:root {
  --bg: #ffffff;
  --bg-soft: #f4f6fa;
  --text: #1a1f2b;
  --muted: #4b5565;
  --line: #d9dee8;
  --accent: #1d4ed8;
  --accent-text: #ffffff;
  --ok: #0f6b3a;
  --ok-bg: #e3f5ea;
  --todo: #8a4b00;
  --todo-bg: #fdf0d9;
  --bad: #9b1c1c;
  --bad-bg: #fde8e8;
  --unk: #374151;
  --unk-bg: #e8ebf1;
  --radius: 10px;
  --max: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f141c;
    --bg-soft: #18202c;
    --text: #e6e9ef;
    --muted: #aab3c2;
    --line: #2d384a;
    --accent: #7aa2ff;
    --accent-text: #0b1220;
    --ok: #7be0a8;
    --ok-bg: #12301f;
    --todo: #ffcf85;
    --todo-bg: #3a2a0d;
    --bad: #ff9b9b;
    --bad-bg: #3b1616;
    --unk: #cbd3df;
    --unk-bg: #263041;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-text); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding-top: .75rem; padding-bottom: .75rem; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); font-size: 1.05rem; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: .25rem 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

main { padding: 1.5rem 0 3rem; }
h1 { font-size: 1.85rem; line-height: 1.2; margin: .25rem 0 1rem; letter-spacing: -.01em; }
h2 { font-size: 1.4rem; line-height: 1.25; margin: 2rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
p, ul, ol, dl { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: .4rem; }
.lead { font-size: 1.15rem; color: var(--text); }
.small { font-size: .875rem; color: var(--muted); }
.crumbs { font-size: .875rem; color: var(--muted); margin-bottom: .5rem; }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 .35rem; }

.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: var(--accent-text); border: 2px solid var(--accent);
  border-radius: var(--radius); padding: .65rem 1.15rem; text-decoration: none; min-height: 44px;
}
.btn:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--accent); }

.hero { background: var(--bg-soft); border-radius: var(--radius); padding: 1.25rem; margin: 0 0 1.5rem; }
.hero p:last-child { margin-bottom: 0; }

.notice { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--bg-soft); border-radius: var(--radius); padding: .75rem 1rem; margin: 1.25rem 0; font-size: .95rem; }
.notice p:last-child { margin-bottom: 0; }

.card-grid { display: grid; gap: .75rem; grid-template-columns: 1fr; padding: 0; list-style: none; }
@media (min-width: 38rem) { .card-grid { grid-template-columns: 1fr 1fr; } }
.card-grid li { margin: 0; }
.card-grid a { display: block; height: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; text-decoration: none; color: var(--text); }
.card-grid a:hover { border-color: var(--accent); }
.card-grid strong { display: block; color: var(--accent); margin-bottom: .2rem; }
.card-grid span { font-size: .9rem; color: var(--muted); }

table { border-collapse: collapse; width: 100%; margin: 0 0 1.25rem; font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: .5rem .65rem; text-align: left; vertical-align: top; }
th { background: var(--bg-soft); }
.table-wrap { overflow-x: auto; }

details { margin: 0 0 1rem; }
summary { cursor: pointer; font-weight: 600; }
.faq details { border-bottom: 1px solid var(--line); padding: .6rem 0; margin: 0; }
.faq p { margin: .5rem 0 0; }

/* Wizard */
.q fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.q legend { font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin-bottom: .5rem; padding: 0; }
.q legend:focus { outline: none; }
.step { margin: 0 0 .35rem; color: var(--muted); font-size: .9rem; }
progress { width: 100%; height: 8px; margin-bottom: 1.25rem; accent-color: var(--accent); }
.help { color: var(--muted); font-size: .95rem; }
.opts { display: grid; gap: .6rem; }
.opt { display: flex; gap: .75rem; align-items: flex-start; border: 2px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; cursor: pointer; min-height: 44px; }
.opt:hover { border-color: var(--accent); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--bg-soft); }
.opt input { margin-top: .3rem; width: 1.15rem; height: 1.15rem; accent-color: var(--accent); flex: none; }
.opt small { display: block; color: var(--muted); font-weight: 400; }
.monthfield { display: flex; gap: 1rem; flex-wrap: wrap; }
.monthfield label { display: grid; gap: .25rem; font-weight: 600; }
select { font: inherit; padding: .55rem .6rem; border-radius: 8px; border: 2px solid var(--line); background: var(--bg); color: var(--text); min-width: 9rem; min-height: 44px; }
.actions { display: flex; gap: .75rem; margin-top: 1.25rem; flex-wrap: wrap; }
.error { color: var(--bad); font-weight: 600; }
.privacy-note { font-size: .85rem; color: var(--muted); margin-top: 1rem; }
#wizard { min-height: 22rem; }

/* Results */
.result { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.result--estimate { border-left: 6px solid var(--ok); }
.result--blocked { border-left: 6px solid var(--bad); }
.result--not_counting, .result--out_of_framework, .result--unsure { border-left: 6px solid var(--accent); }
.result__headline { margin-top: 0; font-size: 1.5rem; }
.result__headline:focus { outline: none; }
.facts { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.facts div { background: var(--bg-soft); border-radius: 8px; padding: .6rem .8rem; }
.facts dt { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 0; font-weight: 700; font-size: 1.1rem; }
.reqs { list-style: none; padding: 0; }
.reqs li { margin-bottom: .7rem; }
.reqs__note { display: block; font-size: .9rem; color: var(--muted); margin-top: .15rem; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; margin-right: .4rem; white-space: nowrap; }
.tag--ok { background: var(--ok-bg); color: var(--ok); }
.tag--todo { background: var(--todo-bg); color: var(--todo); }
.tag--blocked { background: var(--bad-bg); color: var(--bad); }
.tag--unknown { background: var(--unk-bg); color: var(--unk); }
.answers { margin-top: 1rem; }
.answers dl { display: grid; gap: .35rem; margin-top: .5rem; }
.answers dl div { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.answers dt { color: var(--muted); min-width: 10rem; }
.answers dd { margin: 0; }

/* Ads: hidden until filled, so there is no empty space and no layout shift */
.ad-slot { margin: 1.75rem 0; min-height: 0; text-align: center; }
.ad-slot[hidden] { display: none; }
.ad-slot__label { margin: 0 0 .25rem; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ad-slot ins { min-height: 100px; }

.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--bg); border-top: 2px solid var(--accent); padding: .9rem 16px; box-shadow: 0 -4px 16px rgba(0, 0, 0, .15); display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; justify-content: center; }
.consent p { margin: 0; max-width: 40rem; font-size: .92rem; }
.consent__actions { display: flex; gap: .6rem; }

.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; font-size: .9rem; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-bottom: .75rem; }
.site-footer a { color: var(--muted); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; cursor: pointer; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .site-header, .site-footer, .consent, .ad-slot, .actions { display: none !important; } }
