/* GSD Accountants — design system per BRAND.md */
:root {
  --ink: #0D2436;
  --ink-deep: #081826;
  --paper: #F7F5F0;
  --white: #FFFFFF;
  --gold: #E9A13B;
  --gold-strong: #D98F24;
  --green: #1F7A5C;
  --slate: #45586A;
  --muted: #5A6B7D;          /* WCAG AA: 5.03:1 on --paper, 5.48:1 on white */
  --line: #E3DED3;           /* decorative dividers/card edges only */
  --line-strong: #8C867A;    /* form-control borders — 3.62:1 on white, 3.32:1 on --paper */
  --amber-text: #B45309;     /* readable amber for text on light backgrounds (5.02:1) */
  --focus: #0D2436;
  --sky: #A8C6DA;
  --radius-card: 14px;
  --radius-btn: 10px;
  --font-head: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 8px 24px rgba(13, 36, 54, 0.06);
  --shadow-lg: 0 16px 40px rgba(13, 36, 54, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }

/* The header is sticky and 68px tall, so every in-page jump — the skip link,
   blog heading anchors generated in md.mjs, calculator deep links — lands
   underneath it unless the target reserves that much room. Applied to any [id]
   so keyboard focus scrolling clears the header too, not just #hash nav. */
:target,
[id] { scroll-margin-top: 84px; }

/* Removes the mobile double-tap-zoom wait before a tap registers, and replaces
   iOS's default grey tap box with a brand-tinted one. */
a, button, summary, label.field, .btn, .calc-tab {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(13, 36, 54, 0.12);
}

/* ---------- accessibility primitives (WCAG 2.1 AA) ---------- */

/* Skip link: first focusable element on every page, hidden until focused. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: var(--white);
  font: 600 0.95rem var(--font-body);
  padding: 12px 20px; border-radius: 0 0 10px 0; text-decoration: none;
}
.skip-link:focus {
  left: 0;
  outline: 3px solid var(--gold); outline-offset: 2px;
}
/* Deliberate: #main is only ever focused programmatically by the skip link, and
   a ring around the whole page is noise. This outranks :focus-visible below by
   specificity, which is the intent — do not delete it as a stray outline reset. */
main:focus { outline: none; }

/* Visible focus indicator, 15.9:1 on light backgrounds. Never remove without
   a replacement — an invisible focus ring is a 2.4.7 violation. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
/* On dark sections ink would disappear, so flip to gold (8.2:1 on --ink-deep). */
.on-dark :focus-visible,
.site-footer :focus-visible,
.hero-home :focus-visible {
  outline-color: var(--gold);
}

/* Screen-reader-only text that stays in the accessibility tree. */
.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;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--slate);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
/* Stops a long headline stranding one word on its own last line. */
h1, h2, h3, h4, .card-h { text-wrap: balance; }
.lead, .post-body p { text-wrap: pretty; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
strong { color: var(--ink); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* Landscape notches otherwise run the nav and footer under the cutout. */
.site-header .container { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 34px; height: 34px; flex: none; }
.brand .word { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
.brand .word span { font-weight: 400; color: var(--slate); }
.brand img.logo-img { height: 46px; width: auto; }

nav.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
nav.main-nav > a, .dd > button {
  font: 500 0.94rem var(--font-body);
  color: var(--ink); padding: 8px 12px; border-radius: 8px;
  background: none; border: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px;
}
nav.main-nav > a:hover, .dd > button:hover { background: rgba(13,36,54,0.06); text-decoration: none; }
nav.main-nav > a.active { color: var(--green); font-weight: 600; }

.dd { position: relative; }
.dd-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 8px; flex-direction: column;
  display: flex; visibility: hidden; opacity: 0;
  transition: opacity 0.15s ease, visibility 0s linear 0.35s;
}
/* invisible bridge across the gap so the menu stays open while the mouse crosses */
.dd-menu::before { content: ""; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.dd.dismissed .dd-menu { visibility: hidden; opacity: 0; transition-delay: 0s, 0s; }
.dd:focus-within:not(.dismissed) .dd-menu,
.dd.open .dd-menu {
  visibility: visible; opacity: 1; transition-delay: 0s, 0s;
}
/* Hover-open only where a pointer can actually hover. On touch, a tap would
   otherwise leave a sticky :hover state and the toggle would never open. */
@media (hover: hover) {
  .dd:hover:not(.dismissed) .dd-menu {
    visibility: visible; opacity: 1; transition-delay: 0s, 0s;
  }
}
.dd-menu a { color: var(--ink); padding: 9px 12px; border-radius: 8px; font-size: 0.93rem; }
.dd-menu a:hover { background: var(--paper); text-decoration: none; }
.dd-menu a small { display: block; color: var(--muted); font-size: 0.8rem; }

.nav-cta { margin-left: 10px; }

.menu-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 8px; }
.menu-toggle svg { width: 26px; height: 26px; stroke: var(--ink); }

@media (max-width: 920px) {
  nav.main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 2px;
    box-shadow: var(--shadow-lg);
  }
  nav.main-nav.open { display: flex; }
  .menu-toggle { display: block; }
  .dd-menu { position: static; display: flex; visibility: visible; opacity: 1; transition: none; box-shadow: none; border: 0; padding: 0 0 0 16px; }
  .dd-menu::before { display: none; }
  .dd > button { width: 100%; justify-content: flex-start; }
  .nav-cta { margin: 10px 0 0; text-align: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; font: 600 0.98rem var(--font-body);
  padding: 13px 24px; border-radius: var(--radius-btn);
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-strong); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: rgba(13,36,54,0.06); }
.on-dark .btn-ghost { border-color: var(--paper); color: var(--paper); }
.on-dark .btn-ghost:hover { background: rgba(247,245,240,0.1); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }

/* ---------- sections ---------- */
section { padding: 72px 0; }
section.tight { padding: 48px 0; }
.on-dark { background: var(--ink-deep); color: rgba(247,245,240,0.85); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--white); }
.on-dark strong { color: var(--white); }
.on-white { background: var(--white); }

.eyebrow {
  display: block; font: 600 0.8rem var(--font-body);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green); margin-bottom: 14px;
}
.on-dark .eyebrow { color: var(--gold); }
.lead { font-size: 1.16rem; color: var(--muted); max-width: 640px; }
.on-dark .lead { color: var(--sky); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }
.hero .lead { font-size: 1.2rem; margin: 18px 0 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { font-size: 0.88rem; color: var(--sky); margin-top: 18px; }

/* P&L proof card */
.pl-card {
  background: var(--white); border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg); padding: 26px 28px; color: var(--slate);
  border: 1px solid var(--line);
}
.pl-card .pl-title { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.pl-card .pl-title h2 { margin: 0; font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }
/* The proof card is a white surface even inside a dark hero, so its headings
   must not inherit `.on-dark`'s white — that rendered them invisible (1:1). */
.pl-card h2, .pl-card h3, .on-dark .pl-card h2, .on-dark .pl-card h3 { color: var(--ink); }
.pl-card .pl-title small { color: var(--muted); }
.pl-card table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
/* Row labels are <th scope="row"> for screen readers; these rules undo the
   UA's bold + centred default so they render exactly as the old <td>s did. */
.pl-card th { padding: 7px 0; border-bottom: 1px solid var(--paper); text-align: left; font-weight: 400; color: inherit; }
.pl-card td { padding: 7px 0; border-bottom: 1px solid var(--paper); }
.pl-card td:last-child { text-align: right; font-weight: 500; color: var(--ink); }
.pl-card tr.total th, .pl-card tr.total td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 700; color: var(--green); padding-top: 10px; }
.pl-card tr.total td:last-child { color: var(--green); }
.pl-badge {
  display: inline-block; background: rgba(31,122,92,0.1); color: var(--green);
  font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 3px 10px; margin-bottom: 12px;
}

/* ---------- cards & grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 920px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-card); padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow); }
.card h3 { margin-top: 14px; }
/* Semantic h2 that must still *look* like a card title (heading order fix). */
h2.card-h, .card h2.card-h { font-size: 1.25rem; font-weight: 600; margin-top: 14px; }
h2.card-h.mt-0, .card h2.card-h.mt-0 { margin-top: 0; }
.card .icon { width: 42px; height: 42px; color: var(--green); }
a.card-link { color: inherit; display: block; }
a.card-link:hover { text-decoration: none; transform: translateY(-2px); }
a.card-link .go { color: var(--green); font-weight: 600; font-size: 0.92rem; }

/* tier cards */
.tier-card { position: relative; display: flex; flex-direction: column; }
.tier-card .tier-name { font: 600 0.85rem var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.tier-card .price { font: 700 2rem var(--font-head); color: var(--ink); margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.tier-card .price small { font: 500 0.85rem var(--font-body); color: var(--muted); }
.tier-card .for { font-size: 0.92rem; color: var(--muted); min-height: 3em; }
.tier-card ul { padding-left: 0; list-style: none; margin: 14px 0 20px; flex: 1; min-width: 0; }
.tier-card ul li { padding: 5px 0 5px 26px; position: relative; font-size: 0.93rem; }
.tier-card ul li::before { content: "✓"; position: absolute; left: 2px; color: var(--green); font-weight: 700; }
.tier-card.popular { border-color: var(--gold); border-width: 2px; }
.tag-popular {
  position: absolute; top: -13px; left: 24px; background: var(--gold); color: var(--ink);
  font: 600 0.75rem var(--font-body); padding: 4px 12px; border-radius: 999px;
}

/* steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 0; }
h3.step-h { font-size: 1.25rem; font-weight: 600; }
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; background: var(--ink); color: var(--gold);
  font: 700 1.05rem var(--font-head); margin-bottom: 14px;
}

/* stat strip */
.stats { display: flex; gap: 48px; flex-wrap: wrap; }
.stat .n { font: 700 2.2rem var(--font-head); color: var(--ink); font-variant-numeric: tabular-nums; }
.on-dark .stat .n { color: var(--gold); }
.stat .l { font-size: 0.9rem; color: var(--muted); }
.on-dark .stat .l { color: var(--sky); }

/* trust strip */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); padding: 18px 0; }
.trust-strip .container { display: flex; align-items: center; justify-content: center; gap: 14px 36px; flex-wrap: wrap; font-size: 0.9rem; color: var(--muted); }
.trust-strip strong { font-weight: 600; color: var(--slate); }

/* testimonial */
.quote { border-left: 3px solid var(--gold); padding-left: 22px; font-size: 1.02rem; }
.quote footer { color: var(--muted); font-size: 0.88rem; margin-top: 10px; }

/* pain list */
.pain-list { list-style: none; padding: 0; margin: 20px 0; }
.pain-list li { padding: 10px 0 10px 34px; position: relative; border-bottom: 1px solid var(--line); }
.pain-list li:last-child { border-bottom: 0; }
.pain-list li::before { content: "✕"; position: absolute; left: 4px; color: #B54B3A; font-weight: 700; }
.get-list { list-style: none; padding: 0; margin: 20px 0; }
.get-list li { padding: 9px 0 9px 34px; position: relative; }
.get-list li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 700; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; overscroll-behavior: contain; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--white); }
table.compare, .table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table-wrap th, .table-wrap td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap th { background: var(--ink); color: var(--white); font: 600 0.85rem var(--font-body); white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td { font-variant-numeric: tabular-nums; }

/* ---------- FAQ ---------- */
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 4px 22px; margin-bottom: 12px; }
.faq summary { font: 600 1rem var(--font-body); color: var(--ink); cursor: pointer; padding: 14px 0; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font: 400 1.4rem var(--font-head); color: var(--green); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; }

/* ---------- forms ---------- */
.magnet-form { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.magnet-form .mf-field { display: flex; flex-direction: column; gap: 4px; }
.magnet-form label, .calc-email label {
  font: 600 0.78rem var(--font-body); color: var(--muted);
}
.magnet-form input[type="text"], .magnet-form input[type="email"] {
  font: 400 1rem var(--font-body); padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink);
}
.magnet-form input::placeholder, .calc-email input::placeholder { color: #6B7683; opacity: 1; }

/* Honeypot: hidden from sighted users, screen readers AND the keyboard.
   CSS-only hiding gets real users flagged as bots. */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.form-note { font-size: 0.82rem; color: var(--muted); }
.form-status:empty { display: none; }
.form-status { border-radius: 10px; padding: 14px 18px; font-weight: 500; }
.form-status.is-success { background: rgba(31,122,92,0.08); border: 1px solid var(--green); color: #17604A; }
.form-status.is-error { background: rgba(181,75,58,0.08); border: 1px solid #8E3324; color: #8E3324; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.cta-band .lead { margin: 14px auto 30px; }

/* ---------- blog ---------- */
.post-card { display: flex; flex-direction: column; gap: 6px; }
.post-card .date { font-size: 0.82rem; color: var(--muted); }
.post-body { max-width: 760px; }
.post-body h2 { margin-top: 1.6em; }
.post-body h3 { margin-top: 1.4em; }
.post-body img { border-radius: 12px; }
.post-body blockquote { border-left: 3px solid var(--gold); margin: 1.4em 0; padding: 2px 0 2px 20px; color: var(--muted); }
.post-body code { background: rgba(13,36,54,0.07); padding: 2px 6px; border-radius: 5px; font-size: 0.88em; }
.post-body pre { background: var(--ink-deep); color: var(--paper); padding: 18px 22px; border-radius: 12px; overflow-x: auto; }
.post-body pre code { background: none; padding: 0; }
.post-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
.answer-box { background: var(--white); border: 1px solid var(--gold); border-radius: 12px; padding: 20px 24px; margin: 24px 0; }
.answer-box .label { font: 600 0.75rem var(--font-body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--amber-text); display: block; margin-bottom: 6px; }

/* ---------- calendly ---------- */
.calendly-slot { background: var(--white); border: 2px dashed var(--line); border-radius: var(--radius-card); min-height: 640px; display: flex; align-items: center; justify-content: center; }
/* Calendly's snippet ships an inline min-width:320px, which overflows the
   viewport on a 320px phone once container padding is counted. The widget
   itself renders fluid, so the floor is unnecessary. */
.calendly-inline-widget { width: 100%; min-width: 0; }

/* ---------- footer ---------- */
footer.site-footer { background: var(--ink-deep); color: rgba(247,245,240,0.72); padding: 56px 0 max(32px, env(safe-area-inset-bottom)); font-size: 0.92rem; }
footer.site-footer .container { padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
footer.site-footer h3.footer-h { color: var(--white); font-family: var(--font-head); font-size: 0.95rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 14px; }
footer.site-footer a { color: rgba(247,245,240,0.72); }
footer.site-footer a:hover { color: var(--gold); text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a, .post-body a { overflow-wrap: anywhere; }
.footer-legal { border-top: 1px solid rgba(247,245,240,0.14); padding-top: 24px; font-size: 0.82rem; color: rgba(247,245,240,0.5); }
.footer-boundary { font-size: 0.85rem; background: rgba(247,245,240,0.06); border-radius: 10px; padding: 14px 18px; margin-bottom: 28px; }

/* misc */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.section-head { margin-bottom: 44px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }
.badge-green { display: inline-block; background: rgba(31,122,92,0.1); color: var(--green); font-size: 0.78rem; font-weight: 600; border-radius: 999px; padding: 3px 12px }

/* ---------- calculators ---------- */
.calc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.calc-tab {
  font: 600 0.92rem var(--font-body); padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--white); color: var(--ink); cursor: pointer;
}
.calc-tab:hover { border-color: var(--gold); }
.calc-tab.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.calc-panel { display: none; }
.calc-panel.active { display: block; }
.calc-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 28px; align-items: start; }
/* Grid and flex children default to min-width:auto, so they refuse to shrink
   below their content's min-content width and push the page wider than the
   viewport on small phones. */
.calc-grid > *, .fields > *, .calc-email { min-width: 0; }
@media (max-width: 920px) { .calc-grid { grid-template-columns: 1fr; } }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
@media (max-width: 640px) { .fields { grid-template-columns: 1fr; } }
.field span { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.field input {
  width: 100%; font: 500 1rem var(--font-body); padding: 9px 12px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper);
  color: var(--ink); font-variant-numeric: tabular-nums; box-sizing: border-box;
}
.calc-email { margin-top: 16px; }
/* min-width:0 lets a long pasted address shrink the input instead of
   widening the row past the card. overflow-wrap catches the visible text. */
.calc-email .calc-email-row { display: flex; gap: 10px; margin-top: 4px; min-width: 0; }
.calc-email input { min-width: 0; }
.calc-email input { flex: 1; font: 400 0.95rem var(--font-body); padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--white); color: var(--ink); }
.calc-email .form-status { margin-top: 10px; font-size: 0.88rem; }
.calc-note { margin-top: 22px; font-size: 0.92rem; color: var(--muted); }
.calc-cta {
  margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0; padding: 16px 20px;
}
.calc-cta p { margin: 0; font-size: 0.96rem; font-weight: 500; flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; }
.calc-cta .btn { white-space: nowrap; }
.burn-strip { display: flex; gap: 4px; margin-top: 14px; }
.burn-strip span {
  flex: 1; height: 32px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 0.66rem; font-weight: 600; color: var(--white); cursor: default;
}
.burn-strip span.burn { background: #B4452F; }
.burn-strip span.ok { background: var(--green); }
.gauge { margin-top: 16px; }
.gauge-head { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.gauge-track { position: relative; height: 12px; border-radius: 999px; background: var(--paper); }
/* Full width, scaled by transform — animating width would relayout every frame. */
.gauge-fill { height: 100%; width: 100%; border-radius: 999px; background: var(--green); transform: scaleX(0); transform-origin: left center; transition: transform 0.2s; }
.gauge-fill.over { background: #B4452F; }
.gauge-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); opacity: 0.55; }

.footer-logo { height: 58px; width: auto; margin-bottom: 14px; display: block; }

/* ---------- live-close hero card animation ---------- */
.pl-anim .pl-badge { opacity: 0; transform: translateY(-4px); transition: opacity .45s ease, transform .45s ease; }
.pl-anim .pl-badge.show { opacity: 1; transform: none; }
.pl-anim tbody tr { opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; }
.pl-anim tbody tr.show { opacity: 1; transform: none; }
.pl-anim tr.total th, .pl-anim tr.total td { border-top-color: transparent; transition: border-top-color .4s ease; }
.pl-anim tr.total.show th, .pl-anim tr.total.show td { border-top-color: var(--ink); }
/* Compositor-only: the highlight is a pseudo-element whose opacity fades,
   rather than an animation on background and border-radius (both paint). */
.pl-anim tr.total.landed td:last-child { position: relative; }
.pl-anim tr.total.landed td:last-child::after {
  content: ""; position: absolute; inset: 2px -6px; border-radius: 6px;
  background: rgba(31,122,92,0.14); opacity: 0; pointer-events: none;
  animation: profit-land 0.9s ease;
}
@keyframes profit-land {
  0%   { opacity: 0; }
  30%  { opacity: 1; }
  100% { opacity: 0; }
}


/* ---------- page illustrations ---------- */
.illo { max-width: 720px; margin: 44px auto 0; padding: 0 24px; }
.illo img { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }
.illo-tight { margin: 8px auto 12px; }
.post-hero { margin: 22px 0 8px; }
.post-hero img { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }
.about-photo { width: 100%; height: auto; border-radius: 14px; display: block; margin-bottom: 24px; box-shadow: var(--shadow); }


/* ---------- home hero background illustration ---------- */
.hero-home {
  background:
    linear-gradient(90deg, var(--ink-deep) 0%, rgba(8,24,38,0.94) 38%, rgba(8,24,38,0.45) 72%, rgba(8,24,38,0.25) 100%),
    url('/img/real-estate-portfolio-neighborhood-hero-dark.webp') right center / cover no-repeat,
    var(--ink-deep);
}
@media (max-width: 920px) {
  .hero-home {
    background:
      linear-gradient(180deg, rgba(8,24,38,0.92) 0%, rgba(8,24,38,0.8) 100%),
      url('/img/real-estate-portfolio-neighborhood-hero-dark.webp') center top / cover no-repeat,
      var(--ink-deep);
  }
}


/* ---------- amortization schedule dropdown ---------- */
.amort-detail { margin-top: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px 8px; }
.amort-detail summary { cursor: pointer; font: 600 0.98rem var(--font-body); color: var(--ink); padding: 13px 0; }
.amort-detail summary:hover { color: var(--green); }
.amort-detail .table-wrap { max-height: 430px; overflow: auto; overscroll-behavior: contain; margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 10px; }
.amort-detail table { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.amort-detail th { text-align: right; padding: 9px 12px; background: var(--ink); color: var(--white); position: sticky; top: 0; font-weight: 600; }
.amort-detail th:first-child, .amort-detail td:first-child { text-align: left; }
.amort-detail td { text-align: right; padding: 6px 12px; border-bottom: 1px solid var(--paper); color: var(--slate); }
.amort-detail tr.yr td { background: var(--paper); font-weight: 700; color: var(--ink); }


/* ---------- ARIA tab pattern (calculators) ---------- */
.calc-tab[aria-selected="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.calc-panel[hidden] { display: none; }
.calc-panel:focus { outline: none; }
.calc-panel:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 8px; }

/* Gauges and the burn strip repeat numbers already stated in the results
   table, so they are decorative for assistive tech; the strip carries a
   text summary instead of hover-only tooltips. */
.gauge-track, .gauge-mark { pointer-events: none; }

/* ---------- motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
