/* Layout concept: calm, document-like pages with a wide reading column, Evolve navy and blue accents, and a ledger-style calculator as the signature element. */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #1b2440;
  --muted: #545d72;
  --line: #d8deea;
  --accent: #243c76;
  --accent-ink: #ffffff;
  --brass: #1f7ea6;
  --tint: #e8eef8;
  --warn: #8a4b12;
  --band: #243c76;
  --band-ink: #ffffff;
  --font-display: "Poppins", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: "Poppins", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1526; --surface: #161e34; --ink: #e7ecf6; --muted: #a2abc0; --line: #283252;
    --accent: #7ea6e8; --accent-ink: #0d1424; --brass: #5cc0e3; --tint: #1a2440; --warn: #e5a66a;
    --band: #1c2d5c; --band-ink: #eef2fa;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1526; --surface: #161e34; --ink: #e7ecf6; --muted: #a2abc0; --line: #283252;
  --accent: #7ea6e8; --accent-ink: #0d1424; --brass: #5cc0e3; --tint: #1a2440; --warn: #e5a66a;
  --band: #1c2d5c; --band-ink: #eef2fa;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--brass); outline-offset: 2px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.prose { max-width: 68ch; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.eyebrow {
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brass); font-weight: 700;
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }

/* Header */
.topbar { background: var(--band); color: var(--band-ink); font-size: 0.85rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; padding-block: 6px; }
.topbar a { color: var(--band-ink); text-decoration: none; font-weight: 600; }
header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 14px; }
.brand { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.15; }
.brand strong { font-family: var(--font-display); font-size: 1.25rem; }
.brand span { font-size: 0.8rem; color: var(--muted); }
nav.main { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav.main a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 4px 0; border-bottom: 2px solid transparent; }
nav.main a:hover, nav.main a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 6px;
  padding: 13px 22px; font: 700 1rem var(--font-body); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections */
section { padding-block: 64px; }
section.tinted { background: var(--tint); }
.hero { padding-block: 56px 64px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: start; }
.hero-grid > * { min-width: 0; }
.cred { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 0.92rem; color: var(--muted); }
.cred b { color: var(--ink); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 > *, .grid-2 > * { min-width: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.card p { color: var(--muted); }
.card a.more { font-weight: 700; text-decoration: none; margin-top: auto; }

/* Timeline (a real sequence: before, during, after the case) */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.timeline > div { padding: 18px 20px 0 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.timeline .when { font-family: var(--font-mono); font-size: 0.8rem; color: var(--brass); text-transform: uppercase; letter-spacing: 0.06em; }

/* Ledger calculator */
.ledger { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ledger header { background: var(--band); color: var(--band-ink); padding: 14px 20px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ledger header h3 { font-size: 1.1rem; }
.ledger header small { font-family: var(--font-mono); font-size: 0.75rem; opacity: 0.8; }
.ledger .inputs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; padding: 20px; border-bottom: 1px dashed var(--line); }
.ledger .inputs > * { min-width: 0; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: 1rem var(--font-body); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px;
}
.ledger .field input { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.rows { padding: 8px 20px 20px; }
.row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.row span:last-child { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }
.row.total { border-bottom: 0; border-top: 2px solid var(--ink); margin-top: 6px; font-size: 1.1rem; }
.row.total span:first-child { font-weight: 700; }
.note { font-size: 0.85rem; color: var(--muted); }
.flag { font-size: 0.9rem; color: var(--warn); font-weight: 600; }

/* Form */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.form-card .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-card .two > * { min-width: 0; }
.fine { font-size: 0.78rem; color: var(--muted); line-height: 1.45; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
details p { margin-top: 10px; color: var(--muted); max-width: 68ch; }

ul.check { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
ul.check li { padding-left: 28px; position: relative; }
ul.check li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }

.quote { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.4; border-left: 3px solid var(--brass); padding-left: 20px; }

/* Footer */
footer.site { background: var(--band); color: var(--band-ink); padding-block: 40px; font-size: 0.85rem; }
footer.site a { color: var(--band-ink); }
footer.site .cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; }
footer.site .cols > * { min-width: 0; }
footer.site p { opacity: 0.85; margin-bottom: 8px; }
.ehl { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }

@media (max-width: 860px) {
  .hero-grid, .grid-3, .grid-2, .timeline, footer.site .cols { grid-template-columns: 1fr; }
  .timeline > div { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  section { padding-block: 48px; }
}
@media (max-width: 520px) {
  .ledger .inputs, .form-card .two { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

/* Guides */
.article { gap: 14px; }
.article h2 { font-size: 1.45rem; margin-top: 14px; }
.article p { line-height: 1.7; }

.powered { font-size: 0.75rem; color: var(--brass); font-weight: 600; letter-spacing: 0.02em; }
.evolve-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-decoration: none; order: 3; }
.evolve-logo img { height: 40px; width: auto; display: block; }
.footer-logo { height: 44px; width: auto; filter: brightness(0) invert(1); opacity: 0.95; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .evolve-logo img { filter: brightness(0) invert(1); } }
:root[data-theme="dark"] .evolve-logo img { filter: brightness(0) invert(1); }
@media (max-width: 860px) { .evolve-logo { order: 0; } .evolve-logo img { height: 32px; } }
.brand-group { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand-group .evolve-logo { order: 0; padding-left: 16px; border-left: 1px solid var(--line); }
@media (max-width: 860px) { .brand-group .evolve-logo img { height: 30px; } }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
