/* retireacross.com: design system forked from uniacross (no framework); own palette: sea green, sea blue, terracotta on warm sand */
:root {
  --bg: #f7f5f0; --surface: #ffffff; --surface-2: #efebe3; --fg: #1c2526; --muted: #56615f; --line: #e4ded3;
  --brand: #1f6f62; --brand-2: #155247; --teal: #2f7fa6; --accent: #e07a3f; --accent-2: #c8622a;
  --brand-soft: #e3f1ed; --teal-soft: #e3eff6; --accent-soft: #fbece2;
  --ok: #1d7a4c; --warn: #9a6400; --danger: #b8322a;
  --grad: linear-gradient(120deg, #155247 0%, #1f6f62 45%, #2f7fa6 100%);
  --radius: 18px; --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 28, .05);
  --shadow: 0 2px 6px rgba(20, 30, 28, .05), 0 12px 32px rgba(20, 30, 28, .07);
  --shadow-lg: 0 24px 60px rgba(20, 30, 28, .18);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --header-h: 68px;
  --on-brand: #fff; --sel-holistic: #9a5b00; --sel-test: #7a3fb0;
  --accent-ink: #a5481a; --accent-btn: #b4501e; --accent-btn-2: #a5481a;   /* orange text and buttons with WCAG AA contrast (4.5:1) */
}
/* Night colours: automatic on a dark device unless Day is chosen (data-theme="light"), or when Night is chosen */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --bg: #0f1514; --surface: #151d1c; --surface-2: #1c2726; --fg: #ecf1ef; --muted: #a2b0ad; --line: #283533;
    --brand: #6cc3ae; --brand-2: #9fdccd; --teal: #7cc0e0; --accent: #f0a173; --accent-2: #f5b893;
    --brand-soft: #16302b; --teal-soft: #13283a; --accent-soft: #3a2618;
    --ok: #4cc98f; --warn: #e3a64b; --danger: #f07c7c;
    --shadow: 0 1px 0 rgba(255,255,255,.03); --shadow-lg: 0 24px 60px rgba(0,0,0,.5); --on-brand: #0f1514; --sel-holistic: #e3a64b; --sel-test: #c49bf0; --accent-ink: #f5b893; --accent-btn: #f0a173; --accent-btn-2: #f5b893; }
}
:root[data-theme="dark"] { color-scheme: dark; --bg: #0f1514; --surface: #151d1c; --surface-2: #1c2726; --fg: #ecf1ef; --muted: #a2b0ad; --line: #283533;
    --brand: #6cc3ae; --brand-2: #9fdccd; --teal: #7cc0e0; --accent: #f0a173; --accent-2: #f5b893;
    --brand-soft: #16302b; --teal-soft: #13283a; --accent-soft: #3a2618;
    --ok: #4cc98f; --warn: #e3a64b; --danger: #f07c7c;
    --shadow: 0 1px 0 rgba(255,255,255,.03); --shadow-lg: 0 24px 60px rgba(0,0,0,.5); --on-brand: #0f1514; --sel-holistic: #e3a64b; --sel-test: #c49bf0; --accent-ink: #f5b893; --accent-btn: #f0a173; --accent-btn-2: #f5b893; }
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.022em; font-weight: 750; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); margin: 1.6em 0 .6em; }
h3 { font-size: 1.12rem; margin: 1.2em 0 .4em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
code { background: var(--surface-2); padding: .12em .4em; border-radius: 6px; font-size: .88em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 560px; }
.narrow-doc { max-width: 840px; }
.section { padding: 56px 20px; }
.section-tight { padding: 32px 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: clamp(1.06rem, 1.5vw, 1.22rem); color: var(--muted); max-width: 68ch; line-height: 1.6; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 750; color: var(--brand); margin: 0 0 6px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 10px 14px; z-index: 99; border-radius: 10px; }
mark.todo { background: #fff2b3; color: #5a4300; padding: 0 .3em; border-radius: 4px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.32rem; color: var(--fg); text-decoration: none; letter-spacing: -.03em; margin: 0; }
.logo-text span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 16px rgba(31, 111, 98, .35); flex: none; }
.logo-mark svg { width: 20px; height: 20px; }
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a { color: var(--fg); text-decoration: none; font-weight: 550; font-size: .95rem; padding: 8px 11px; border-radius: 10px; white-space: nowrap; }
.site-nav a:hover { background: var(--surface-2); color: var(--fg); }
.site-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }
.site-nav .nav-sep { width: 1px; height: 22px; background: var(--line); margin: 0 8px; }
.site-nav a.btn { color: #fff; padding: 9px 16px; margin-left: 4px; }
.theme-toggle { flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); cursor: pointer; padding: 0; }
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ti { display: none; }
:root:not([data-theme]) .theme-toggle .ti-auto, :root[data-theme="light"] .theme-toggle .ti-light, :root[data-theme="dark"] .theme-toggle .ti-dark { display: block; }
.beta-badge { flex: none; margin-right: auto; margin-left: -6px; align-self: center; font: 700 .68rem/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent-ink) 30%, transparent); border-radius: 999px; padding: 4px 8px; cursor: help; }   /* site-wide beta notice */
.nav-toggle { display: none; background: var(--surface-2); border: 0; border-radius: 10px; padding: 9px 14px; color: var(--fg); font: 600 .95rem var(--font); }
@media (max-width: 1180px) {
  .nav-toggle { display: block; margin-left: auto; }
  .header-inner { gap: 8px; }
  .site-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--surface); flex-direction: column; align-items: stretch; padding: 10px 20px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 10px; }
  .site-nav .nav-sep { display: none; }
  .site-nav a.btn { text-align: center; margin: 8px 0 0; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; border: 1px solid transparent; border-radius: 12px; padding: 11px 20px; font: 650 1rem var(--font); text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s; box-shadow: 0 6px 16px rgba(31, 111, 98, .25); }
.btn:hover { background: var(--brand-2); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(31, 111, 98, .32); }
.btn:active { transform: none; }
.btn-accent { background: var(--accent-btn); box-shadow: 0 8px 22px rgba(255, 122, 61, .35); }
.btn-accent:hover { background: var(--accent-btn-2); box-shadow: 0 12px 28px rgba(255, 122, 61, .42); }
.btn-ghost { background: transparent; color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); box-shadow: none; }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand-2); box-shadow: none; }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.4); box-shadow: none; backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255,255,255,.26); color: #fff; box-shadow: none; }
.btn-small { padding: 7px 13px; font-size: .9rem; border-radius: 10px; }
.btn-large { padding: 15px 26px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { display: flex; width: 100%; }
.btn-danger { background: var(--danger); box-shadow: none; }
.btn-google { background: var(--surface); color: var(--fg); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-google:hover { background: var(--surface-2); color: var(--fg); box-shadow: var(--shadow-sm); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.btn-ghost):not(.btn-google):not(.btn-light) { color: #0b1220; } }
:root[data-theme="dark"] .btn:not(.btn-ghost):not(.btn-google):not(.btn-light) { color: #0b1220; }
.linklike { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.danger { color: var(--danger); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); margin: 18px 0; font-size: .9rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 22px; }
.grid > .card { margin-bottom: 0; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-4 { grid-template-columns: 1fr; } }
a.card { text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.more { font-weight: 650; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; }
.more::after { content: "→"; transition: transform .15s; }
a:hover .more::after, .more:hover::after { transform: translateX(3px); }

/* photo element (picture) */
.ph { position: relative; overflow: hidden; }
.ph picture, .ph img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph img { object-fit: cover; }
.ph-fallback { position: absolute; inset: 0; background: var(--grad); }   /* photo() when the photo file does not exist yet */

/* tool cards with photos */
.tool-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.tool-card .ph { aspect-ratio: 16 / 9; }
.tool-card .ph img { transition: transform .5s ease; }
.tool-card:hover .ph img { transform: scale(1.05); }
.tool-card .tool-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tool-card h3 { margin: 0; font-size: 1.15rem; }
.tool-card p { margin: 0; color: var(--muted); font-size: .96rem; }
.tool-card .more { margin-top: auto; padding-top: 10px; }
.tool-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; font-size: 1.35rem; margin-top: -42px; position: relative; border: 3px solid var(--surface); box-shadow: var(--shadow); }

/* country cards */
.country-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.country-card .cc-top { position: relative; height: 112px; overflow: hidden; }
.country-card .cc-top .ph { position: absolute; inset: 0; }
.country-card .cc-top::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(10, 18, 34, .55)); }
.country-card .cc-flag { position: absolute; left: 18px; bottom: 12px; z-index: 1; font-size: 2rem; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.country-card .cc-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.country-card h3, .country-card h2 { margin: 0; font-size: 1.15rem; }
.country-card h2 a { color: inherit; text-decoration: none; }
.country-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.country-card ul { padding-left: 1.1em; margin: .3em 0 .6em; color: var(--muted); font-size: .95rem; }
.country-card .more { margin-top: auto; padding-top: 8px; }
/* flag-coloured backgrounds for countries without a photo */
.flagbg { position: absolute; inset: 0; background: var(--grad); }   /* destination cards and heroes until each country has a photo */
.flagbg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(20, 30, 28, .25), rgba(20, 30, 28, .05)); }

/* ---------- hero (home) ---------- */
.hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; }
.hero .ph { position: absolute; inset: 0; z-index: -2; }
.hero .ph img { object-position: 70% 30%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(8, 34, 30, .94) 0%, rgba(14, 60, 52, .82) 38%, rgba(14, 60, 52, .25) 70%, rgba(14, 60, 52, .05) 100%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .85fr); gap: 40px; align-items: center; padding-top: 84px; padding-bottom: 96px; min-height: 620px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 span { background: linear-gradient(90deg, #ffd2b0, #8fe6da); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: rgba(255,255,255,.86); max-width: 54ch; }
.hero .eyebrow { color: #8fe6da; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 28px; color: rgba(255,255,255,.82); font-size: .92rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust span::before { content: "✓"; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(95, 227, 211, .22); color: #8fe6da; font-size: .75rem; font-weight: 800; }
.glass { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border-radius: 22px; padding: 22px 24px; box-shadow: 0 20px 50px rgba(0,0,0,.25); color: #fff; }
.glass h2 { font-size: 1.05rem; margin: 0 0 10px; color: #fff; letter-spacing: 0; display: flex; align-items: center; gap: 8px; }
.glass h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5fe3d3; box-shadow: 0 0 0 4px rgba(95, 227, 211, .25); }
.glass .deadline-list li { border-color: rgba(255,255,255,.16); }
.glass .deadline-list time { color: #dbe7ff; }
.glass a { color: #fff; font-weight: 650; }
@media (max-width: 920px) { .hero-inner { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 60px; min-height: 0; } .hero::before { background: linear-gradient(180deg, rgba(8, 34, 30, .9), rgba(14, 60, 52, .78)); } }

/* stats strip */
.stats { margin-top: -44px; position: relative; z-index: 2; }
.stats-inner { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-item { padding: 22px 24px; border-right: 1px solid var(--line); }
.stat-item:last-child { border-right: 0; }
.stat-item strong { display: block; font-size: 1.9rem; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.15; }
.stat-item span { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .stats-inner { grid-template-columns: 1fr 1fr; } .stat-item:nth-child(2) { border-right: 0; } .stat-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }

/* steps */
.steps { counter-reset: step; }
.step { position: relative; padding: 26px 24px 24px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; font-weight: 800; margin-bottom: 14px; box-shadow: 0 8px 18px rgba(31, 111, 98, .3); }
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); }

/* split feature with photo */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .ph { aspect-ratio: 4 / 3; border-radius: 24px; box-shadow: var(--shadow-lg); }
.split ul.ticks { list-style: none; padding: 0; margin: 18px 0 24px; display: grid; gap: 12px; }
.split ul.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.split ul.ticks li::before { content: "✓"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--teal-soft); color: var(--teal); font-weight: 800; font-size: .85rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* CTA band */
.cta-band { position: relative; overflow: hidden; isolation: isolate; border-radius: 28px; color: #fff; padding: 56px 48px; }
.cta-band .ph { position: absolute; inset: 0; z-index: -2; }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, rgba(29, 63, 158, .95), rgba(15, 181, 165, .78)); }
.cta-band h2 { color: #fff; margin: 0 0 8px; }
.cta-band p { color: rgba(255,255,255,.88); max-width: 56ch; }
@media (max-width: 640px) { .cta-band { padding: 36px 24px; border-radius: 22px; } }

/* band */
.band { background: var(--surface-2); padding: 56px 0; }
.band h3 { margin-top: 0; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature-icon { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; background: var(--surface); box-shadow: var(--shadow); }
.feature h3 { margin: 4px 0 4px; }
.feature p { margin: 0; color: var(--muted); }

/* ---------- page hero (inner pages) ---------- */
.page-hero { position: relative; color: #fff; overflow: hidden; isolation: isolate; background: var(--grad); }
.page-hero .ph { position: absolute; inset: 0; z-index: -2; }
.page-hero .flagbg { z-index: -2; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(8, 34, 30, .92) 0%, rgba(14, 60, 52, .72) 50%, rgba(14, 60, 52, .3) 100%); }
.page-hero-inner { padding-top: 44px; padding-bottom: 52px; }
.page-hero h1 { color: #fff; margin: .1em 0 .25em; max-width: 26ch; font-size: clamp(1.9rem, 4vw, 3rem); }
.page-hero .lead { color: rgba(255,255,255,.86); margin: 0; }
.page-hero .crumbs, .page-hero .crumbs a { color: rgba(255,255,255,.75); }
.page-hero .doc-meta { color: rgba(255,255,255,.8); margin-top: 14px; }
.page-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }

/* ---------- docs (country & guide pages) ---------- */
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 48px; }
.toc { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; font-size: .92rem; max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; box-shadow: var(--shadow-sm); }
.toc-title { font-weight: 750; text-transform: uppercase; font-size: .75rem; letter-spacing: .1em; color: var(--muted); margin: 0 0 8px; }
.toc ol { list-style: none; padding: 0; margin: 0 0 14px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc li a { display: flex; gap: 8px; padding: 5px 8px; border-radius: 8px; color: var(--fg); text-decoration: none; }
.toc li a::before { content: counter(toc); color: var(--muted); font-variant-numeric: tabular-nums; min-width: 1.2em; }
.toc li a:hover { background: var(--surface-2); }
.toc-tools { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 960px) { .doc-layout { grid-template-columns: 1fr; gap: 24px; } .toc { position: static; max-height: none; } }
.doc { min-width: 0; }
.doc h2 { padding-top: 1.1em; margin-top: 1.4em; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.doc h2:first-of-type { border-top: 0; margin-top: .4em; padding-top: 0; }
.doc h3 { scroll-margin-top: calc(var(--header-h) + 16px); }
.doc p, .doc li { max-width: 78ch; }
.doc li { margin: .35em 0; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li::marker { color: var(--brand); }
.doc blockquote { border-left: 4px solid var(--teal); margin: 1.2em 0; padding: .6em 1.2em; background: var(--teal-soft); border-radius: 0 12px 12px 0; }
.doc-meta { color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.legend { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.doc-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 36px 32px; box-shadow: var(--shadow-sm); }
@media (max-width: 640px) { .doc-body { padding: 18px 18px 22px; } }
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--brand-soft) 45%, transparent); }
.st { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; vertical-align: -2px; font-size: 0; cursor: help; flex: none; }
.st::before { font: 800 10px/1 var(--font); color: #fff; }
.st-ok { background: var(--ok); } .st-ok::before { content: "\2713"; }
.st-sec { background: color-mix(in srgb, var(--brand) 16%, var(--surface)); box-shadow: inset 0 0 0 1.5px var(--brand); }
.st-sec::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.st-ver { background: var(--warn); } .st-ver::before { content: "!"; }
.st-word { font-size: max(.85em, .75rem); color: var(--muted); margin-left: .25em; }

/* ---------- forms ---------- */
.form label, .tool-form label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input:not([type]), select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--fg); font: 1rem var(--font); transition: border-color .15s, box-shadow .15s; }
input:hover, select:hover, textarea:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
fieldset { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
legend { font-weight: 700; margin-bottom: 8px; font-size: .95rem; }
label.check, label.radio { display: block; position: relative; padding-left: 28px; font-weight: 450; margin: 7px 0; font-size: .96rem; cursor: pointer; line-height: 1.5; }
label.check input, label.radio input { position: absolute; left: 0; top: .2em; margin: 0; accent-color: var(--brand); width: 17px; height: 17px; }
.checks { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.field-error { color: var(--danger); margin: 4px 0 0; font-size: .9rem; }
.consents { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; margin: 18px 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 22px; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-inline input { width: auto; flex: 1 1 200px; margin: 0; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hint { color: var(--muted); font-size: .9rem; margin: 6px 0; }
.row2, .row3 { display: grid; gap: 0 12px; }
.row2 { grid-template-columns: 2fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); }
.lang-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0 12px; }

/* auth split layout */
.auth { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
.auth-side { position: relative; overflow: hidden; isolation: isolate; color: #fff; display: flex; align-items: flex-end; padding: 48px; }
.auth-side .ph { position: absolute; inset: 0; z-index: -2; }
.auth-side::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 60, 52, .15), rgba(8, 34, 30, .9)); }
.auth-side h2 { color: #fff; font-size: 1.8rem; margin: 0 0 10px; max-width: 18ch; }
.auth-side ul { padding: 0; list-style: none; margin: 0; display: grid; gap: 8px; color: rgba(255,255,255,.88); }
.auth-side li::before { content: "✓  "; color: #8fe6da; font-weight: 800; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-main > div { width: 100%; max-width: 440px; }
.auth-main h1 { font-size: 2rem; }
.auth-main .card { box-shadow: none; padding: 0; border: 0; background: transparent; }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- flashes, badges ---------- */
.flash { padding: 13px 18px; border-radius: 14px; margin: 18px 0; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); display: flex; gap: 10px; align-items: flex-start; }
.flash::before { font-weight: 800; }
.flash-success { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); } .flash-success::before { content: "✓"; color: var(--ok); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); background: color-mix(in srgb, var(--danger) 6%, var(--surface)); } .flash-error::before { content: "!"; color: var(--danger); }
.flash-info { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); } .flash-info::before { content: "i"; color: var(--brand); }
.badge { display: inline-block; font-size: .74rem; padding: 3px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); font-weight: 650; vertical-align: middle; }
.badge-warn { background: var(--accent-soft); color: var(--accent-ink); }
.notice { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: linear-gradient(135deg, var(--brand-soft), var(--surface) 60%); }
/* Universities tab: readiness questions, three choice tabs, compact cards */
.readiness { border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); border-radius: 14px; padding: 14px 16px; margin: 14px 0; background: linear-gradient(135deg, var(--brand-soft), var(--surface) 60%); }
.readiness h3 { margin: 0 0 4px; font-size: 1.05rem; }
.ready-list { list-style: none; margin: 10px 0; padding: 0; display: grid; gap: 6px; }
.ready-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.ready-list .ready-done { color: var(--muted); }
.ready-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.ready-done .ready-label { font-weight: 400; }
.ready-actions { display: inline-flex; gap: 6px; align-items: center; }
.ready-actions .inline-form { margin: 0; }
.uni-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.uni-tab { text-align: left; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 12px 12px 0 0; background: var(--surface-2); padding: 10px 12px; cursor: pointer; display: grid; gap: 3px; font: inherit; color: inherit; }
.uni-tab.active { background: var(--surface); border-color: var(--brand); }
.uni-tab-rank { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); }
.uni-tab-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uni-panel { border: 1px solid var(--line); border-radius: 0 0 14px 14px; padding: 14px; margin-bottom: 14px; display: grid; gap: 12px; }
.uni-panel .rec-group h4 { margin: 4px 0 8px; }
.uni-panel .choice { max-width: none; }
.choice-facts { margin: 0; color: var(--muted); }
.choice-notes { margin: 0; }
.choice-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.choice-actions details.act > summary { list-style: none; }
.choice-actions details.act > summary::-webkit-details-marker { display: none; }
.choice-actions details.act[open] { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.choice-actions details.act .inline-form { margin: 0; flex-wrap: wrap; align-items: center; }
.choice-actions .act-remove { margin: 0; }
.btn.danger { color: var(--danger); }
.uni-more { border-top: 1px dashed var(--line); padding-top: 8px; }
.uni-more[open] > summary { margin-bottom: 8px; }
.hint-tip { text-decoration: underline dotted; cursor: help; }
@media (max-width: 700px) { .uni-tabs { grid-template-columns: 1fr; gap: 4px; } .uni-tab { border-radius: 10px; } .uni-panel { border-radius: 14px; } }
/* Overview: every date of the child, folded (the former Timeline tab) */
.all-dates { margin-top: 16px; }
.all-dates > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.all-dates > summary::-webkit-details-marker { display: none; }
.all-dates > summary h2 { margin: 0; font-size: 1.15rem; }
.all-dates > summary h2::before { content: "▸ "; color: var(--brand); }
.all-dates[open] > summary h2::before { content: "▾ "; }
.all-dates[open] > summary { margin-bottom: 12px; }
/* university pop-ups and the Application tab's chosen universities */
.uni-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; background: var(--surface); color: var(--fg); box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.uni-dialog::backdrop { background: rgba(10, 16, 32, .45); }
.uni-dialog h3 { margin: 0 0 4px; padding-right: 80px; }
.uni-dialog h4 { margin: 14px 0 4px; font-size: .95rem; }
.uni-dialog .tips { margin: 0; padding-left: 18px; font-size: .9rem; }
.uni-dialog-close { position: sticky; top: 0; float: right; margin: -6px -8px 0 0; }
.uni-dialog-links { margin-top: 14px; }
.app-uni { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 10px 0; display: grid; gap: 8px; background: var(--surface); }
.app-uni-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.app-uni-head h4 { margin: 2px 0 0; font-size: 1.05rem; }
.app-status { flex-wrap: wrap; gap: 8px; align-items: center; }
.app-status label { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.app-status select, .app-status input { width: auto; margin: 0; }
.app-status input[name="notes"] { flex: 1 1 220px; }
.app-uni-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.app-uni-cols p { margin: 0 0 4px; }
.app-uni .tips { margin: 0; padding-left: 18px; }
.sel-grades { color: var(--brand); } .sel-holistic { color: var(--sel-holistic); } .sel-test { color: var(--sel-test); }
@media (max-width: 700px) { .app-uni-cols { grid-template-columns: 1fr; } }
/* Universities tab: one-click field of study when none is chosen */
.field-prompt { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 14px 16px; border-width: 1px; border-style: solid; border-radius: 12px; margin: 18px 0 6px; }
.onboarding .field-pick select { max-width: 360px; }
.field-prompt label { flex: 1 1 320px; display: grid; gap: 8px; }
.field-prompt select { max-width: 320px; }

/* ---------- tools ---------- */
.tool-layout { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 960px) { .tool-layout { grid-template-columns: 1fr; } }
.tool-form { position: sticky; top: calc(var(--header-h) + 18px); max-height: calc(100vh - var(--header-h) - 36px); overflow: auto; margin: 0; }
@media (max-width: 960px) { .tool-form { position: static; max-height: none; } }
.tool-form fieldset:first-of-type { margin-top: 0; }
.tool-form .btn-large { margin-top: 20px; width: 100%; }
.tool-results .card.muted { display: flex; align-items: center; gap: 14px; min-height: 120px; border-style: dashed; box-shadow: none; background: transparent; }
.tool-results .card.muted::before { content: ""; flex: none; width: 26px; height: 26px; background: var(--brand); -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M9.937%2015.5A2%202%200%200%200%208.5%2014.063l-6.135-1.582a.5.5%200%200%201%200-.962L8.5%209.936A2%202%200%200%200%209.937%208.5l1.582-6.135a.5.5%200%200%201%20.963%200L14.063%208.5A2%202%200%200%200%2015.5%209.937l6.135%201.581a.5.5%200%200%201%200%20.964L15.5%2014.063a2%202%200%200%200-1.437%201.437l-1.582%206.135a.5.5%200%200%201-.963%200z'%2F%3E%3Cpath%20d%3D'M20%203v4'%2F%3E%3Cpath%20d%3D'M22%205h-4'%2F%3E%3Cpath%20d%3D'M4%2017v2'%2F%3E%3Cpath%20d%3D'M5%2018H3'%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'1.8'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M9.937%2015.5A2%202%200%200%200%208.5%2014.063l-6.135-1.582a.5.5%200%200%201%200-.962L8.5%209.936A2%202%200%200%200%209.937%208.5l1.582-6.135a.5.5%200%200%201%20.963%200L14.063%208.5A2%202%200%200%200%2015.5%209.937l6.135%201.581a.5.5%200%200%201%200%20.964L15.5%2014.063a2%202%200%200%200-1.437%201.437l-1.582%206.135a.5.5%200%200%201-.963%200z'%2F%3E%3Cpath%20d%3D'M20%203v4'%2F%3E%3Cpath%20d%3D'M22%205h-4'%2F%3E%3Cpath%20d%3D'M4%2017v2'%2F%3E%3Cpath%20d%3D'M5%2018H3'%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.status-note { margin: 6px 0 0; }
.result { position: relative; overflow: hidden; }
.result::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--brand); }
.result.good::before { background: var(--ok); } .result.mid::before { background: var(--warn); } .result.low::before { background: var(--danger); }
.result h3 { margin-top: 0; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 1.2rem; }
.score { font-size: .82rem; color: var(--muted); font-weight: 700; white-space: nowrap; background: var(--surface-2); padding: 3px 10px; border-radius: 999px; }
.meter { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 10px 0 14px; }
.meter span { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.result ul { padding-left: 1.3em; margin: .3em 0; }
.pros li::marker { content: "✓  "; color: var(--ok); }
.cons li::marker { content: "!  "; color: var(--warn); font-weight: 800; }
.verdict { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.verdict.good { color: var(--ok); } .verdict.mid { color: var(--warn); } .verdict.low { color: var(--danger); }
.cost-total { font-size: 2.2rem; font-weight: 800; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 4px 0 12px; }
.tl-group h3 { position: sticky; top: var(--header-h); background: var(--bg); padding: 8px 0; margin: 18px 0 8px; z-index: 1; }
.tl-item { display: grid; grid-template-columns: 9em 1fr; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--surface); box-shadow: var(--shadow-sm); }
.tl-item.past { opacity: .5; }
.tl-item time { font-weight: 750; color: var(--brand); }
.tl-item .meta { font-size: .86rem; color: var(--muted); }
@media (max-width: 560px) { .tl-item { grid-template-columns: 1fr; gap: 4px; } }

/* deadline list */
.deadline-list { list-style: none; padding: 0; margin: 0 0 14px; }
.deadline-list li { display: grid; grid-template-columns: 7.4em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.deadline-list li:last-child { border-bottom: 0; }
.deadline-list time { font-weight: 750; color: var(--brand); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- account ---------- */
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 26px; position: sticky; top: var(--header-h); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); padding: 10px 0; z-index: 5; }
.tabs a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--fg); background: var(--surface); font-size: .92rem; font-weight: 550; }
.tabs a:hover { border-color: var(--brand); color: var(--brand); }
section[id], div[id] { scroll-margin-top: 130px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-n { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.task-list { list-style: none; padding: 0; margin: 18px 0; }
.task-list li { display: grid; grid-template-columns: 36px 8em 1fr 28px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task-list li.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-list li.late .task-date { color: var(--danger); font-weight: 700; }
.tick { width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--brand); background: var(--surface); color: var(--ok); font-weight: 800; cursor: pointer; }
.plan-list { list-style: none; padding: 0; }
.plan-list li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.plan-list p { margin: .2em 0 0; color: var(--muted); }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.inline-form select, .inline-form input { width: auto; margin: 0; padding: 7px 9px; font-size: .9rem; }
.add-form { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 8px; }
.import-form { background: var(--surface-2); padding: 14px 16px; border-radius: 14px; }
.data-actions h3 { margin-top: 0; }

/* ---------- family space ---------- */
.family-grid { margin: 22px 0 26px; }
.child-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--fg); position: relative; }
.child-card h3 { margin: 8px 0 0; }
.child-card p { margin: 0; }
a.child-card:hover { border-color: var(--brand); }
.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.25rem; }
.avatar-add { background: var(--surface-2); color: var(--brand); border: 2px dashed var(--brand); }
.child-meta { display: flex; gap: 14px; font-size: .9rem; color: var(--muted); margin-top: 6px !important; }
.hint-line { color: var(--brand); font-weight: 600; }
.add-card summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.add-card summary::-webkit-details-marker { display: none; }
.add-card[open] summary { margin-bottom: 10px; }
.start-card { margin: 22px 0 26px; border: 2px solid color-mix(in srgb, var(--brand) 35%, var(--line)); }
.who { font-weight: 700; margin-right: 4px; }
.sibling-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.sibling-nav a { padding: 6px 14px; border-radius: 999px; text-decoration: none; background: var(--surface-2); color: var(--fg); font-weight: 600; font-size: .92rem; }
.sibling-nav a[aria-current="page"] { background: var(--brand); color: var(--on-brand); }
.sibling-nav a.add { background: none; color: var(--brand); }
.prompts { background: var(--surface-2); }
.prompts ul { margin: 6px 0 0; padding-left: 1.2em; }
.prompts li { margin: 4px 0; }
.profile-sections > h2 { margin: 6px 0 12px; }
.fold { padding: 0; }
.fold > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(9em, 13em) 1fr auto; gap: 14px; align-items: center; padding: 16px 20px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover .fold-edit { text-decoration: underline; }
.fold-title { font-weight: 750; }
.fold-sum { color: var(--muted); font-size: .93rem; overflow: hidden; text-overflow: ellipsis; }
.fold-sum em { font-style: normal; opacity: .75; }
.fold-edit { color: var(--brand); font-weight: 650; font-size: .92rem; }
.fold[open] > summary { border-bottom: 1px solid var(--line); }
.fold[open] .fold-edit { visibility: hidden; }
.fold > form, .fold > p { padding: 16px 20px 20px; margin: 0; }
.grades-table { width: 100%; }
.grades-table th { text-align: left; font-size: .85rem; color: var(--muted); font-weight: 600; }
.grades-table td { padding: 4px 6px 4px 0; vertical-align: middle; }
.grades-table input, .grades-table select { margin: 0; padding: 8px 9px; font-size: .92rem; }
.grades-table td:first-child { min-width: 13em; }
.grades-table.hide-prev th:nth-child(5), .grades-table.hide-prev td[data-label="Last year"] { display: none; }   /* last year's grades: folded until asked for */
.grades-table .lvl { min-width: 8.5em; }
/* tests and language certificates: one folded line; compact score fields; one row per language */
.tests-fold { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 14px; }
.tests-fold > summary { cursor: pointer; list-style-position: inside; }
.tests-fold[open] > summary { margin-bottom: 6px; }
.tests-fold > p { margin: 4px 0 10px; }
.test-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 8px 16px; margin: 4px 0 8px; }
.test-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0; font-weight: 600; font-size: .92rem; }
.test-item > span { display: flex; flex-direction: column; }
.tests-fold input.score { width: 7.5em; flex: none; margin: 0; padding: 6px 8px; }
.cert-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.cert-row .cert-lang { font-weight: 600; font-size: .92rem; display: flex; flex-direction: column; }
.cert-row select { width: auto; max-width: 100%; margin: 0; padding: 6px 8px; }
.cert-pair { display: inline-flex; gap: 6px; align-items: center; }
.tests-fold .more-tests { margin-top: 6px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }   /* "HL (Higher Level)", "Leistungskurs (eA)": readable level names */
.grades-table .grade { width: 6.5em; }
.grades-form .overall { margin-top: 16px; }
.add-fold > summary { list-style: none; cursor: pointer; display: inline-flex; margin: 8px 0; }
.add-fold > summary::-webkit-details-marker { display: none; }
.import-form > summary { display: block; }
.danger-zone .fold-title { color: var(--danger); }
@media (max-width: 640px) {
  .fold > summary { grid-template-columns: 1fr auto; }
  .fold-sum { grid-column: 1 / -1; grid-row: 2; }
  .grades-table thead { display: none; }
  .grades-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .grades-table td:first-child { grid-column: 1 / -1; min-width: 0; }
  .grades-table .grade { width: 100%; }
}

/* ---------- stages, next steps, notifications ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .74rem; font-weight: 800; }
.badge-danger { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.badge-info { background: var(--surface-2); color: var(--fg); }
.alert-soon { border-left: 4px solid var(--accent-2); margin-top: 22px; }
.alert-soon h2 { margin-top: 0; font-size: 1.15rem; }
.soon-list { list-style: none; padding: 0; margin: 0 0 8px; }
.soon-list li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.soon-list li:last-child { border-bottom: 0; }
.soon-list .badge { margin-right: 8px; min-width: 6.5em; text-align: center; }
.stage-chip { display: inline-block; margin: 6px 0 0 !important; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--muted); width: fit-content; }
.stage-decided { background: var(--brand-soft); color: var(--brand-2); }
.stage-applied { background: var(--accent-soft); color: var(--accent-ink); }
.stage-admitted { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.stage-card { border: 2px solid color-mix(in srgb, var(--brand) 30%, var(--line)); }
.stage-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.stage-head h2 { margin: 0; }
.stage-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 0; color: var(--muted); }
.stage-edit { margin: 10px 0 4px; }
.stage-edit > summary { list-style: none; cursor: pointer; display: inline; color: var(--brand); font-weight: 600; }
.stage-edit > summary::-webkit-details-marker { display: none; }
.stage-edit[open] form { margin-top: 12px; padding: 14px; background: var(--surface-2); border-radius: 14px; }
.stage-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-bottom: 12px; }
.stage-option { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 36px; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; margin: 0; }
.stage-option input { position: absolute; left: 12px; top: 13px; width: auto; margin: 0; }
.stage-option:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.stage-card h3 { margin: 22px 0 8px; font-size: 1.05rem; }
.advice-list { list-style: none; padding: 0; margin: 0; }
.advice-list li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.advice-list li > div { flex: 1 1 320px; }
.advice-list p { margin: .2em 0 0; color: var(--muted); font-size: .94rem; }
.advice-list.compact li { padding: 8px 0; }
.track { font-weight: 700; margin: 4px 0; }
.track-ok { color: var(--ok); }
.track-late { color: var(--danger); }
.next-big { font-size: 1.05rem; margin: 6px 0 12px; }
.next-list { list-style: none; padding: 0; margin: 0 0 8px; }
.next-list li { display: grid; grid-template-columns: 7.5em 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.next-list .badge { text-align: center; }
.next-list li.u-late .next-title { color: var(--danger); }
.next-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.next-actions form { margin: 0; }
.stage-cta { margin-top: 16px; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.stage-cta p { margin: 0; flex: 1 1 320px; font-weight: 600; }
/* university choices */
.choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 8px; }
.choice { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.choice h3 { margin: 4px 0 0; font-size: 1.05rem; } .choice h3 a { text-decoration: none; }
.choice h4 { margin: 8px 0 0; font-size: .9rem; }
.choice p { margin: 0; }
.choice-empty { border-style: dashed; background: var(--surface-2); justify-content: center; }
.choice-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 8px; }
.choice-rank { flex: none; white-space: nowrap; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); }
.choice .tips { margin: 0; padding-left: 18px; font-size: .9rem; }
.choice-edit { margin-top: auto; padding-top: 6px; } .choice-edit .inline-form { margin-top: 6px; }
.hint-inline { color: var(--muted); }
.lik { display: inline-flex; gap: 6px; align-items: baseline; border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.lik-range { font-weight: 500; opacity: .85; }
.lik-likely { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.lik-match { background: var(--brand-soft); color: var(--brand); }
.lik-reach { background: var(--accent-soft); color: var(--accent-ink); }
.lik-long { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.lik-unknown { background: var(--surface-2); color: var(--muted); }
.rec-title { margin-top: 24px; }
.rec-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.rec-groups.rec-single { grid-template-columns: 1fr; }
.rec-group h4 { margin: 0 0 8px; }
.rec { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; display: grid; gap: 6px; }
.rec-name a { font-weight: 650; text-decoration: none; } .rec-name .muted { display: block; }
.rec-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rec-form select { width: auto; margin: 0; padding: 4px 8px; font-size: .85rem; }
.rec-single .rec { grid-template-columns: 1fr auto auto; align-items: center; }
.other-options { list-style: none; padding: 0; display: grid; gap: 8px; }
.other-options li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.other-options li > span:first-child { flex: 1 1 220px; }
.other-options select { width: auto; margin: 0; }
@media (max-width: 900px) { .choices, .rec-groups { grid-template-columns: 1fr; } .rec-single .rec { grid-template-columns: 1fr; } }
.disclaimer-inline { margin: 16px 0 0; }
.inline-label { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.inline-label select { width: auto; margin: 0; }
.footer-bottom .disclaimer { max-width: 900px; line-height: 1.5; margin: 0 0 8px; }
.footer-bottom p:last-child { margin: 0; }
@media (max-width: 640px) {
  .next-list li { grid-template-columns: 1fr auto; }
  .next-list .badge { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- universities ---------- */
.h3 { font-size: 1.1rem; }
.section-tight { margin-top: 44px; }
.subject-card h3 { margin-top: 0; font-size: 1.05rem; }
.uni-mini { margin: 6px 0 4px; padding-left: 1.4em; }
.uni-mini li { margin: 4px 0; font-size: .94rem; }
.uni-mini.cols { columns: 2; column-gap: 24px; }
.uni-mini .flag { font-size: .9em; }
.subject-card details summary { list-style: none; cursor: pointer; display: inline; }
.subject-card details summary::-webkit-details-marker { display: none; }
.uni-filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0 16px; align-items: end; }
.uni-filters .check, .uni-filters #uni-count { grid-column: 1 / -1; margin: 4px 0 0; }
.uni-table td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); }
.uni-table tr[hidden] { display: none; }
.uni-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.uni-facts { position: sticky; top: calc(var(--header-h) + 16px); }
.uni-facts h2 { margin-top: 0; }
.facts { display: grid; grid-template-columns: 11em 1fr; gap: 10px 16px; margin: 0; }
.facts dt { font-weight: 650; color: var(--muted); }
.facts dd { margin: 0; }
.facts.compact { grid-template-columns: 1fr; gap: 2px; }
.facts.compact dt { margin-top: 10px; font-size: .85rem; }
.tag-list { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); text-decoration: none; font-weight: 600; font-size: .9rem; }
.subject-ranks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.subject-ranks a { display: inline-flex; gap: 8px; align-items: center; padding: 6px 12px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--fg); font-size: .92rem; }
.subject-ranks .rank { font-weight: 800; color: var(--brand); }
.uni-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 0; }
.uni-in-country { margin-top: 32px; }
@media (max-width: 900px) {
  .uni-layout { grid-template-columns: 1fr; }
  .uni-facts { position: static; }
  .uni-filters { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dt { margin-top: 10px; }
  .uni-mini.cols { columns: 1; }
}

/* ---------- footer ---------- */
.site-footer { background: #0b1527; color: #c3cde0; padding: 56px 0 28px; margin-top: 64px; }
.site-footer a { color: #dfe7f5; text-decoration: none; } .site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .logo { color: #fff; }
.site-footer .muted { color: #8e9ab2; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: #8e9ab2; margin: 6px 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; } .site-footer li { margin: 7px 0; font-size: .95rem; }
.site-footer .linklike { color: #dfe7f5; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: .86rem; color: #8e9ab2; }

/* ---------- cookie banner ---------- */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; display: flex; justify-content: center; }
.cookie-inner { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 20px 22px; max-width: 780px; width: 100%; }
.cookie-inner h2 { margin: 0 0 6px; font-size: 1.1rem; }
.cookie-inner p { margin: 0 0 12px; font-size: .94rem; color: var(--muted); }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cookie-actions .btn { flex: 1 1 auto; }

/* small motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .6s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
.choice-label { display: block; margin: 0; font-size: .82rem; font-weight: 650; color: var(--brand-2); }
.choice-label select { margin-top: 3px; font-weight: 400; color: var(--fg); }
.grades-table tr.tpl-core input { background: var(--surface-2); }

/* ---------- glossary and help tooltips (hover, focus or tap) ---------- */
abbr.gl, .tip { position: relative; cursor: help; }
abbr.gl { text-decoration: underline dotted color-mix(in srgb, var(--brand) 60%, transparent); text-underline-offset: 3px; }
.tip { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 5px; border-radius: 50%; background: var(--surface-2); color: var(--brand); font-size: .72rem; font-weight: 800; vertical-align: 1px; }
abbr.gl::after, .tip::after { content: none; position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: min(300px, 80vw);
  background: #0f1b2d; color: #fff; font: 500 .82rem/1.4 var(--font); text-align: left; padding: 8px 10px; border-radius: 10px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 50; white-space: normal; text-transform: none; letter-spacing: 0; }
abbr.gl:hover::after, abbr.gl:focus::after, .tip:hover::after, .tip:focus::after { content: attr(data-tip); opacity: 1; }
abbr.gl:focus, .tip:focus { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
abbr.gl.tip-left::after, .tip.tip-left::after { left: 0; transform: none; }
abbr.gl.tip-right::after, .tip.tip-right::after { left: auto; right: 0; transform: none; }

/* ---------- child dashboard ---------- */
.tab-panel[hidden] { display: none !important; }
.tab-panel { display: grid; gap: 18px; }
.dash-tabs a.active { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.dash-tabs .tab-back { margin-left: auto; border-style: dashed; }
.onboarding { border: 2px solid color-mix(in srgb, var(--brand) 35%, var(--line)); }
.onboarding h2 { margin: 6px 0 4px; }
.onb-steps { list-style: none; padding: 0; margin: 0 0 8px; display: flex; gap: 8px; flex-wrap: wrap; font-size: .85rem; }
.onb-steps li { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.onb-steps li.current { background: var(--brand); color: var(--on-brand); font-weight: 650; }
.onb-steps li.done { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.onb-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
/* profile set-up: the steps as chips (✓ enough · ◐ started · – skipped · ○ to do), the current one highlighted */
.setup-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.setup-head .eyebrow { margin: 0; }
.setup-head .meter { flex: 1 1 120px; max-width: 220px; height: 6px; margin: 0; }
.setup-chips { list-style: none; padding: 0; margin: 10px 0 6px; display: flex; gap: 6px; flex-wrap: wrap; font-size: .84rem; }
.setup-chips li > a, .setup-chips li > span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); text-decoration: none; }
.setup-chips li > a:hover { border-color: var(--brand); color: var(--fg); }
.setup-chips .sc-mark { font-weight: 800; }
.setup-chips .st-done > * { background: color-mix(in srgb, var(--ok) 13%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); color: var(--ok); }
.setup-chips .st-partial > * { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); color: var(--warn); }
.setup-chips .st-skipped > * { border-style: dashed; }
.setup-chips li.current > * { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 650; }
.setup-have { margin: 2px 0 0; color: var(--muted); }
.setup .form-grid { margin-top: 8px; }
.setup .lang-grid.setup-langs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 14px; }
.setup .onb-label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.setup .onb-label input { width: 140px; }
.setup > form.inline-form { margin-top: 6px; }
.setup-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.setup-foot .inline-form { margin: 0; }
.ready-next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 4px; }
.setup-back { margin: 0; }
.onb-form select { width: auto; min-width: 220px; margin: 0; }
.next-step { border-left: 4px solid var(--brand); }
.next-step .eyebrow { margin: 0; }
.next-step-text { font-size: 1.15rem; font-weight: 650; margin: 4px 0 0; }
.next-step-text a { text-decoration: none; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--fg); }
.tile:hover { border-color: var(--brand); }
.tile-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.tile-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.tile-value.small-value { font-size: 1.15rem; }
.tile-sub { font-size: .82rem; color: var(--muted); }
.tile-alert { border-color: var(--danger); } .tile-alert .tile-value { color: var(--danger); }
.tile .meter { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.tile .meter span { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.completion h2 { margin-top: 0; }
.completion-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
.completion-list li { display: flex; gap: 8px; align-items: flex-start; }
.completion-list .sc-mark { font-weight: 800; width: 1em; flex: none; color: var(--muted); }
.completion-list .st-done .sc-mark { color: var(--ok); } .completion-list .st-partial .sc-mark { color: var(--warn); }
.completion-list .comp-what { display: block; font-size: .8rem; color: var(--muted); }
.completion-list .st-partial .comp-what { color: var(--warn); }
.more-fold { margin-top: 6px; } .more-fold > summary { list-style: none; cursor: pointer; display: inline; }
@media (max-width: 760px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-tabs .tab-back { margin-left: 0; } }

/* ---------- parent dashboard ---------- */
.kid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 20px 0 24px; }
.kid-card { display: flex; flex-direction: column; gap: 12px; }
.kid-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.kid-head h3 { margin: 0; } .kid-head h3 a { text-decoration: none; color: var(--fg); } .kid-head p { margin: 0; }
.kid-head .stage-chip { margin: 0 !important; }
.kid-facts { margin: 0; display: grid; gap: 6px; }
.kid-facts > div { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; align-items: center; font-size: .93rem; }
.kid-facts dt { color: var(--muted); font-weight: 600; } .kid-facts dd { margin: 0; }
.kid-facts .meter { display: inline-block; width: 90px; height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; vertical-align: middle; margin-left: 6px; }
.kid-facts .meter span { display: block; height: 100%; background: var(--grad); }
.kid-step { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.kid-step a { font-weight: 650; text-decoration: none; }
.kid-card > .btn { align-self: flex-start; margin-top: auto; }
.kid-useful { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--teal-soft); font-size: .93rem; }
.kid-useful a { text-decoration: none; font-weight: 600; }
.family-tiles { margin-top: 16px; }
.ask-ai { display: flex; align-items: center; gap: 10px; margin: 20px 0 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ask-ai input { flex: 1; min-width: 0; margin: 0; border: 0; background: transparent; font: inherit; color: var(--muted); cursor: not-allowed; }
.ask-ai-icon { color: var(--brand); font-size: 1.1rem; }
.ft-empty { margin-top: 8px; }
@media (max-width: 600px) { .ask-ai .badge { display: none; } }
/* one colour per child (family timeline) */
.kid-c0 { --kid: var(--brand); } .kid-c1 { --kid: var(--accent-btn); } .kid-c2 { --kid: var(--teal); }
.kid-c3 { --kid: #9b5de5; } .kid-c4 { --kid: #d6336c; } .kid-c5 { --kid: #6c8a00; }
.family-timeline { margin-top: 8px; }
.ft-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ft-head h2 { margin: 0; }
.ft-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.ft-chip { border: 2px solid var(--kid); background: transparent; color: var(--fg); border-radius: 999px; padding: 3px 12px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.ft-chip.on { background: var(--kid); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ft-chip.on:is(.kid-c0, .kid-c1, .kid-c2) { color: #0b1220; } }
:root[data-theme="dark"] .ft-chip.on:is(.kid-c0, .kid-c1, .kid-c2) { color: #0b1220; }   /* the light night colours need dark text */
.ft-list { list-style: none; margin: 16px 0 0 6px; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.ft-list > li { position: relative; margin: 0 0 14px; }
.ft-list > li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.ft-today::before { background: var(--accent) !important; border-color: var(--accent) !important; }
.ft-newyear::before { background: var(--brand) !important; border-color: var(--brand) !important; }
.ft-quiet { color: var(--muted); font-size: .9rem; }
.ft-month-head { margin-bottom: 6px; }
.ft-events { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ft-ev { display: grid; grid-template-columns: 6em 1fr auto; gap: 10px; align-items: baseline; padding: 6px 10px; border-left: 4px solid var(--kid); background: var(--surface-2); border-radius: 0 10px 10px 0; font-size: .93rem; }
.ft-ev[hidden] { display: none; }
.ft-kid { font-weight: 700; color: var(--kid); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-meta { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.ft-late .badge { background: var(--danger); color: #fff; }
.ft-deadline .badge { background: var(--accent-soft); color: var(--accent-ink); }
.ft-start { background: var(--brand-soft); font-weight: 650; }
.ft-start .badge { background: var(--brand); color: var(--on-brand); }
@media (max-width: 600px) { .ft-ev { grid-template-columns: 1fr; gap: 2px; } .ft-meta { white-space: normal; } }
.onb-form input { width: auto; flex: 1 1 220px; margin: 0; }
.settings-fold > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.settings-fold > summary::-webkit-details-marker { display: none; }
.settings-fold > summary h2 { margin: 0; font-size: 1.1rem; }
.settings-fold > summary h2::after { content: " ▸"; color: var(--muted); }
.settings-fold[open] > summary h2::after { content: " ▾"; }
.settings-fold[open] > summary { margin-bottom: 12px; }
.rec .lik { justify-self: start; }
.country-rank .rank-row { display: inline-flex; gap: 6px; align-items: center; }
.country-rank select { width: auto; margin: 0; padding: 2px 6px; font-size: .85rem; }
.choice .facts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; color: var(--muted); }
.choice-blocked { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.why-not { color: var(--danger); margin: 0; }
.rec-facts { margin: 0; color: var(--muted); }
.rec .hint-inline { margin: 0; }
.not-possible { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 12px; }
.not-possible > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.not-possible > summary::-webkit-details-marker { display: none; }
.not-possible > summary h3 { margin: 0; font-size: 1.05rem; }
.not-possible > summary h3::after { content: " ▸"; color: var(--muted); }
.not-possible[open] > summary h3::after { content: " ▾"; }
.np-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.np-list li { display: grid; gap: 2px; border-left: 3px solid color-mix(in srgb, var(--danger) 50%, var(--line)); padding: 4px 10px; }
.np-list a { text-decoration: none; }
.choice .facts { grid-template-columns: 1fr !important; }

/* application file */
.app-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-head h2, .app-head h3 { margin: 0; }
.app-card p { margin: 8px 0 0; }
.stronger-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.stronger-list a { text-decoration: none; }
.app-full { margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.pred { margin: 12px 0; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); }
.pred p { margin: 0; } .pred-main strong { font-size: 1.25rem; margin: 0 6px; }
.pred .muted.small { margin-top: 4px; }
.file-parts { display: grid; gap: 8px; margin: 12px 0; }
.file-part { display: grid; grid-template-columns: minmax(150px, 230px) 140px 1fr; gap: 10px; align-items: center; }
.file-part .meter { display: block; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.file-part .meter span { display: block; height: 100%; background: var(--grad); }
.ideas { margin: 6px 0; padding-left: 20px; }
.plan-title { margin-top: 8px; }
@media (max-width: 700px) { .file-part { grid-template-columns: 1fr; gap: 2px; } }
/* small screens: let long words and dates wrap inside grid cells (no horizontal scroll) */
.kid-facts > div { grid-template-columns: 6.5em minmax(0, 1fr); }
.kid-facts dd, .ft-title, .ft-meta, .rec-name, .rec-facts, .choice, .np-list li, .file-part, .tile-sub, .tile-value { overflow-wrap: anywhere; min-width: 0; }
.ft-ev { grid-template-columns: 6em minmax(0, 1fr) auto; }
@media (max-width: 600px) { .ft-ev { grid-template-columns: minmax(0, 1fr); } .ft-list { padding-left: 14px; } }
.badge-type { background: var(--teal-soft); color: var(--fg); font-weight: 600; }
.fr-sel-table .group-row th { text-align: left; background: var(--surface-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
/* one action plan: text left, a fixed "add to timeline" column right (stacked on phones) */
.plan-merged li { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 8px 16px; align-items: start; }
.plan-merged li > div p { margin: 4px 0 0; }
.plan-merged .badge-type { margin-right: 6px; }
.plan-merged form.form-inline { display: grid; gap: 6px; margin: 0; }
.plan-merged form.form-inline input[type="date"] { width: 100%; margin: 0; }
.plan-merged li > .badge { justify-self: start; }
@media (max-width: 640px) { .plan-merged li { grid-template-columns: minmax(0, 1fr); } }
.rec-groups.rec-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rec-groups.rec-cols-1 { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
@media (max-width: 900px) { .rec-groups.rec-cols-2 { grid-template-columns: 1fr; } }
.sch-line { margin: 0; color: var(--ok); }
.sch-list a { font-weight: 600; text-decoration: none; }

/* icons (Lucide, inline SVG) */
.icon { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.tool-icon { color: var(--brand); } .tool-icon .icon { width: 22px; height: 22px; vertical-align: 0; }
.feature-icon { color: var(--brand); } .feature-icon .icon { width: 22px; height: 22px; vertical-align: 0; }
.ask-ai-icon .icon { width: 20px; height: 20px; vertical-align: -4px; }
.why-not .icon { color: var(--danger); } .hint-inline .icon { color: var(--brand); } .sch-line .icon { color: var(--ok); }
.track .icon { vertical-align: -.2em; margin-right: .2em; } .track-late .icon { color: var(--danger); } .track-ok .icon { color: var(--ok); }

/* ---------- forms review (2026-10-20) ---------- */
.form-grid { align-items: end; }   /* fields line up even when a label wraps onto two lines */
.grades-table .lvl-text { display: inline-block; padding: 8px 4px; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.grades-table select[name^="kind"] { min-width: 7.5em; }
.test-scores > p { margin: 0 0 4px; }
.more-tests > summary { cursor: pointer; color: var(--brand); font-weight: 600; margin: 12px 0 2px; font-size: .92rem; }
.country-rank { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px 18px; }
/* countries considered: three ranked slots (1st / 2nd / 3rd choice) */
.country-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin: 6px 0 10px; }
.country-slot { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.country-slot .slot-rank { font-size: .82rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; }
.country-slot .slot-rank .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.country-slot select { width: 100%; margin: 0; }
@media (max-width: 640px) { .country-slots { grid-template-columns: 1fr; } }
.country-rank .rank-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.country-rank .rank-row label.check { margin: 0; }
fieldset.section-break { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 26px; }
@media (max-width: 640px) {
  .grades-table td[data-label]::before { content: attr(data-label); display: block; font-size: .72rem; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
  .dash-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; position: static; }   /* all four tabs visible on a phone (2 × 2), none hidden off-screen */
  .dash-tabs a { white-space: nowrap; text-align: center; justify-content: center; padding-left: 8px; padding-right: 8px; }
  .dash-tabs .tab-back { display: none; }
  .onb-steps li:not(.current) { display: none; }
  .setup-chips { font-size: .78rem; gap: 4px; }
  .setup-chips li > a, .setup-chips li > span { padding: 3px 8px; }
}
.country-rank .rank-row:not(:has(input:checked)) select { visibility: hidden; }   /* rank only for ticked countries */
/* single list (no grades yet): full width, details on the left, the target form on the right */
.rec-groups.rec-single.rec-cols-1 { max-width: none; }
.rec-single .rec { grid-template-columns: minmax(0, 1fr) auto; align-items: start; column-gap: 18px; }
.rec-single .rec > * { grid-column: 1; }
.rec-single .rec > .rec-form { grid-column: 2; grid-row: 1 / span 6; align-self: center; }
@media (max-width: 700px) { .rec-single .rec { grid-template-columns: minmax(0, 1fr); } .rec-single .rec > .rec-form { grid-column: 1; grid-row: auto; } }
/* chances tool: "what it takes" panel (no grades needed) and the optional grades step */
.form-step { margin: 22px 0 4px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .95rem; }
#chances-results:not(:empty) { margin-bottom: 16px; }
.expect h3 { margin-top: 0; }
.expect-list { margin: 0; }
.expect-list dt { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 14px; }
.expect-list dd { margin: 4px 0 0; }
.expect-list ul { margin: 0; padding-left: 18px; }
.later-results { margin: 10px 0 4px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; }
.later-results > summary { cursor: pointer; font-weight: 600; font-size: .92rem; color: var(--brand); }
.later-results p { margin: 6px 0 0; }
@media (max-width: 960px) { .tool-form #chances-expect { margin: 14px 0 4px; } .tool-form #chances-expect .card { box-shadow: none; border: 1px solid var(--line); padding: 16px; } }

/* ---------- tools as entry points (2026-10-20): chip answers, readable results, sign-up invitation ---------- */
.quiz .q { margin: 0 0 22px; }
.quiz .q:first-of-type { margin-top: 0; }
.quiz .q legend { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-weight: 700; font-size: 1rem; margin-bottom: 10px; }
.q-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: .8rem; font-weight: 750; flex: none; }
.q-why { font-weight: 500; font-size: .84rem; color: var(--muted); width: 100%; padding-left: 36px; margin-top: -2px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-form .choices label { display: inline-flex; flex-direction: column; justify-content: center; margin: 0; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-weight: 550; font-size: .92rem; line-height: 1.25; transition: border-color .15s, background .15s; }
.tool-form .choices label:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.choices input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tool-form .choices label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-2); box-shadow: 0 0 0 1px var(--brand); }
.tool-form .choices label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.choices.stack { flex-direction: column; }
.tool-form .choices.stack label { border-radius: 12px; }
.choices .sub { font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.results-title { font-size: 1.25rem; margin: 0 0 12px; }
.pc-head { margin: 0 0 4px; font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.pc-head.ok { color: var(--ok); } .pc-head.warn { color: var(--warn); }
.result-links { font-size: .92rem; margin: 10px 0 0; }
.result-rest > summary { cursor: pointer; font-weight: 700; }
.rest-list { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 10px; }
.rest-list li { display: grid; grid-template-columns: minmax(150px, 1fr) 90px 34px; gap: 4px 10px; align-items: center; }
.rest-list .meter { height: 6px; }
.rest-score { font-weight: 700; font-size: .9rem; color: var(--muted); }
.rest-why { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }
.tool-cta { display: flex; gap: 16px; align-items: flex-start; margin-top: 18px; border: 2px solid color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.tool-cta h2 { margin: 0 0 6px; font-size: 1.2rem; }
.tool-cta p { margin: 0 0 10px; }
.tool-cta-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: #fff; }
.tool-cta-icon .icon { width: 22px; height: 22px; }
.tool-cta-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
@media (max-width: 640px) { .tool-cta { flex-direction: column; } .rest-list li { grid-template-columns: 1fr 70px 30px; } }
.tool-form.quiz { position: static; max-height: none; overflow: visible; }   /* long questionnaires: no inner scroll */
.tool-form .choices label { display: inline-block; }
.choices .sub { display: block; }
.tag-group + .tag-group { margin-top: 12px; }
.tag-group-title { margin: 0 0 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.quiz select { max-width: 320px; }
.dl-summary { margin-bottom: 14px; border-left: 4px solid var(--brand); }
.dl-kicker { margin: 0 0 4px; font-size: .85rem; color: var(--muted); font-weight: 600; }
.dl-count { margin: 0; font-size: 1.02rem; }
.deadline-actions { margin-top: 16px; }
.deadline-actions .form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.deadline-actions .icon { margin-right: 4px; }
.expect h3 { font-size: 1rem; margin: 18px 0 6px; }
.chance-box { border-radius: 12px; padding: 12px 14px; margin: 8px 0 4px; border: 1px solid var(--line); }
.chance-box p { margin: 0; }
.chance-box .chance-label { font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.chance-box.good { background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.chance-box.good .chance-label { color: var(--ok); }
.chance-box.mid { background: color-mix(in srgb, var(--warn) 9%, var(--surface)); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.chance-box.mid .chance-label { color: var(--warn); }
.chance-box.low { background: color-mix(in srgb, var(--danger) 7%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.chance-box.low .chance-label { color: var(--danger); }
.req { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.req li { position: relative; padding-left: 24px; }
.req li::before { position: absolute; left: 0; top: .05em; font-weight: 800; }
.req.must li::before { content: "!"; color: var(--warn); left: 6px; }
.req.good li::before { content: "+"; color: var(--ok); left: 4px; }
.req.level li::before { content: "•"; color: var(--brand); left: 6px; }
.cost-headline { margin: 4px 0 0; }
.cost-headline .cost-total { font-size: 1.9rem; }
.small-total { font-size: 1.3rem; }
.cost-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-2); margin: 12px 0 10px; }
.cost-bar .tu, .dot.tu { background: var(--brand); }
.cost-bar .li, .dot.li { background: var(--teal); }
.cost-bar .ex, .dot.ex { background: var(--accent); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; }
.cost-compare tr.current td { background: var(--brand-soft); font-weight: 650; }
.cost-card h3 { font-size: 1rem; margin: 20px 0 6px; }
.cost-extra { margin-top: 4px; }
.cost-extra label { font-weight: 600; font-size: .92rem; }
.choices-gap { margin-top: 8px; }
.cost-compare td:not(:first-child), .cost-card table td:last-child { white-space: nowrap; }
.tool-layout > * { min-width: 0; }   /* wide tables scroll inside their wrapper instead of widening the page */
/* home (2026-10-20): useful country facts, clickable steps leading to the account, two actions in the final band */
.cc-facts { margin: 6px 0 12px; display: grid; gap: 6px; font-size: .88rem; }
.cc-facts dt { display: flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cc-facts dt .icon { width: 14px; height: 14px; color: var(--brand); }
.cc-facts dd { margin: 0 0 4px; color: var(--fg); line-height: 1.4; }
a.card.step { color: var(--fg); text-decoration: none; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
a.card.step:hover { border-color: var(--brand); transform: translateY(-2px); }
a.card.step p { flex: 1; }
a.card.step .more { margin-top: 12px; color: var(--brand); font-weight: 650; font-size: .92rem; }
a.card.step .more::after { content: " →"; }
.step-account { border: 2px solid color-mix(in srgb, var(--accent) 50%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.step-account.card.step::before { background: var(--accent); box-shadow: 0 8px 18px rgba(255, 122, 61, .3); }
a.card.step-account .more { color: var(--accent-ink); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.btn-ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.75); box-shadow: none; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; }
/* country guides (2026-10-20): key facts, quiet citations, folded reference sections, next steps */
sup.cite { font-size: .68em; line-height: 0; margin-left: 1px; }
sup.cite a { color: var(--muted); text-decoration: none; padding: 0 1px; }
sup.cite a:hover { color: var(--brand); text-decoration: underline; }
.doc-fold { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 6px; }
.doc-fold > summary { cursor: pointer; list-style: none; }
.doc-fold > summary::-webkit-details-marker { display: none; }
.doc-fold > summary h2 { display: inline; font-size: 1.15rem; color: var(--muted); }
.doc-fold > summary h2::after { content: "  ▸"; font-size: .9rem; }
.doc-fold[open] > summary h2::after { content: "  ▾"; }
.toc-fold > summary { cursor: pointer; list-style: none; }
.toc-fold > summary::-webkit-details-marker { display: none; }
@media (max-width: 960px) { .toc-fold > summary::after { content: " ▸"; } .toc-fold[open] > summary::after { content: " ▾"; } }
.key-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; padding: 18px 20px; margin: 0 0 26px; border-radius: 14px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); }
.key-facts p { margin: 4px 0 0; font-size: .95rem; line-height: 1.45; }
.kf-label { display: flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-2); }
.kf-label .icon { width: 15px; height: 15px; }
.kf-fit { grid-column: 1 / -1; font-weight: 650; }
@media (max-width: 760px) { .key-facts { grid-template-columns: 1fr; } }
.country-next { margin-top: 34px; }
.country-next h2 { margin-top: 0; }
.next-tool { display: flex; flex-direction: column; gap: 6px; color: var(--fg); text-decoration: none; transition: border-color .15s; }
.next-tool:hover { border-color: var(--brand); }
.next-tool span:last-child { color: var(--muted); font-size: .92rem; }
.doc-body .tool-cta h2 { margin-top: 0; }
.country-next .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .country-next .grid-3 { grid-template-columns: 1fr; } }
.next-tool .tool-icon { position: static; margin: 0 0 4px; width: 36px; height: 36px; transform: none; box-shadow: none; }
.next-tool { padding: 16px; }

/* ---------- guides as entry points (2026-10-20): key points, country chips ---------- */
.key-points { padding: 18px 20px 6px; margin: 0 0 26px; border-radius: 14px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line)); }
.key-points .kf-label { margin: 0 0 8px; }
.key-points ul { margin: 0 0 12px; padding-left: 20px; }
.key-points li { margin: 0 0 8px; line-height: 1.5; }
.country-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.country-chips a { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); font-weight: 600; text-decoration: none; transition: border-color .15s; }
.country-chips a:hover { border-color: var(--brand); }

/* ---------- universities as entry points (2026-10-20) ---------- */
.key-facts.kf-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
.schol-list { list-style: none; padding: 0; margin: 0 0 10px; }
.schol-list li { padding: 10px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.schol-list li:last-child { border-bottom: 0; }
.uni-more { text-align: center; margin: 14px 0 4px; }
.fr-sel-fold > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.fr-sel-fold > summary::-webkit-details-marker { display: none; }
.fr-sel-fold > summary .h2 { font-size: 1.5rem; font-weight: 750; color: var(--fg); }
.fr-sel-fold[open] > summary { margin-bottom: 12px; }
.uni-main .tool-cta { margin-top: 0; }
@media (max-width: 760px) { .key-facts.kf-4 { grid-template-columns: 1fr; } }

/* guide sections: open on wide screens, folded to their headings on phones (data-open-wide) */
.doc-sec { border-top: 1px solid var(--line); margin-top: 1.4em; padding-top: 1.1em; scroll-margin-top: calc(var(--header-h) + 16px); }
.doc-sec > summary { list-style: none; cursor: pointer; }
.doc-sec > summary::-webkit-details-marker { display: none; }
.doc .doc-sec > summary h2 { border: 0; margin: 0 0 .5em; padding: 0; }
.doc-fold { scroll-margin-top: calc(var(--header-h) + 16px); }
@media (min-width: 961px) { .doc-sec > summary { pointer-events: none; cursor: text; } }
@media (max-width: 960px) {
  .doc-sec { margin-top: 0; padding: 12px 0; }
  .doc .doc-sec > summary h2 { display: flex; justify-content: space-between; gap: 12px; margin: 0; font-size: 1.15rem; }
  .doc .doc-sec > summary h2::after { content: "▸"; color: var(--brand); flex: none; }
  .doc .doc-sec[open] > summary h2 { margin-bottom: .6em; }
  .doc .doc-sec[open] > summary h2::after { content: "▾"; }
}
/* university card on phones: the identity card right after "At a glance" */
@media (max-width: 900px) {
  .uni-main { display: contents; }
  .uni-main > * { order: 3; }
  .uni-main > .key-facts { order: 1; }
  .uni-facts { order: 2; }
}

/* ---------- family timeline, horizontal (2026-10-20): one row per child, icons per milestone ---------- */
.ft-scroll { overflow-x: auto; margin: 12px 0 0; border: 1px solid var(--line); border-radius: 12px; }
.ft-grid { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; font-size: .85rem; }
.ft-grid th, .ft-grid td { padding: 6px 4px; text-align: center; vertical-align: middle; border-bottom: 1px solid var(--line); min-width: 40px; }
.ft-grid tbody tr:last-child > * { border-bottom: 0; }
.ft-grid thead th { font-weight: 650; color: var(--muted); white-space: nowrap; line-height: 1.2; background: var(--surface-2); }
.ft-grid thead th span { display: block; font-size: .72rem; font-weight: 750; color: var(--brand-2); }
.ft-grid thead th.ft-y { border-left: 2px solid var(--line); }
.ft-grid .ft-now { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ft-grid thead th.ft-now { color: var(--accent-ink); }
.ft-grid .ft-q { min-width: 16px; width: 16px; padding: 0; color: var(--muted); background: repeating-linear-gradient(135deg, transparent 0 4px, var(--surface-2) 4px 8px); }
.ft-grid .ft-name-col { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding: 6px 10px; min-width: 0; max-width: 8.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-right: 1px solid var(--line); }
.ft-grid thead .ft-name-col { background: var(--surface-2); }
.ft-lane .ft-name-col { box-shadow: inset 4px 0 0 var(--kid); }
.ft-lane .ft-name-col a { color: var(--kid); font-weight: 750; text-decoration: none; }
.ft-lane[hidden] { display: none; }
.ft-lane td { white-space: nowrap; }
.ft-ic { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: 1px; padding: 0; border-radius: 50%; border: 2px solid var(--kid, var(--brand)); background: var(--surface); color: var(--kid, var(--brand)); cursor: pointer; vertical-align: middle; }
.ft-ic .icon { width: 14px; height: 14px; }
.ft-ic.ft-deadline { background: var(--kid, var(--brand)); color: #fff; }
.ft-ic.ft-late { background: var(--danger); border-color: var(--danger); color: #fff; }
.ft-ic.ft-start { background: var(--kid, var(--brand)); color: #fff; box-shadow: 0 0 0 3px color-mix(in srgb, var(--kid, var(--brand)) 25%, transparent); }
.ft-ic.ft-milestone { border-style: dashed; }
.ft-ic:hover, .ft-ic:focus-visible, .ft-ic.pinned { transform: scale(1.18); outline: 2px solid var(--fg); outline-offset: 1px; }
.ft-detail { min-height: 2.6em; margin: 10px 0 6px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: .92rem; border-left: 4px solid var(--line); }
.ft-detail.on { border-left-color: var(--kid, var(--brand)); }
.ft-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; font-size: .82rem; color: var(--muted); }
.ft-legend li { display: flex; align-items: center; gap: 6px; }
.ft-legend .ft-ic { width: 20px; height: 20px; cursor: default; --kid: var(--muted); }
.ft-legend .ft-ic .icon { width: 11px; height: 11px; }
.ft-grid tbody .ft-name-col { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.ft-hint { display: none; }
@media (max-width: 700px) { .ft-grid .ft-name-col { max-width: 5.5em; padding: 6px 8px; } .ft-hint { display: inline; } }
.tool-form .choices label[hidden] { display: none; }
/* long option texts ("Academic year 2027–28 (applying now)", "Before the end of this school year · ~Jun 2027") must not widen their form on phones */
.onb-form select { min-width: 0; max-width: 100%; }
.onb-form select { flex: 1 1 220px; }
.tab-panel { grid-template-columns: minmax(0, 1fr); } .tab-panel > * { min-width: 0; }
/* auto-fit grids: the column minimum never exceeds the space available (small phones, 320 px) */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.form-grid { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.stage-options { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
.completion-list { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.kid-grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.country-rank { grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); }
.plan-merged li { grid-template-columns: minmax(0, 1fr) 290px; }
@media (max-width: 900px) { .plan-merged li { grid-template-columns: minmax(0, 1fr) 240px; } }
@media (max-width: 640px) { .plan-merged li { grid-template-columns: minmax(0, 1fr); } }

/* ---------- currency picker next to results; even choice chips (2026-10-20) ---------- */
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; }
.results-head h2, .results-head .dl-kicker { margin: 0; }
.cost-card .results-head { margin-bottom: 6px; }
.cur-pick { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); font-weight: 600; margin: 0; white-space: nowrap; }
.cur-pick select { width: auto; margin: 0; padding: 4px 28px 4px 10px; font-size: .88rem; min-height: 0; }
.kf-cur { margin-left: auto; }
.kf-cur .cur-pick { font-size: .78rem; text-transform: none; letter-spacing: 0; }
.money[title] { border-bottom: 1px dotted currentColor; }
.tool-form .choices-even { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 8px; }
.tool-form .choices-even label { display: flex; flex-direction: column; justify-content: center; min-height: 56px; border-radius: 14px; }
.tool-form .choices label { vertical-align: top; }
.cost-extra { display: block; margin-top: 14px; max-width: 220px; }

/* ---------- university search form (2026-10-20) ---------- */
input[type=search] { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--fg); font: 1rem var(--font); transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }   /* same as the other text fields */
.uni-filters { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px 16px; align-items: end; padding: 20px 22px 16px; }
.uni-filters > label { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.uni-filters select, .uni-filters input[type=search] { margin: 0; min-height: 46px; }
.uf-label { font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.uf-input { position: relative; display: block; }
.uf-input .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.uf-input input[type=search] { padding-left: 40px; }
.uf-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.uf-foot .check { margin: 0; }
.uf-count { margin: 0; font-weight: 700; color: var(--brand-2); font-size: .92rem; }
@media (max-width: 900px) { .uni-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .uf-search { grid-column: 1 / -1; } }
@media (max-width: 560px) { .uni-filters { grid-template-columns: minmax(0, 1fr); } }
/* the full list on phones: the flag stands for the country so the table fits */
@media (max-width: 560px) {
  #uni-table .uc-country { position: relative; }   /* keeps the hidden name inside the scrolling table */
  #uni-table .uc-name { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #uni-table th:last-child { font-size: 0; }
  #uni-table th:last-child::after { content: "🌐"; font-size: .9rem; }
  #uni-table th, #uni-table td { padding-left: 8px; padding-right: 8px; }
}
/* child card footer: dashboard button and a discreet remove link (asks for the name on the child page) */
.kid-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: auto; }
.kid-remove { font-size: .85rem; color: var(--muted); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--muted) 40%, transparent); }
.kid-remove:hover, .kid-remove:focus-visible { color: var(--danger); }

/* Application tab: "What would help most" (top 3, one line each) */
.help-most { margin: 18px 0 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--teal-soft); }
.help-most h3 { margin: 0 0 8px; font-size: 1.05rem; }
.help-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.help-list li { display: list-item; }
.help-list li .muted { display: block; margin-top: 2px; }
.help-more { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.help-more a { text-decoration: none; }

.ready-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }   /* open profile questions once choices are made: one line, not a gate */
.ready-hint .inline-form { display: inline-flex; margin: 0; }

.refresh-rec { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 4px; }   /* Update the suggestions */
.refresh-rec .btn .icon { width: 1em; height: 1em; vertical-align: -0.15em; }
/* general form QA (2026-10-21) */
.setup .onb-label { margin: 0; }
.setup .onb-label input { flex: none; width: 140px; height: auto; }   /* not stretched by .onb-form input's flex in the label's column */
.setup .onb-form:has(.onb-label) { align-items: flex-end; }
.setup .lang-grid.setup-langs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) { .setup .lang-grid.setup-langs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.onb-form select[data-curriculum] { flex: 2 1 300px; }
.setup .field-pick { display: flex; flex-direction: column; gap: 4px; max-width: calc((100% - 28px) / 3); margin: 0 0 14px; }
.setup .field-pick select { max-width: none; width: 100%; margin: 0; }
@media (max-width: 640px) { .setup .field-pick { max-width: none; } }
.setup .form-actions, .setup .onb-form { margin-top: 12px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 70px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--brand); font: 600 .88rem var(--font); padding: 8px 10px; min-height: 36px; border-radius: 8px; cursor: pointer; }
.pw-toggle:hover { background: color-mix(in srgb, var(--brand) 10%, transparent); }
.settings-fold > form.form > .btn { margin-top: 8px; }
.settings-fold > .form-inline { margin-top: 12px; }
.settings-fold .data-actions { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
label.check.untick-confirm { margin-left: 28px; padding: 8px 12px 8px 40px; border-radius: 10px; background: color-mix(in srgb, var(--danger, #e5484d) 10%, transparent); }
label.check.untick-confirm input { left: 12px; top: calc(8px + .2em); }
select { padding-top: 10px; padding-bottom: 10px; }   /* same height as the text fields beside it (43 px, not 45) */
.form .btn-block { margin-top: 18px; }   /* auth forms: the main button not glued to the last field */
/* grades form: overall results in groups (this year / last year / end of this year) */
.grades-form .overall .ov-group { margin: 18px 0 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 12px; }
.grades-form .overall .ov-group legend { padding: 0 6px; margin: 0 0 0 -6px; }
.grades-form .overall .ov-group > p { margin: 0 0 2px; }
.grades-form .overall .form-grid label { margin-top: 10px; }
.grades-form .overall .later-results { margin: 12px 0 0; }
.grades-form .overall .later-results > summary .muted { font-weight: 450; }
.grades-form .overall > p.muted { margin: 12px 0 0; }
.grades-form .overall .ov-tests { margin-top: 18px; }
.grades-form .overall .form-grid { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
/* grades form: the help on the three types of grade (header tooltip on desktop, a fold on phones where the header is hidden) */
.grades-table th .tip { font-size: .7rem; }
.type-help { margin: 8px 0 4px; }
.type-help > summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .9rem; }
.type-help ul { margin: 6px 0 4px; padding-left: 18px; }
.type-help p { margin: 4px 0 0; }
button.tip { border: 0; padding: 0; line-height: 1; }
.tabs-pending .tab-panel { visibility: hidden; }   /* until app.js opens the requested tab (early.js) */
/* the header of each tab of a child's page (tab_head()): the Overview set-up card's design everywhere; green "result" variant on the Application tab */
.tab-head { border: 2px solid color-mix(in srgb, var(--brand) 35%, var(--line)); }
.tab-head:not(.card) { border-radius: 14px; padding: 14px 16px; margin: 12px 0 18px; background: linear-gradient(135deg, var(--brand-soft), var(--surface) 60%); }
.tab-head h2 { margin: 6px 0 4px; }
.tab-head .tab-head-text { margin: 6px 0 0; }
.tab-head .ready-next { margin-top: 10px; }
.tab-head-result { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.tab-head-result:not(.card) { background: linear-gradient(135deg, color-mix(in srgb, var(--ok) 12%, var(--surface)), var(--surface) 60%); }
.tab-head-result .eyebrow { color: var(--ok); }
.tab-head-result .meter span { background: var(--ok); }
/* family page: the "Ask Retireacross AI agent" box stands out (gradient border, tinted background, icon in a gradient circle, orange badge) */
.ask-ai { padding: 14px 16px; border: 2px solid transparent; border-radius: 16px;
  background: linear-gradient(120deg, var(--brand-soft), var(--teal-soft)) padding-box, var(--grad) border-box;
  box-shadow: 0 6px 22px color-mix(in srgb, var(--brand) 18%, transparent); }
.ask-ai-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; }
.ask-ai-icon .icon { width: 20px; height: 20px; vertical-align: 0; }
.ask-ai input { color: var(--fg); font-weight: 550; font-size: 1.02rem; }
.ask-ai input::placeholder { color: color-mix(in srgb, var(--fg) 72%, transparent); opacity: 1; }
.ask-ai .badge { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-weight: 700; }
/* ---- mobile & tablet QA (Galaxy S24 Ultra 384 px, iPhone 17 Pro 402 px, tablet 768 / 1024 px), 2026-10-21 ---- */
/* family page: the stage badge goes under the child's name (it squeezed "Grade 12 · US diploma" into a narrow column) */
.kid-head { grid-template-columns: auto 1fr; }
.kid-head .stage-chip { grid-column: 2; justify-self: start; }
/* touch screens: tap targets of at least 40 px, fields at 16 px (iPhone Safari zooms in on smaller ones) */
@media (pointer: coarse) {
  .nav-toggle { min-height: 44px; }
  .theme-toggle { width: 44px; height: 44px; }
  .btn-small { min-height: 40px; display: inline-flex; align-items: center; }
  .sibling-nav a { padding: 10px 16px; }
  .setup-chips li > a, .setup-chips li > span { padding: 8px 12px; }
  .crumbs a { display: inline-block; padding: 8px 0; }
  .site-footer li { margin: 0; } .site-footer li a, .site-footer li button { display: inline-block; padding: 9px 0; }
  button.linklike, summary.linklike, .kid-remove, .stage-edit > summary, .more-fold > summary, .later-results > summary, .type-help > summary { display: inline-block; padding-top: 10px; padding-bottom: 10px; }
  .kid-useful a, .kid-step a, .result-links a, .meta a { display: inline-block; padding: 6px 0; }
  input:not([type=checkbox]):not([type=radio]), select, textarea,
  .inline-form select, .inline-form input, .grades-table input, .grades-table select, .cur-pick select { font-size: 16px; }
  .beta-badge { font-size: .72rem; }
}
/* phones: the page banner and the cards inside cards take less room, so the content starts higher and names are not cut */
@media (max-width: 640px) {
  .page-hero-inner { padding-top: 22px; padding-bottom: 24px; }
  .page-hero h1 { font-size: 1.75rem; }
  .page-hero .lead { font-size: .98rem; }
  .card .card, .tab-panel.card article, .tab-panel.card .rec, .tab-head:not(.card) { padding-left: 14px; padding-right: 14px; }
  .tab-panel.card { padding: 18px 14px; }
}
@media (max-width: 640px) {
  .page-hero + .wrap.section, .page-hero + main .wrap.section { padding-top: 24px; }
  /* the children chips: one row that scrolls sideways, "+ Add a child" included */
  .sibling-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .sibling-nav::-webkit-scrollbar { display: none; }
  .sibling-nav a { flex: none; white-space: nowrap; }
}
/* countries page (entry point): photo cards with the name on the photo, key facts, and a comparison table */
.countries-intro { margin: 0 0 22px; font-size: 1.05rem; color: var(--muted); }
.countries-intro a { font-weight: 650; }
.countries-grid { gap: 20px; }
.country-card.cc-big { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.country-card.cc-big:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 14px 34px color-mix(in srgb, var(--brand) 18%, transparent); }
.country-card.cc-big .cc-top { height: 170px; }
.country-card.cc-big .cc-top::after { background: linear-gradient(180deg, transparent 35%, rgba(8, 14, 30, .78)); }
.country-card .cc-name { position: absolute; left: 18px; right: 18px; bottom: 12px; z-index: 1; margin: 0; color: #fff; font-size: 1.35rem; display: flex; align-items: center; gap: 10px; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.country-card .cc-flag-inline { font-size: 1.7rem; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.country-card .cc-lead { color: var(--fg); font-weight: 600; font-size: .98rem; line-height: 1.45; }
.country-card.cc-big .more { color: var(--brand); font-weight: 650; }
.compare { margin-top: 44px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.compare-table th, .compare-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare-table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); }
.compare-table tbody th a { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; text-decoration: none; white-space: nowrap; }
.compare-table tbody tr:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
@media (max-width: 700px) { .compare-table { min-width: 720px; } }
/* country finder: the podium of the three best countries, and the "best match" bar on phones */
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 4px 0 18px; }
.pod { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px 14px 14px; border-radius: 16px; text-decoration: none; color: var(--fg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.pod:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.pod-1 { background: linear-gradient(150deg, color-mix(in srgb, var(--brand) 16%, var(--surface)), var(--surface) 70%); border: 2px solid transparent;
  background-clip: padding-box; outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: -2px; }
.pod-rank { position: absolute; top: 10px; right: 12px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: .85rem; color: #fff; background: #94a3b8; }
.pod-1 .pod-rank { background: linear-gradient(135deg, #f5b301, #f08c00); }
.pod-2 .pod-rank { background: linear-gradient(135deg, #b8c2cc, #8a96a3); }
.pod-3 .pod-rank { background: linear-gradient(135deg, #d99459, #b06a32); }
.pod-flag { font-size: 1.9rem; line-height: 1; }
.pod-name { font-weight: 750; font-size: 1.05rem; }
.pod-score { font-size: 1.6rem; font-weight: 800; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pod-score small { font-size: .75rem; font-weight: 650; -webkit-text-fill-color: var(--muted); margin-left: 2px; }
.pod.low .pod-score { background: none; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.pod-why { font-size: .84rem; color: var(--muted); line-height: 1.35; }
@media (max-width: 560px) { .podium { grid-template-columns: 1fr; } .pod { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 10px; } .pod-why { flex-basis: 100%; } .pod-score { margin-left: auto; margin-right: 34px; } }
.finder-live { margin: 6px 0 0; }
.finder-bar { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: var(--fg); color: var(--bg); text-decoration: none; font-size: .92rem; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.finder-bar strong { color: inherit; }
.finder-bar .fb-go { font-weight: 700; white-space: nowrap; }
.finder-sum { margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.finder-sum .fs-head { margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.finder-sum ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.finder-sum li { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .86rem; font-weight: 600; line-height: 1.25; }
.finder-sum li .icon { flex: none; width: 15px; height: 15px; color: var(--brand); }
/* chances: the three levels as podium cards, "how admission works" in a soft panel */
.ch-lv-head { margin: 0 0 8px; }
.ch-levels .pod { cursor: pointer; }
.ch-levels .pod-score { font-size: 1.3rem; }
.ch-levels .pod-score small { font-size: .75rem; white-space: nowrap; display: inline-block; }
.ch-lv-you { order: -1; font-size: .75rem; font-weight: 750; color: var(--brand); text-transform: uppercase; letter-spacing: .05em; }
.ch-how { margin: 14px 0 12px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; }
.ch-how .pc-head { margin-top: 0; }
.ch-how p:last-of-type { margin-bottom: 6px; }
@media (max-width: 560px) { .ch-levels .pod-score { margin-right: 0; } .ch-lv-you { flex-basis: 100%; } }
.finder-sum .fs-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 8px; }
.finder-sum .fs-top .fs-head { margin: 0; flex: 1 1 auto; min-width: 0; }
.finder-sum .fs-cur { flex: none; }
.finder-sum .fs-cur .cur-pick { white-space: nowrap; }
.finder-sum .fs-flag { font-size: 1rem; line-height: 1; }
/* deadlines: vertical timeline, the rail on the left, one card per date on the right */
.vtl-wrap .dl-count { margin: 0 0 10px; }
.vtl-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; padding: 0; font-size: .82rem; color: var(--muted); }
.vtl-legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.vtl-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--vk); color: var(--vk); background: var(--surface); }
.vtl-dot .icon { width: 12px; height: 12px; }
.vtl { list-style: none; margin: 0; padding: 0; position: relative; }
.vtl::before { content: ""; position: absolute; left: 17px; top: 6px; bottom: 18px; width: 2px; background: linear-gradient(var(--line), var(--line)) ; border-radius: 2px; }
.vtl > li { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; margin: 0 0 12px; align-items: start; }
.vtl-node { position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--vk, var(--brand)); background: var(--surface); color: var(--vk, var(--brand)); }
.vtl-node .icon { width: 17px; height: 17px; }
.k-deadline { --vk: var(--accent); } .k-test { --vk: var(--brand); } .k-visa { --vk: var(--teal, var(--brand-2)); } .k-result { --vk: var(--ok); } .k-open { --vk: var(--brand-2); } .k-key { --vk: var(--muted); } .k-start { --vk: var(--brand); }
.vtl-item.k-deadline .vtl-node, .vtl-item.k-start .vtl-node { background: var(--vk); color: #fff; }
.vtl-item.k-start .vtl-node { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.vtl-card { padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--vk, var(--line)); border-radius: 12px; background: var(--surface); }
.vtl-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 2px; font-size: .86rem; }
.vtl-when time { font-weight: 750; color: var(--fg); }
.vtl-kind { color: var(--vk, var(--muted)); font-weight: 650; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.vtl-next { background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 9px; font-size: .75rem; font-weight: 750; }
.vtl-title { margin: 0 0 4px; font-weight: 650; line-height: 1.4; }
.vtl-card .meta { font-size: .84rem; color: var(--muted); }
.vtl-item.next .vtl-card { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.vtl-item.next .vtl-node { transform: scale(1.1); }
.vtl-item.past { opacity: .55; }
.vtl-month { margin: 6px 0 8px !important; }
.vtl-month span { grid-column: 1 / -1; justify-self: start; position: relative; z-index: 1; padding: 3px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .8rem; font-weight: 750; color: var(--brand-2); }
.vtl-today { align-items: center !important; }
.vtl-today .vtl-node { --vk: var(--danger); width: 36px; height: 36px; }
.vtl-today-label { font-weight: 750; color: var(--danger); font-size: .9rem; border-top: 2px dashed color-mix(in srgb, var(--danger) 50%, transparent); padding-top: 4px; }
.vtl-item.k-start .vtl-card { background: var(--brand-soft); }
@media (max-width: 560px) { .vtl > li { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; } .vtl::before { left: 14px; } .vtl-node { width: 30px; height: 30px; } .vtl-node .icon { width: 15px; height: 15px; } .vtl-card { padding: 9px 11px; } }
.pod-cost { font-size: .84rem; font-weight: 650; color: var(--fg); }
.pod-cost small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.finder-fieldnote { margin: -6px 0 16px; }
.res-facts { list-style: none; margin: 12px 0 14px; padding: 12px 14px; display: grid; gap: 8px; background: var(--surface-2); border-radius: 12px; font-size: .92rem; line-height: 1.4; }
.res-facts li { display: flex; gap: 10px; align-items: flex-start; margin: 0; }
.res-facts .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--brand); }
@media (max-width: 560px) { .pod-cost { flex-basis: 100%; order: 5; } }
@media (min-width: 900px) { .finder-bar { display: none; } }

/* ---------- Cost calculator 2027: degree headline, year timeline, 12-country strip, sticky bar on phones ---------- */
.cost-hero { margin: 10px 0 4px; padding: 16px 18px; border-radius: var(--radius-sm); background: var(--brand-soft); }
.cost-hero-k { margin: 0; font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-2); }
.cost-card .cost-big { font-size: clamp(2.3rem, 9vw, 3.4rem); line-height: 1.05; margin: 6px 0 4px; overflow-wrap: anywhere; }
.cost-range { margin: 0 0 10px; font-size: .9rem; color: var(--muted); }
.cost-kpis { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .92rem; }
.cost-kpis strong { font-size: 1.1rem; color: var(--fg); }
.cost-tl .tu { background: var(--brand); } .cost-tl .li { background: var(--teal); } .cost-tl .ex { background: var(--accent); }
.dot.oo, .cost-tl .oo { background: var(--sel-test); }
.cost-tl { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; gap: 8px; align-items: flex-end; height: 170px; }
.cost-tl .tl-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; text-align: center; margin: 0; }
.cost-tl .tl-amt { font-size: .74rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.cost-tl .tl-track { flex: 1 1 auto; min-height: 0; display: flex; align-items: flex-end; }
.cost-tl .tl-bar { width: 100%; display: flex; flex-direction: column-reverse; border-radius: 8px 8px 3px 3px; overflow: hidden; background: var(--surface-2); min-height: 8px; transition: height .4s ease; }
.cost-tl .tl-bar i { display: block; width: 100%; }
.cost-tl .tl-yr { font-size: .74rem; color: var(--muted); margin-top: 5px; line-height: 1.2; }
.cost-tl .tl-yr small { display: block; font-size: .68rem; }
.cost-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; }
.cost-src { display: block; font-size: .76rem; color: var(--muted); margin: 2px 0 0 18px; }
.cost-src a { color: var(--brand); white-space: nowrap; }
.cost-src .icon { width: .95em; height: .95em; margin-left: 2px; vertical-align: -.12em; }
.cost-card table td:last-child { vertical-align: top; }
.cost-compare th.num, .cost-compare td.num { text-align: right; white-space: nowrap; }
.cost-strip { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 4px; }
.cost-strip li { margin: 0; }
.cost-strip .cs-row { width: 100%; display: grid; grid-template-columns: minmax(0, 9.5em) minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--fg); font: inherit; font-size: .86rem; text-align: left; cursor: pointer; }
.cost-strip .cs-row:hover, .cost-strip .cs-row:focus-visible { background: var(--surface-2); }
.cost-strip .cs-row.current { background: var(--brand-soft); border-color: var(--brand); font-weight: 700; }
.cost-strip .cs-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cost-strip .cs-yrs { font-size: .74rem; color: var(--muted); font-weight: 400; }
.cost-strip .cs-track { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.cost-strip .cs-fill { display: block; height: 100%; border-radius: 999px; background: var(--teal); transition: width .4s ease; }
.cost-strip .current .cs-fill { background: var(--accent); }
.cost-strip .cs-val { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .82rem; }
.cost-foot .icon { color: var(--brand); }
.cost-sticky .icon { width: 1em; height: 1em; vertical-align: -.15em; }
@media (max-width: 480px) {
  .cost-hero { padding: 14px; }
  .cost-tl { gap: 4px; height: 150px; }
  .cost-tl .tl-amt { font-size: .66rem; }
  .cost-strip .cs-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "track track"; gap: 3px 8px; padding: 5px 6px; font-size: .84rem; }
  .cost-strip .cs-name { grid-area: name; } .cost-strip .cs-val { grid-area: val; } .cost-strip .cs-track { grid-area: track; height: 8px; }
  .cost-compare th, .cost-compare td { padding-left: 8px; padding-right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .cost-tl .tl-bar, .cost-strip .cs-fill { transition: none; } }
@media (min-width: 900px) { .cost-sticky { display: none; } }
/* night: the dark gradient of the big total is too faint on the tinted panel */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cost-card .cost-big { background: linear-gradient(120deg, var(--brand-2), var(--teal)); -webkit-background-clip: text; background-clip: text; } }
:root[data-theme="dark"] .cost-card .cost-big { background: linear-gradient(120deg, var(--brand-2), var(--teal)); -webkit-background-clip: text; background-clip: text; }
/* ---------- chances tool: verdict, what decides, examples, next step, phone bar (tools.js initChances) ---------- */
.ch-grade { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
.ch-grade-title { margin: 0 0 8px; font-weight: 650; font-size: .92rem; }
.ch-grade-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ch-field { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: var(--muted); flex: 1 1 180px; min-width: 0; }
.ch-field select, .ch-field input { width: 100%; max-width: none; min-width: 0; font-size: 1rem; color: var(--fg); }
.ch-field[hidden], .ch-field [hidden] { display: none; }
.ch-grade-out { margin: 8px 0 0; }
.ch-grade-out:empty { display: none; }
.ch-ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.ch-verdict { --v: var(--muted); border-radius: 16px; padding: 16px 18px; margin: 10px 0 14px; border: 1px solid color-mix(in srgb, var(--v) 35%, var(--line)); background: color-mix(in srgb, var(--v) 9%, var(--surface)); }
.ch-verdict.v-high { --v: var(--ok); } .ch-verdict.v-mid { --v: var(--brand); } .ch-verdict.v-reach { --v: var(--accent-ink); } .ch-verdict.v-long { --v: var(--danger); } .ch-verdict.v-diff { --v: var(--muted); background: var(--surface-2); border-color: var(--line); }
.ch-who { margin: 0; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ch-word { margin: 2px 0 6px; font-size: clamp(1.9rem, 6vw, 2.6rem); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; color: var(--v); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; }
.ch-word .ch-word-ic { width: 30px; height: 30px; }
.ch-range { font-size: .95rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.ch-text { margin: 0; font-size: 1rem; }
.ch-note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; font-size: .9rem; color: var(--fg); }
.ch-note .ch-ic { color: var(--brand); margin-top: 2px; }
.ch-h { margin: 0 0 6px; font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ch-h .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ch-decides { margin: 0 0 14px; }
.ch-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.ch-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 650; font-size: .88rem; }
.ch-dtext { margin: 0; color: var(--muted); font-size: .92rem; }
.ch-unis { margin: 0 0 14px; }
.ch-uni-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ch-uni { --s: var(--muted); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ch-uni > .ch-ic { color: var(--s); width: 20px; height: 20px; margin-top: 1px; }
.ch-uni.st-in { --s: var(--ok); } .ch-uni.st-close { --s: var(--brand); } .ch-uni.st-reach { --s: var(--accent-ink); } .ch-uni.st-open { --s: var(--teal); }
.ch-uni-main { display: flex; flex-direction: column; min-width: 0; }
.ch-uni-offer { color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.ch-uni-st { color: var(--s); font-weight: 700; font-size: .86rem; text-align: right; white-space: nowrap; }
.ch-uni-mine { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; }
.ch-next { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 6px; padding: 10px 12px; border-radius: 12px; background: var(--teal-soft); }
.ch-next .ch-ic { color: var(--teal); margin-top: 2px; }
.ch-more { margin: 14px 0 8px; }
.ch-more summary { cursor: pointer; font-weight: 650; }
.ch-bar .ch-bar-word { font-weight: 800; }
@media (max-width: 480px) {
  .ch-uni { grid-template-columns: auto minmax(0, 1fr); }
  .ch-uni-st { grid-column: 2; text-align: left; white-space: normal; }
  .ch-verdict { padding: 14px; }
}
@media (min-width: 900px) { .ch-bar { display: none; } }

/* universities page: world leaders, list, best by field */
.uni-leaders { margin-top: 4px; }
.uni-lead { position: relative; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--fg); padding: 20px 20px 16px; transition: transform .15s, border-color .15s;
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 9%, var(--surface)), var(--surface) 60%); }
.uni-lead:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.ul-rank { position: absolute; top: 14px; right: 16px; font-size: 1.6rem; font-weight: 800; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ul-rank small { font-size: .7em; margin-right: 3px; -webkit-text-fill-color: var(--muted); font-weight: 700; }
.ul-where { font-size: .86rem; color: var(--muted); padding-right: 70px; }
.ul-name { font-size: 1.2rem; line-height: 1.25; }
.ul-sum { font-size: .9rem; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ul-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.ul-tag { font-size: .76rem; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-2); }
.ul-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--muted); }
.ul-foot .icon { width: 15px; height: 15px; vertical-align: -2px; }
.uni-list td { vertical-align: middle; }
.ul-pill { display: inline-block; min-width: 3.2em; text-align: center; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 700; font-size: .84rem; color: var(--fg); font-variant-numeric: tabular-nums; }
.ul-cell strong { display: block; font-weight: 650; }
.ul-cell strong a { text-decoration: none; }
.ul-cell strong a:hover { text-decoration: underline; }
.ul-cell .muted { display: block; }
.ul-card { text-align: right; white-space: nowrap; }
.ul-card-link { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--line)); color: var(--brand); font-size: .82rem; font-weight: 700; text-decoration: none; }
.ul-card-link .icon { width: 15px; height: 15px; }
.ul-fields { white-space: nowrap; }
.uni-list .uc-country { white-space: nowrap; }
.ul-f { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 3px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.ul-f .icon { width: 15px; height: 15px; }
.ul-card-link:hover { background: var(--brand-soft); }
.subject-card { display: flex; flex-direction: column; }
.sc-head { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.sc-head h3 { margin: 0; font-size: 1.05rem; }
.sc-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.sc-icon .icon { width: 20px; height: 20px; }
.fr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fr-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 10px; margin: 0; padding: 6px 8px; border-radius: 10px; font-size: .93rem; }
.fr-row + .fr-row { border-top: 1px solid var(--line); border-radius: 0; }
.fr-pos { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: .78rem; font-weight: 800; color: var(--muted); border: 1px solid var(--line); background: var(--surface); }
.fr-m1 .fr-pos { color: #fff; border: 0; background: linear-gradient(135deg, #f5b301, #f08c00); }
.fr-m2 .fr-pos { color: #fff; border: 0; background: linear-gradient(135deg, #b8c2cc, #8a96a3); }
.fr-m3 .fr-pos { color: #fff; border: 0; background: linear-gradient(135deg, #d99459, #b06a32); }
.fr-name { min-width: 0; line-height: 1.3; display: flex; align-items: baseline; gap: 6px; }
.fr-name .flag { flex: none; }
.fr-name a { font-weight: 650; text-decoration: none; }
.fr-name a:hover { text-decoration: underline; }
.fr-rank { font-size: .78rem; font-weight: 750; color: var(--brand-2); background: var(--brand-soft); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.sc-more { margin-top: 8px; }
.sc-more .fr-list { margin-top: 6px; }
@media (max-width: 560px) { .ul-fields { display: none; } .ul-card-link span { display: none; } .ul-card-link { padding: 5px 7px; } .uni-list .uc-name { display: none; } }

/* About: the founders' story */
.about-page { padding-top: 28px; }
.about-page .crumbs { margin-bottom: 14px; }
.story-photo { display: grid; place-items: center; width: 100%; max-width: 980px; aspect-ratio: 16 / 7; margin: 0 auto 36px; border-radius: 24px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), color-mix(in srgb, var(--teal, var(--brand-2)) 12%, var(--surface)));
  border: 1px solid var(--line); color: color-mix(in srgb, var(--brand) 35%, transparent); }
.story-photo .icon { width: 56px; height: 56px; }
.story { max-width: 680px; margin: 0 auto; font-size: 1.08rem; line-height: 1.75; }
.story h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; margin: 4px 0 22px; }
.story p { margin: 0 0 18px; }
.story-lead { font-size: 1.3rem; line-height: 1.55; font-weight: 600; color: var(--fg); }
.story-quote { margin: 30px 0; padding: 22px 26px; border-radius: 18px; border-left: 5px solid var(--brand); background: var(--brand-soft);
  font-size: 1.35rem; line-height: 1.45; font-weight: 750; color: var(--fg); }
.story-end { font-weight: 600; }
.story-sign { display: flex; flex-direction: column; gap: 2px; margin-top: 30px !important; padding-top: 18px; border-top: 1px solid var(--line); }
.story-names { font-size: 1.25rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; width: max-content; }
.about-page .country-next { max-width: 980px; margin-left: auto; margin-right: auto; }
@media (max-width: 560px) { .story-photo { aspect-ratio: 4 / 3; border-radius: 18px; margin-bottom: 24px; } .story { font-size: 1.02rem; } .story-lead { font-size: 1.15rem; } .story-quote { font-size: 1.15rem; padding: 18px 18px; } }
.about-more { max-width: 980px; margin-left: auto; margin-right: auto; }
.about-more h2 { margin-top: 0; font-size: 1.2rem; }
.about-more ul { margin: 0; padding-left: 1.2em; }
.about-more li { margin: 0 0 8px; line-height: 1.55; }

/* Tools on phones and small tablets: the result first, the answers in a full-screen panel (tools.js mobileSheet) */
.ts-head, .ts-foot, .ts-edit { display: none; }
@media (max-width: 960px) {
  .tool-layout.ts-ready { display: flex; flex-direction: column; }
  .tool-layout.ts-ready > .tool-results { order: -1; }
  .tool-layout.ts-ready > .tool-form { display: none; }
  .tool-layout.ts-ready.ts-open > .tool-form { display: block; position: fixed; inset: 0; z-index: 300; margin: 0; max-height: none; overflow: auto;
    border-radius: 0; border: 0; padding: 0 16px 100px; background: var(--surface); overscroll-behavior: contain; }
  .ts-head { display: flex; position: sticky; top: 0; z-index: 2; justify-content: space-between; align-items: center; gap: 12px;
    margin: 0 -16px 10px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .ts-close { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--fg); cursor: pointer; }
  .ts-close .icon { width: 20px; height: 20px; }
  .ts-foot { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
  .ts-foot .btn { width: 100%; min-height: 48px; font-size: 1rem; }
  .ts-edit { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; width: 100%; justify-content: center; min-height: 44px; }
  .ts-edit .icon { width: 16px; height: 16px; }
  body.ts-lock { overflow: hidden; }
  .finder-bar { display: none !important; }   /* the result is already at the top */
}
.finder-sum li { max-width: 100%; }
.finder-sum li span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 960px) { .tool-layout.ts-ready > * { width: 100%; max-width: 100%; } }

/* Universities list on phones and small tablets: search visible, the other filters in a full-screen panel (app.js) */
.uf-mbar { display: none; }
@media (max-width: 960px) {
  .uni-filters { display: block; }
  .uni-filters > label:not(.uf-search), .uni-filters .uf-foot .check { display: none; }
  .uf-mbar { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
  .uf-open-btn { display: inline-flex; align-items: center; gap: 6px; }
  .uf-open-btn .icon { width: 16px; height: 16px; }
  .uf-open-btn.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
  .uf-active { font-size: .86rem; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
  .uni-filters .uf-foot { padding-top: 10px; margin-top: 10px; }
  .uni-filters.uf-open { position: fixed; inset: 0; z-index: 300; margin: 0; border-radius: 0; border: 0; overflow: auto; padding: 0 16px 100px; background: var(--surface); }
  .uni-filters.uf-open > label:not(.uf-search) { display: flex; margin-top: 14px; }
  .uni-filters.uf-open .uf-foot .check { display: flex; }
  .uni-filters.uf-open .uf-search, .uni-filters.uf-open .uf-mbar { display: none; }
  .uni-filters .uf-head, .uni-filters .uf-foot-m { display: none; }
  .uni-filters.uf-open .uf-head { display: flex; }
  .uni-filters.uf-open .uf-foot-m { display: block; }
}

/* ---------- retireacross additions ---------- */
.steps-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 14px; }
.steps-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.steps-list .n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; font-weight: 750; font-size: .95rem; }
.glass .note { color: rgba(255, 255, 255, .78); font-size: .9rem; }
.region-title { margin: 30px 0 12px; font-size: 1.15rem; }
.dest-grid { gap: 14px; }
.dest-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 16px 18px; text-decoration: none; color: var(--fg); }
.dest-card:hover { border-color: var(--brand); color: var(--fg); }
.dest-flag { grid-row: 1 / span 2; font-size: 1.9rem; line-height: 1; }
.dest-name { font-weight: 700; font-size: 1.05rem; }
.dest-meta { color: var(--muted); font-size: .88rem; line-height: 1.4; }
.dest-card.is-soon .dest-meta { font-style: italic; }
.feature-card h3 { margin: 12px 0 6px; }
.feature-card p { color: var(--muted); margin: 0; font-size: .95rem; }
.card.notice { border-left: 4px solid var(--accent); }
.card.notice h2 { margin-top: 0; }
.card.route { margin: 14px 0; }
.card.route h3 { margin-top: 0; }
.sources { color: var(--muted); margin-top: 10px; }
.sources a { color: inherit; }
.journey-steps { list-style: none; padding: 0; margin: 0 0 30px; }
.journey-steps li { display: flex; flex-direction: column; gap: 6px; }
.journey-steps li p { margin: 0; }
.journey-steps .badge { align-self: flex-start; }
tr.total td, tr.total th { border-top: 2px solid var(--line); }
.footer-countries { columns: 2; column-gap: 18px; }
.dest-card { overflow: hidden; }
.dest-ph { grid-column: 1 / -1; display: block; margin: -16px -18px 12px; aspect-ratio: 16 / 9; }
.dest-card.is-soon .dest-ph { filter: saturate(.55); opacity: .8; }
.dest-card .dest-flag { grid-row: span 2; }

/* ---------- quick tools (finder, can I afford it, visa checker) ---------- */
.row-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-inline input[type=number] { max-width: 11em; margin: 0; }
.row-inline select { width: auto; margin: 0; }
.tool-form .tag-group-title { margin: 10px 0 6px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tool-form .tag-group-title:first-of-type { margin-top: 0; }
.rest-why a { white-space: nowrap; }
/* can I afford it */
.cost-card .cost-headline { margin: 0; }
.cost-card .verdict { font-size: 1.15rem; }
.budget-bar .b0, .dot.b0 { background: var(--brand); }
.budget-bar .b1, .dot.b1 { background: var(--teal); }
.budget-bar .b2, .dot.b2 { background: var(--accent); }
.budget-bar .b3, .dot.b3 { background: color-mix(in srgb, var(--brand) 45%, #fff); }
.budget-bar .b4, .dot.b4 { background: var(--danger); }
.budget-bar .b5, .dot.b5 { background: color-mix(in srgb, var(--teal) 45%, #fff); }
.cost-card tr.total th { border-top: 2px solid var(--line); }
.cost-card td.n, .cost-card th.n { text-align: right; font-variant-numeric: tabular-nums; }
.afford-balance { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); margin: 12px 0; font-size: .95rem; }
.afford-balance.good { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.afford-balance.low { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); }
.afford-balance .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.afford-balance.good .icon { color: var(--ok); } .afford-balance.low .icon { color: var(--danger); }
/* visa checker */
.visa-route-card { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.visa-route-card h4 { margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 1.05rem; }
.visa-req { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; font-size: .95rem; }
.visa-req li { display: flex; gap: 8px; align-items: flex-start; }
.visa-req .icon { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.visa-req li.ok .icon { color: var(--ok); } .visa-req li.ko .icon { color: var(--danger); } .visa-req li.info .icon { color: var(--muted); }
.visa-req .gap { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.cost-card h3, .result h3 + p { margin-top: 18px; }
.result .tl-group h4 { margin: 14px 0 8px; font-size: .95rem; color: var(--brand); }
.result .tl-item { box-shadow: none; }
.alt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.alt-list a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--fg); background: var(--surface); font-weight: 600; font-size: .92rem; }
.alt-list a:hover { border-color: var(--brand); color: var(--brand); }
a.feature-card { text-decoration: none; color: var(--fg); display: flex; flex-direction: column; }
a.feature-card:hover { border-color: var(--brand); }
a.feature-card .more { margin-top: auto; padding-top: 10px; color: var(--brand); font-weight: 650; }

/* ===================== member area (2026-10-23): journey bar, shortlist, compare, settling plan ===================== */
.member-steps ol { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.member-steps a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--fg); text-decoration: none; height: 100%; box-sizing: border-box; }
.member-steps a:hover { border-color: var(--brand); }
.member-steps .ms-ic { flex: none; color: var(--muted); display: inline-flex; }
.member-steps .ms-txt { display: flex; flex-direction: column; min-width: 0; }
.member-steps small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-steps li.done .ms-ic { color: var(--ok); }
.member-steps li.current a { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 -3px 0 var(--brand); }
.member-steps li.current .ms-ic { color: var(--brand); }
@media (max-width: 900px) {
  .member-steps ol { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .member-steps a { flex-direction: column; gap: 2px; padding: 8px 4px; text-align: center; }
  .member-steps small { display: none; }
  .member-steps strong { font-size: .78rem; }
}
.field-error { color: var(--danger); font-size: .9rem; margin: 4px 0 0; }
.consent-box { border-top: 1px solid var(--line); padding-top: 16px; }
.member-form .choices.stack { grid-template-columns: 1fr; }
/* shortlist */
.ms-bar { position: sticky; top: calc(var(--header-h) + 8px); z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ms-h { font-size: 1.15rem; margin: 6px 0 12px; }
.ms-item.kept { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft), var(--shadow-sm); }
.ms-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 0; }
.ms-why summary { cursor: pointer; color: var(--brand); font-weight: 600; margin: 8px 0; }
.ms-rest > summary { cursor: pointer; font-weight: 700; }
.ms-rest .ms-item { margin-top: 12px; }
/* compare */
.mc-scroll { overflow-x: auto; }
.mc-table { min-width: 640px; border-collapse: separate; border-spacing: 0; width: 100%; }
.mc-table th, .mc-table td { vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.mc-table thead th { position: sticky; top: 0; background: var(--surface); font-size: 1rem; }
.mc-table tbody th { width: 9.5em; color: var(--muted); font-weight: 650; font-size: .9rem; }
.mc-table ul.cons { margin: 0; padding-left: 1.1em; }
.verdict-chip { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.verdict-chip.good { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.verdict-chip.mid { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.verdict-chip.low { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.mc-decide { margin-top: 22px; scroll-margin-top: calc(var(--header-h) + 12px); }
.mc-choose { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.mc-choose p { flex-basis: 100%; margin: 4px 0 0; }
/* settling plan */
.mp-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: center; margin-bottom: 18px; }
@media (max-width: 900px) { .mp-head { grid-template-columns: 1fr; } }
.mp-choice { display: flex; gap: 12px; align-items: center; }
.mp-choice h2 { margin: 0; }
.mp-choice p { margin: 2px 0; }
.mp-flag { font-size: 2.4rem; line-height: 1; }
.mp-move label { font-weight: 700; display: block; margin-bottom: 6px; }
.mp-progress p { margin: 0 0 6px; }
.mp-check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.mp-check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.mp-step p { margin: 6px 0; }
.mp-step.is-done { opacity: .62; }
.mp-step.is-done strong { text-decoration: line-through; text-decoration-color: var(--muted); }
.mp-step.is-late { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.mp-more ul { padding-left: 1.1em; }
/* hub */
.journey-steps li.done .tool-icon { color: var(--ok); }
.journey-steps li.next { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft), var(--shadow-sm); }
.journey-steps li.locked { opacity: .7; }
.journey-steps .js-status { margin: 8px 0 0; }
/* saved / error message */
.member-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 600; transition: opacity .2s, transform .2s; z-index: 60; max-width: calc(100vw - 32px); }
.member-toast.show { opacity: 1; transform: translate(-50%, 0); }
.member-toast.bad { background: var(--danger); color: #fff; }
.ms-item h3 { flex-wrap: wrap; row-gap: 4px; }
.ms-item h3 .score { white-space: normal; }
