/* Kalkula. One stylesheet for every page. Colours checked for 4.5:1 text contrast. */
:root {
  --ink: #0f1b2d;
  --muted: #475569;
  --line: #e2e8f0;
  --line-strong: #94a3b8;
  --soft: #f5f7fa;
  --brand: #1d4ed8;
  --brand-dark: #1e3a8a;
  --brand-tint: #dbeafe;
  --radius: 12px;
  --max: 1120px;
  --display: "Space Grotesk", Inter, system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: #fff; font-size: 16px; line-height: 1.55; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; }
h1 { font-size: clamp(30px, 5vw, 44px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 20px; }
p { margin: 0; }
img, svg { max-width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: 18px; color: var(--muted); max-width: 680px; }

/* Header and footer */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 14px; padding-bottom: 14px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.logo svg { width: 28px; height: 28px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-weight: 500; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); text-decoration: underline; text-underline-offset: 4px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 40px; padding-top: 40px; padding-bottom: 48px; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer nav a { min-height: 44px; display: inline-flex; align-items: center; }

/* Page furniture */
main.page { padding-top: 28px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: 14px; color: var(--muted); }
.pill { font-size: 12px; font-weight: 600; color: var(--brand-dark); background: var(--brand-tint); border-radius: 999px; padding: 4px 10px; }
.pill.grey { color: var(--muted); background: #f1f5f9; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel-soft { background: var(--soft); border-radius: var(--radius); padding: 28px; }
.band { background: var(--soft); }
.band-dark { background: var(--ink); color: #fff; }
.band-dark .muted { color: #cbd5e1; }
.section { padding: 56px 0; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
a.card:hover { border-color: var(--brand); color: var(--ink); }
.card.primary { border: 2px solid var(--brand); }
.card-title { font-family: var(--display); font-size: 19px; font-weight: 600; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }

/* Buttons and inputs */
.btn { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 22px; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--ink); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 44px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 500; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.chip-grid a { min-height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid #cbd5e1; border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--ink); }
.chip-grid a:hover { border-color: var(--brand); color: var(--brand); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend, .label { font-size: 14px; font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); }
input[type="text"], select { min-height: 48px; width: 100%; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; font: inherit; color: var(--ink); background: #fff; }
input.money-input { font-size: 22px; font-weight: 600; min-height: 54px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.segmented label { position: relative; min-height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 500; }
.segmented label + label { border-left: 1px solid var(--line-strong); }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented input:checked + span { color: #fff; }
.segmented label:has(input:checked) { background: var(--brand); color: #fff; font-weight: 600; }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: -3px; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; }
.check input { width: 20px; height: 20px; }
details.more { border-top: 1px solid var(--line); padding-top: 12px; }
details.more summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--brand); }
details.more[open] summary { margin-bottom: 12px; }
details.more .stack { gap: 14px; }

/* Calculator layout */
.calc { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.calc-form { flex: 1 1 340px; }
.calc-result { flex: 1 1 440px; display: flex; flex-direction: column; gap: 20px; }
.headline { display: flex; flex-direction: column; gap: 2px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); }
.big { font-family: var(--display); font-size: clamp(38px, 6vw, 52px); font-weight: 700; line-height: 1.1; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { background: #fff; border-radius: 8px; padding: 12px 16px; display: flex; flex-direction: column; }
.tile-value { font-size: 22px; font-weight: 600; }
.bar { display: flex; height: 18px; border-radius: 4px; overflow: hidden; gap: 2px; background: #fff; }
.bar span { display: block; min-width: 2px; }
.legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.prose { max-width: 760px; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 12px; }
.prose ul { padding-left: 22px; margin: 0; }
.prose h2 { margin-top: 32px; margin-bottom: 12px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 16px; text-align: left; }
thead th { background: var(--soft); font-weight: 600; font-size: 14px; }
tbody tr + tr, tbody tr:first-child { border-top: 1px solid var(--line); }
table.money td, table.money thead th:not(:first-child), table.num td:not(:first-child), table.num thead th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody th { font-weight: 400; }
tr.total { border-top: 2px solid var(--ink) !important; font-weight: 600; }
tr.total th { font-weight: 600; }
tr.current { background: #eff6ff; font-weight: 600; }

/* FAQ */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 16px; color: var(--muted); }

/* Ad slots: empty and invisible until an ad code is pasted in. */
.ad-slot:empty { display: none; }
.ad-slot { margin: 8px 0; min-height: 90px; }

/* Mobile result bar on the calculator */
.sticky-result { display: none; }
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .section { padding: 40px 0; }
  .panel, .panel-soft { padding: 20px; }
  .has-sticky { padding-bottom: 76px; }
  .sticky-result { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--ink); color: #fff; padding: 10px 16px; align-items: center; justify-content: space-between; gap: 12px; }
  .sticky-result .label { font-size: 12px; color: #cbd5e1; font-weight: 500; }
  .sticky-result .value { font-family: var(--display); font-size: 22px; font-weight: 700; }
  .sticky-result a { min-height: 44px; display: inline-flex; align-items: center; padding: 0 14px; background: #fff; color: var(--ink); border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
