:root {
  --bg: #f5f8f7;
  --surface: #ffffff;
  --surface-alt: #edf4f2;
  --ink: #0b2320;
  --ink-muted: #405a55;
  --ink-soft: #6b8480;
  --border: #dbe6e3;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #e8f7f4;
  --accent: #b45309;
  --accent-soft: #fdf6e9;
  --gold: #f0b429;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(11, 35, 32, 0.07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand:hover { text-decoration: none; }

.brand-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e, #0b2320);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; font-size: 1.06rem; }
.brand-text small { font-size: 0.68rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.02em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav-links a { color: var(--ink-muted); font-weight: 600; font-size: 0.9rem; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); text-decoration: none; }

/* Hero */
.hero {
  background: radial-gradient(1200px 400px at 80% -10%, #146b63 0%, rgba(20, 107, 99, 0) 60%),
              linear-gradient(135deg, #062521 0%, #0b3a34 55%, #0f5048 100%);
  color: #f4fbf9;
  padding: 54px 0 40px;
}

.hero-pill {
  display: inline-block;
  background: rgba(94, 234, 212, 0.14);
  border: 1px solid rgba(153, 246, 228, 0.32);
  color: #99f6e4;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 { margin: 0 0 12px; font-size: clamp(1.85rem, 3.6vw, 2.65rem); line-height: 1.18; letter-spacing: -0.03em; }
.hero p { margin: 0; max-width: 720px; color: #c7ded9; font-size: 1.04rem; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 30px;
}

.stat {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(153, 246, 228, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
}

.stat strong { display: block; font-size: 1.25rem; color: #99f6e4; letter-spacing: -0.01em; }
.stat span { font-size: 0.78rem; color: #a9c8c2; }

@media (max-width: 760px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }

/* Sections and cards */
.section { padding: 42px 0 8px; }
.section-title { font-size: 1.5rem; margin: 0 0 8px; letter-spacing: -0.02em; }
.section-sub { margin: 0 0 24px; color: var(--ink-muted); }

.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 20px; }

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.tool-card:hover { transform: translateY(-2px); border-color: #5eead4; }
.tool-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.tool-tag {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.card-num {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--ink-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tool-card h2, .tool-card h3 { margin: 12px 0 8px; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.01em; }
.tool-card p { margin: 0 0 18px; color: var(--ink-muted); font-size: 0.93rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  font-family: inherit;
}

.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn-outline { background: var(--surface); color: var(--ink); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--surface-alt); }

/* Calculator layout */
.breadcrumb { padding: 16px 0 4px; font-size: 0.85rem; color: var(--ink-soft); }
.page-intro { padding: 8px 0 22px; }
.intro-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tax-year { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; }
.page-intro h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.24; letter-spacing: -0.025em; }
.page-intro p { margin: 0; color: var(--ink-muted); max-width: 800px; }

.calc-workspace { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .calc-workspace { grid-template-columns: 1fr; } }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel h2 { margin: 0 0 16px; font-size: 1.1rem; }

.field { margin-bottom: 15px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--ink); }
.field-hint { font-weight: 500; color: var(--ink-soft); font-size: 0.8rem; }
.field input[type="number"], .field input[type="text"], .field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.98rem;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
}
.field input:focus, .field select:focus { outline: 2px solid #5eead4; border-color: var(--primary); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.toggle-row { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 16px; font-size: 0.88rem; color: var(--ink-muted); }
.toggle-row input { margin-top: 4px; accent-color: var(--primary); width: 16px; height: 16px; }

/* Results */
.result-highlight {
  background: linear-gradient(135deg, #e8f7f4, #fdf6e9);
  border: 1px solid #b7e4dc;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.result-label { font-size: 0.8rem; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.result-value { font-size: clamp(1.75rem, 3.2vw, 2.3rem); font-weight: 800; color: var(--ink); line-height: 1.2; margin: 4px 0; letter-spacing: -0.02em; }
.result-sub { font-size: 0.88rem; color: var(--ink-muted); }

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi-box { background: var(--surface-alt); border-radius: 10px; padding: 11px 13px; }
.kpi-box .k-label { font-size: 0.78rem; color: var(--ink-soft); font-weight: 600; line-height: 1.3; }
.kpi-box .k-val { font-size: 1.08rem; font-weight: 800; color: var(--ink); margin-top: 2px; }

.bar-wrap { margin-top: 12px; }
.bar-row { margin-bottom: 9px; }
.bar-meta { display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 600; margin-bottom: 4px; }
.bar-track { height: 10px; background: var(--surface-alt); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; transition: width 0.25s ease; }

.table-scroll { overflow-x: auto; margin: 14px 0; }
.rate-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; background: #fff; }
.rate-table th, .rate-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.rate-table th { background: var(--surface-alt); font-weight: 700; color: var(--ink); }
.rate-table td.num, .rate-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rate-table tbody tr:nth-child(even) td { background: #fbfdfc; }
.rate-table tr.is-now td { background: var(--primary-soft); font-weight: 700; }
.rate-table .row-note { font-size: 0.78rem; color: var(--ink-soft); }

.verdict { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
@media (max-width: 520px) { .verdict { grid-template-columns: 1fr; } }
.verdict-card { border: 1px solid var(--border); border-radius: 11px; padding: 12px 14px; background: #fff; }
.verdict-card .v-name { font-size: 0.78rem; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.verdict-card .v-val { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; }
.verdict-card.win { border-color: #5eead4; background: var(--primary-soft); }
.verdict-card.win .v-val { color: var(--primary-dark); }
.verdict-line { margin: 0 0 14px; font-size: 0.92rem; font-weight: 600; color: var(--ink-muted); }

/* Article */
.article-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  margin-top: 30px;
  box-shadow: var(--shadow);
}
@media (max-width: 620px) { .article-box { padding: 22px 18px; } }

.article-box h2 { margin: 30px 0 10px; font-size: 1.32rem; letter-spacing: -0.015em; }
.article-box h2:first-child { margin-top: 0; }
.article-box h3 { margin: 18px 0 6px; font-size: 1.04rem; }
.article-box p, .article-box li { color: var(--ink-muted); }
.article-box ul, .article-box ol { padding-left: 22px; }
.article-box li { margin-bottom: 6px; }
.article-box table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.89rem; }
.article-box th, .article-box td { border: 1px solid var(--border); padding: 9px 11px; text-align: left; }
.article-box th { background: var(--surface-alt); color: var(--ink); font-weight: 700; }
.article-box td.num, .article-box th.num { text-align: right; font-variant-numeric: tabular-nums; }

.callout {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  padding: 14px 16px;
  border-radius: 8px;
  margin: 16px 0;
  color: var(--ink);
  font-size: 0.94rem;
}
.callout-warn { background: var(--accent-soft); border-left-color: var(--accent); }

.toc { background: var(--surface-alt); border-radius: 10px; padding: 14px 18px; margin: 18px 0; font-size: 0.9rem; }
.toc strong { display: block; margin-bottom: 6px; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
.toc ol { margin: 0; padding-left: 20px; }
.toc a { color: var(--ink-muted); }

.disclaimer-strip {
  margin: 22px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
  border: 1px dashed var(--border);
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* Home extras */
.step-list { counter-reset: step; list-style: none; padding: 0; margin: 18px 0; }
.step-list li { counter-increment: step; position: relative; padding-left: 44px; margin-bottom: 16px; color: var(--ink-muted); }
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.86rem;
}
.step-list strong { color: var(--ink); }

.compare-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin: 18px 0; }
.compare-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: #fff; }
.compare-card h3 { margin: 0 0 6px; font-size: 1rem; color: var(--ink); }
.compare-card p { margin: 0; font-size: 0.9rem; color: var(--ink-muted); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.chip { font-size: 0.8rem; font-weight: 600; color: var(--primary-dark); background: var(--primary-soft); border-radius: 999px; padding: 4px 11px; }
.chip-warn { color: var(--accent); background: var(--accent-soft); }

/* Footer */
.site-footer { margin-top: 56px; background: #08211e; color: #9ab8b2; padding: 40px 0 34px; font-size: 0.88rem; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-brand strong { color: #e6f5f1; font-size: 1.02rem; }
.footer-brand p { margin: 8px 0 0; max-width: 420px; }
.footer-legal { font-size: 0.8rem; color: #7f9a95; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.footer-links a { color: #cbe6e0; }

.copy-toast { font-size: 0.82rem; color: var(--primary); font-weight: 700; margin-left: 10px; }
.mini-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 10px; }
