@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque.woff2) format("woff2-variations"), url(/fonts/bricolage-grotesque.woff2) format("woff2");
}
@font-face {
  font-family: "Source Serif 4"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(/fonts/source-serif-4.woff2) format("woff2-variations"), url(/fonts/source-serif-4.woff2) format("woff2");
}
:root {
  --dusk: #1E2740;
  --dusk-2: #2C3A5E;
  --season: #2C3A5E;
  --ink: #1B2232;
  --muted: #586075;
  --paper: #F4F6F8;
  --card: #FFFFFF;
  --line: #D9DEE6;
  --lamp: #E9A93B;
  --lamp-soft: #FBF0DA;
  --moss: #3F7356;
  --moss-soft: #E3EFE7;
  --heather: #8A3B5C;
  --heather-soft: #F4E3EA;
  --focus: #2F6FDB;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E8EBF2; --muted: #A9B0C2; --paper: #121725; --card: #1A2133;
    --line: #2E3850; --lamp-soft: #3A2E17; --moss-soft: #1C3328; --heather-soft: #3A1F2C;
    --moss: #7FC29C; --heather: #E592B4; --focus: #8DB4FF; --season: #8296DA;
  }
}
:root[data-theme="dark"] {
  --ink: #E8EBF2; --muted: #A9B0C2; --paper: #121725; --card: #1A2133;
  --line: #2E3850; --lamp-soft: #3A2E17; --moss-soft: #1C3328; --heather-soft: #3A1F2C;
  --moss: #7FC29C; --heather: #E592B4; --focus: #8DB4FF; --season: #8296DA;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--serif); font-size: 1.0625rem; line-height: 1.65;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.measure { max-width: 66ch; }

/* ---------- Hero: dusk over a roofline ---------- */
.hero { background: var(--dusk); color: #F2EEE4; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #17203A 0%, #26335A 55%, #4A4466 82%, #8C6A6A 100%);
}
.hero .wrap { position: relative; padding-top: 22px; padding-bottom: 150px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; text-decoration: none; }
.brand svg { width: 30px; height: 30px; }
.hero h1 {
  font-family: var(--sans); font-weight: 800; font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1; letter-spacing: -.025em; margin: 64px 0 18px; max-width: 13ch;
  font-variation-settings: "opsz" 96;
}
.hero p.lede { font-size: 1.2rem; max-width: 46ch; margin: 0; color: #DCD8E6; }
.roofline { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 150px; display: block; }
.moon { position: absolute; right: 12%; top: 84px; width: 64px; height: 64px; border-radius: 50%; background: #F2E3B8; box-shadow: 0 0 60px 10px rgba(242,227,184,.25); }
.bat-flight { position: absolute; right: 18%; top: 120px; width: 120px; height: 60px; opacity: .85; }
@media (prefers-reduced-motion: no-preference) {
  .bat-flight path { animation: flit 9s ease-in-out infinite; transform-origin: center; }
  .bat-flight path:nth-child(2) { animation-delay: -3s; }
  @keyframes flit { 0%,100% { transform: translate(0,0); } 30% { transform: translate(-18px,8px); } 60% { transform: translate(10px,-6px); } }
}
@media (max-width: 640px) { .moon { right: 8%; top: 70px; width: 44px; height: 44px; } .bat-flight { display: none; } }

/* ---------- Checker ---------- */
.checker {
  position: relative; margin-top: -96px; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px; box-shadow: 0 24px 48px -28px rgba(20,25,45,.45);
}
@media (max-width: 640px) { .checker { padding: 20px 16px; border-radius: 14px; } }
.progress { display: flex; gap: 6px; margin-bottom: 22px; }
.progress span { height: 5px; flex: 1; border-radius: 3px; background: var(--line); transition: background .2s; }
.progress span.done { background: var(--dusk-2); }
:root[data-theme="dark"] .progress span.done { background: var(--lamp); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .progress span.done { background: var(--lamp); } }
.q-count { font-family: var(--sans); font-size: .9rem; color: var(--muted); margin: 0 0 6px; }
.checker h2 { font-family: var(--sans); font-weight: 700; font-size: clamp(1.4rem, 3.4vw, 1.85rem); line-height: 1.2; margin: 0 0 6px; letter-spacing: -.01em; }
.q-help { color: var(--muted); margin: 0 0 18px; font-size: 1rem; }
.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.opt {
  font: inherit; text-align: left; cursor: pointer; background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; line-height: 1.35;
  display: flex; gap: 12px; align-items: flex-start; min-height: 64px;
}
.opt:hover { border-color: var(--season); }
.opt[aria-pressed="true"] { border-color: var(--lamp); background: var(--lamp-soft); }
.opt .tick { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted); margin-top: 2px; display: grid; place-items: center; }
.opt.multi .tick { border-radius: 5px; }
.opt[aria-pressed="true"] .tick { background: var(--lamp); border-color: var(--lamp); }
.opt[aria-pressed="true"] .tick::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #1B2232; border-bottom: 2px solid #1B2232; transform: rotate(-45deg) translate(1px,-1px); }
.opt b { display: block; font-family: var(--sans); font-weight: 600; font-size: 1.02rem; }
.opt small { display: block; color: var(--muted); font-size: .9rem; margin-top: 2px; }
.nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 12px; }
.btn {
  font-family: var(--sans); font-weight: 700; font-size: 1rem; border-radius: 999px; padding: 12px 22px;
  border: 1.5px solid var(--dusk); background: var(--dusk); color: #F2EEE4; cursor: pointer;
}
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .btn:not(.ghost) { background: var(--lamp); border-color: var(--lamp); color: #1B2232; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.ghost) { background: var(--lamp); border-color: var(--lamp); color: #1B2232; } }

/* Result */
.verdict { border-radius: 14px; padding: 22px 22px 20px; margin-bottom: 22px; }
.verdict.unlikely { background: var(--moss-soft); }
.verdict.possible { background: var(--lamp-soft); }
.verdict.likely { background: var(--heather-soft); }
.verdict .scale { display: flex; gap: 6px; margin-bottom: 14px; }
.verdict .scale i { flex: 1; height: 8px; border-radius: 4px; background: rgba(120,130,150,.25); }
.verdict.unlikely .scale i:nth-child(1) { background: var(--moss); }
.verdict.possible .scale i:nth-child(-n+2) { background: var(--lamp); }
.verdict.likely .scale i { background: var(--heather); }
.verdict h2 { margin-bottom: 8px; }
.verdict p { margin: 0; max-width: 62ch; }
.result-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .result-grid { grid-template-columns: 1fr; } }
.result-grid h3 { font-family: var(--sans); font-size: 1.15rem; margin: 0 0 8px; }
.result-grid ul { margin: 0; padding-left: 1.1em; }
.result-grid li { margin-bottom: 6px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.result-actions a.btn { text-decoration: none; display: inline-block; }

/* ---------- Content sections ---------- */
section.block { padding: 72px 0 8px; }
section.block h2 { font-family: var(--sans); font-weight: 800; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 14px; }
section.block h3 { font-family: var(--sans); font-weight: 700; font-size: 1.2rem; margin: 28px 0 6px; }

/* Season calendar */
.calendar { margin: 28px 0 8px; }
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; }
.months div { font-family: var(--sans); font-size: .82rem; text-align: center; color: var(--muted); padding-top: 8px; }
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 10px; }
.bars span { height: 30px; border-radius: 6px; background: var(--line); }
.bars span.season { background: var(--season); }
.bars span.peak { background: var(--lamp); }
.bars.pra span { background: var(--moss); opacity: .75; }
.cal-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; margin-top: 10px; }
.cal-row .lbl { font-family: var(--sans); font-size: .92rem; font-weight: 600; line-height: 1.25; }
@media (max-width: 640px) {
  .cal-row { grid-template-columns: 1fr; gap: 4px; }
  .months div { font-size: .7rem; }
  .bars span { height: 22px; }
}
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-family: var(--sans); font-size: .88rem; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 6px; }

/* Stages — a real sequence, so numbered */
.stages { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; counter-reset: stage; }
.stages li { counter-increment: stage; display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 22px 0; border-top: 1px solid var(--line); }
.stages li::before { content: counter(stage); font-family: var(--sans); font-weight: 800; font-size: 2.2rem; line-height: 1; color: var(--lamp); }
section.block .stages h3 { margin: 0 0 4px; }
.stages p { margin: 0; }
.stages .meta { font-family: var(--sans); font-size: .92rem; color: var(--muted); margin-top: 6px; }

/* Costs */
.costs { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 1rem; }
.costs th, .costs td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.costs th { font-family: var(--sans); font-weight: 700; font-size: .95rem; }
.costs td:last-child { font-family: var(--sans); font-weight: 600; white-space: nowrap; }
@media (max-width: 560px) { .costs td:last-child { white-space: normal; } }

/* FAQ */
details { border-top: 1px solid var(--line); padding: 16px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-family: var(--sans); font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 500; font-size: 1.4rem; line-height: 1; color: var(--muted); }
details[open] summary::after { content: "–"; }
details p { margin: 10px 0 0; }

footer { margin-top: 80px; padding: 36px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
footer h2 { font-family: var(--sans); font-size: 1rem; color: var(--ink); margin: 0 0 8px; }
footer ol { padding-left: 1.2em; margin: 0 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shared additions ---------- */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.topnav { display: flex; gap: 18px; font-family: var(--sans); font-size: .98rem; }
.topnav a { text-decoration: none; color: #DCD8E6; }
.topnav a:hover, .topnav a[aria-current="page"] { color: #fff; text-decoration: underline; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 24px; font-family: var(--sans); }
