/* ==========================================================================
   WhatPays — grayscale design system

   Deliberately monochrome. The product's claim is that it reports numbers
   honestly; colour used decoratively reads as persuasion. Hierarchy comes
   from weight, size and rule-lines instead. Semantic states (data tier,
   lifecycle) are encoded with fill + border style, never hue, so they read
   identically in greyscale print and to colour-blind readers.

   Serif display + sans UI = statistical-publication register, not SaaS.
   Bootstrap is NOT loaded; this file is the whole system.
   ========================================================================== */

:root {
  /* Ink ramp — the entire palette. */
  --ink:      #14161a;
  --graphite: #2f3338;
  --slate:    #565c63;
  --steel:    #767d85;
  --silver:   #9aa1a9;
  --mist:     #c7ccd1;
  --fog:      #e2e5e8;
  --haze:     #eef0f2;
  --paper:    #f7f8f9;
  --white:    #ffffff;

  --rule:       var(--fog);
  --rule-heavy: var(--mist);

  --font-display: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 68ch;
  --shell: 1120px;
  --shell-wide: 1320px;

  --step-1: clamp(.82rem, .8rem + .1vw, .875rem);
  --step0:  clamp(1rem, .97rem + .15vw, 1.0625rem);
  --step1:  clamp(1.15rem, 1.1rem + .25vw, 1.3rem);
  --step2:  clamp(1.4rem, 1.3rem + .5vw, 1.75rem);
  --step3:  clamp(1.75rem, 1.55rem + .9vw, 2.4rem);
  --step4:  clamp(2.1rem, 1.7rem + 1.9vw, 3.4rem);
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-size: var(--step0);
  line-height: 1.62;
  color: var(--graphite);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.011em;
  line-height: 1.18;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: var(--step4); letter-spacing: -0.022em; }
h2 { font-size: var(--step3); }
h3 { font-size: var(--step2); }
h4 { font-size: var(--step1); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--slate); }

strong, b { font-weight: 650; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
img, svg { max-width: 100%; height: auto; }
::selection { background: var(--ink); color: var(--white); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Numbers must line up in every table and stat block. */
.num, table td, table th, .stat__figure, .data { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- layout -- */

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: 1.25rem; }
.shell--wide { max-width: var(--shell-wide); }
.shell--narrow { max-width: 760px; }

.section { padding-block: clamp(2.75rem, 5vw, 4.5rem); }
.section--tight { padding-block: clamp(1.75rem, 3vw, 2.75rem); }
.section--ruled { border-top: 1px solid var(--rule); }
.section--paper { background: var(--paper); border-block: 1px solid var(--rule); }

.prose { max-width: var(--measure); }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.15rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--silver); }

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }
/* 420px floor keeps this a true 2-up inside the 1120px shell rather than
   collapsing to 3 + 1 orphan at desktop widths. */
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* --------------------------------------------------------------- type -- */

.eyebrow {
  font-family: var(--font-ui);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--steel); margin: 0 0 1rem;
}
.lede { font-size: var(--step1); line-height: 1.5; color: var(--slate); max-width: 62ch; }
.muted { color: var(--steel); }
.small { font-size: var(--step-1); }
.tiny  { font-size: .78rem; line-height: 1.5; color: var(--steel); }

/* --------------------------------------------------------------- nav --- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--white);
  position: sticky; top: 0; z-index: 60;
}
.masthead__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 62px; }

.brand {
  font-family: var(--font-display);
  font-size: 1.32rem; font-weight: 650;
  letter-spacing: -0.02em; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand__mark { color: var(--silver); font-weight: 400; }

.navwrap { display: contents; }
.navlinks { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.navlinks--end { margin-left: auto; gap: 1rem; }

.navlink {
  font-size: .925rem; font-weight: 500; color: var(--slate);
  text-decoration: none; padding-block: .3rem;
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.navlink:hover { color: var(--ink); }
.navlink.is-active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

.navtoggle {
  display: none; margin-left: auto; background: none;
  border: 1px solid var(--rule-heavy); padding: .45rem .6rem; cursor: pointer; line-height: 0;
}
.navtoggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); margin: 3px 0; }

@media (max-width: 900px) {
  .navtoggle { display: block; }
  .masthead__inner { flex-wrap: wrap; }
  .navwrap {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    gap: .25rem; padding-block: .5rem 1rem; border-top: 1px solid var(--rule); margin-top: .5rem;
  }
  .navwrap.is-open { display: flex; }
  .navlinks { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
  .navlinks--end { margin-left: 0; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid var(--rule); align-items: stretch; }
  .navlink { display: block; width: 100%; padding-block: .55rem; border-bottom: 0; }
  .navlink.is-active { border-bottom: 0; }
}

/* ------------------------------------------------------------ buttons -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-ui); font-size: .935rem; font-weight: 550; line-height: 1;
  padding: .78rem 1.35rem; border: 1px solid var(--ink); border-radius: 2px;
  cursor: pointer; text-decoration: none;
  transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.btn--solid { background: var(--ink); color: var(--white); }
.btn--solid:hover { background: var(--graphite); border-color: var(--graphite); color: var(--white); }
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--quiet { background: transparent; color: var(--slate); border-color: var(--rule-heavy); }
.btn--quiet:hover { color: var(--ink); border-color: var(--ink); }
.btn--sm { padding: .5rem .85rem; font-size: .85rem; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* -------------------------------------------------------------- hero --- */

.hero { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); }
.hero h1 { max-width: 21ch; }
.hero .lede { margin-top: 1.1rem; }
.hero .btn-row { margin-top: 2rem; }

/* ------------------------------------------------------- stat figures -- */

.stat { border-top: 2px solid var(--ink); padding-top: .9rem; }
.stat__figure {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.4rem + 1.9vw, 2.9rem);
  font-weight: 600; line-height: 1.02; color: var(--ink);
  letter-spacing: -0.025em; display: block;
}
.stat__label { margin-top: .5rem; font-size: .9rem; color: var(--slate); line-height: 1.45; }
.stat__source { margin-top: .5rem; font-size: .74rem; color: var(--steel); }
.stat--minor { border-top-color: var(--rule-heavy); }
.stat--minor .stat__figure { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.05rem); color: var(--graphite); }

/* ------------------------------------------------------------- cards --- */

.card { border: 1px solid var(--rule); padding: 1.5rem; background: var(--white); display: flex; flex-direction: column; }
.card--paper { background: var(--paper); }
.card__title { font-size: var(--step1); margin-bottom: .5rem; }
.card__body { color: var(--slate); font-size: .95rem; }
.card__foot { margin-top: auto; padding-top: 1rem; }

/* Numbered explainer steps (how-it-works / how-to). Semantic <ol>, no HowTo
   schema — Google removed HowTo rich results, so the markup would be cost
   with zero eligibility. */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 3.25rem; padding-bottom: 1.9rem; margin: 0; }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -0.1rem;
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 600;
  color: var(--silver); border-top: 2px solid var(--ink);
  padding-top: .35rem; min-width: 2.25rem;
}
.steps > li:last-child { padding-bottom: 0; }
.steps h3 { font-size: var(--step1); margin-bottom: .35rem; }
.steps p { color: var(--slate); font-size: .95rem; margin-bottom: 0; }

/* ------------------------------------------------------------ badges --- */

.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  font-family: var(--font-ui); font-size: .7rem; font-weight: 650;
  letter-spacing: .07em; text-transform: uppercase;
  padding: .22rem .5rem; border: 1px solid var(--rule-heavy);
  border-radius: 2px; color: var(--slate); white-space: nowrap;
}
/* Data-confidence tiers: fill/stroke, never hue. */
.badge--tier-a { background: var(--ink); color: var(--white); border-color: var(--ink); }
.badge--tier-b { background: var(--white); color: var(--ink); border-color: var(--ink); }
.badge--tier-c { background: var(--white); color: var(--steel); border-style: dashed; }
.badge--dead { text-decoration: line-through; color: var(--steel); }

/* ------------------------------------------------------------ tables --- */

.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data caption { text-align: left; font-size: .78rem; color: var(--steel); padding-bottom: .6rem; }
table.data th {
  text-align: left; font-weight: 600; font-size: .74rem;
  letter-spacing: .07em; text-transform: uppercase; color: var(--steel);
  border-bottom: 1px solid var(--ink); padding: .5rem .75rem .5rem 0; white-space: nowrap;
}
table.data td { padding: .7rem .75rem .7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data tbody tr:hover { background: var(--paper); }
table.data .align-r { text-align: right; padding-right: 0; }

/* --------------------------------------------------------------- FAQ --- */

.faq { border-top: 1px solid var(--ink); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q {
  width: 100%; display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1.5rem; text-align: left; background: none; border: 0; padding: 1.15rem 0;
  cursor: pointer; font-family: var(--font-display); font-size: var(--step1);
  font-weight: 600; color: var(--ink); line-height: 1.3; list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q:hover { color: var(--slate); }
.faq__sign { flex: none; font-family: var(--font-ui); font-size: 1.15rem; color: var(--silver); line-height: 1.4; }
.faq__item[open] .faq__sign { color: var(--ink); }
.faq__a { padding: 0 0 1.4rem; max-width: var(--measure); color: var(--slate); }
.faq__a p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ callout -- */

.callout {
  border-left: 3px solid var(--ink); background: var(--paper);
  padding: 1.15rem 1.35rem; margin: 1.75rem 0; font-size: .95rem;
}
.callout__title {
  font-family: var(--font-ui); font-size: .72rem; font-weight: 650;
  letter-spacing: .12em; text-transform: uppercase; color: var(--steel); margin-bottom: .45rem;
}
.callout--quiet { border-left-color: var(--mist); }

/* ------------------------------------------------------------- forms --- */

.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink); margin-bottom: .38rem; }
.field .hint { font-size: .78rem; color: var(--steel); margin-top: .35rem; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], select, textarea, .input {
  width: 100%; font-family: inherit; font-size: .95rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--rule-heavy);
  border-radius: 2px; padding: .65rem .8rem;
}
input:focus, select:focus, textarea:focus, .input:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--haze);
}
textarea { min-height: 8rem; resize: vertical; }

.form-card {
  border: 1px solid var(--rule); padding: clamp(1.5rem, 3vw, 2.25rem);
  max-width: 460px; margin-inline: auto; background: var(--white);
}
.form-card h1 { font-size: var(--step2); }

.alert {
  border: 1px solid var(--rule-heavy); border-left: 3px solid var(--ink);
  padding: .8rem 1rem; font-size: .9rem; margin-bottom: 1.25rem; background: var(--paper);
}

/* ------------------------------------------------------------ pricing -- */

.plan { border: 1px solid var(--rule); padding: 1.75rem 1.5rem; display: flex; flex-direction: column; }
.plan--featured { border: 1px solid var(--ink); box-shadow: 4px 4px 0 var(--haze); }
.plan__name {
  font-family: var(--font-ui); font-size: .74rem; font-weight: 650;
  letter-spacing: .12em; text-transform: uppercase; color: var(--steel); margin-bottom: .9rem;
}
.plan__price {
  font-family: var(--font-display); font-size: 2.5rem; font-weight: 600;
  color: var(--ink); line-height: 1; letter-spacing: -0.025em;
}
.plan__per { font-size: .85rem; color: var(--steel); font-family: var(--font-ui); font-weight: 400; }
.plan__list { list-style: none; margin: 1.4rem 0; padding: 0; font-size: .92rem; }
.plan__list li { padding: .45rem 0 .45rem 1.4rem; position: relative; border-bottom: 1px solid var(--haze); color: var(--slate); }
.plan__list li::before { content: "—"; position: absolute; left: 0; color: var(--silver); }
.plan .btn { margin-top: auto; }

/* ------------------------------------------------------------- footer -- */

.footer {
  border-top: 1px solid var(--rule); background: var(--paper);
  padding-block: clamp(2.5rem, 4vw, 3.5rem) 1.75rem; margin-top: auto; font-size: .9rem;
}
.footer__grid {
  display: grid; gap: 2rem;
  grid-template-columns: minmax(220px, 1.6fr) repeat(auto-fit, minmax(140px, 1fr));
  padding-bottom: 2rem;
}
.footer__blurb { color: var(--slate); font-size: .875rem; max-width: 38ch; margin-top: .7rem; }
.footer h2 {
  font-family: var(--font-ui); font-size: .72rem; font-weight: 650;
  letter-spacing: .12em; text-transform: uppercase; color: var(--steel); margin: 0 0 .85rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .5rem; }
.footer a { color: var(--slate); text-decoration: none; }
.footer a:hover { color: var(--ink); text-decoration: underline; }
.footer__base {
  border-top: 1px solid var(--rule-heavy); padding-top: 1.25rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  color: var(--steel); font-size: .82rem;
}

.langpick {
  font-family: inherit; font-size: .85rem; color: var(--slate);
  background: var(--white); border: 1px solid var(--rule-heavy);
  border-radius: 2px; padding: .35rem 1.6rem .35rem .55rem; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--steel) 50%), linear-gradient(135deg, var(--steel) 50%, transparent 50%);
  background-position: calc(100% - 13px) 50%, calc(100% - 9px) 50%;
  background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
}
.langpick:focus { outline: none; border-color: var(--ink); }

/* --------------------------------------------------------- utilities -- */

.stack > * + * { margin-top: 1rem; }
.stack--lg > * + * { margin-top: 1.75rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: var(--white); padding: .7rem 1.1rem; }
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .masthead, .footer, .btn-row, .navtoggle { display: none; }
  body { color: #000; font-size: 11pt; }
  a { text-decoration: none; }
}
