/* ── The public website (WP-32) ───────────────────────────────────────────────
 *
 * One stylesheet for the server-rendered public pages (src/site/): home,
 * About, Features and plans, the sample households and the register-interest
 * replies. No web fonts, no images but the real brand assets, no script.
 *
 * The brand pair is the shared one (public/js/shared/brand.js, app.css
 * --brand-navy / --brand-gold; tests/wp32-front-door.test.js holds them
 * equal). Gold on navy is about 6.4:1; gold is never a fill under white text.
 * Light and dark follow the visitor's system setting. Text tokens are
 * checked for at least 4.5:1 on their surfaces in both themes by the same
 * test. Laid out for a 375px phone first.
 * ──────────────────────────────────────────────────────────────────────────── */

:root {
  --brand-navy: #101c30;
  --brand-gold: #c9962e;
  --brand-gold-bright: #e8c766;
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #1a2233;
  --muted: #4a5870;
  --border: #d9d4c8;
  --link: #1d4ed8;
  --band-alt: #efece4;
  --premium: #7a5a12;
  --free: #1f6b45;
  --note-bg: #fff7e6;
  --note-border: #c9962e;
  --focus: #1d4ed8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1523;
    --surface: #161f33;
    --text: #f1f5f9;
    --muted: #a7b4c8;
    --border: #2d3a52;
    --link: #93c5fd;
    --band-alt: #121a2c;
    --premium: #e8c766;
    --free: #86efac;
    --note-bg: #2a2413;
    --note-border: #c9962e;
    --focus: #e8c766;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
h1 { font-size: 2rem; line-height: 1.2; margin: 1.5rem 0 .75rem; }
h2 { font-size: 1.45rem; line-height: 1.3; margin: 0 0 .75rem; }
h3, .h3 { font-size: 1.1rem; line-height: 1.35; margin: 0 0 .35rem; }
p, li { max-width: 70ch; }
.small { font-size: .9rem; color: var(--muted); }
.muted { color: var(--muted); }
.lead { font-size: 1.15rem; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--text); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Header: the navy band, in both themes ─────────────────────────────────── */
.site-header { background: var(--brand-navy); border-bottom: 3px solid var(--brand-gold); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #ffffff; text-decoration: none; font-weight: 700; font-size: 1.1rem; min-height: 44px; }
.site-header a:focus-visible { outline-color: var(--brand-gold-bright); }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.nav-list a { color: #e8eef7; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--brand-gold-bright); text-decoration: underline; }
.nav-list .btn { color: var(--brand-navy); }
.nav-list .btn:hover { color: var(--brand-navy); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 10px 18px; border-radius: 8px; border: 2px solid var(--brand-gold);
  background: var(--brand-gold); color: var(--brand-navy); font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--brand-gold-bright); border-color: var(--brand-gold-bright); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface); border-color: var(--brand-gold); }
.btn-small { min-height: 40px; padding: 6px 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.25rem 0; }

/* ── Sections ──────────────────────────────────────────────────────────────── */
.hero { padding: 1.5rem 0 2rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; font-weight: 700; color: var(--muted); margin: 1rem 0 0; }
.points, .cards { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
.points li, .cards li {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand-gold);
  border-radius: 8px; padding: 14px 16px; max-width: none;
}
.points p, .cards p { margin: 0; }
.band { padding: 2rem 0; }
.band-alt { background: var(--band-alt); }
.two-col { display: grid; gap: 24px; grid-template-columns: 1fr; }
.ticks { padding-left: 1.2em; }
.ticks li { margin: .35rem 0; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px 16px; margin: 1.25rem 0; }
.plans { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 1rem 0; }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.plan-premium { border-top: 4px solid var(--brand-gold); }
.not-advice { border-left: 4px solid var(--brand-gold); padding-left: 12px; }
.placeholder { background: var(--note-bg); border: 1px dashed var(--note-border); border-radius: 8px; padding: 10px 14px; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.field { margin: .75rem 0; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field input {
  width: 100%; max-width: 420px; min-height: 44px; padding: 8px 10px; font: inherit;
  color: var(--text); background: var(--bg); border: 2px solid var(--muted); border-radius: 6px;
}
.check { display: flex; gap: 10px; align-items: flex-start; margin: .75rem 0 1rem; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; }
.form-error { color: #b42318; font-weight: 600; }
@media (prefers-color-scheme: dark) { .form-error { color: #fca5a5; } }

/* ── Features table ────────────────────────────────────────────────────────── */
.area { margin: 2rem 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--border); }
thead th { font-size: .9rem; color: var(--muted); }
.features th[scope="row"] { width: 32%; }
.within, .for-whom { display: block; font-weight: 400; font-size: .85rem; color: var(--muted); }
.for-whom { display: inline; }
.tier { display: inline-block; font-size: .85rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; }
.tier-free { color: var(--free); }
.tier-premium { color: var(--premium); }

/* ── Sample households ─────────────────────────────────────────────────────── */
.sample-banner { background: var(--note-bg); border-bottom: 2px solid var(--note-border); padding: 10px 0; }
.switcher { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 8px; }
.switcher a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 2px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--text); }
.switcher a[aria-current="page"] { border-color: var(--brand-gold); font-weight: 700; }
.tiles { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; max-width: none; }
.tile-label { display: block; font-size: .85rem; color: var(--muted); font-weight: 600; }
.tile-value { display: block; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-note { display: block; font-size: .8rem; color: var(--muted); }
.bridge { border-left: 4px solid var(--brand-gold); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines caption { text-align: left; font-weight: 700; padding: 8px 0; }
.lines tfoot th, .lines tfoot td, tfoot th, tfoot td { font-weight: 700; }
.income-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.site-footer { margin-top: 3rem; padding: 2rem 0; border-top: 1px solid var(--border); font-size: .95rem; }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }

@media (max-width: 480px) {
  table { font-size: .9rem; }
  th, td { padding: 8px 4px; }
  .num { white-space: normal; }
}

@media (min-width: 720px) {
  h1 { font-size: 2.5rem; }
  .points { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .cards-tight { grid-template-columns: 1fr; }
  .two-col, .plans, .income-grid { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
}
