/* Merritt Stack design system (redesign Phase 2, docs/REDESIGN_PLAN.md).
   One sheet for every page: tokens, type, layout, header/footer, buttons, cards, article pages, the homepage
   (hero dashboard, narrative sections, workflow demo) and forms (/contact/). No build step: pages link it
   directly. The CSV Cleanroom tool adds /cleanroom/style.css on top for its own components.
   Concepts: structure (grid, hairlines), precision (tabular numbers, aligned columns), flow (status motion). */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-2: #f5f6f8;
  --surface: #ffffff;
  --ink: #171717;
  --muted: #686868;
  --line: #e7e8eb;
  --line-strong: #d5d7dc;
  --accent: #4b4fd8;
  --accent-hover: #3d40b8;
  --accent-soft: #eeeffc;
  --accent-ink: #ffffff;
  --dark: #17191d;
  --dark-ink: #f2f3f5;
  --dark-muted: #a3a7b0;
  --ok: #1f7a4d;
  --ok-soft: #e6f3ec;
  --warn: #9a5a10;
  --warn-soft: #fbf0df;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* type scale (desktop max; clamp() scales down on small screens) */
  --fs-hero: clamp(42px, 6.4vw, 76px);
  --fs-h1: clamp(34px, 5vw, 52px);
  --fs-h2: clamp(28px, 3.8vw, 44px);
  --fs-h3: clamp(19px, 1.8vw, 23px);
  --fs-lede: clamp(18px, 1.7vw, 21px);
  --fs-body: 17px;
  --fs-small: 14px;
  --fs-label: 12px;

  /* 4/8 spacing grid */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --r-sm: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgb(23 25 29 / 5%), 0 8px 24px -12px rgb(23 25 29 / 14%);
  --shadow-lg: 0 1px 2px rgb(23 25 29 / 6%), 0 24px 60px -24px rgb(23 25 29 / 22%);
  --container: 1200px;
  --gutter: 24px;
  --header-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1013;
    --bg-2: #17191d;
    --surface: #1b1d22;
    --ink: #edeef0;
    --muted: #a3a7b0;
    --line: #2a2d33;
    --line-strong: #3a3e46;
    --accent: #8b8ef5;
    --accent-hover: #a5a8f8;
    --accent-soft: #23244a;
    --accent-ink: #0f1013;
    --dark: #17191d;
    --ok: #5fcf97;
    --ok-soft: #15301f;
    --warn: #e7a651;
    --warn-soft: #3a2c16;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    --shadow-lg: 0 24px 60px -24px rgb(0 0 0 / 70%);
  }
}

@media (max-width: 640px) { :root { --gutter: 16px; --fs-body: 16px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--font);
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { font-weight: 640; letter-spacing: -.025em; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0 0 var(--s4); }
p, li { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: var(--s4); top: -100px; z-index: 100; padding: var(--s2) var(--s4); background: var(--ink); color: var(--bg); border-radius: var(--r-sm); }
.skip:focus { top: var(--s2); color: var(--bg); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.num { font-variant-numeric: tabular-nums; }
.eyebrow {
  font: 600 var(--fs-label)/1.4 var(--font); letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 var(--s3);
}
.lede { font-size: var(--fs-lede); line-height: 1.55; color: var(--muted); max-width: 40em; }

/* ---------- buttons ---------- */
.btn, .cta-btn, .book-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 15px/1.2 var(--font); letter-spacing: -.005em; text-decoration: none; cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn-primary, .cta-btn { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover, .cta-btn:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-secondary, .book-btn { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover, .book-btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-lg { min-height: 50px; padding: 13px 26px; font-size: 16px; }
.btn .arr { transition: transform .15s var(--ease); }
.btn:hover .arr { transform: translateX(2px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: var(--s6); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand:hover { color: var(--ink); }
.brand img { width: 28px; height: 28px; display: block; }
.brand span { font: 650 17px/1 var(--font); letter-spacing: -.02em; }
/* the mark is a black tile; on dark backgrounds it flips to a light tile (same treatment as the old logo) */
@media (prefers-color-scheme: dark) { .brand img, .dash-bar img { filter: invert(1); } }
.nav-main { display: flex; gap: var(--s1); flex: 1; min-width: 0; }
.nav-main a, .nav-tool {
  color: var(--muted); text-decoration: none; font: 500 15px/1 var(--font); padding: 10px 12px; border-radius: 8px;
  white-space: nowrap;
}
/* Five items plus the actions: keep one row on a laptop without crowding the brand. */
@media (min-width: 960px) and (max-width: 1180px) {
  .site-header .container { gap: var(--s3); }
  .nav-main a, .nav-tool { padding: 8px; font-size: 14px; }
}
.nav-main a:hover, .nav-tool:hover { color: var(--ink); background: var(--bg-2); }
.nav-main a[aria-current="page"] { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: var(--s2); }
.nav-actions .btn { min-height: 38px; padding: 8px 16px; font-size: 14px; }
.nav-mobile { display: none; margin-left: auto; }
.nav-mobile summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; font: 600 15px/1 var(--font);
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary .bars { width: 14px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; }
.nav-mobile summary .bars::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 2px solid currentColor; }
.nav-mobile[open] summary { background: var(--bg-2); }
.nav-mobile nav {
  position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--bg); border-bottom: 1px solid var(--line);
  padding: var(--s2) var(--gutter) var(--s5); display: grid; box-shadow: var(--shadow-lg);
}
.nav-mobile nav a { color: var(--ink); text-decoration: none; font: 500 18px/1 var(--font); padding: 16px 0; border-bottom: 1px solid var(--line); }
.nav-mobile nav a[aria-current="page"] { color: var(--accent); }
.nav-mobile nav .btn { margin-top: var(--s5); border-bottom: 0; color: var(--accent-ink); }
@media (max-width: 959px) {
  .nav-main, .nav-actions { display: none; }
  .nav-mobile { display: block; }
}

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: var(--s9); font-size: var(--fs-small); color: var(--muted); }
.site-footer .container { display: grid; gap: var(--s6); padding-top: var(--s8); padding-bottom: var(--s6); }
.foot-grid { display: grid; gap: var(--s6); grid-template-columns: 1.4fr repeat(4, 1fr); }
.foot-about p { margin: var(--s3) 0 0; max-width: 28em; }
.foot-col h2 { font: 600 var(--fs-label)/1.4 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 0 0 var(--s3); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); padding-top: var(--s5); border-top: 1px solid var(--line); font-size: 13px; }
.foot-base p { margin: 0; }
@media (max-width: 959px) { .foot-grid { grid-template-columns: repeat(2, 1fr); } .foot-about { grid-column: 1 / -1; } }

/* ---------- sections + cards ---------- */
.section { padding: var(--s10) 0; }
.section-alt { background: var(--bg-2); }
.section-dark { background: var(--dark); color: var(--dark-ink); }
.section-dark .lede, .section-dark .muted { color: var(--dark-muted); }
.section-head { max-width: 44em; margin-bottom: var(--s7); }
.section-head h2 { font-size: var(--fs-h2); margin-bottom: var(--s4); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s6); }
.card h3 { font-size: var(--fs-h3); margin-bottom: var(--s3); }
a.card { display: block; color: inherit; text-decoration: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
a.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); color: inherit; }
.grid-3 { display: grid; gap: var(--s5); grid-template-columns: repeat(3, 1fr); }
.grid-2x2 { grid-template-columns: repeat(2, 1fr); } /* four cards: two rows of two, not three plus one */
@media (max-width: 959px) { .grid-3 { grid-template-columns: 1fr; } .section { padding: var(--s8) 0; } }

/* ---------- hero ---------- */
.hero { padding: var(--s9) 0 var(--s10); overflow: hidden; }
.hero .container { display: grid; gap: var(--s8); grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; }
.hero h1 { font-size: var(--fs-hero); letter-spacing: -.045em; line-height: 1.02; margin-bottom: var(--s5); }
.hero h1 .quiet { color: var(--muted); display: block; }
.hero .lede { margin-bottom: var(--s6); max-width: 30em; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s3); }
.hero-note { margin: var(--s5) 0 0; font-size: var(--fs-small); color: var(--muted); }
@media (max-width: 1199px) { .hero .container { grid-template-columns: 1fr; gap: var(--s7); } .hero .lede { max-width: 36em; } }
@media (max-width: 640px) { .hero { padding: var(--s7) 0 var(--s8); } .hero-ctas .btn { flex: 1 1 100%; } }

/* ---------- operations dashboard (hero visual; demonstration, sample data) ---------- */
.dash {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; font-size: 14px;
}
.dash-bar { display: flex; align-items: center; gap: var(--s3); padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.dash-bar img { width: 20px; height: 20px; }
.dash-title { font: 600 var(--fs-label)/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase; }
.dash-title span { color: var(--muted); }
.dash-tag { margin-left: auto; font: 500 11px/1 var(--font); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 9px; white-space: nowrap; }
.dash-body { padding: var(--s2) 20px var(--s5); }
.dash h3 { font: 600 11px/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: var(--s5) 0 var(--s2); }
.dash table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dash th { text-align: left; font: 500 12px/1.3 var(--font); color: var(--muted); padding: 0 0 var(--s2); border-bottom: 1px solid var(--line); }
.dash td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dash tr:last-child td { border-bottom: 0; }
.dash td.wf { font-weight: 550; }
.dash td.meta { color: var(--muted); }
.dash th:last-child, .dash td:last-child { text-align: right; }
.status { display: inline-flex; align-items: center; gap: 6px; font: 550 12.5px/1 var(--font); padding: 5px 9px 5px 8px; border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.done { color: var(--ok); background: var(--ok-soft); }
.status.attn { color: var(--warn); background: var(--warn-soft); }
.status.proc { color: var(--accent); background: var(--accent-soft); }
/* flow: the data-cleanup row runs "Processing" then settles on "Completed" (CSS only, plays once) */
.flip { display: inline-grid; justify-items: end; }
.flip > * { grid-area: 1 / 1; }
.flip .status.proc { animation: flip-out .4s var(--ease) 2.6s forwards; }
.flip .status.proc::before { animation: pulse 1s ease-in-out 3; }
.flip .status.done { opacity: 0; animation: flip-in .4s var(--ease) 2.8s forwards; }
@keyframes flip-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes flip-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .25; } }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.activity li { display: grid; grid-template-columns: 52px 1fr auto; gap: var(--s3); align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.activity li:last-child { border-bottom: 0; }
.activity time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.activity .ct { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.dash figcaption { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--bg-2); color: var(--muted); font-size: 12.5px; }
@media (max-width: 640px) {
  .dash-bar { padding: 12px 16px; flex-wrap: wrap; }
  .dash-tag { margin-left: 0; }
  .dash-body { padding: var(--s1) 16px var(--s4); }
  .dash .col-sched { display: none; }
  .activity li { grid-template-columns: 1fr auto; }
  .activity time { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------- homepage: feature band + closing call to action ---------- */
.feature { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.feature h2 { font-size: var(--fs-h2); margin-bottom: var(--s4); }
.feature .lede { margin: 0; }
@media (max-width: 959px) { .feature { grid-template-columns: 1fr; } }
.final-cta { text-align: center; }
.final-cta h2 { font-size: var(--fs-h2); margin: 0 auto var(--s4); max-width: 16em; }
.final-cta .lede { margin: 0 auto var(--s6); }
.final-cta .hero-ctas { justify-content: center; }
.section-dark .btn-secondary { color: var(--dark-ink); border-color: #3a3e46; }
.section-dark .btn-secondary:hover { border-color: var(--dark-ink); color: var(--dark-ink); }
.section-dark .btn-primary { background: #8b8ef5; color: #0f1013; }
.section-dark .btn-primary:hover { background: #a5a8f8; color: #0f1013; }

/* ---------- article pages (about, how it works, services, faq, privacy, terms, guides) ---------- */
main.article { max-width: 760px; margin: 0 auto; padding: var(--s8) var(--gutter) 0; }
.article h1 { font-size: var(--fs-h1); letter-spacing: -.035em; margin-bottom: var(--s5); }
.article .lede { margin-bottom: var(--s6); }
.article section { margin-top: var(--s7); }
.article h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 0 0 var(--s4); }
.article h3 { font-size: 19px; margin: var(--s5) 0 var(--s2); }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: var(--s3); }
.article li::marker { color: var(--muted); }
.article code { font-family: var(--mono); font-size: .88em; background: var(--bg-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
.article table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.article th, .article td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article th { font-weight: 600; font-size: 13px; color: var(--muted); }
.article .steps li { padding-left: var(--s1); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.notice { padding: var(--s4) var(--s5); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r-sm); background: var(--bg-2); }
.fine { font-size: 13px; color: var(--muted); }
/* closing call-to-action panel on article pages */
.cta { margin: var(--s8) 0 0; padding: var(--s7) var(--s6); border-radius: var(--r-lg); background: var(--dark); color: var(--dark-ink); }
.article .cta { margin-top: var(--s8); }
.cta h2 { color: var(--dark-ink); margin: 0 0 var(--s3); }
.cta p { color: var(--dark-muted); max-width: 40em; }
.cta p:last-child { margin-bottom: 0; }
.cta .cta-btn { background: #8b8ef5; color: #0f1013; margin-top: var(--s2); }
.cta .cta-btn:hover { background: #a5a8f8; color: #0f1013; }
.cta .book-btn { color: var(--dark-ink); border-color: #3a3e46; }
@media (max-width: 640px) { main.article { padding-top: var(--s7); } .cta { padding: var(--s6) var(--s5); } }

/* services: two fixed-price offers. Prices stay on the page; passages that contain "$" are left out of the chat corpus. */
.offers { display: grid; gap: var(--s4); grid-template-columns: 1fr 1fr; margin-top: var(--s5); align-items: stretch; }
.offer { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); min-width: 0; }
.article .offer h3 { margin: 0; font-size: var(--fs-h3); }
.card .offer-price {
  margin: 0; color: var(--ink); font-size: clamp(32px, 4vw, 40px); font-weight: 650;
  letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums;
}
.offer .btn { margin-top: auto; }
.offer-free {
  display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: var(--s5);
  margin-top: var(--s4); padding: var(--s5); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2);
}
.offer-free > div { flex: 1; min-width: 0; }
.article .offer-free h3 { margin: 0 0 var(--s2); font-size: 19px; }
.offer-free p { margin: 0; color: var(--muted); }
.offer-free .btn { flex: none; }
#pricing .fine { margin: var(--s4) 0 0; }
@media (max-width: 640px) {
  .offers { grid-template-columns: 1fr; }
  .offer .btn, .offer-free .btn { width: 100%; }
  .offer-free { flex-wrap: wrap; }
}
body:has(main > .section:last-child) .site-footer { margin-top: 0; }

/* ---------- homepage narrative (Phase 4) ---------- */
.icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: var(--s5); }
.icon svg { width: 22px; height: 22px; }
.card p { color: var(--muted); margin: 0; }
.pillar { display: flex; flex-direction: column; }
.pillar .idx { font: 600 var(--fs-label)/1 var(--font); letter-spacing: .12em; color: var(--muted); margin-bottom: var(--s5); font-variant-numeric: tabular-nums; }
.pillar ul { list-style: none; margin: var(--s5) 0 0; padding: var(--s4) 0 0; border-top: 1px solid var(--line); display: grid; gap: var(--s2); font-size: 15px; }
.pillar li { display: flex; gap: var(--s2); }
.pillar li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: .62em; border-radius: 50%; background: var(--accent); }
.pillar .more { margin-top: auto; padding-top: var(--s5); font-weight: 600; font-size: 15px; text-decoration: none; }
.pillar .more:hover { text-decoration: underline; }

/* process: 01 Discover / 02 Build / 03 Improve, joined by a hairline (structure + flow) */
.steps-3 { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s5); grid-template-columns: repeat(3, 1fr); counter-reset: st; }
.steps-3 li { position: relative; padding-top: var(--s6); border-top: 1px solid var(--line-strong); }
.steps-3 li::before { counter-increment: st; content: "0" counter(st); position: absolute; top: -13px; left: 0; padding-right: var(--s3); background: var(--bg); font: 600 var(--fs-label)/26px var(--font); letter-spacing: .12em; color: var(--accent); }
.section-alt .steps-3 li::before { background: var(--bg-2); }
.steps-3 h3 { font-size: var(--fs-h3); margin-bottom: var(--s3); }
.steps-3 p { color: var(--muted); margin: 0; }
@media (max-width: 959px) { .steps-3 { grid-template-columns: 1fr; gap: var(--s7); } }

/* Cleanroom before/after (shows only operations the tool really performs) */
.ba { display: grid; gap: var(--s5); grid-template-columns: 1fr 1fr; margin-top: var(--s7); }
.ba figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.ba figcaption { padding: 12px 16px; border-bottom: 1px solid var(--line); font: 600 var(--fs-label)/1.3 var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ba .scroll { overflow-x: auto; }
.ba table { width: 100%; border-collapse: collapse; font: 13px/1.4 var(--mono); white-space: nowrap; }
.ba th, .ba td { text-align: left; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.ba th { font: 500 12px/1.3 var(--font); color: var(--muted); }
.ba tr:last-child td { border-bottom: 0; }
.ba .bad { color: var(--warn); }
.ba .fixed { color: var(--ok); }
.ba-notes { list-style: none; margin: var(--s5) 0 var(--s6); padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.ba-notes li { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; background: var(--surface); }
@media (max-width: 1199px) { .ba { grid-template-columns: 1fr; } }

/* trust: verifiable specifics, no badges */
.trust { display: grid; gap: var(--s5); grid-template-columns: repeat(2, 1fr); }
.trust .card ul { margin: 0; padding-left: 20px; color: var(--muted); display: grid; gap: var(--s2); }
.trust .card li::marker { color: var(--accent); }
.founder { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: var(--s5); align-items: start; }
.founder .icon { margin: 0; }
.founder p + p { margin-top: var(--s3); }
@media (max-width: 959px) { .trust { grid-template-columns: 1fr; } .founder { grid-template-columns: 1fr; } }
/* reusable case-study card: only rendered once a real, verifiable engagement exists */
.case { border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s6); background: var(--surface); }
.case dl { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); margin: var(--s4) 0 0; }
.case dt { font-weight: 600; }
.case dd { margin: 0; color: var(--muted); }
.case .verified { color: var(--ok); }
.case .estimate { color: var(--warn); }

/* ---------- workflow demo: AR follow-up (client-side, synthetic data, /assets/demo.js) ---------- */
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.demo-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.demo-steps button {
  width: 100%; height: 100%; display: grid; gap: 4px; text-align: left; padding: 14px 18px; border: 0; border-right: 1px solid var(--line);
  background: transparent; color: var(--muted); font: 500 14px/1.3 var(--font); cursor: pointer; position: relative;
}
.demo-steps li:last-child button { border-right: 0; }
.demo-steps .k { font: 600 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; }
.demo-steps button:hover { color: var(--ink); }
.demo-steps button[aria-selected="true"] { color: var(--ink); background: var(--surface); }
.demo-steps button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }
.demo-steps button.done .k::after { content: " \2713"; color: var(--ok); }
.demo-panel { padding: var(--s6); }
.demo-panel[hidden] { display: none; }
/* one height for every stage on wider screens, so Back / Next stay put while stepping through */
@media (min-width: 960px) { .js .demo-panel { min-height: 550px; } }
.demo-panel h3 { font-size: var(--fs-h3); margin-bottom: var(--s2); }
.demo-panel > p { color: var(--muted); margin-bottom: var(--s5); max-width: 46em; }
.demo .scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.demo table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.demo th, .demo td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.demo th { font: 500 12px/1.3 var(--font); color: var(--muted); background: var(--bg-2); }
.demo tr:last-child td { border-bottom: 0; }
.demo .amt { text-align: right; }
.demo .raw td { font-family: var(--mono); font-size: 13px; }
.demo .flag td { background: var(--warn-soft); }
.demo .dup td { color: var(--muted); text-decoration: line-through; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.checks li { display: grid; grid-template-columns: 18px 1fr auto; gap: var(--s3); align-items: baseline; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.checks li::before { content: "\2713"; color: var(--ok); font-weight: 700; }
.checks li.warn::before { content: "!"; color: var(--warn); }
.checks .ct { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.js .checks.play li { opacity: 0; transform: translateY(4px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.js .checks.play li.in { opacity: 1; transform: none; }
.bucket { display: inline-block; font: 600 12px/1 var(--font); padding: 5px 8px; border-radius: 999px; }
.b91 { color: var(--warn); background: var(--warn-soft); }
.b61, .b31 { color: var(--accent); background: var(--accent-soft); }
.b1 { color: var(--muted); background: var(--bg-2); }
.summary { display: grid; gap: var(--s3); grid-template-columns: repeat(4, 1fr); margin-bottom: var(--s5); }
.summary div { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; }
.summary b { display: block; font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.summary span { font-size: 13px; color: var(--muted); }
.demo-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding: 14px var(--s6); border-top: 1px solid var(--line); background: var(--bg-2); font-size: 13px; color: var(--muted); }
.demo-foot p { margin: 0; }
.demo-foot .btn { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.demo-nav { display: flex; gap: var(--s2); }
@media (max-width: 959px) {
  .demo-steps { grid-template-columns: repeat(2, 1fr); }
  .demo-steps li:nth-child(2) button { border-right: 0; }
  .demo-steps li:nth-child(-n+2) button { border-bottom: 1px solid var(--line); }
  .summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) { .demo-panel { padding: var(--s5) var(--s4); } .demo-foot { padding: 12px var(--s4); } .demo-steps button { padding: 12px 14px; } }
/* without JavaScript every stage is shown in order, with no tabs */
html:not(.js) .demo-steps, html:not(.js) .demo-nav { display: none; }
html:not(.js) .demo-panel[hidden] { display: block; border-top: 1px solid var(--line); }

/* ---------- forms + contact (Phase 4) ---------- */
.contact { display: grid; gap: var(--s8); grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; padding-top: var(--s8); }
.contact h1 { font-size: var(--fs-h1); letter-spacing: -.035em; margin-bottom: var(--s5); }
.contact .lede { margin-bottom: var(--s6); }
.next { list-style: none; margin: var(--s7) 0 0; padding: 0; display: grid; gap: var(--s4); counter-reset: nx; }
.next li { display: grid; grid-template-columns: 26px 1fr; gap: var(--s3); color: var(--muted); }
.next li::before { counter-increment: nx; content: counter(nx); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 600 13px/1 var(--font); }
.next b { color: var(--ink); font-weight: 600; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s6); box-shadow: var(--shadow); display: grid; gap: var(--s5); }
.form-card h2 { font-size: var(--fs-h3); }
.field { display: grid; gap: 6px; font: 600 15px/1.3 var(--font); }
.field .opt, .field .hint { font-weight: 400; color: var(--muted); }
.field .hint { font-size: 13px; line-height: 1.4; }
.field input, .field textarea {
  font: 400 16px/1.5 var(--font); color: var(--ink); background: var(--bg); width: 100%;
  padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--warn); }
.form-card button[type=submit] { justify-self: start; }
.alert { padding: var(--s4) var(--s5); border: 1px solid var(--warn); border-left-width: 3px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--ink); margin: 0; }
.alert[hidden] { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.thanks { max-width: 640px; padding-top: var(--s9); }
.thanks .icon { width: 48px; height: 48px; background: var(--ok-soft); color: var(--ok); }
.thanks h1 { font-size: var(--fs-h1); letter-spacing: -.035em; margin-bottom: var(--s4); }
@media (max-width: 959px) { .contact { grid-template-columns: 1fr; gap: var(--s7); padding-top: var(--s7); } }
@media (max-width: 640px) { .form-card { padding: var(--s5) var(--s4); } .form-card button[type=submit] { justify-self: stretch; } }

/* ---------- bookkeeping directory (comparison guide) ---------- */
main.article.directory { max-width: 1080px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--s4); font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.directory .notice { margin: 0 0 var(--s6); }
.directory .notice p { margin: 0; font-size: var(--fs-small); line-height: 1.55; }
.compare-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr);
  margin: 0 0 var(--s3); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow); overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.directory .compare {
  width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0;
  table-layout: fixed; font-size: 14.5px; line-height: 1.45;
}
.directory .compare .c-tool { width: 16%; }
.directory .compare .c-for { width: 22%; }
.directory .compare .c-price { width: 26%; }
.directory .compare .c-qbo { width: 16%; }
.directory .compare .c-soc { width: 20%; }
.directory .compare.cols-3 { min-width: 760px; }
.directory .compare.cols-3 .c1 { width: 22%; }
.directory .compare.cols-3 .c2 { width: 39%; }
.directory .compare.cols-3 .c3 { width: 39%; }
.directory .compare.cols-4 { min-width: 920px; }
.directory .compare.cols-4 .c1 { width: 18%; }
.directory .compare.cols-4 .c2 { width: 34%; }
.directory .compare.cols-4 .c3 { width: 28%; }
.directory .compare.cols-4 .c4 { width: 20%; }
.directory .compare.cols-5 { min-width: 1080px; }
.directory .compare.cols-5 .c1 { width: 16%; }
.directory .compare.cols-5 .c2,
.directory .compare.cols-5 .c3,
.directory .compare.cols-5 .c4,
.directory .compare.cols-5 .c5 { width: 21%; }
.guide-list { display: grid; gap: var(--s4); }
.guide-list .guide-card { margin-top: 0; }
.directory .compare th, .directory .compare td { padding: 14px 16px; }
.directory .compare thead th {
  background: var(--bg-2); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.directory .compare tbody th {
  position: sticky; left: 0; z-index: 1; background: var(--surface);
  font-weight: 640; color: var(--ink); box-shadow: 1px 0 0 var(--line);
}
.directory .compare thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--bg-2); }
.directory .compare tbody tr:last-child th,
.directory .compare tbody tr:last-child td { border-bottom: 0; }
.directory .compare tbody tr:hover td { background: var(--bg-2); }
.directory .compare tbody tr:hover th { background: var(--bg-2); }
.directory .compare a { font-weight: 600; text-decoration: none; }
.directory .compare a:hover { text-decoration: underline; }
.directory .compare .fine { display: block; margin-top: 2px; }
.scroll-hint { margin: 0 0 var(--s3); font-size: 13px; color: var(--muted); }
@media (min-width: 960px) { .scroll-hint { display: none; } }
.vendor { padding-top: var(--s6); border-top: 1px solid var(--line); }
.vendor-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); }
.vendor-head h2 { margin: 0; }
.vendor-kicker {
  margin: 0 0 var(--s2); font: 600 var(--fs-label)/1.4 var(--font); letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.vendor-head .btn { flex: none; }
.facts { margin: 0; display: grid; gap: var(--s5); }
.facts div { display: grid; gap: 4px; }
.facts dt {
  margin: 0; font: 600 var(--fs-label)/1.4 var(--font); letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.facts dd { margin: 0; }
.cite { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.cite a { font-weight: 600; }
.directory .email-template { margin: 0 0 var(--s4); padding: var(--s4) var(--s5); border-left: 3px solid var(--accent); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--bg-2); }
.directory .email-template p { margin: 0 0 var(--s3); }
.directory .email-template p:last-child { margin-bottom: 0; }
.choose { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.choose li { margin: 0; padding: var(--s4) var(--s5); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); }
a.guide-card h3 { font-size: clamp(20px, 2vw, 24px); }
a.guide-card .more { display: inline-block; margin-top: var(--s4); font-weight: 600; text-decoration: none; }
a.guide-card:hover .more { text-decoration: underline; }
@media (max-width: 640px) {
  .vendor-head { flex-direction: column; align-items: stretch; }
  .vendor-head .btn { width: 100%; }
}

/* Quiet close on the directory: packaged tools, then where a custom workflow fits. */
.off-shelf {
  padding: var(--s6);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-2);
}
.off-shelf h2 { margin-bottom: var(--s4); }
.off-shelf .hero-ctas { margin-top: var(--s2); }
@media (max-width: 640px) {
  .off-shelf { padding: var(--s5) var(--s4); }
  .off-shelf .hero-ctas { flex-direction: column; }
  .off-shelf .hero-ctas .btn { width: 100%; }
}
