/* Liberty & Logic: calm, readable, large type. Mobile first. */

:root {
  --paper: #f5f2eb;
  --card: #fffdf8;
  --ink: #1d2433;
  --navy: #1b2a41;
  --navy-2: #2a3d5c;
  --muted: #555e6e;
  --line: #e2dccf;
  --gold: #c39a3e;
  --gold-ink: #7d5c14;
  --gold-soft: #f3e8cc;
  --ok: #2f6b45;
  --ok-soft: #e3f0e6;
  --warn: #8a3b1c;
  --warn-soft: #f7e6dd;
  --radius: 14px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --read: 42rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 125%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
}
@media (max-width: 600px) { html { font-size: 118.75%; } }

img, svg { max-width: 100%; height: auto; }
a { color: var(--navy-2); text-underline-offset: 3px; }
a:hover { color: var(--gold-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 4vw, 1.9rem); margin: 1.8em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.6em 0 .5em; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: .45em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.read { max-width: var(--read); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.lead { font-size: 1.15rem; color: var(--navy-2); }
.kicker { font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); margin: 0 0 .6rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- preview banner ---------- */
.preview { background: var(--gold-soft); color: var(--gold-ink); font-size: .8rem; text-align: center; padding: .45rem 1rem; border-bottom: 1px solid var(--line); }

/* ---------- header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.bar { display: flex; align-items: center; gap: .75rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--navy); margin-right: auto; }
.brand svg { width: 2.4rem; height: 2.4rem; flex: none; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--sans); font-weight: 600; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.nav { display: none; }
.nav a { color: var(--navy); text-decoration: none; font-weight: 500; padding: .5rem .7rem; border-radius: 8px; font-size: .9rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--gold-soft); color: var(--navy); }

.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--navy); cursor: pointer; }
.menu-btn svg { width: 1.4rem; height: 1.4rem; }
.mobile-nav { border-top: 1px solid var(--line); background: var(--card); }
.mobile-nav[hidden] { display: none; }
.mobile-nav a { display: block; padding: 1rem; text-decoration: none; color: var(--navy); font-weight: 600; border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: 0; }

@media (max-width: 480px) {
  .bar { gap: .5rem; }
  .brand svg { width: 2.1rem; height: 2.1rem; }
  .brand-name { font-size: 1rem; }
  .brand-name small, .cta-long { display: none; }
  .header-cta { padding: .45rem .9rem; }
  .menu-btn { width: 2.75rem; height: 2.75rem; }
}

@media (min-width: 920px) {
  .nav { display: flex; gap: .25rem; }
  .menu-btn, .mobile-nav { display: none !important; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; padding: .7rem 1.4rem; border-radius: 999px; border: 2px solid var(--navy); background: var(--navy); color: #fff; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-gold:hover { background: #d4ad55; border-color: #d4ad55; color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-sm { min-height: 2.5rem; padding: .45rem 1rem; font-size: .85rem; }
.btn-block { width: 100%; }
.header-cta { gap: 0; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

/* ---------- sections ---------- */
main { display: block; }
.section { padding: 3.5rem 0; }
.section-tight { padding: 2rem 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.page-head { padding: 3rem 0 1rem; }

.hero { padding: 3.5rem 0 3rem; }
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 34rem; }
.badge { display: inline-block; background: var(--navy); color: #fff; font-size: .8rem; font-weight: 600; padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.2rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
.hero-art { display: none; }
.hero-art svg { display: block; width: 100%; max-width: 22rem; margin: 0 auto; }
@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.4fr 1fr; }
  .hero-art { display: block; }
}

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.1rem 3.6rem; position: relative; margin: 0; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 1.1rem; top: 1.05rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
.steps strong { display: block; color: var(--navy); }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(4, 1fr); } }

.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.3rem 1.2rem; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.card h3 { margin: .2rem 0 .5rem; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; }
.card .num { font-size: .75rem; font-weight: 700; letter-spacing: .1em; color: var(--gold-ink); }
.card .more { margin-top: auto; padding-top: .8rem; font-weight: 600; color: var(--navy-2); font-size: .9rem; }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.timeline li { border-left: 4px solid var(--gold); background: var(--card); padding: 1rem 1.2rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 0; }
.timeline strong { color: var(--navy); }
@media (min-width: 860px) { .timeline { grid-template-columns: repeat(3, 1fr); } }

.stats { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat b { display: block; font-family: var(--serif); font-size: 1.7rem; color: var(--navy); line-height: 1.2; }
.stat span { font-size: .82rem; color: var(--muted); }

.progress { height: 1rem; background: var(--line); border-radius: 999px; overflow: hidden; margin: .6rem 0 .4rem; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #d9b45e); border-radius: 999px; min-width: .6rem; }

.cta-box { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 2.4rem 1.5rem; text-align: center; }
.cta-box h2 { color: #fff; margin-top: 0; }
.cta-box p { color: #d6dbe5; }

/* ---------- long-form content ---------- */
.prose { max-width: var(--read); }
.prose h2 { margin-top: 1.8em; padding-top: .2em; }
.prose ul { padding-left: 1.2rem; }
.prose li::marker { color: var(--gold); }
.callout { background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; padding: .9rem 1.1rem; margin: 1.3rem 0; }
.callout p { margin: 0; }
.callout-label { color: var(--gold-ink); margin-right: .25rem; }
.sources { font-size: .8rem; color: var(--muted); }

.plank-nav { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; margin: 2.5rem 0 1rem; }
.plank-nav a { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; text-decoration: none; color: var(--navy); font-size: .9rem; }
.plank-nav a:hover { border-color: var(--gold); }
.plank-nav .next { text-align: right; grid-column: 2; }
.plank-nav small { display: block; color: var(--muted); font-size: .75rem; }

/* collapsible sections */
details.fold { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 0 .8rem; }
details.fold > summary { list-style: none; cursor: pointer; padding: 1rem 3rem 1rem 1.2rem; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--navy); position: relative; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; position: absolute; right: 1.2rem; top: 50%; width: .6rem; height: .6rem; border-right: 2px solid var(--gold-ink); border-bottom: 2px solid var(--gold-ink); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
details.fold[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
details.fold > .fold-body { padding: 0 1.2rem 1.1rem; }
details.fold > .fold-body > :last-child { margin-bottom: 0; }

/* ---------- forms ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.panel-narrow { max-width: 30rem; }
label { display: block; font-weight: 600; color: var(--navy); margin-bottom: .35rem; }
.field { margin-bottom: 1.1rem; }
.hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
input[type=text], input[type=tel], input[type=number], input[type=email] {
  width: 100%; min-height: 3.1rem; padding: .6rem .9rem; font: 1.05rem var(--sans); color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: 10px;
}
input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px var(--gold-soft); }
.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 500; color: var(--ink); margin-bottom: .7rem; }
.check input { width: 1.35rem; height: 1.35rem; margin-top: .2rem; flex: none; accent-color: var(--navy); }
.code-input { font-size: 1.6rem !important; letter-spacing: .4em; text-align: center; }
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: .7rem; }
.amounts button { min-height: 3rem; border: 2px solid var(--line); background: #fff; border-radius: 10px; font: 600 1rem var(--sans); color: var(--navy); cursor: pointer; }
.amounts button[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.money-field { position: relative; }
.money-field span { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 1.05rem; }
.money-field input { padding-left: 1.8rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; }
legend { font-weight: 600; color: var(--navy); margin-bottom: .5rem; padding: 0; }

.alert { border-radius: 10px; padding: .85rem 1rem; margin-bottom: 1.1rem; }
.alert-error { background: var(--warn-soft); color: var(--warn); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.notice { font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .9rem; margin-top: 1.1rem; }

/* ---------- tables and lists ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--paper); }
tr:last-child td { border-bottom: 0; }
td.amt { font-variant-numeric: tabular-nums; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--gold-soft); color: var(--gold-ink); border-radius: 999px; padding: .1rem .55rem; margin-left: .35rem; vertical-align: middle; }
.priv { color: var(--muted); font-style: italic; }

.roster { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.roster li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .9rem; margin: 0; font-size: .9rem; }
.roster li span { color: var(--muted); }

.tabs { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a { padding: .45rem 1rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--navy); font-size: .85rem; font-weight: 600; background: var(--card); }
.tabs a[aria-current="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- quiz ---------- */
.quiz-shell { max-width: 40rem; margin: 0 auto; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; font-weight: 600; color: var(--navy); }
.timer { font-variant-numeric: tabular-nums; background: var(--navy); color: #fff; border-radius: 999px; padding: .3rem .9rem; font-size: .95rem; }
.timer.low { background: var(--warn); }
.quiz-bar { height: .5rem; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 1.5rem; }
.quiz-bar span { display: block; height: 100%; background: var(--gold); transition: width .3s; }
.question { font-family: var(--serif); font-size: clamp(1.25rem, 4.2vw, 1.6rem); color: var(--navy); line-height: 1.35; margin: 0 0 1.3rem; -webkit-user-select: none; user-select: none; }
.question:focus { outline: none; }
.options { display: grid; gap: .7rem; -webkit-user-select: none; user-select: none; }
.option { text-align: left; width: 100%; min-height: 3.5rem; padding: .95rem 1.1rem; border: 2px solid var(--line); border-radius: 12px; background: var(--card); font: 1rem/1.45 var(--sans); color: var(--ink); cursor: pointer; transition: border-color .12s, background .12s; }
.option:hover { border-color: var(--gold); }
.option[aria-pressed="true"] { border-color: var(--navy); background: var(--gold-soft); }
.option:disabled { cursor: wait; }
.score { font-family: var(--serif); font-size: clamp(3rem, 12vw, 4.5rem); color: var(--navy); line-height: 1; margin: .2rem 0 .6rem; }
.result-pass { border-top: 6px solid var(--gold); }
.result-fail { border-top: 6px solid var(--muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #cfd6e2; padding: 3rem 0 2rem; margin-top: 3rem; font-size: .88rem; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 .7rem; font-family: var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.foot-grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr; } }
.foot-links { list-style: none; padding: 0; margin: 0; }
.foot-links li { margin-bottom: .35rem; }
.legal { border-top: 1px solid #34486a; margin-top: 2rem; padding-top: 1.2rem; font-size: .8rem; color: #aeb8c9; }
.legal p { margin: 0 0 .4rem; }
.paid-for { display: inline-block; border: 1px solid #5a6e91; padding: .3rem .6rem; color: #fff; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
