/* FundRadar - editorial design system v1: calm canvas, cobalt actions, teal indicators, navy editorial bands.
   One stylesheet for every page. The older token names (--paper, --card, --green, --wheat...) are kept as aliases
   so the signed-in app picks up the new system without changes to its markup. */
:root {
  color-scheme: light;
  /* design tokens */
  --canvas: #f7f9fc; --paper-alt: #f0f4f9; --surface: #ffffff;
  --ink: #122036; --ink-soft: #25364f; --muted: #61718a;
  --line: #dfe6ef; --line-2: #cdd7e4;
  --brand: #335fe8; --brand-hover: #274fd1; --on-brand: #ffffff; --brand-soft: #e8eefd;
  --teal: #2bcbbb; --teal-ink: #137a70; --teal-soft: #ddf6f2; --focus: #1a9e91;
  --navy: #0b1d38; --navy-2: #122947; --on-navy: #ffffff; --navy-muted: #c9d7e8; --navy-line: #34506b;
  --alert: #ab5c1d; --alert-soft: #fbefe3; --danger: #b23a2b; --danger-soft: #fbe6e2;
  --shadow: 0 1px 2px rgba(10, 31, 64, .05), 0 10px 30px rgba(10, 31, 64, .06);
  --shadow-lg: 0 22px 70px rgba(10, 31, 64, .09);
  --radius-sm: 12px; --radius: 20px; --radius-lg: 30px;
  --max: 1240px; --gutter: clamp(20px, 4vw, 54px);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  /* aliases used by the app, admin and older markup */
  --paper: var(--canvas); --card: var(--surface);
  --green: var(--brand); --green-2: var(--brand-hover); --green-soft: var(--brand-soft); --on-green: var(--on-brand);
  --wheat: var(--alert); --wheat-soft: var(--alert-soft); --red: var(--danger); --red-soft: var(--danger-soft);
  --blue: var(--teal-ink); --blue-soft: var(--teal-soft); --r: var(--radius);
}
/* Light for everyone by default; dark only when someone turns it on (theme.js sets data-theme="dark"). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #081426; --paper-alt: #14263d; --surface: #101f33;
  --ink: #f5f8ff; --ink-soft: #e1e9f5; --muted: #b0bfd1;
  --line: #2b3e57; --line-2: #3a506d;
  --brand: #7f9cff; --brand-hover: #a7bbff; --on-brand: #081426; --brand-soft: #1b2d52;
  --teal: #45d7c7; --teal-ink: #6fe3d6; --teal-soft: #153d3e; --focus: #45d7c7;
  --navy: #050e1b; --navy-2: #10233d; --navy-line: #2b4560;
  --alert: #f0a868; --alert-soft: #3a2a1c; --danger: #f08a7a; --danger-soft: #3d221e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 400 16px/1.62 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 { line-height: 1.12; margin: 0; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
p { margin: .5rem 0; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--max), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.narrow { width: min(640px, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr:focus { position: fixed; left: 14px; top: 10px; width: auto; height: auto; clip: auto; z-index: 100; padding: 10px 16px; background: var(--brand); color: var(--on-brand); border-radius: 10px; }
[hidden] { display: none !important; }

/* eyebrow: tiny uppercase label with a teal dot */
.eyebrow, .kick { display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .15em; color: var(--brand); line-height: 1.3; margin: 0; }
.eyebrow::before, .kick::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--teal); border-radius: 50%; }
.on-navy .eyebrow { color: var(--teal); }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--canvas) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 21px; letter-spacing: -.05em; line-height: 1; }
.brand:hover { color: var(--ink); }
.brand svg { width: 36px; height: 36px; flex: none; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.navlinks { display: flex; align-items: center; gap: 26px; margin-right: 10px; }
.navlinks a { color: var(--ink-soft); font-weight: 650; font-size: 14px; text-decoration: none; }
.navlinks a:hover, .navlinks a[aria-current=page] { color: var(--brand); }
#nav-app a:not(.btn) { color: var(--ink-soft); font-weight: 650; font-size: 14px; text-decoration: none; padding: 8px 10px; }
#nav-app a:not(.btn):hover { color: var(--brand); }
.icon-btn { flex: none; display: inline-grid; place-items: center; width: 41px; height: 41px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; padding: 0; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: block; }
:root[data-theme="dark"] .icon-btn .i-moon { display: none; }
.menu-toggle { display: none; }
@media (max-width: 860px) {
  .top .wrap { min-height: 68px; gap: 12px; }
  .menu-toggle { display: inline-grid; }
  .navlinks { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); padding: 10px var(--gutter) 18px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); }
  .navlinks.is-open { display: flex; }
  .navlinks a { padding: 12px 4px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .navlinks a:last-child { border-bottom: 0; }
  .top nav .btn.outline { display: none; }
}
@media (max-width: 420px) { .brand { font-size: 19px; } .brand svg { width: 32px; height: 32px; } .top nav .btn.small { padding: 10px 14px; } }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  background: var(--brand); color: var(--on-brand); font: 750 14px/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .2s, border-color .2s, color .2s; }
.btn:hover { background: var(--brand-hover); color: var(--on-brand); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost, .btn.outline { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover, .btn.outline:hover { background: var(--paper-alt); color: var(--ink); border-color: var(--line-2); }
.btn.white { background: #fff; color: #11233b; }
.btn.white:hover { background: #e9f2ff; color: #11233b; }
.btn.on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn.on-dark:hover { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .6); }
.btn.small { min-height: 40px; padding: 10px 18px; font-size: 14px; }
.btn.big { min-height: 52px; padding: 15px 24px; font-size: 15px; }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn .arr { font-size: 17px; line-height: 1; }
.linkish { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.text-link { font-weight: 800; color: var(--brand); font-size: 14px; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
label.f { display: grid; gap: 6px; font-weight: 650; font-size: 14px; color: var(--ink-soft); }
label.f span.hint { font-weight: 400; color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 400 15px var(--font); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.msg { padding: 12px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 600; font-size: 14px; }
.msg.ok { background: var(--teal-soft); color: var(--teal-ink); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card h2 { font-size: 20px; margin-bottom: 10px; }

/* home: hero */
.hero { padding: clamp(56px, 8vw, 116px) 0 80px; overflow: hidden; }
.hero-layout { display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: clamp(28px, 5vw, 76px); }
.hero h1 { font-size: clamp(54px, 6.75vw, 106px); letter-spacing: -.075em; line-height: .99; margin: 24px 0 24px; max-width: 760px; }
.hero h1 .accent { color: var(--brand); }
.lede { font-size: clamp(17px, 1.55vw, 20px); line-height: 1.62; color: var(--muted); max-width: 590px; margin: 0; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 30px 0 18px; }
.small-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 13px; font-weight: 650; color: var(--muted); margin: 0; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); flex: none; }

/* home: the radar scene (navy panel with the live canvas sweep) */
.radar-scene { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; min-height: 540px; padding: 26px; border-radius: var(--radius-lg); overflow: hidden; isolation: isolate;
  background: linear-gradient(148deg, #122947, #0b1d38 75%); color: #fff; box-shadow: 0 38px 90px rgba(11, 29, 56, .22); }
.radar-scene::after { content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%; right: -130px; bottom: -180px; z-index: -1; background: radial-gradient(circle, rgba(48, 207, 190, .12), transparent 70%); }
.radar-top, .radar-bottom { display: flex; justify-content: space-between; align-items: center; gap: 14px; font-size: 12px; color: #bccde4; letter-spacing: .04em; }
.radar-bottom { font-size: 11px; text-transform: uppercase; color: #c8d8ea; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px; background: #1c3756; border: 1px solid #35506d; font-size: 11px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: #e1ecfa; }
.radar-stage { display: grid; place-items: center; min-height: 0; }
.radar { position: relative; width: min(400px, 100%); aspect-ratio: 1; border-radius: 50%; }
.radar canvas { display: block; width: 100%; height: 100%; border-radius: 50%; }
.radar-tags { position: absolute; inset: 0; pointer-events: none; }
.radar::before, .radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; z-index: -1; opacity: 0; border: 1px solid rgba(69, 215, 199, .45); animation: radar-wave 6.5s cubic-bezier(.15, .55, .35, 1) infinite; }
.radar::after { animation-delay: 3.25s; }
@keyframes radar-wave { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(1.35); opacity: 0; } }
.radar-tag { --dx: 13px; position: absolute; transform: translate(var(--dx), -30%); opacity: 0; white-space: nowrap;
  padding: 7px 11px; border-radius: 12px; font-size: 12px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; color: #162339;
  background: rgba(246, 250, 255, .97); border: 1px solid #e2e9f2; box-shadow: 0 12px 34px rgba(2, 15, 34, .35);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .3, 1); }
.radar-tag::before { content: "Match"; display: block; font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #17856d; margin-bottom: 2px; }
.radar-tag.to-left { --dx: calc(-100% - 13px); }
.radar-tag.on { opacity: 1; transform: translate(var(--dx), -50%); }
.radar-read { margin: 0; font-size: 12px; color: #c8d8ea; }
.radar-read b { color: #fff; font-weight: 700; }
.radar-live { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--teal); vertical-align: .1em; animation: radar-live 1.6s ease-in-out infinite; }
@keyframes radar-live { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .radar::before, .radar::after, .radar-live { animation: none; } .radar-tag { transition: none; } }

/* home: stats strip */
.stats-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 28px 32px; border-right: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat b { display: block; font-size: 32px; letter-spacing: -.055em; line-height: 1.15; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stats-note { font-size: 12px; color: var(--muted); padding: 10px 0 0; margin: 0; }

/* home: sections */
.section { padding: 110px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 36px; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(38px, 4.7vw, 69px); letter-spacing: -.06em; line-height: 1.02; max-width: 760px; margin: 16px 0 0; }
.section-head p { max-width: 380px; margin: 0 0 6px; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.step { display: flex; flex-direction: column; min-height: 300px; padding: 32px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-lg); transition: transform .2s, box-shadow .2s; }
.step:hover, .audience-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-no { color: var(--brand); font-weight: 750; font-size: 13px; }
.step-ill { display: grid; place-items: center; width: 72px; height: 72px; margin: 20px 0 28px; border-radius: 22px; background: var(--paper-alt); color: var(--brand); }
.step-ill svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.step h3 { font-size: 27px; letter-spacing: -.045em; margin: 0 0 10px; }
.step p { font-size: 15px; margin: 0; color: var(--muted); }
.audience-section { background: var(--paper-alt); }
.audience-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; }
.audience-card { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; min-height: 250px; padding: 31px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.audience-card:hover { color: var(--ink); }
.audience-card.tint-teal { background: #e5f8f4; color: #132f33; border-color: #cdeee7; }
.audience-card.tint-blue { background: #dce6ff; color: #15264b; border-color: #c9d6fb; }
:root[data-theme="dark"] .audience-card.tint-teal { background: #12343a; color: #e6faf6; border-color: #1f4a50; }
:root[data-theme="dark"] .audience-card.tint-blue { background: #1a2b52; color: #e7eeff; border-color: #2a3f6c; }
.audience-card h3 { font-size: clamp(24px, 2.9vw, 36px); letter-spacing: -.05em; margin: 0 0 12px; }
.audience-card p { color: inherit; opacity: .75; font-size: 15px; max-width: 400px; margin: 0; }
.audience-top { display: flex; justify-content: space-between; gap: 18px; font-size: 12px; font-weight: 800; color: var(--brand); }
.audience-card.tint-teal .audience-top, .audience-card.tint-teal .audience-bottom { color: #146b62; }
.audience-card.tint-blue .audience-top, .audience-card.tint-blue .audience-bottom { color: #2a4bc2; }
:root[data-theme="dark"] .audience-card.tint-teal .audience-top, :root[data-theme="dark"] .audience-card.tint-teal .audience-bottom { color: #7fe8dc; }
:root[data-theme="dark"] .audience-card.tint-blue .audience-top, :root[data-theme="dark"] .audience-card.tint-blue .audience-bottom { color: #a9bdff; }
.audience-bottom { font-size: 13px; font-weight: 800; color: var(--brand); }
.trust { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.trust::after { content: ""; position: absolute; right: -260px; top: 80px; width: 640px; height: 640px; border: 1px solid #294969; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 80px transparent, 0 0 0 90px #29496933, 0 0 0 170px transparent, 0 0 0 180px #29496922; }
.trust-layout { position: relative; z-index: 2; display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; }
.trust h2 { font-size: clamp(40px, 4.5vw, 65px); letter-spacing: -.06em; line-height: 1.02; margin: 18px 0 20px; max-width: 760px; }
.trust p { color: var(--navy-muted); }
.trust-list { border-top: 1px solid var(--navy-line); list-style: none; margin: 0; padding: 0; }
.trust-item { display: grid; grid-template-columns: 36px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--navy-line); }
.trust-check { color: var(--teal); }
.trust-check svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.trust-item h3 { font-size: 21px; letter-spacing: -.03em; margin: 0 0 6px; }
.trust-item p { font-size: 14px; margin: 0; }
.cta-band { background: var(--brand); color: #fff; padding: 85px 0; }
:root[data-theme="dark"] .cta-band { background: #2a4fc8; }
.cta-layout { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.cta-layout h2 { font-size: clamp(40px, 5vw, 75px); letter-spacing: -.06em; line-height: 1.02; max-width: 720px; margin: 14px 0 0; }
.cta-band .eyebrow { color: #e3e9ff; }
.cta-band .eyebrow::before { background: #7ff0e2; }
.cta-band p { color: #e3e9ff; }

/* footer */
.foot { background: var(--canvas); border-top: 1px solid var(--line); padding: 56px 0 30px; color: var(--muted); font-size: 14px; }
.foot-main { display: grid; grid-template-columns: 1.7fr .8fr .8fr; gap: 60px; padding-bottom: 56px; }
.foot-main p { max-width: 340px; margin: 14px 0 0; }
.foot-label { font-size: 12px; color: var(--muted); font-weight: 850; letter-spacing: .1em; text-transform: uppercase; margin: 6px 0 16px; }
.foot-links { display: grid; gap: 10px; font-weight: 600; }
.foot-links a, .foot-links .linkish { color: var(--ink-soft); text-decoration: none; text-align: left; font-weight: 600; }
.foot-links a:hover, .foot-links .linkish:hover { color: var(--brand); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 12px; }
.foot-bottom p { margin: 0; }

/* auth */
.auth { padding: clamp(40px, 6vw, 76px) 0 110px; }
.auth-wrap { width: min(980px, calc(100% - 2 * var(--gutter))); margin: 0 auto; display: grid; grid-template-columns: .95fr 1.05fr; border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.auth-promo { display: flex; flex-direction: column; min-height: 520px; padding: 46px; background: var(--navy); color: #fff; }
.auth-promo h2 { font-size: clamp(32px, 3.4vw, 42px); letter-spacing: -.055em; line-height: 1.05; margin: 40px 0 18px; }
.auth-promo p { color: var(--navy-muted); }
.auth-promo ul { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 14px; color: #e5edf8; font-size: 15px; }
.auth-promo li { display: flex; gap: 10px; align-items: flex-start; }
.auth-promo li svg { flex: none; width: 18px; height: 18px; margin-top: 3px; fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.auth-panel { padding: 46px; }
.auth-panel .stack h1 { font-size: 32px; letter-spacing: -.05em; }
.auth-note { font-size: 12px; color: var(--muted); margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.auth-solo { width: min(560px, calc(100% - 2 * var(--gutter))); margin: 0 auto; }
.auth-solo .card { padding: 40px; border-radius: var(--radius-lg); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--paper-alt); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 26px; }
.tabs button { min-height: 42px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 700 14px var(--font); cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.stack { display: grid; gap: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--brand); flex: none; }

/* home and auth: responsive */
@media (max-width: 1024px) {
  .hero h1 { font-size: clamp(50px, 6.3vw, 76px); }
  .radar-scene { min-height: 480px; }
  .section { padding: 85px 0; }
  .trust-layout { gap: 38px; }
}
@media (max-width: 860px) {
  .hero { padding: 48px 0 60px; }
  .hero-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(50px, 10vw, 84px); }
  .section-head { display: block; }
  .section-head p { margin-top: 18px; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .step-ill { margin: 12px 0 18px; }
  .trust-layout { grid-template-columns: 1fr; }
  .cta-layout { display: block; }
  .cta-layout .btn { margin-top: 24px; }
  .stat { padding: 24px 16px; }
  .stat b { font-size: 26px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-promo { min-height: 0; }
  .auth-promo h2 { margin-top: 26px; }
  .auth-promo ul { margin-top: 28px; }
  .foot-main { grid-template-columns: 1fr 1fr; gap: 34px; }
  .foot-main > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: clamp(44px, 12.5vw, 64px); }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; }
  .radar-scene { min-height: 0; padding: 18px; border-radius: 23px; }
  .radar-tag { font-size: 10.5px; padding: 5px 8px; --dx: 9px; }
  .radar-tag.to-left { --dx: calc(-100% - 9px); }
  .radar-tag::before { font-size: 8px; }
  .radar-bottom { font-size: 10px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat, .stat:first-child { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 0; }
  .stat:last-child { border-bottom: 0; }
  .section { padding: 70px 0; }
  .audience-grid { grid-template-columns: 1fr; }
  .audience-card { min-height: 0; padding: 26px; }
  .auth-panel, .auth-promo { padding: 30px 24px; }
  .auth-solo .card { padding: 28px 22px; }
  .foot-bottom { display: block; }
  .foot-bottom p { margin-bottom: 8px; }
}

/* survey */
.survey { padding: 2rem 0 4rem; }
.sv-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; color: var(--muted); font-size: .92rem; }
.sv-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin-bottom: 1.5rem; }
.sv-bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .3s; }
.sv-q h1 { font-size: clamp(1.5rem, 3.6vw, 2rem); margin-bottom: .4rem; }
.sv-help { color: var(--muted); margin: 0 0 1.2rem; }
.opts { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.opt { position: relative; display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--card); cursor: pointer; transition: border-color .12s, background .12s; }
.opt:hover { border-color: var(--green); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .box { flex: none; width: 1.25rem; height: 1.25rem; margin-top: .1rem; border: 2px solid var(--line-2); border-radius: 6px; display: grid; place-items: center; }
.opt input[type=radio] + .box { border-radius: 50%; }
.opt input:checked + .box { background: var(--green); border-color: var(--green); }
.opt input:checked + .box::after { content: ""; width: .5rem; height: .5rem; border-radius: 2px; background: var(--on-green); }
.opt input[type=radio]:checked + .box::after { border-radius: 50%; }
.opt input:focus-visible + .box { outline: 3px solid var(--wheat); outline-offset: 2px; }
.opt:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.opt b { display: block; font-weight: 500; }
.opt small { display: block; color: var(--muted); font-size: .86rem; margin-top: .1rem; }
.sv-sub { margin-top: 1rem; padding: 1rem; border-radius: 12px; background: var(--card); border: 1px dashed var(--line-2); }
.sv-sub h2 { font-size: 1rem; margin-bottom: .6rem; }
.sv-sub .opts { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.sv-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; }
.sv-count { margin-top: 1.4rem; padding: .8rem 1rem; border-radius: 12px; background: var(--wheat-soft); color: var(--ink); font-weight: 500; }
.sv-count b { color: var(--wheat); font-size: 1.15rem; }

/* dashboard */
.dash { padding: 1.6rem 0 4rem; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.dash-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; margin-bottom: 1rem; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1rem; box-shadow: var(--shadow); }
.tile span { display: block; color: var(--muted); font-size: .85rem; }
.tile b { display: block; font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; margin: .1rem 0; }
.tile small { color: var(--muted); font-size: .82rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile.warn b { color: var(--wheat); }
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.up { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.up li button { width: 100%; display: grid; grid-template-columns: 4.2rem 1fr; gap: .8rem; align-items: center; text-align: left; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; cursor: pointer; }
.up li button:hover { border-color: var(--green); }
.up .n { text-align: center; font-weight: 600; font-size: 1.3rem; line-height: 1; color: var(--green); }
.up .n small { display: block; font-size: .7rem; font-weight: 500; color: var(--muted); margin-top: .2rem; }
.up .due .n { color: var(--wheat); }
.up b { display: block; font-weight: 600; }
.up .t small { color: var(--muted); }
.answers { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .35rem; font-size: .92rem; }
.answers li span { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; align-items: center; }
.filters input[type=search] { flex: 1 1 220px; width: auto; }
.filters select { width: auto; flex: 0 1 200px; }
.seg { display: inline-flex; padding: .25rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.seg button { min-height: 38px; padding: 0 .9rem; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: 600 .92rem var(--font); cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
table.gt { width: 100%; border-collapse: collapse; }
.gt th { text-align: left; font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
.gt td { padding: .8rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.gt tr[data-open] { cursor: pointer; }
.gt tr[data-open]:hover td { background: color-mix(in srgb, var(--green-soft) 50%, transparent); }
.gt tr.dim td { opacity: .62; }
.gt td b { display: block; font-weight: 600; }
.gt td small { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.chip { display: inline-block; padding: .1rem .5rem; border-radius: 99px; font-size: .78rem; font-weight: 500; background: var(--green-soft); color: var(--green); }
.chip.flag { background: var(--wheat-soft); color: var(--wheat); }
.chip.miss { background: var(--red-soft); color: var(--red); }
.chip.new { background: var(--blue-soft); color: var(--blue); }
.dl { white-space: nowrap; }
.dl small { display: block; }
.dl.due { color: var(--wheat); font-weight: 600; }
.dl.none, .dl.closed { color: var(--muted); white-space: normal; }
.st { display: inline-block; padding: .15rem .55rem; border-radius: 99px; font-size: .8rem; font-weight: 600; background: var(--paper); border: 1px solid var(--line); white-space: nowrap; }
.st-researching, .st-drafting { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.st-submitted { background: var(--wheat-soft); color: var(--wheat); border-color: transparent; }
.st-awarded { background: var(--green-soft); color: var(--green); border-color: transparent; }
.st-declined, .st-not_fit { color: var(--muted); }
.rowacts { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.gt td.acts { width: 1%; white-space: nowrap; }
.ext { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .6rem; border-radius: 9px; border: 1px solid var(--line-2); color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 500; white-space: nowrap; }
.ext svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
.ext:hover { border-color: var(--green); color: var(--green); }
.skip { padding: .35rem .6rem; border-radius: 9px; border: 0; background: transparent; color: var(--muted); font: 500 .85rem var(--font); cursor: pointer; white-space: nowrap; }
.skip:hover { color: var(--red); background: var(--red-soft); }
.empty { text-align: center; padding: 2rem 1rem; color: var(--muted); }
details.gone summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .6rem; }
details.gone summary::-webkit-details-marker { display: none; }
details.gone summary h2 { margin: 0; }
.gone-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .4rem; }
.gone-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; }
.gone-list li > button:first-child { flex: 1; text-align: left; background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; padding: 0; }
.gone-list small { color: var(--muted); display: block; }

/* detail panel */
.shade { position: fixed; inset: 0; background: rgba(10, 14, 12, .45); z-index: 40; }
.pane { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: 41; background: var(--card); border-left: 1px solid var(--line); overflow-y: auto; padding: 1.4rem 1.4rem 3rem; box-shadow: -10px 0 40px rgba(0, 0, 0, .15); }
.pane header { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: .6rem; }
.pane h2 { font-size: 1.45rem; }
.pane h3 { font-size: 1rem; margin: 1.5rem 0 .6rem; }
.pane .kicker { color: var(--muted); font-size: .9rem; margin: 0 0 .2rem; }
.x { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.facts { display: grid; grid-template-columns: 7.5rem 1fr; gap: .45rem 1rem; margin: 1rem 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; }
.pform { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.pform .wide { grid-column: 1 / -1; }
.saved { min-height: 1.4rem; color: var(--green); font-size: .9rem; font-weight: 500; margin: .4rem 0 0; }
.saved.bad { color: var(--red); }
.hist { list-style: none; padding: 0; margin: 0; font-size: .9rem; color: var(--muted); }
.paneacts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
body.lock { overflow: hidden; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--paper); padding: .75rem 1rem; border-radius: 12px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }
.toast .linkish { color: var(--wheat); margin-left: .5rem; }

/* menu */
.menu { position: relative; }
.menu > button { display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .3rem .8rem; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: 500 .95rem var(--font); cursor: pointer; max-width: 220px; }
.menu > button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu ul { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; list-style: none; margin: 0; padding: .35rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 30; }
.menu li a, .menu li button { display: block; width: 100%; text-align: left; padding: .55rem .7rem; border-radius: 8px; border: 0; background: none; color: var(--ink); font: 400 .95rem var(--font); text-decoration: none; cursor: pointer; }
.menu li a:hover, .menu li button:hover { background: var(--paper); }


/* admin */
.bars { display: grid; gap: .35rem; }
.bar { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr 2.5rem; gap: .6rem; align-items: center; font-size: .9rem; }
.bar i { display: block; height: .7rem; border-radius: 99px; background: var(--green); min-width: 2px; }
.bar b { text-align: right; font-weight: 600; }
.admin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1rem; }
.scroll { overflow-x: auto; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2rem; }
  .steps, .who { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles .tile:last-child { grid-column: 1 / -1; }
  .cols, .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .steps, .who, .why-list { grid-template-columns: 1fr; }
  .top nav a.hide-sm { display: none; }
  .gt thead { display: none; }
  .gt, .gt tbody, .gt tr, .gt td { display: block; width: 100%; }
  .gt tr { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; margin-bottom: .6rem; background: var(--card); }
  .gt td { border: 0; padding: .2rem 0; }
  .gt td[data-l]:not([data-l=Program])::before { content: attr(data-l) ": "; color: var(--muted); font-size: .85rem; }
  .gt td.acts { width: 100%; }
  .rowacts { justify-content: flex-start; padding-top: .4rem; }
  .pform { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: .1rem; }
  .facts dd { margin-bottom: .5rem; }
  .bar { grid-template-columns: 7rem 1fr 2rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* admin: plan picker in the accounts table */
.plan-pick { width: auto; min-width: 9rem; padding: .3rem .5rem; font-size: .9rem; }

/* personal strategy */
.strat { margin-bottom: 1rem; border-left: 4px solid var(--wheat); }
.strat.ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.5rem; border-left-color: var(--line-2); }
.strat.ask h2 { margin-bottom: .2rem; }
.strat.ask p { margin: 0; max-width: 46rem; }
.strat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .3rem 1rem; margin-bottom: .4rem; }
.strat-head h2 { margin: 0; }
.plan { max-width: 46rem; }
.plan p, .plan ul { margin: .55rem 0; }
.plan ul { padding-left: 1.2rem; }
h3.sub { font-size: 1rem; margin: 1.1rem 0 .5rem; }
.strat-picks { counter-reset: pick; max-width: 46rem; }
.strat-picks li button { grid-template-columns: 2rem 1fr; }
.strat-picks li button::before { counter-increment: pick; content: counter(pick); font-weight: 600; color: var(--wheat); text-align: center; font-size: 1.1rem; }
.ask { white-space: pre-wrap; }
/* admin: one person's view */
.qa { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: .45rem 1rem; margin: 0; }
.qa dt { color: var(--muted); font-size: .9rem; }
.qa dd { margin: 0; }
.picks { margin: .3rem 0 0; padding-left: 1.3rem; display: grid; gap: .35rem; }
.picks li span { margin-right: .6rem; }
.picks .linkish { margin-right: .6rem; }
.fb-text { font-weight: 500; white-space: pre-wrap; }
@media (max-width: 640px) { .qa { grid-template-columns: 1fr; gap: .1rem; } .qa dd { margin-bottom: .5rem; } }

/* filters in Everything */
.fbar { margin: -.2rem 0 1rem; padding: .7rem; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--paper); }
.fpills { display: flex; flex-wrap: wrap; gap: .45rem; }
.fpill { position: relative; }
.fpill summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; min-height: 36px; padding: 0 .75rem; border: 1px solid var(--line-2);
  border-radius: 99px; background: var(--card); font-size: .88rem; color: var(--muted); user-select: none; }
.fpill summary::-webkit-details-marker { display: none; }
.fpill summary b { color: var(--ink); font-weight: 600; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpill summary::after { content: ""; width: .4rem; height: .4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: .15rem; }
.fpill[open] summary { border-color: var(--green); color: var(--green); }
.fpill .pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 240px; max-width: min(340px, 86vw); max-height: 320px; overflow: auto;
  padding: .7rem .8rem; display: grid; gap: .45rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow), 0 12px 30px rgba(0, 0, 0, .12); }
.fpill .pop .check { font-size: .92rem; }
.factions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .7rem; }
.factions .btn { margin-left: auto; }
.factions .saved { margin: 0; flex-basis: 100%; text-align: right; }
@media (max-width: 640px) { .fpill { position: static; } .fpills { position: relative; } .fpill .pop { left: 0; right: 0; max-width: none; } .factions .btn { margin-left: 0; } .factions .saved { text-align: left; } }

/* feedback */
.fb-btn { position: fixed; right: 16px; bottom: 16px; z-index: 30; min-height: 40px; padding: 0 1rem; border: 1px solid var(--line-2); border-radius: 99px;
  background: var(--card); color: var(--ink); font: 600 .9rem var(--font); box-shadow: var(--shadow); cursor: pointer; }
.fb-btn:hover { border-color: var(--green); color: var(--green); }
body.lock .fb-btn { display: none; }
.fb-dlg { width: min(460px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.fb-dlg::backdrop { background: rgba(10, 20, 15, .45); }
.fb-dlg h2 { font-size: 1.2rem; }
.fb-dlg textarea { min-height: 120px; }

/* list tabs: counts, and a 2 x 2 grid on phones */
.seg .count { display: inline-block; min-width: 1.4rem; margin-left: .25rem; padding: 0 .35rem; border-radius: 99px; background: var(--line); color: var(--muted); font-size: .78rem; line-height: 1.35rem; text-align: center; }
.seg button[aria-pressed=true] .count { background: var(--green-soft); color: var(--green); }
@media (max-width: 640px) { .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } .seg button { padding: 0 .5rem; } }

/* Track button on each row */
.trk { padding: .35rem .65rem; border-radius: 9px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: 600 .85rem var(--font); cursor: pointer; white-space: nowrap; }
.trk:hover { border-color: var(--green); color: var(--green); }
.trk.on { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.st-interested { border-color: var(--green); color: var(--green); }

/* add to calendar */
.cal { position: relative; }
.cal summary { list-style: none; cursor: pointer; }
.cal summary::-webkit-details-marker { display: none; }
.cal summary svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.cal[open] summary { border-color: var(--green); color: var(--green); }
.cal .pop { position: absolute; z-index: 25; top: calc(100% + 6px); right: 0; width: 240px; padding: .5rem; display: grid; gap: .2rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow), 0 12px 30px rgba(0, 0, 0, .12); text-align: left; }
.cal .pop a, .cal .pop button { display: block; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 500 .9rem var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.cal .pop a:hover, .cal .pop button:hover { background: var(--green-soft); color: var(--green); }
.cal .pop small { padding: .2rem .6rem .1rem; }
.cal.wide .pop { left: 0; right: auto; }
.paneline { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; margin: .8rem 0; }
@media (max-width: 640px) { .rowacts .cal .pop { left: 0; right: auto; } }

/* admin viewing someone's account */
.viewas { background: var(--wheat-soft); border-bottom: 1px solid var(--line-2); color: var(--ink); font-size: .9rem; }
.viewas .wrap { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; justify-content: space-between; padding: .55rem 0; }

/* AI application plan */
.aiplan { margin: 1.2rem 0; padding: 1rem 1.1rem; border: 1px solid var(--line); border-left: 4px solid var(--wheat); border-radius: 12px; background: var(--paper); }
.aiplan h3 { margin: 0 0 .5rem; }
.aiplan h4 { margin: 1rem 0 .35rem; font-size: .95rem; }
.aiplan ul { margin: 0; padding-left: 1.2rem; display: grid; gap: .25rem; }
.aiplan .fit { margin: 0 0 .4rem; }
.aiplan .fit-strong b { color: var(--green); }
.aiplan .fit-possible b { color: var(--wheat); }
.aiplan .fit-unlikely b { color: var(--red); }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.tl li { display: grid; grid-template-columns: 7.5rem 1fr; gap: .7rem; }
.tl li b { font-weight: 600; color: var(--green); }
.spin { display: inline-block; width: .9rem; height: .9rem; margin-right: .4rem; vertical-align: -.1em; border: 2px solid var(--line-2); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
@media (max-width: 480px) { .tl li { grid-template-columns: 1fr; gap: .1rem; } }


/* public program pages: browse, country pages and program details */
.page-hero { padding: clamp(48px, 6vw, 76px) 0 46px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.page-hero h1 { font-size: clamp(42px, 5.65vw, 79px); letter-spacing: -.065em; line-height: 1.01; max-width: 980px; margin: 18px 0 18px; }
.page-hero .lede { max-width: 880px; font-size: 17px; }
.page-hero .msg { max-width: 880px; margin: 0 0 18px; }
.pg-countries { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; margin: 6px 0 0; }
.pg-countries a { display: grid; gap: 2px; padding: 15px 17px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s; }
.pg-countries a:hover, .pg-countries a[aria-current=page] { border-color: var(--brand); transform: translateY(-2px); }
.pg-countries b { font-weight: 750; letter-spacing: -.02em; }
.pg-countries span { font-size: 12px; color: var(--muted); font-weight: 600; }

.catalog-layout { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 26px; align-items: start; padding-bottom: 100px; }
.cat-filters { position: sticky; top: 96px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-height: calc(100vh - 116px); overflow: auto; }
.cat-filters h2 { font-size: 20px; letter-spacing: -.04em; margin: 0 0 4px; }
.field-label { display: block; font-size: 12px; font-weight: 800; color: var(--ink-soft); margin: 18px 0 8px; }
.cat-filters input[type=search], .cat-filters select { background: var(--canvas); font-size: 14px; }
.filter-options { display: grid; gap: 8px; }
.filter-options label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); cursor: pointer; line-height: 1.35; }
.filter-options input { accent-color: var(--brand); width: 16px; height: 16px; margin-top: 1px; flex: none; }
.filter-options .n { color: var(--muted); font-size: 12px; margin-left: auto; padding-left: 6px; }
.cat-filters .linkish { font-size: 13px; margin-top: 16px; }
.catalog-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 16px; }
.catalog-bar strong { font-size: 17px; letter-spacing: -.02em; }
.catalog-bar span { color: var(--muted); font-size: 13px; }
.pg-group { margin: 0 0 34px; scroll-margin-top: 96px; }
.pg-group > h2 { display: flex; align-items: baseline; gap: 8px; font-size: 22px; letter-spacing: -.04em; margin: 0 0 14px; }
.pg-group > h2 .muted { font-size: 14px; font-weight: 600; letter-spacing: 0; }
.grant-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.grant-card { position: relative; padding: 24px 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, transform .2s; }
.grant-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.grant-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-weight: 760; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.grant-meta span + span::before { content: "\00b7"; margin-right: 12px; color: var(--line-2); }
.grant-meta .urgent { color: var(--alert); }
.grant-card h3 { font-size: 23px; letter-spacing: -.045em; line-height: 1.2; margin: 10px 0 6px; }
.grant-card h3 a { color: var(--ink); text-decoration: none; }
.grant-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }   /* whole card is the link */
.grant-card h3 a:focus-visible { outline: none; }
.grant-card:has(h3 a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.grant-card p { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.grant-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.grant-amount { font-size: 15px; font-weight: 850; letter-spacing: -.01em; }
.grant-foot .text-link { flex: none; }
.empty-state { padding: 38px; border: 1px dashed var(--line-2); border-radius: var(--radius); text-align: center; color: var(--muted); }
.catalog-note { border-radius: var(--radius-sm); font-size: 13px; padding: 14px 17px; background: var(--paper-alt); color: var(--muted); margin: 8px 0 0; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); align-items: start; gap: 32px; padding-bottom: 110px; }
.detail-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; margin-bottom: 18px; }
.detail-section > h2 { font-size: 27px; letter-spacing: -.045em; margin: 0 0 22px; }
.detail-section p { color: var(--muted); }
.fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 28px; margin: 0; }
.fact-grid div { min-width: 0; }
.fact-grid dt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.fact-grid dd { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; overflow-wrap: anywhere; }
.fact-grid dd.due { color: var(--alert); }
.fact-grid dd small { display: block; font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 3px; }
.fact-wide { grid-column: 1 / -1; }
.fact-stack { display: grid; gap: 20px; margin: 0; }
.fact-stack dt { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.fact-stack dd { margin: 0; color: var(--ink-soft); }
.verify { font-size: 13px; color: var(--muted); line-height: 1.55; padding: 18px 0 0; margin: 0; border-top: 1px solid var(--line); }
.verify svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 6px; fill: none; stroke: var(--teal-ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.detail-aside { position: sticky; top: 96px; }
.aside-card { border-radius: var(--radius); padding: 30px; background: var(--navy); color: #fff; }
.aside-card h2 { font-size: 29px; letter-spacing: -.05em; margin: 12px 0 12px; }
.aside-card p { color: var(--navy-muted); font-size: 14px; }
.aside-card .btn { width: 100%; margin: 8px 0 0; white-space: normal; text-align: center; }
.aside-card .aside-note { font-size: 12px; margin: 18px 0 0; }
.sim-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sim-list .grant-card { padding: 20px 22px; }
.sim-list .grant-card h3 { font-size: 19px; }
.back-link { margin: 6px 0 0; font-weight: 700; }

@media (max-width: 960px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .cat-filters { position: static; max-height: none; }
  .cat-filters .filter-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
}
@media (max-width: 560px) {
  .page-hero h1 { font-size: clamp(38px, 11vw, 52px); }
  .cat-filters .filter-options { grid-template-columns: 1fr; }
  .catalog-bar { flex-direction: column; align-items: flex-start; gap: 4px; }
  .grant-card { padding: 20px; }
  .grant-card h3 { font-size: 20px; }
  .grant-foot { flex-wrap: wrap; }
  .fact-grid { grid-template-columns: 1fr; }
  .detail-section { padding: 24px 20px; }
  .aside-card { padding: 24px 20px; }
}

/* prose pages (privacy, terms, 404) */
.prose { padding: clamp(44px, 6vw, 76px) 0 100px; }
.prose h1 { font-size: clamp(40px, 5vw, 64px); letter-spacing: -.06em; line-height: 1.02; margin: 14px 0 10px; }
.prose h2 { font-size: 22px; letter-spacing: -.035em; margin: 34px 0 8px; }
.prose li { margin: 6px 0; }
.prose p, .prose li { color: var(--ink-soft); }
.prose .muted { color: var(--muted); }

/* signed-in app: carry the shared system through (survey, dashboard, detail panel) */
.survey { padding: clamp(36px, 5vw, 64px) 0 90px; }
.sv-q h1 { font-size: clamp(30px, 4.2vw, 46px); letter-spacing: -.055em; line-height: 1.05; margin-bottom: 10px; }
.sv-bar i { background: var(--brand); }
.opt { border-radius: 14px; border-width: 1px; padding: 15px 16px; }
.opt b { font-weight: 650; }
.sv-sub { border-radius: var(--radius-sm); }
.sv-count { border-radius: var(--radius-sm); background: var(--teal-soft); }
.sv-count b { color: var(--teal-ink); }
.dash { padding: clamp(32px, 4vw, 52px) 0 90px; }
.dash-head h1 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -.055em; line-height: 1.04; }
.tile { border-radius: var(--radius-sm); padding: 16px 18px; }
.tile b { font-size: 28px; letter-spacing: -.05em; font-weight: 750; }
.seg { border-radius: 999px; padding: 4px; }
.seg button { border-radius: 999px; padding: 0 16px; font-weight: 700; }
.up li button { border-radius: var(--radius-sm); }
.pane { border-radius: var(--radius) 0 0 var(--radius); padding: 28px 28px 48px; }
.pane h2 { font-size: 28px; letter-spacing: -.05em; }
.pane .kicker { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.x { border-radius: 50%; }
.ext, .trk, .menu > button, .fpill summary { border-radius: 999px; }
.ext, .trk { padding: 7px 13px; }
.menu > button { padding: 6px 14px; }
.aiplan { border-left-color: var(--brand); border-radius: var(--radius-sm); }
.gt th { font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.gt tr[data-open]:hover td { background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.fb-btn { font-weight: 700; }
.toast { border-radius: var(--radius-sm); }
.toast .linkish { color: var(--teal); }
@media (max-width: 640px) { .pane { border-radius: 0; padding: 22px 18px 44px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* small phones: keep the header on one line (the theme switch is also in the footer) and put the form first */
@media (max-width: 560px) {
  .top .wrap { gap: 8px; }
  .top nav { gap: 6px; }
  .top nav > [data-theme-icon] { display: none; }
  .top nav .btn.small .arr { display: none; }
  .auth-panel { order: -1; }
  .tabs button { font-size: 13px; }
}
@media (max-width: 360px) { .brand span { font-size: 18px; } .top nav .btn.small { padding: 9px 12px; font-size: 13px; } }
