/* AML Cert Prep
   Tokens: banknote green for structure, highlighter yellow for "right", red flag for "wrong".
   One typeface (Public Sans), weight carries hierarchy. */
:root {
  --ink: #172026;
  --muted: #56655F;
  --paper: #F2F5F1;
  --surface: #FFFFFF;
  --rule: #CFD9D2;
  --green: #1F4A3D;
  --green-2: #2C6654;
  --green-tint: #E3ECE6;
  --marker: #F4D75A;
  --marker-soft: #FBF0B8;
  --flag: #B42318;
  --flag-soft: #FBE4E1;
  --radius-s: 6px;
  --radius-m: 10px;
  --wrap: 1120px;
  --measure: 68ch;
  --font: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  font-feature-settings: "tnum" 0;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-2); }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.measure { max-width: var(--measure); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---- header / footer ---- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--green); text-decoration: none; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-mark { width: 28px; height: 28px; color: var(--green); }
.nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--green); text-decoration: underline; }
.nav-strong { font-weight: 700 !important; color: var(--green) !important; }
@media (max-width: 640px) { .nav { gap: 14px; } .nav a { font-size: .9rem; } .brand span { display: none; } }

.site-footer { margin-top: 96px; background: var(--green); color: #DCE7E0; padding: 56px 0 24px; }
.site-footer a { color: #fff; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer .muted { color: #B9CBC1; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand { font-weight: 800; color: #fff; font-size: 1.1rem; margin-bottom: .4em; }
.footer-head { font-weight: 700; color: #fff; margin-bottom: .4em; }
.footer-base { margin-top: 40px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.15); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* ---- buttons / forms ---- */
.btn, .btn-primary, .btn-quiet, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: var(--radius-s);
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer; border: 2px solid transparent;
}
.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.btn-outline { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline:hover { background: var(--green-tint); color: var(--green); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { border-color: var(--ink); }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.05rem; }
.btn-block { width: 100%; }
button:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.inline-form { display: inline; margin: 0; }

/* Identity default UI uses Bootstrap class names; give them our look. */
.form-control, .form-select, input[type=email], input[type=password], input[type=text] {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #A9B7AE; border-radius: var(--radius-s);
  font: inherit; background: #fff; color: var(--ink);
}
.form-control:focus { outline: 3px solid var(--marker); border-color: var(--green); }
.form-floating { display: flex; flex-direction: column-reverse; gap: 4px; margin-bottom: 16px; }
.form-floating > label, .form-label { font-weight: 600; font-size: .95rem; }
.form-check { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.mb-3 { margin-bottom: 16px; } .w-100 { width: 100%; } .text-danger { color: var(--flag); font-size: .9rem; }
.row { display: flex; flex-wrap: wrap; gap: 40px; } .col-md-4, .col-lg-6, .col-md-6 { flex: 1 1 340px; }
.col-md-6.col-md-offset-2, .col-lg-4.col-lg-offset-2 { display: none; } /* external login column */
.alert { padding: 12px 14px; border-radius: var(--radius-s); background: var(--green-tint); margin-bottom: 16px; }
.alert-danger { background: var(--flag-soft); color: var(--flag); }
.nav-pills, .nav-tabs { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.identity-page, body .container { max-width: 900px; margin: 40px auto; padding: 0 20px; }

/* ---- home hero ---- */
.hero { padding: 64px 0 56px; background: var(--surface); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }
.hero h1 { max-width: 14ch; }
.hero-lede { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 18px; }
.hero-proof { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--rule); }
.hero-proof div { font-size: .95rem; color: var(--muted); }
.hero-proof strong { display: block; color: var(--ink); font-size: 1.35rem; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }

/* The signature: a real exam item in the hero */
.sample { background: var(--paper); border: 1px solid var(--rule); border-left: 6px solid var(--green); border-radius: var(--radius-m); padding: 24px; }
.sample-meta { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.sample-q { font-weight: 600; font-size: 1.05rem; margin-bottom: 16px; }

/* ---- question / options (shared by hero, diagnostic, practice, mock) ---- */
.options { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.opt {
  width: 100%; text-align: left; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start;
  padding: 12px 14px; background: var(--surface); border: 1.5px solid var(--rule); border-radius: var(--radius-s);
  font: inherit; color: var(--ink); cursor: pointer;
}
.opt:hover:not(:disabled) { border-color: var(--green); }
.opt-key { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #9AAAA0; display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--muted); }
.opt.is-chosen { border-color: var(--green); background: var(--green-tint); }
.opt.is-chosen .opt-key { background: var(--green); border-color: var(--green); color: #fff; }
.opt.is-right { border-color: #8A7A12; background: var(--marker-soft); }
.opt.is-right .opt-key { background: var(--marker); border-color: #8A7A12; color: var(--ink); }
.opt.is-wrong { border-color: var(--flag); background: var(--flag-soft); }
.opt.is-wrong .opt-key { background: var(--flag); border-color: var(--flag); color: #fff; }
.opt:disabled { cursor: default; }
.explain { margin-top: 16px; padding: 14px 16px; background: var(--surface); border-radius: var(--radius-s); border: 1px solid var(--rule); }
.explain-verdict { font-weight: 700; margin-bottom: 6px; }
.explain-verdict.ok { color: #6B5D00; } .explain-verdict.bad { color: var(--flag); }
.explain-source { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
@media (prefers-reduced-motion: no-preference) { .explain { animation: reveal .25s ease-out; } }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---- sections ---- */
.section { padding: 72px 0 0; }
.section-head { max-width: var(--measure); margin-bottom: 28px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* certification ledger (rows, not cards) */
.ledger { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); overflow: hidden; }
.ledger-row { display: grid; grid-template-columns: 110px 1fr 140px 170px; gap: 20px; align-items: center; padding: 20px 24px; border-top: 1px solid var(--rule); color: inherit; text-decoration: none; }
.ledger-row:first-child { border-top: 0; }
.ledger-row:hover { background: #F8FAF8; color: inherit; }
.ledger-abbr { font-weight: 800; font-size: 1.4rem; color: var(--green); letter-spacing: -0.02em; }
.ledger-name { font-weight: 600; }
.ledger-sub { color: var(--muted); font-size: .92rem; }
.ledger-count { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .95rem; }
.ledger-go { justify-self: end; white-space: nowrap; }
@media (max-width: 800px) {
  .ledger-row { grid-template-columns: 70px 1fr; }
  .ledger-count { grid-column: 2; } .ledger-go { grid-column: 1 / -1; justify-self: start; }
}

/* steps: a real sequence, so numbered */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: s; border-top: 2px solid var(--green); }
.steps li { counter-increment: s; padding: 24px 24px 0 0; }
.steps li::before { content: counter(s); display: block; font-weight: 800; font-size: 2.4rem; color: var(--green); line-height: 1; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* comparison table */
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); overflow: hidden; font-size: .97rem; }
.compare th, .compare td { padding: 14px 16px; text-align: left; border-top: 1px solid var(--rule); vertical-align: top; }
.compare thead th { border-top: 0; background: var(--green-tint); font-weight: 700; }
.compare td.yes { color: var(--green); font-weight: 600; }
.table-scroll { overflow-x: auto; }

/* pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 880px; }
.plan { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 28px; display: flex; flex-direction: column; }
.plan-best { border: 2px solid var(--green); }
.plan-tag { align-self: flex-start; background: var(--marker); color: var(--ink); font-weight: 700; font-size: .85rem; padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.plan-price { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 6px 0 2px; }
.plan-price s { font-size: 1.2rem; color: var(--muted); font-weight: 500; margin-left: 6px; }
.plan ul { padding-left: 1.1em; margin: 16px 0 24px; flex: 1; }
.plan li { margin-bottom: 6px; }
.plan select { width: 100%; min-height: 46px; padding: 0 10px; font: inherit; border: 1px solid #A9B7AE; border-radius: var(--radius-s); margin-bottom: 12px; background: #fff; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* faq */
.faq details { border-top: 1px solid var(--rule); padding: 16px 0; max-width: var(--measure); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--green); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* cert landing */
.page-head { padding: 56px 0 40px; background: var(--surface); border-bottom: 1px solid var(--rule); }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.cert-grid { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.cert-side { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 24px; position: sticky; top: 88px; }
.domains { list-style: none; padding: 0; margin: 0; }
.domains li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.domains li:first-child { border-top: 0; }
.weight { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--green); }
@media (max-width: 900px) { .cert-grid { grid-template-columns: 1fr; } .cert-side { position: static; } }

/* ---- exam runner ---- */
.exam-body { background: var(--paper); }
.exam-bar { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 64px; z-index: 10; }
.exam-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; flex-wrap: wrap; }
.exam-title { font-weight: 700; }
.exam-progress { flex: 1; min-width: 140px; max-width: 360px; height: 8px; background: var(--green-tint); border-radius: 999px; overflow: hidden; }
.exam-progress span { display: block; height: 100%; background: var(--green); width: 0; transition: width .2s; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; padding: 6px 10px; border-radius: var(--radius-s); background: var(--green-tint); }
.timer.is-low { background: var(--flag-soft); color: var(--flag); }
.exam-main { display: grid; grid-template-columns: 1fr 260px; gap: 32px; padding: 32px 20px; max-width: var(--wrap); margin: 0 auto; }
.qcard { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 28px; }
.qmeta { display: flex; justify-content: space-between; color: var(--muted); font-size: .9rem; margin-bottom: 14px; gap: 12px; }
.qtext { font-size: 1.15rem; font-weight: 600; margin-bottom: 20px; }
.qnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.flag-btn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; padding: 4px; }
.flag-btn[aria-pressed="true"] { color: var(--flag); font-weight: 600; }
.grid-nav { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 18px; position: sticky; top: 140px; }
.grid-nav-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 12px 0 16px; }
.cell { aspect-ratio: 1; border: 1px solid var(--rule); background: #fff; border-radius: 4px; font: 600 .75rem/1 var(--font); color: var(--muted); cursor: pointer; padding: 0; font-variant-numeric: tabular-nums; }
.cell.is-answered { background: var(--green-tint); border-color: var(--green); color: var(--green); }
.cell.is-flagged { box-shadow: inset 0 -3px 0 var(--flag); }
.cell.is-current { outline: 2px solid var(--ink); outline-offset: 1px; }
.cell.is-right { background: var(--marker-soft); border-color: #8A7A12; color: var(--ink); }
.cell.is-wrong { background: var(--flag-soft); border-color: var(--flag); color: var(--flag); }
.legend { font-size: .82rem; color: var(--muted); display: grid; gap: 4px; }
@media (max-width: 900px) { .exam-main { grid-template-columns: 1fr; } .grid-nav { position: static; } .grid-nav-cells { grid-template-columns: repeat(10, 1fr); } }

/* ---- results ---- */
.score-head { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.score-big { font-size: clamp(3.5rem, 9vw, 5.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.score-big small { font-size: .35em; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.verdict { display: inline-block; font-weight: 700; padding: 4px 12px; border-radius: 999px; margin-bottom: 8px; }
.verdict.pass { background: var(--marker); }
.verdict.fail { background: var(--flag-soft); color: var(--flag); }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.bar-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-weight: 600; }
.bar-track { height: 12px; background: var(--green-tint); border-radius: 999px; position: relative; overflow: visible; }
.bar-fill { height: 100%; background: var(--green); border-radius: 999px; }
.bar-fill.weak { background: var(--flag); }
.bar-pass { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); }
.review-item { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 22px; margin-bottom: 14px; }
.review-item.locked { position: relative; overflow: hidden; max-height: 150px; }
.review-item.locked::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, var(--surface)); }
.upsell { background: var(--green); color: #fff; border-radius: var(--radius-m); padding: 32px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.upsell p { color: #D5E3DA; margin: 0; }
.upsell .btn-primary { background: var(--marker); color: var(--ink); border-color: var(--marker); }
.upsell .btn-primary:hover { background: #FFE47A; border-color: #FFE47A; color: var(--ink); }
@media (max-width: 700px) { .upsell, .score-head { grid-template-columns: 1fr; } }

/* ---- dashboard ---- */
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 24px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pass-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; align-items: center; }
.pass-row:first-of-type { border-top: 0; }
.pass-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.history { width: 100%; border-collapse: collapse; font-size: .95rem; }
.history td, .history th { padding: 10px 8px; border-top: 1px solid var(--rule); text-align: left; }
.history th { border-top: 0; color: var(--muted); font-weight: 600; }
@media (max-width: 800px) { .dash-grid { grid-template-columns: 1fr; } }

/* ---- blog / prose ---- */
.prose { max-width: var(--measure); font-size: 1.08rem; }
.prose h2 { margin-top: 1.8em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.4em; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0 1.5em; font-size: .97rem; background: var(--surface); }
.prose th, .prose td { border: 1px solid var(--rule); padding: 10px 12px; text-align: left; }
.prose th { background: var(--green-tint); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--marker); color: var(--muted); }
.post-list { list-style: none; padding: 0; margin: 0; max-width: 820px; }
.post-list li { padding: 24px 0; border-top: 1px solid var(--rule); }
.post-list h2 { font-size: 1.35rem; margin-bottom: 6px; }
.post-list a { text-decoration: none; color: var(--ink); }
.post-list a:hover h2 { color: var(--green); text-decoration: underline; }

/* ---- misc ---- */
.callout { background: var(--marker-soft); border-left: 4px solid var(--marker); padding: 14px 18px; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 16px 18px; box-shadow: 0 10px 30px rgba(23,32,38,.18); z-index: 50; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.consent p { margin: 0; font-size: .95rem; flex: 1 1 240px; }
.consent-actions { display: flex; gap: 8px; }
.consent[hidden] { display: none; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 16px; } .mt-4 { margin-top: 32px; } .mb-0 { margin-bottom: 0; }

/* ---- multi-select, practice builder, progress, flashcards ---- */
.pick-hint { font-weight: 700; color: var(--green); white-space: nowrap; }
.opt-multi .opt-key { border-radius: 5px; }
.opt-multi.is-chosen .opt-key::after { content: "✓"; }
.opt-multi.is-chosen .opt-key { font-size: 0; }
.opt-multi.is-chosen .opt-key::after { font-size: .85rem; }
.chips { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--green-tint); font-size: .85rem; font-weight: 600; }
.chip-weak { background: var(--flag-soft); color: var(--flag); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule); font-size: .8rem; font-weight: 600; color: var(--muted); }
.tag-ok { background: var(--marker-soft); border-color: #D8C25A; color: var(--ink); }
.edition-badge { display: inline-block; margin: 4px 0 0; padding: 4px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); font-size: .85rem; font-weight: 600; color: var(--green); }
.mt-1 { margin-top: 6px; } .mb-1 { margin-bottom: 6px; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 20px 0; }
.measure-wide { max-width: 860px; }

.stat-row { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 18px; }
.stat-row > div { display: grid; }
.stat-row strong { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.stat-row span { font-size: .875rem; color: var(--muted); }

.field { border: 0; padding: 0; margin: 0 0 22px; }
.field legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); cursor: pointer; line-height: 1.35; }
.check:hover { border-color: var(--green); }
.check input { margin-top: 3px; accent-color: var(--green); }
.check:has(input:checked) { border-color: var(--green); background: var(--green-tint); }

.steps-mini { padding-left: 1.2em; margin: 0 0 16px; display: grid; gap: 6px; }
.progress-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.pc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.why-us { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 28px; }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 32px; margin-top: 12px; }
.why-grid h3 { font-size: 1.05rem; margin-bottom: .3em; }
.why-grid p { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) { .why-grid { grid-template-columns: 1fr; } .why-us { padding: 20px; } }

.fc-topic { font-size: 1.25rem; margin: 28px 0 12px; }
.fc-topic:first-child { margin-top: 0; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.fc { position: relative; min-height: 150px; padding: 18px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface); text-align: left; font: inherit; color: inherit; cursor: pointer; display: flex; align-items: center; }
.fc:hover { border-color: var(--green); }
.fc-front { font-weight: 700; font-size: 1.05rem; }
.fc-back { display: none; font-size: .95rem; line-height: 1.5; }
.fc.is-flipped { background: var(--green-tint); border-color: var(--green); }
.fc.is-flipped .fc-front { display: none; }
.fc.is-flipped .fc-back { display: block; }
.fc::after { content: "Tap to flip"; position: absolute; right: 12px; bottom: 8px; font-size: .7rem; color: var(--muted); }
.fc.is-flipped::after { content: ""; }

/* ---- flashcard deck (mobile first) ---- */
.page-head-tight { padding-bottom: 20px; }
.section-tight { padding-top: 24px; }
.deck { max-width: 620px; margin: 0 auto; }
.deck-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.deck-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.deck-filter { font: inherit; font-size: .875rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; }
.deck-filter.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.deck-filter .num { opacity: .75; font-weight: 500; margin-left: 2px; }
.deck-pos { font-size: .875rem; color: var(--muted); }
.deck-progress { height: 6px; background: var(--green-tint); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.deck-progress > div { height: 100%; width: 0; background: var(--green); transition: width .2s; }
.deck-stage { position: relative; }
.deck-card { width: 100%; min-height: 300px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; text-align: center;
  padding: 36px 24px 44px; border-radius: 18px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer;
  box-shadow: 0 10px 30px rgba(23, 32, 38, .08); touch-action: pan-y; user-select: none; -webkit-user-select: none; position: relative; transition: transform .18s, opacity .18s, background .15s; }
.deck-card.is-flipped { background: var(--green-tint); border-color: var(--green); }
.deck-card.go-right { transform: translateX(120%) rotate(8deg) !important; opacity: 0; }
.deck-card.go-left { transform: translateX(-120%) rotate(-8deg) !important; opacity: 0; }
.deck-topic { position: absolute; top: 14px; left: 18px; right: 18px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.deck-front { font-size: clamp(1.35rem, 5vw, 1.75rem); font-weight: 800; line-height: 1.25; }
.deck-back { display: none; font-size: 1.05rem; line-height: 1.55; }
.deck-card.is-flipped .deck-front { font-size: 1rem; color: var(--muted); font-weight: 700; }
.deck-card.is-flipped .deck-back { display: block; }
.deck-hint { position: absolute; bottom: 14px; font-size: .8rem; color: var(--muted); }
.deck-end { min-height: 300px; border-radius: 18px; border: 1px dashed var(--rule); background: var(--surface); padding: 32px 24px; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.deck-end[hidden] { display: none; }
.deck-end-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.deck-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.btn-deck { font: inherit; font-weight: 700; font-size: 1.05rem; min-height: 56px; border-radius: 14px; cursor: pointer; border: 2px solid; }
.btn-deck:disabled { opacity: .4; cursor: default; }
.btn-learning { background: var(--surface); border-color: var(--flag); color: var(--flag); }
.btn-known { background: var(--green); border-color: var(--green); color: #fff; }
.deck-tip { text-align: center; margin-top: 10px; }
.unlock-box { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding: 20px 22px; border-radius: var(--radius-m); background: var(--marker-soft); border: 1px solid #E5CF6A; }
.unlock-title { font-weight: 800; font-size: 1.1rem; margin-bottom: 4px; }
.unlock-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fc-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.fc-list li { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr; gap: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-s); font-size: .95rem; }
.fc-list li.is-locked span { color: var(--muted); }
.fc-lock { font-size: .875rem; }
@media (max-width: 600px) { .fc-list li { grid-template-columns: 1fr; gap: 4px; } .deck-card, .deck-end { min-height: 52vh; } }

.smart-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.smart-buttons form { margin: 0; }
.btn-smart { width: 100%; min-height: 76px; display: grid; place-items: center; gap: 0; border-radius: 14px; border: 2px solid var(--green); background: var(--surface); color: var(--green); font: inherit; cursor: pointer; padding: 10px; }
.btn-smart strong { font-size: 1.6rem; line-height: 1; }
.btn-smart span { font-size: .8rem; font-weight: 600; }
.btn-smart.is-main { background: var(--green); color: #fff; }
.btn-smart:hover { border-color: var(--green-2); }

/* ---- mobile: compact header, thumb-friendly exam ---- */
.nav-toggle { display: none; font: inherit; font-weight: 600; font-size: .9rem; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); cursor: pointer; }
@media (max-width: 760px) {
  .header-row { min-height: 56px; }
  .nav { gap: 12px; flex-wrap: nowrap; position: static; }
  .nav .nav-more { display: none; }
  .nav-toggle { display: inline-block; }
  .nav.is-open .nav-more { display: block; }
  .nav.is-open { position: absolute; top: 56px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--rule); padding: 6px 16px 12px; box-shadow: 0 10px 20px rgba(0,0,0,.06); }
  .nav.is-open a { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
  .nav.is-open .nav-toggle { align-self: flex-end; margin-top: 10px; }
  .brand span { display: inline; font-size: 1rem; }
  .page-head { padding-top: 20px; padding-bottom: 20px; }
  .page-head h1 { font-size: 2rem; }
  .hero-lede { font-size: 1rem; }
  .qcard { padding: 18px 16px; }
  .qtext { font-size: 1.08rem; }
  .opt { min-height: 54px; padding: 12px 14px; }
  .qnav { position: sticky; bottom: 0; z-index: 5; background: var(--surface); margin: 16px -16px -18px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); box-shadow: 0 -8px 20px rgba(0,0,0,.06); }
  .qnav .btn-primary, .qnav .btn-quiet { min-height: 50px; padding-left: 22px; padding-right: 22px; }
  .stat-row { gap: 18px; }
  .stat-row strong { font-size: 1.5rem; }
  .smart-buttons { gap: 8px; }
}

.updates-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.updates-list li { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--green); border-radius: var(--radius-s); padding: 16px 18px; }
.updates-list h3 { font-size: 1.05rem; margin-bottom: 4px; }
.source-list { padding-left: 1.1em; margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.uptodate { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--green); }
.uptodate::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2FA36B; box-shadow: 0 0 0 3px rgba(47,163,107,.18); }

/* ---- home (Mietprüfer-style: services up front) ---- */
.hero-home { padding: 56px 0 40px; }
.hero-home h1 { max-width: 17ch; }
.hero-home .hero-lede { max-width: 62ch; }
.cert-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
.cert-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.cert-card form { margin-top: auto; }
.cert-card-head { display: flex; justify-content: space-between; align-items: baseline; }
.cert-abbr { font-size: 1.6rem; font-weight: 800; color: var(--green); letter-spacing: -.02em; }
.cert-issuer { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cert-name { font-weight: 600; line-height: 1.3; margin: 0; }
.cert-meta { font-size: .85rem; color: var(--muted); margin: 0 0 6px; }
.cert-more { font-size: .875rem; text-align: center; }
.hero-fine { margin: 20px 0 0; font-size: .9rem; color: var(--muted); }
.section.alt { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding-bottom: 64px; margin-top: 72px; }
.section.alt + .section { padding-top: 64px; }
.steps-4 { grid-template-columns: repeat(4, 1fr); }
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.benefit { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 20px; }
.benefit h3 { font-size: 1.08rem; margin-bottom: .35em; }
.benefit p { margin: 0; color: var(--muted); font-size: .95rem; }
.narrow-wrap { max-width: 760px; }
.guide-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.guide-card { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--paper); text-decoration: none; color: var(--ink); }
.guide-card:hover { border-color: var(--green); }
@media (max-width: 960px) { .cert-cards { grid-template-columns: repeat(2, 1fr); } .benefits { grid-template-columns: repeat(2, 1fr); } .steps-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .hero-home { padding: 28px 0 28px; }
  .cert-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cert-card { padding: 14px; }
  .cert-name { font-size: .85rem; }
  .cert-abbr { font-size: 1.35rem; }
  .cert-card .btn-primary { padding-left: 8px; padding-right: 8px; font-size: .9rem; }
  .benefits, .guide-cards, .steps-4 { grid-template-columns: 1fr; }
  .section { padding-top: 48px; }
  .section.alt { margin-top: 48px; padding-bottom: 44px; }
  .section.alt + .section { padding-top: 44px; }
}
.hero + .section.alt { margin-top: 0; border-top: 0; }

.whats-new { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-m); background: var(--green-tint); border: 1px solid #B9D0C2; font-size: .95rem; }
.whats-new-tag { flex: none; background: var(--green); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; margin-top: 2px; }
.whats-new-title { font-weight: 800; margin-bottom: 4px; }
.scenario-panel { border-left: 4px solid var(--marker); }

.inv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inv-wide { grid-column: 1 / -1; }
.field-label { display: grid; gap: 4px; font-size: .875rem; font-weight: 600; }
.field-label input, .field-label textarea { font: inherit; font-weight: 400; font-size: 1rem; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); width: 100%; }
.field-label input:focus, .field-label textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--green-tint); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.checklist li::before { content: "✓ "; color: var(--green); font-weight: 800; }
@media (max-width: 600px) { .inv-grid { grid-template-columns: 1fr; } }

.why { margin-top: 14px; border-top: 1px dashed var(--rule); padding-top: 12px; }
.btn-why { font: inherit; font-weight: 700; font-size: .95rem; color: var(--green); background: var(--surface); border: 1.5px solid var(--green); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.btn-why:disabled { opacity: .6; }
.btn-why::before { content: "💡 "; }
.why-text { margin-top: 10px; padding: 12px 14px; background: var(--paper); border-radius: var(--radius-s); font-size: .97rem; }
.why-text.is-locked { background: var(--marker-soft); }
.why-text .btn-primary { display: inline-block; }

.stars { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.stars input { position: absolute; opacity: 0; }
.stars label { font-size: 2rem; color: #CBD5CF; cursor: pointer; line-height: 1; }
.stars input:checked ~ label, .stars label:hover, .stars label:hover ~ label { color: #E2B007; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.review { margin: 0; padding: 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); }
.review-stars { color: #E2B007; letter-spacing: 2px; margin-bottom: 6px; }
.review blockquote { margin: 0 0 10px; font-size: .97rem; }
.review figcaption { font-size: .85rem; color: var(--muted); font-weight: 600; }
.select { font: inherit; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); width: 100%; }
@media (max-width: 760px) { .review-grid { grid-template-columns: 1fr; } }

.guide-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.guide-tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper); text-decoration: none; color: var(--ink); font-weight: 600; font-size: .9rem; }
.guide-tabs a.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.facts { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: .97rem; }
.facts th, .facts td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.facts th { width: 42%; font-weight: 600; background: var(--paper); }
.prose table:not(.facts) { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.prose table:not(.facts) th, .prose table:not(.facts) td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.guide-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 32px; padding: 20px 22px; border-radius: var(--radius-m); background: var(--green-tint); }
.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.news-list li { padding-bottom: 14px; border-bottom: 1px solid var(--rule); }
.news-meta { font-size: .8rem; color: var(--muted); margin: 0 0 2px; }
.news-kind { font-weight: 700; color: var(--muted); }
.news-kind.is-ours { color: var(--green); }
.news-title { font-weight: 700; margin: 0 0 4px; line-height: 1.35; }
.news-summary { font-size: .92rem; color: var(--muted); margin: 0; }
@media (max-width: 600px) { .facts th { width: auto; display: block; border-bottom: 0; padding-bottom: 2px; } .facts td { display: block; padding-top: 2px; } }
.guide-links { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-m); padding: 20px 22px; }
.guide-links ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
