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

body {
  font-family: ui-sans-serif, system-ui, sans-serif;
  background: #0b1120; color: #e2e8f0;
  min-height: 100vh; display: flex; flex-direction: column; line-height: 1.6;
}
a { color: #fbbf24; text-decoration: none; }
a:hover { color: #fcd34d; }

.container { max-width: 780px; margin: 0 auto; padding: 0 1.25rem; width: 100%; flex: 1; display: flex; flex-direction: column; }

.top-nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; padding: 1rem 0 0; font-size: .8rem; }
.top-nav a { color: #94a3b8; }
.top-nav a:hover { color: #f1f5f9; }

header { padding: 1.75rem 0 1.5rem; }
.wordmark { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; color: #f8fafc; }
.wordmark span { color: #f59e0b; }
.tagline { color: #94a3b8; font-size: .9rem; margin-top: .35rem; }
main { flex: 1; }

h1 { font-size: 1.45rem; font-weight: 700; color: #f8fafc; letter-spacing: -0.01em; margin-bottom: .4rem; }
.lead { color: #94a3b8; font-size: .95rem; margin-bottom: 1.1rem; }

.calc-card, .result-card, .content {
  background: #131d33; border: 1px solid #1e2d4a; border-radius: 16px;
  padding: 1.5rem 1.6rem; margin-bottom: 1.25rem;
}

/* ── Form ─────────────────────────────────────────────────────────────────── */
.calc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field.wide, .field.checks, .calc-form button { grid-column: 1 / -1; }
.field label { display: block; font-size: .8rem; font-weight: 600; color: #cbd5e1; margin-bottom: .35rem; }
.field select {
  width: 100%; padding: .65rem .8rem; font-size: 1rem;
  background: #0b1120; color: #f1f5f9; border: 1px solid #2a3b5e; border-radius: 10px;
}
.field select:focus { outline: 2px solid #f59e0b; border-color: #f59e0b; }
fieldset.checks { border: 1px solid #2a3b5e; border-radius: 10px; padding: .8rem 1rem; }
fieldset.checks legend { font-size: .8rem; font-weight: 600; color: #cbd5e1; padding: 0 .4rem; }
fieldset.checks label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .9rem; color: #e2e8f0; margin: .45rem 0; cursor: pointer; }
fieldset.checks input { margin-top: .3rem; accent-color: #f59e0b; }
.calc-form button, .btn {
  display: inline-block; background: #f59e0b; color: #1c1102; font-weight: 700; font-size: .95rem;
  padding: .75rem 1.2rem; border: none; border-radius: 10px; cursor: pointer; transition: background .15s;
  text-align: center;
}
.calc-form button:hover, .btn:hover { background: #d97706; color: #1c1102; }
.btn.secondary { background: #1e2d4a; color: #fbbf24; }
.btn.secondary:hover { background: #2a3b5e; }
.btn.big { font-size: 1.05rem; padding: .9rem 1.4rem; margin-top: .5rem; }

/* ── Results ─────────────────────────────────────────────────────────────── */
.result-heading { font-size: 1.2rem; color: #f8fafc; margin-bottom: 1rem; }
.verdict { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin: 1.25rem 0 .5rem; padding-bottom: .35rem; border-bottom: 1px solid #1e2d4a; }
.verdict.likely { color: #34d399; }
.verdict.possible { color: #fbbf24; }
.verdict.info { color: #94a3b8; }
.scheme-row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: .85rem 0; border-bottom: 1px solid #1e2d4a; }
.scheme-row:last-child { border-bottom: none; }
.scheme-row.compact { padding: .6rem 0; }
.scheme-row p { color: #9fb0c4; font-size: .88rem; margin-top: .2rem; }
.scheme-name { font-weight: 600; color: #f1f5f9; font-size: 1rem; }
.scheme-name:hover { color: #fbbf24; }
.scheme-amount { color: #34d399; font-size: .85rem; font-weight: 600; }
.scheme-row .btn { flex-shrink: 0; white-space: nowrap; }
details.not-eligible { margin-top: 1rem; }
details.not-eligible summary { cursor: pointer; color: #64748b; font-size: .85rem; }
.note { font-size: .8rem; color: #64748b; margin-top: 1rem; }

.status-pill { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 999px; margin-bottom: .4rem; }
.status-open { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.status-closed { background: rgba(248,113,113,.12); color: #f87171; border: 1px solid rgba(248,113,113,.3); }
.status-upcoming { background: rgba(251,191,36,.12); color: #fbbf24; border: 1px solid rgba(251,191,36,.3); }
.status-not_in_ni { background: rgba(100,116,139,.15); color: #94a3b8; border: 1px solid rgba(100,116,139,.3); }
.status-advice { background: rgba(129,140,248,.15); color: #a5b4fc; border: 1px solid rgba(129,140,248,.3); }

/* ── Content ─────────────────────────────────────────────────────────────── */
.content h2 { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; color: #f1f5f9; margin: 0 0 .7rem; }
.content h2:not(:first-child) { margin-top: 1.5rem; }
.content h2::before { content: ""; flex: none; width: 4px; height: 1.05em; border-radius: 2px; background: linear-gradient(#fbbf24, #d97706); }
.content h3 { font-size: .95rem; color: #e2e8f0; margin: 1rem 0 .2rem; }
.content p { color: #9fb0c4; font-size: .92rem; margin: .5rem 0; }
.content ul.who { margin: .3rem 0 .5rem 1.2rem; color: #cbd5e1; font-size: .92rem; }
.content ul.who li { margin: .35rem 0; }
.callout { background: #0b1120; border-left: 3px solid #f59e0b; padding: .7rem .9rem; border-radius: 8px; color: #e2e8f0 !important; }

.scheme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.scheme-tile { display: flex; flex-direction: column; gap: .3rem; background: #0b1120; border: 1px solid #2a3b5e; border-radius: 12px; padding: .9rem 1rem; color: #f1f5f9; transition: border-color .15s; }
.scheme-tile:hover { border-color: #f59e0b; color: #f1f5f9; }
.scheme-tile strong { font-size: .92rem; line-height: 1.35; }
.tile-amount { font-size: .8rem; color: #34d399; }
.verified { font-size: .72rem; color: #64748b; }

.facts { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: .92rem; margin-bottom: 1rem; }
.facts dt { color: #64748b; font-weight: 600; }
.facts dd { color: #f1f5f9; }

.breakdown { width: 100%; border-collapse: collapse; font-size: .88rem; }
.breakdown th, .breakdown td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid #1e2d4a; }
.breakdown th { font-weight: 500; color: #cbd5e1; }
.breakdown tr.bad td, .breakdown tr.bad th { color: #f87171; }
.breakdown tr.warn td, .breakdown tr.warn th { color: #fbbf24; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.chip { background: #0b1120; border: 1px solid #2a3b5e; border-radius: 999px; padding: .35rem .85rem; font-size: .85rem; color: #cbd5e1; transition: border-color .15s, color .15s; }
.chip:hover { border-color: #f59e0b; color: #fbbf24; }

.ad-slot { margin: 1.5rem 0; text-align: center; min-height: 90px; }

article > h1 { margin-bottom: .3rem; }

footer { margin-top: 2rem; padding: 1.5rem 0 2rem; border-top: 1px solid #1e293b; color: #475569; font-size: .75rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin-bottom: .8rem; font-size: .8rem; }
.footer-nav a { color: #94a3b8; }
.footer-nav a:hover { color: #f1f5f9; }
footer p { margin: .4rem 0; }

@media (max-width: 560px) {
  .calc-form { grid-template-columns: 1fr; }
  .scheme-row { flex-direction: column; align-items: flex-start; }
}
