:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --brand: #0b6e4f;
  --brand-dark: #08553d;
  --brand-soft: #e8f5f0;
  --accent: #1d4ed8;
  --warn: #b45309;
  --danger: #b91c1c;
  --ok: #047857;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --max: 1080px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #eef7f3 0%, var(--bg) 220px);
  line-height: 1.6;
}
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.site-header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}
.nav { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--brand); }
.tax-year-pill {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
}

.hero {
  padding: 2.5rem 0 1.5rem;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}
.lede { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }
.disclaimer {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--warn);
  background: #fff7ed;
  color: #7c2d12;
  border-radius: 0 10px 10px 0;
  font-size: 0.92rem;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, border-color .15s ease;
}
a.card:hover { transform: translateY(-2px); border-color: #86efac; }
.card h2, .card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.55rem;
}

.calc-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
  margin: 1.25rem 0 2rem;
}
@media (max-width: 860px) {
  .calc-layout { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; align-items: flex-start; }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.panel h2 { margin-top: 0; font-size: 1.15rem; }
label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0.85rem 0 0.35rem;
}
input[type="number"], input[type="date"], input[type="text"], select, textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid #86efac;
  border-color: var(--brand);
}
.hint { color: var(--muted); font-size: 0.85rem; margin: 0.25rem 0 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 560px) { .row-2 { grid-template-columns: 1fr; } }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
  padding: 0.75rem 1.1rem;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}
.results {
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius);
  padding: 1.2rem;
}
.results h2 { margin: 0 0 0.75rem; font-size: 1.1rem; color: #fff; }
.result-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.95rem;
}
.result-row:last-child { border-bottom: 0; }
.result-row strong { font-variant-numeric: tabular-nums; }
.result-row .big { font-size: 1.35rem; color: #86efac; }
.note-soft { color: #cbd5e1; font-size: 0.85rem; margin-top: 0.85rem; }
.status-ok { color: #86efac; }
.status-warn { color: #fdba74; }
.status-bad { color: #fca5a5; }

.content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}
.content h2 { margin-top: 1.6rem; }
.content h2:first-child { margin-top: 0; }
.content h3 { margin-top: 1.25rem; }
.content ul, .content ol { padding-left: 1.2rem; }
.content li { margin: 0.35rem 0; }
.sources { font-size: 0.9rem; color: var(--muted); }
.related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 2rem;
}
.related a {
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.related a:hover { border-color: var(--brand); color: var(--brand); }

.ad-slot {
  min-height: 90px;
  margin: 1rem 0;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ad-slot[data-filled="true"] { border-style: solid; min-height: auto; color: transparent; }

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 2rem 0;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.site-footer ul { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.site-footer li { margin: 0.3rem 0; }

.breadcrumbs {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 1rem 0 0.25rem;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--brand); }

.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0.6rem 0;
  background: #fbfcfe;
}
.faq summary { cursor: pointer; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th, td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
}
th { background: #f1f5f9; }

.radio-row, .check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.4rem;
}
.radio-row label, .check-row label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  margin: 0;
}


/* GDPR cookie banner */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  max-width: 720px;
  margin-inline: auto;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  display: grid;
  gap: 0.85rem;
}
.cookie-banner p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.cookie-banner strong { color: var(--ink); }
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.cookie-actions button {
  appearance: none;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: var(--ink);
}
.cookie-actions button.cookie-accept {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.cookie-actions button.cookie-accept:hover { background: var(--brand-dark); }
.cookie-actions button.cookie-reject:hover { background: #f8fafc; }
@media (min-width: 640px) {
  .cookie-banner { left: 50%; right: auto; transform: translateX(-50%); width: min(720px, calc(100% - 2rem)); }
}
