/* ============================================================================
   ACF Club - public website. Implements web/design.md: 3-tier tokens (light+dark),
   small motion vocabulary, WCAG-AA, mobile-first. Components use semantic vars only.
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url("tokens.css");

/* ---- reset + base ---- */
* { box-sizing:border-box; }
html { scroll-behavior:smooth; -webkit-text-size-adjust:100%; }
body {
  margin:0; background:var(--bg-canvas); color:var(--text-primary);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  font-size:16px; line-height:1.6; -webkit-font-smoothing:antialiased;
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
h1,h2,h3,h4 { color:var(--text-primary); line-height:1.15; letter-spacing:-.02em; margin:0; font-weight:800; }
p { margin:0; color:var(--text-secondary); }
a { color:var(--primary); text-decoration:none; }
img { max-width:100%; display:block; }
.wrap { max-width:var(--wrap); margin:0 auto; padding:0 20px; }
.eyebrow { color:var(--accent-text); font-weight:700; text-transform:uppercase; letter-spacing:.09em; font-size:12.5px; }
.section { padding:72px 0; }
.section.tight { padding:48px 0; }
.section-head { max-width:680px; margin:0 auto 40px; text-align:center; }
.section-head h2 { font-size:clamp(26px,4vw,38px); }
.section-head p { margin-top:12px; font-size:17px; }
.skip-link { position:absolute; left:-9999px; top:0; background:var(--primary); color:var(--on-primary); padding:10px 16px; border-radius:0 0 var(--r) 0; z-index:100; }
.skip-link:focus { left:0; }
:focus-visible { outline:3px solid var(--focus); outline-offset:2px; border-radius:4px; }

/* ---- buttons ---- */
.btn { display:inline-flex; align-items:center; gap:8px; justify-content:center; font:inherit; font-weight:600;
  padding:12px 20px; border-radius:var(--r); border:1px solid transparent; cursor:pointer; transition:background var(--dur-fast),transform var(--dur-fast),box-shadow var(--dur-fast); text-decoration:none; }
.btn:active { transform:scale(.985); }
.btn-primary { background:var(--primary); color:var(--on-primary); box-shadow:var(--shadow-sm); }
.btn-primary:hover { background:var(--primary-hover); }
.btn-secondary { background:var(--bg-surface); color:var(--text-primary); border-color:var(--border-strong); }
.btn-secondary:hover { background:var(--bg-surface-2); }
.btn-ghost { background:transparent; color:var(--text-primary); }
.btn-ghost:hover { background:var(--bg-surface-2); }
.btn-lg { padding:14px 26px; font-size:17px; }

/* ---- header ---- */
.site-header { position:sticky; top:0; z-index:50; background:color-mix(in srgb, var(--bg-surface) 86%, transparent);
  backdrop-filter:saturate(180%) blur(10px); border-bottom:1px solid var(--border); }
.site-header .bar { display:flex; align-items:center; gap:16px; height:64px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:800; color:var(--text-primary); }
.brand .logo { width:34px; height:34px; border-radius:9px; background:linear-gradient(135deg,var(--blue-500),var(--blue-700)); color:#fff; display:grid; place-items:center; font-size:19px; box-shadow:var(--shadow-sm); }
.nav { display:flex; gap:6px; margin-left:8px; }
.nav a { color:var(--text-secondary); font-weight:500; font-size:14.5px; padding:8px 11px; border-radius:var(--r-sm); transition:color var(--dur-fast),background var(--dur-fast); }
.nav a:hover,.nav a[aria-current="page"] { color:var(--text-primary); background:var(--bg-surface-2); }
.header-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
.icon-btn { width:38px; height:38px; border-radius:10px; border:1px solid var(--border); background:var(--bg-surface); color:var(--text-secondary); display:grid; place-items:center; cursor:pointer; transition:background var(--dur-fast),color var(--dur-fast); }
.icon-btn:hover { background:var(--bg-surface-2); color:var(--text-primary); }
.icon-btn svg { width:18px; height:18px; }
.hamburger { display:none; }

/* app launcher dropdown */
.launcher { position:relative; }
.launcher-menu { position:absolute; right:0; top:48px; width:300px; background:var(--bg-overlay); border:1px solid var(--border);
  border-radius:var(--r-lg); box-shadow:var(--shadow-lg); padding:8px; opacity:0; transform:translateY(-6px); pointer-events:none;
  transition:opacity var(--dur-base) var(--ease),transform var(--dur-base) var(--ease); }
.launcher.open .launcher-menu { opacity:1; transform:translateY(0); pointer-events:auto; }
.launcher-item { display:flex; align-items:center; gap:12px; padding:10px; border-radius:var(--r); color:var(--text-primary); }
.launcher-item:hover { background:var(--bg-surface-2); }
.launcher-item .tile { width:38px; height:38px; border-radius:10px; display:grid; place-items:center; flex:none; }
.launcher-item small { color:var(--text-muted); display:block; font-weight:400; }
.tile.blue{background:var(--blue-50);color:var(--blue-500);} .tile.emerald{background:#ecfdf5;color:#059669;}
.tile.amber{background:var(--accent-bg);color:var(--accent);} .tile.navy{background:var(--bg-surface-2);color:var(--text-primary);}
:root[data-theme="dark"] .tile.blue{background:#16223c;} :root[data-theme="dark"] .tile.emerald{background:#0f2a20;}

/* mobile nav sheet */
.mobile-sheet { position:fixed; inset:64px 0 auto 0; background:var(--bg-surface); border-bottom:1px solid var(--border);
  padding:12px 20px 20px; display:none; flex-direction:column; gap:4px; box-shadow:var(--shadow-md); z-index:49; }
.mobile-sheet.open { display:flex; }
.mobile-sheet a { color:var(--text-primary); padding:11px 8px; border-radius:var(--r-sm); font-weight:600; }
.mobile-sheet a:hover { background:var(--bg-surface-2); }

/* ---- hero ---- */
.hero { position:relative; padding:84px 0 64px; text-align:center; background:var(--hero-grad); }
.hero h1 { font-size:clamp(34px,6.2vw,60px); margin-top:14px; }
.hero h1 .hl { color:var(--primary); }
.hero .lede { font-size:clamp(17px,2.4vw,21px); color:var(--text-secondary); max-width:620px; margin:18px auto 0; }
.hero-cta { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-top:28px; }
.trust-strip { display:flex; gap:10px 22px; justify-content:center; flex-wrap:wrap; margin-top:30px; color:var(--text-muted); font-size:13.5px; font-weight:600; }
.trust-strip span { display:inline-flex; align-items:center; gap:7px; }
.trust-strip svg { width:16px; height:16px; color:var(--success); }
.hero-compact { padding:56px 0 24px; text-align:center; background:var(--hero-grad); }
.hero-compact h1 { font-size:clamp(28px,5vw,44px); }
.hero-compact p { max-width:600px; margin:14px auto 0; font-size:18px; }

/* ---- generic cards / grids ---- */
.grid { display:grid; gap:20px; }
.grid-3 { grid-template-columns:repeat(3,1fr); }
.grid-2 { grid-template-columns:repeat(2,1fr); }
.card { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:24px; box-shadow:var(--shadow-sm); }
.feature { background:var(--bg-surface); border:1px solid var(--border); border-top:4px solid var(--primary); border-radius:var(--r-lg);
  padding:26px; box-shadow:var(--shadow-sm); transition:transform var(--dur-base) var(--ease),box-shadow var(--dur-base) var(--ease); display:block; color:inherit; }
.feature:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); }
.feature.amber{border-top-color:var(--accent);} .feature.emerald{border-top-color:#059669;} .feature.navy{border-top-color:var(--text-primary);}
.feature .tile { width:48px; height:48px; border-radius:12px; display:grid; place-items:center; margin-bottom:16px; }
.feature .tile svg { width:25px; height:25px; }
.feature h3 { font-size:19px; margin-bottom:8px; }
.feature p { font-size:15px; }
.feature .more { display:inline-flex; align-items:center; gap:5px; color:var(--primary); font-weight:600; margin-top:14px; font-size:14.5px; }

/* step flow */
.steps { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; counter-reset:step; }
.step { position:relative; padding:22px; background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--r-lg); box-shadow:var(--shadow-sm); }
.step .n { width:34px; height:34px; border-radius:50%; background:var(--primary); color:var(--on-primary); display:grid; place-items:center; font-weight:800; margin-bottom:12px; }
.step h4 { font-size:16px; margin-bottom:6px; } .step p { font-size:14px; }

/* impact / stat row */
.impact { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; text-align:center; }
.stat { padding:18px; }
.stat .num { font-size:clamp(34px,6vw,52px); font-weight:800; color:var(--primary); letter-spacing:-.03em; }
.stat .num.give { color:var(--accent); }
.stat .lbl { color:var(--text-secondary); font-weight:600; margin-top:4px; }

/* allocation diagram */
.alloc { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:26px; box-shadow:var(--shadow-sm); }
.alloc .bar { display:flex; height:46px; border-radius:var(--r); overflow:hidden; border:1px solid var(--border); }
.alloc .seg { display:grid; place-items:center; color:#fff; font-weight:700; font-size:13px; }
.alloc .seg.base { background:var(--primary); flex:65; }
.alloc .seg.rest { background:var(--bg-surface-2); color:var(--text-secondary); flex:35; }
.alloc .seg.bonus { background:var(--accent); flex:10; }
.alloc .note { color:var(--text-muted); font-size:13px; margin-top:12px; }

/* reward matrix table */
.matrix { width:100%; border-collapse:collapse; background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--r-lg); overflow:hidden; }
.matrix th,.matrix td { text-align:left; padding:13px 15px; border-bottom:1px solid var(--border); font-size:14.5px; }
.matrix th { background:var(--bg-surface-2); color:var(--text-secondary); font-weight:700; }
.matrix tr:last-child td { border-bottom:0; }

/* compliance callout */
.callout { display:flex; gap:13px; align-items:flex-start; background:var(--accent-bg); border:1px solid color-mix(in srgb,var(--accent) 35%,transparent);
  border-radius:var(--r-lg); padding:18px 20px; color:var(--text-primary); }
.callout svg { width:22px; height:22px; color:var(--accent); flex:none; margin-top:1px; }
.callout p { color:var(--text-secondary); font-size:14.5px; }
.callout strong { color:var(--text-primary); }

/* doc status rows + badges */
.row { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--border); }
.row:last-child { border-bottom:0; }
.row .k { color:var(--text-secondary); font-size:14.5px; }
.row .v { flex:none; display:inline-flex; align-items:center; }
.row .v svg { width:18px; height:18px; }
.row.kv .k { flex:none; }
.row.kv .v.kv-val { flex:1 1 auto; min-width:0; justify-content:flex-end; text-align:right; color:var(--text-primary); font-weight:600; overflow-wrap:anywhere; }
.badge { display:inline-block; padding:3px 11px; border-radius:999px; font-size:11.5px; font-weight:700; background:var(--bg-surface-2); color:var(--text-secondary); }
.badge.draft{background:var(--accent-bg);color:var(--accent);} .badge.dark{background:#1f2937;color:#e5e7eb;}

/* faq accordion */
.faq-item { border:1px solid var(--border); border-radius:var(--r); margin-bottom:10px; background:var(--bg-surface); overflow:hidden; }
.faq-q { width:100%; text-align:left; background:none; border:0; padding:16px 18px; font:inherit; font-weight:600; color:var(--text-primary); cursor:pointer; display:flex; justify-content:space-between; gap:12px; align-items:center; }
.faq-q .chev { transition:transform var(--dur-base) var(--ease); flex:none; color:var(--text-muted); }
.faq-item.open .chev { transform:rotate(180deg); }
.faq-a { display:grid; grid-template-rows:0fr; transition:grid-template-rows var(--dur-base) var(--ease); }
.faq-item.open .faq-a { grid-template-rows:1fr; }
.faq-a > div { overflow:hidden; }
.faq-a p { padding:0 18px 16px; font-size:14.5px; }

/* CTA band + footer */
.cta-band { background:linear-gradient(135deg,var(--blue-700),var(--blue-500)); color:#fff; border-radius:var(--r-xl); padding:44px; text-align:center; }
.cta-band h2 { color:#fff; font-size:clamp(24px,4vw,34px); } .cta-band p { color:#dbe7fe; margin-top:10px; }
.cta-band .hero-cta { margin-top:24px; }
.cta-band .btn-primary { background:#fff; color:var(--blue-700); } .cta-band .btn-primary:hover { background:#eef4ff; }
.cta-band .btn-secondary { background:transparent; color:#fff; border-color:rgba(255,255,255,.5); }
/* ---- member QR card mock ---- */
.qr-card { background:linear-gradient(135deg,var(--blue-700),var(--blue-500)); color:#fff; border-radius:var(--r-xl); padding:26px; box-shadow:var(--shadow-md); max-width:360px; margin:0 auto; }
.qr-card .qc-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.qr-card .qc-brand { display:flex; align-items:center; gap:8px; font-weight:800; letter-spacing:.01em; }
.qr-card .qc-brand .logo { width:30px; height:30px; border-radius:8px; background:rgba(255,255,255,.18); display:grid; place-items:center; font-weight:800; }
.qr-card .qc-tag { font-size:12px; color:#dbe7fe; text-align:right; max-width:120px; }
.qr-card .qc-qr { width:132px; height:132px; background:#fff; border-radius:14px; padding:11px; margin:20px auto; }
.qr-card .qc-qr svg { width:100%; height:100%; color:var(--blue-700); }
.qr-card .qc-name { font-size:19px; font-weight:700; }
.qr-card .qc-meta { font-size:12.5px; color:#dbe7fe; margin-top:3px; font-variant-numeric:tabular-nums; }
.qr-card .qc-cause { margin-top:16px; padding-top:14px; border-top:1px solid rgba(255,255,255,.22); font-size:13px; color:#dbe7fe; display:flex; justify-content:space-between; gap:12px; }
.qr-card .qc-cause strong { color:#fff; font-weight:700; }

/* ---- forms ---- */
.form { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:26px; box-shadow:var(--shadow-sm); }
.field { margin-bottom:16px; }
.field label { display:block; font-size:14px; font-weight:600; color:var(--text-primary); margin-bottom:6px; }
.field input, .field select, .field textarea { width:100%; font:inherit; font-size:15px; color:var(--text-primary); background:var(--bg-canvas); border:1px solid var(--border); border-radius:var(--r); padding:11px 13px; transition:border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease); }
.field input:focus, .field select:focus, .field textarea:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 22%,transparent); }
.field textarea { min-height:120px; resize:vertical; }
.form .btn { width:100%; }
.form-status { margin-top:16px; padding:13px 15px; border-radius:var(--r); font-size:14.5px; background:var(--blue-50); border:1px solid color-mix(in srgb,var(--primary) 30%,transparent); color:var(--text-secondary); }
.form-status[hidden] { display:none; }
.form-note { font-size:13px; color:var(--text-muted); margin-top:14px; }

.site-footer { border-top:1px solid var(--border); background:var(--bg-surface); margin-top:24px; }
.site-footer .cols { display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:28px; padding:48px 0 28px; }
.site-footer h5 { font-size:13px; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); margin:0 0 12px; }
.site-footer a { display:block; color:var(--text-secondary); padding:5px 0; font-size:14.5px; }
.site-footer a:hover { color:var(--text-primary); }
.site-footer .legal { border-top:1px solid var(--border); padding:18px 0; color:var(--text-muted); font-size:12.5px; display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }

/* ============================================================================
   Interactive polish: allocation calculator, rewards directory, FAQ search
   ============================================================================ */

/* ---- allocation calculator ---- */
.calc { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:26px 28px; box-shadow:var(--shadow-sm); }
.calc-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; }
.calc-fee { font-size:clamp(30px,5.5vw,44px); font-weight:800; color:var(--primary); letter-spacing:-.03em; font-variant-numeric:tabular-nums; line-height:1; }
.calc-fee .lbl { display:block; font-size:12.5px; font-weight:700; color:var(--text-muted); letter-spacing:.04em; text-transform:uppercase; margin-bottom:6px; }
.calc-presets { display:flex; gap:8px; flex-wrap:wrap; }
.chip { font:inherit; font-size:14px; font-weight:600; padding:7px 15px; border-radius:999px; border:1px solid var(--border-strong); background:var(--bg-surface); color:var(--text-secondary); cursor:pointer; transition:background var(--dur-fast),color var(--dur-fast),border-color var(--dur-fast),transform var(--dur-fast); }
.chip:hover { background:var(--bg-surface-2); color:var(--text-primary); }
.chip:active { transform:scale(.96); }
.chip[aria-pressed="true"] { background:var(--primary); border-color:var(--primary); color:var(--on-primary); }
.calc-slider { -webkit-appearance:none; appearance:none; width:100%; height:8px; border-radius:999px; background:var(--bg-surface-2); margin:22px 0 4px; cursor:pointer; }
.calc-slider::-webkit-slider-thumb { -webkit-appearance:none; appearance:none; width:24px; height:24px; border-radius:50%; background:var(--primary); border:3px solid var(--bg-surface); box-shadow:var(--shadow-md); cursor:pointer; }
.calc-slider::-moz-range-thumb { width:21px; height:21px; border-radius:50%; background:var(--primary); border:3px solid var(--bg-surface); box-shadow:var(--shadow-md); cursor:pointer; }
.calc-slider:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.calc-scale { display:flex; justify-content:space-between; color:var(--text-muted); font-size:12px; font-variant-numeric:tabular-nums; }
.calc-bar { display:flex; height:52px; border-radius:var(--r); overflow:hidden; border:1px solid var(--border); margin:20px 0 6px; }
.calc-bar .seg { display:grid; place-items:center; color:#fff; font-weight:700; font-size:13px; min-width:0; padding:0 4px; white-space:nowrap; overflow:hidden; transition:flex-grow var(--dur-slow) var(--ease); }
.calc-bar .seg.cause { background:var(--primary); }
.calc-bar .seg.bonus { background:var(--accent); }
.calc-bar .seg.rest { background:var(--bg-surface-2); color:var(--text-secondary); }
.calc-rows { margin-top:14px; }
.calc-row { display:flex; align-items:center; gap:11px; padding:11px 0; border-bottom:1px solid var(--border); }
.calc-row:last-child { border-bottom:0; }
.calc-row .dot { width:13px; height:13px; border-radius:4px; flex:none; }
.calc-row .dot.cause { background:var(--primary); } .calc-row .dot.bonus { background:var(--accent); } .calc-row .dot.rest { background:var(--bg-surface-2); border:1px solid var(--border-strong); }
.calc-row .k { color:var(--text-secondary); font-size:14.5px; }
.calc-row .amt { margin-left:auto; font-weight:700; color:var(--text-primary); font-variant-numeric:tabular-nums; font-size:15px; }
.calc-row .pct { color:var(--text-muted); font-weight:600; font-size:12.5px; min-width:42px; text-align:right; font-variant-numeric:tabular-nums; }
.calc-row.total { margin-top:4px; border-top:2px solid var(--border); border-bottom:0; padding-top:14px; }
.calc-row.total .k { color:var(--text-primary); font-weight:700; font-size:15.5px; }
.calc-row.total .amt { color:var(--accent-text); font-size:18px; font-weight:800; }
.calc-row[hidden] { display:none; }
.calc-toggle { display:flex; gap:12px; align-items:flex-start; margin-top:18px; padding:14px 16px; border-radius:var(--r); background:var(--bg-surface-2); border:1px solid var(--border); cursor:pointer; transition:border-color var(--dur-fast); }
.calc-toggle:hover { border-color:var(--border-strong); }
.calc-toggle input { margin:2px 0 0; width:19px; height:19px; accent-color:var(--accent); flex:none; cursor:pointer; }
.calc-toggle .tl { font-weight:600; color:var(--text-primary); font-size:14.5px; }
.calc-toggle small { display:block; color:var(--text-muted); margin-top:3px; font-size:13px; }
.calc-note { color:var(--text-muted); font-size:13px; margin-top:14px; }

/* ---- rewards directory preview ---- */
.dir-controls { display:flex; gap:14px; flex-wrap:wrap; align-items:center; justify-content:space-between; margin-bottom:20px; }
.dir-filters { display:flex; gap:8px; flex-wrap:wrap; }
.dir-search { position:relative; flex:1 1 220px; max-width:340px; }
.dir-search input { width:100%; font:inherit; font-size:14.5px; color:var(--text-primary); background:var(--bg-surface); border:1px solid var(--border); border-radius:999px; padding:10px 16px 10px 40px; transition:border-color var(--dur-base),box-shadow var(--dur-base); }
.dir-search input:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 22%,transparent); }
.dir-search svg { position:absolute; left:14px; top:50%; transform:translateY(-50%); width:17px; height:17px; color:var(--text-muted); pointer-events:none; }
.dir-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.perk { background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--r-lg); padding:18px 19px; box-shadow:var(--shadow-sm); display:flex; flex-direction:column; gap:7px; transition:transform var(--dur-base) var(--ease),box-shadow var(--dur-base) var(--ease); }
.perk:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); }
.perk-top { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.perk h4 { font-size:16px; } .perk .suburb { font-size:12.5px; color:var(--text-muted); margin-top:2px; display:flex; align-items:center; gap:5px; }
.perk .suburb svg { width:13px; height:13px; flex:none; }
.perk .cat { font-size:11px; font-weight:700; padding:3px 10px; border-radius:999px; background:var(--blue-50); color:var(--primary); flex:none; }
:root[data-theme="dark"] .perk .cat { background:#16223c; }
.perk-offer { font-weight:700; color:var(--text-primary); font-size:14.5px; margin-top:3px; }
.perk-loyalty { font-size:13px; color:var(--text-secondary); display:flex; gap:7px; align-items:flex-start; }
.perk-loyalty svg { width:15px; height:15px; flex:none; color:var(--success); margin-top:1px; }
.perk .tierbadge { align-self:flex-start; margin-top:4px; font-size:11px; font-weight:700; padding:3px 10px; border-radius:999px; background:var(--bg-surface-2); color:var(--text-secondary); }
.perk .tierbadge.paid { background:var(--accent-bg); color:var(--accent-text); }
.dir-empty { display:none; text-align:center; color:var(--text-muted); padding:30px; grid-column:1/-1; }

/* ---- FAQ search ---- */
.faq-search { position:relative; margin-bottom:12px; }
.faq-search input { width:100%; font:inherit; font-size:15.5px; color:var(--text-primary); background:var(--bg-surface); border:1px solid var(--border); border-radius:var(--r); padding:14px 16px 14px 46px; transition:border-color var(--dur-base),box-shadow var(--dur-base); }
.faq-search input:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 22%,transparent); }
.faq-search svg { position:absolute; left:16px; top:50%; transform:translateY(-50%); width:19px; height:19px; color:var(--text-muted); pointer-events:none; }
.faq-count { font-size:13px; color:var(--text-muted); margin:0 2px 16px; }
.faq-item[hidden] { display:none; }
.faq-empty { display:none; text-align:center; color:var(--text-muted); padding:24px; }
mark { background:color-mix(in srgb,var(--accent) 32%,transparent); color:inherit; border-radius:3px; padding:0 2px; }

/* ---- motion: reveal (honour reduced-motion) ---- */
.reveal { opacity:0; transform:translateY(16px); }
.reveal.in { opacity:1; transform:none; transition:opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  .reveal { opacity:1 !important; transform:none !important; transition:none !important; }
  .feature, .btn, * { transition:none !important; }
}

/* ---- responsive ---- */
@media (max-width:900px){
  .nav { display:none; } .hamburger { display:grid; }
  .brand span { white-space:nowrap; }
  .header-actions .btn-primary { display:none; }   /* "Join free" lives in the mobile sheet */
  .grid-3,.steps,.impact { grid-template-columns:1fr; }
  .grid-2 { grid-template-columns:1fr; }
  #home-apps { grid-template-columns:1fr 1fr !important; }
  .cta-band { padding:32px 22px; }
  .site-footer .cols { grid-template-columns:1fr 1fr; gap:20px; }
  .section { padding:52px 0; }
  .dir-grid { grid-template-columns:1fr 1fr; }
  .dir-controls { flex-direction:column; align-items:stretch; }
  .dir-search { max-width:none; }
}
@media (max-width:560px){
  .site-footer .cols { grid-template-columns:1fr; }
  .hero { padding:60px 0 44px; }
  /* stack the allocation bar so 3-segment labels never clip on phones */
  .alloc .bar { flex-direction:column; height:auto; }
  .alloc .seg { flex:none !important; width:100%; justify-content:flex-start; padding:11px 14px; font-size:13px; }
  /* stack key/value rows (label above value) so long values never clip */
  .row.kv { flex-direction:column; align-items:flex-start; gap:2px; }
  .row.kv .v.kv-val { justify-content:flex-start; text-align:left; }
  .dir-grid { grid-template-columns:1fr; }
  .calc { padding:22px 20px; }
  /* keep the calculator bar readable on phones: stack segments with labels */
  .calc-bar { flex-direction:column; height:auto; }
  .calc-bar .seg { width:100%; justify-content:flex-start; padding:10px 14px; min-height:38px; }
}


/* ---- landing front door (Agent G, round 4) ------------------------------- */
/* narrow column used inside a .wrap for callouts, the calculator and the FAQ */
.narrow { max-width:680px; margin:24px auto 0; }
.narrow + .narrow { margin-top:20px; }
/* small centred "read more" link under a landing section */
.section-link { text-align:center; margin-top:24px; font-size:14.5px; font-weight:600; }
/* returning-user line in the hero: present, but never the dominant element */
.portal-note { margin-top:20px; font-size:14px; color:var(--text-muted); }
.portal-note a { font-weight:600; text-decoration:underline; text-underline-offset:3px; }
.portal-title { font-size:clamp(20px,2.6vw,26px); }
/* compact portal chooser row for people who already have an account */
.portal-row { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; }
.portal-row a { display:inline-flex; align-items:center; padding:9px 18px; border-radius:999px;
  border:1px solid var(--border); background:var(--bg-surface); color:var(--text-secondary);
  font-size:14px; font-weight:600; transition:border-color var(--dur-fast), color var(--dur-fast); }
.portal-row a:hover { border-color:var(--border-strong); color:var(--text-primary); }
@media (max-width:560px){
  .portal-row { flex-direction:column; align-items:stretch; text-align:center; }
  .portal-row a { justify-content:center; }
}
