/* Dealena — visual identity
   Layout: calm, open columns; one teal "ledger track" motif (Tracked → Pending → Confirmed → Paid) carries the brand. */
:root {
  --paper: #f5f8f7;
  --surface: #ffffff;
  --surface-2: #eaf1ef;
  --ink: #12232a;
  --muted: #52666a;
  --line: #d6e2df;
  --brand: #0a6e62;
  --brand-strong: #075247;
  --brand-tint: #d9efea;
  --on-brand: #ffffff;
  --marigold: #f2b134;
  --marigold-ink: #6b4500;
  --marigold-tint: #fdf0d3;
  --danger: #b3261e;
  --ok: #1d7a46;
  --shadow: 0 1px 2px rgba(18, 35, 42, .06), 0 8px 24px rgba(18, 35, 42, .06);

  --font-display: "Familjen Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;

  --step--1: .875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.4vw, 2.25rem);
  --step-4: clamp(2.1rem, 1.5rem + 2.8vw, 3.4rem);

  --radius: 14px;
  --radius-sm: 8px;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1618; --surface: #12201f; --surface-2: #172a28; --ink: #e6efed; --muted: #9fb3b1;
    --line: #26403c; --brand: #3cc0ab; --brand-strong: #6fd6c4; --brand-tint: #143a35; --on-brand: #06201c;
    --marigold: #f5c35c; --marigold-ink: #f5c35c; --marigold-tint: #2e2611; --danger: #ff8a80; --ok: #6fd69a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c1618; --surface: #12201f; --surface-2: #172a28; --ink: #e6efed; --muted: #9fb3b1;
  --line: #26403c; --brand: #3cc0ab; --brand-strong: #6fd6c4; --brand-tint: #143a35; --on-brand: #06201c;
  --marigold: #f5c35c; --marigold-ink: #f5c35c; --marigold-tint: #2e2611; --danger: #ff8a80; --ok: #6fd69a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: .18em; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.015em; margin: 0; text-wrap: balance; color: var(--ink); }
h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 46rem; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: -.03em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.nav a { color: var(--ink); text-decoration: none; padding: .5rem .75rem; border-radius: 999px; font-size: .98rem; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--brand-tint); color: var(--brand-strong); font-weight: 700; }
.nav .btn { margin-left: .5rem; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; color: var(--ink); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 52rem) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: .25rem; padding: .75rem var(--gutter) 1.25rem; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 1rem; border-radius: 10px; }
  .nav .btn { margin: .5rem 0 0; justify-content: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font: 700 1rem/1 var(--font-body); padding: .85rem 1.25rem; border-radius: 999px;
  border: 1.5px solid transparent; text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease;
  min-height: 44px;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-sm { padding: .6rem 1rem; font-size: .95rem; min-height: 40px; }
.btn svg { width: 18px; height: 18px; }
@media (hover: hover) { .btn:hover { transform: translateY(-1px); } }

/* Sections */
section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.eyebrow { font: 700 .8rem/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: .9rem; display: block; }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 40rem; }
.section-head { display: grid; gap: .75rem; margin-bottom: 2.25rem; max-width: 44rem; }
.section-head p { color: var(--muted); }
.stack { display: grid; gap: 1rem; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: 1.1rem; }
.hero h1 em { font-style: normal; color: var(--brand); box-shadow: inset 0 -.32em 0 var(--marigold-tint); }
.hero .lede { margin-bottom: 1.75rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-note { margin-top: 1.25rem; font-size: var(--step--1); color: var(--muted); }
@media (max-width: 56rem) { .hero-grid { grid-template-columns: 1fr; } }

/* Ledger track — signature motif */
.ledger { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 1.5rem; min-width: 0; }
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.ledger-head h2 { font-size: var(--step-1); }
.ledger-head span { font-size: var(--step--1); color: var(--muted); }
.track { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.track li { display: grid; grid-template-columns: 2.25rem 1fr; gap: .9rem; position: relative; padding-bottom: 1.15rem; }
.track li:last-child { padding-bottom: 0; }
.track li::before { content: ""; position: absolute; left: calc(1.125rem - 1px); top: 2.25rem; bottom: 0; width: 2px; background: var(--line); }
.track li:last-child::before { display: none; }
.dot { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); border: 1.5px solid var(--line); }
.dot svg { width: 18px; height: 18px; }
.track li.done .dot { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.track li.paid .dot { background: var(--marigold); color: #3a2600; border-color: var(--marigold); }
.track h3 { font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.track p { font-size: .95rem; color: var(--muted); margin-top: .15rem; }
.pill { display: inline-block; font: 700 .72rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase; padding: .35rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pill-brand { background: var(--brand-tint); color: var(--brand-strong); }
.pill-gold { background: var(--marigold-tint); color: var(--marigold-ink); }

/* Cards & grids */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 60rem) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: .6rem; align-content: start; min-width: 0; }
.card p { color: var(--muted); font-size: .98rem; }
.icon { width: 2.75rem; height: 2.75rem; border-radius: 12px; background: var(--brand-tint); color: var(--brand-strong); display: grid; place-items: center; margin-bottom: .35rem; }
.icon svg { width: 22px; height: 22px; }
.plain { border: 0; background: transparent; padding: 0; }

/* Steps (real sequence) */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: .5rem; align-content: start; min-width: 0; }
.steps li::before { content: counter(step); font: 700 1rem/1 var(--font-display); width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); margin-bottom: .4rem; }
.steps p { color: var(--muted); font-size: .98rem; }
@media (max-width: 60rem) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .steps { grid-template-columns: 1fr; } }

/* Split band */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.checks li { display: grid; grid-template-columns: 1.5rem 1fr; gap: .7rem; align-items: start; }
.checks li svg { width: 1.3rem; height: 1.3rem; color: var(--brand); margin-top: .2rem; }
.checks.x li svg { color: var(--danger); }

/* Callout */
.callout { background: var(--marigold-tint); border: 1px solid color-mix(in srgb, var(--marigold) 45%, transparent); border-radius: var(--radius); padding: 1.1rem 1.25rem; display: grid; grid-template-columns: 1.5rem 1fr; gap: .75rem; }
.callout svg { width: 1.4rem; height: 1.4rem; color: var(--marigold-ink); margin-top: .1rem; }
.callout p { color: var(--ink); font-size: .98rem; }

/* CTA band */
.band { background: var(--brand); color: var(--on-brand); border-radius: 22px; padding: clamp(1.75rem, 4vw, 3rem); display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.band h2 { color: var(--on-brand); }
.band p { opacity: .9; margin-top: .4rem; max-width: 36rem; }
.band .btn { background: var(--paper); color: var(--ink); }
.band .btn:hover { background: var(--surface); color: var(--ink); }

/* Page hero (inner pages) */
.page-hero { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); margin-bottom: .75rem; }
.crumbs { font-size: var(--step--1); color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }

/* Prose (policies) */
.prose { max-width: 46rem; }
.prose h2 { font-size: var(--step-2); margin: 2.5rem 0 .75rem; scroll-margin-top: 5.5rem; }
.prose h3 { font-size: 1.12rem; margin: 1.5rem 0 .5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose .meta { color: var(--muted); font-size: var(--step--1); }
.policy-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.toc { position: sticky; top: 5.5rem; font-size: .93rem; border-left: 2px solid var(--line); padding-left: 1rem; }
.toc strong { display: block; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }
@media (max-width: 56rem) { .policy-layout { grid-template-columns: 1fr; } .toc { position: static; } }
.table-wrap { overflow-x: auto; margin: 0 0 1.25rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--surface); }
th, td { text-align: left; padding: .75rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-display); background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td:first-child { white-space: nowrap; }
@media (max-width: 40rem) { td:first-child { white-space: normal; } }

/* FAQ */
.faq { display: grid; gap: .75rem; max-width: 50rem; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.25rem; }
.faq summary { cursor: pointer; padding: 1.1rem 0; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-bottom: 1.1rem; color: var(--muted); }

/* Forms */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .4rem; min-width: 0; }
.field label { font-weight: 700; font-size: .95rem; }
.field .hint { font-size: .85rem; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 10px; padding: .75rem .9rem; min-height: 48px;
}
textarea.input { min-height: 9rem; resize: vertical; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: .87rem; min-height: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 40rem) { .form-row { grid-template-columns: 1fr; } }
.status { border-radius: 10px; padding: .9rem 1rem; background: var(--brand-tint); color: var(--ink); font-size: .95rem; }

/* Contact blocks */
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: .5rem; }
.contact-card .value { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; word-break: break-word; }
.copy-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
address { font-style: normal; }

/* Offers */
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.5rem; }
.toolbar .input { max-width: 22rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { font: 600 .92rem/1 var(--font-body); padding: .6rem .9rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; min-height: 40px; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.offer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: .6rem; align-content: start; }
.offer-top { display: flex; justify-content: space-between; gap: .75rem; align-items: start; }
.offer .rate { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--brand); }
.offer p { color: var(--muted); font-size: .93rem; }
.offer .btn { margin-top: .4rem; }
.empty { background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 2rem 1.5rem; display: grid; gap: .6rem; justify-items: start; }
.empty p { color: var(--muted); max-width: 40rem; }

/* Calculator */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem; display: grid; gap: 1rem; box-shadow: var(--shadow); }
.calc-out { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; padding-top: .5rem; border-top: 1px dashed var(--line); }
.calc-out strong { font-family: var(--font-display); font-size: 2rem; color: var(--brand); }
.calc small { color: var(--muted); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 3rem 2rem; margin-top: 0; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2rem; }
.footer-grid > * { min-width: 0; }
.footer-grid h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; font-family: var(--font-body); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-grid a { color: var(--ink); text-decoration: none; }
.footer-grid a:hover { color: var(--brand); text-decoration: underline; }
.footer-about p { color: var(--muted); margin-top: .8rem; max-width: 22rem; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; color: var(--muted); font-size: .88rem; }
@media (max-width: 56rem) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 34rem) { .footer-grid { grid-template-columns: 1fr; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mt-2 { margin-top: 2rem; }
.muted { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .track li { animation: rise .5s ease both; }
  .track li:nth-child(2) { animation-delay: .08s; } .track li:nth-child(3) { animation-delay: .16s; } .track li:nth-child(4) { animation-delay: .24s; }
  @keyframes rise { from { transform: translateY(6px); } to { transform: none; } }
}
