/* Varibridge marketing site: shared design system.
   Layout concept: a ledger. Left-aligned columns, hairline rules, tabular figures; one signal colour reserved for the "why".
   Photography sits in calm, squared frames so it supports the numbers rather than competing with them. */
:root {
  --paper: #f7f8fb;
  --paper-2: #eef0f6;
  --ink: #141a2e;
  --ink-2: #3b4360;
  --muted: #646c8a;
  --rule: #d9dde8;
  --rule-strong: #b9c0d3;
  --card: #ffffff;
  --brand: #3f49d8;
  --brand-ink: #2a32a8;
  --brand-soft: #e9ebfb;
  --signal: #c2410c;
  --signal-soft: #fdebe1;
  --good: #0f766e;
  --bad: #b42318;
  --on-photo: #ffffff;
  --scrim: rgba(12, 16, 32, .62);
  --cta-bg: #141a2e; --cta-fg: #f7f8fb; --cta-bd: #141a2e;
  --shadow: 0 1px 2px rgba(20,26,46,.05), 0 12px 32px rgba(20,26,46,.08);
  --display: "Manrope", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 14px;
  --maxw: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1219; --paper-2: #161a25; --ink: #eef0f7; --ink-2: #c6cbdd; --muted: #97a0bb;
    --rule: #262c3d; --rule-strong: #3a4258; --card: #171b27; --brand: #8b93ff; --brand-ink: #b3b8ff; --brand-soft: #23274a;
    --signal: #f0925f; --signal-soft: #3a2418; --good: #34c5a8; --bad: #ff7b6e; --scrim: rgba(6, 8, 16, .7);
    --cta-bg: #171b27; --cta-fg: #eef0f7; --cta-bd: #3a4258; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1219; --paper-2: #161a25; --ink: #eef0f7; --ink-2: #c6cbdd; --muted: #97a0bb;
  --rule: #262c3d; --rule-strong: #3a4258; --card: #171b27; --brand: #8b93ff; --brand-ink: #b3b8ff; --brand-soft: #23274a;
  --signal: #f0925f; --signal-soft: #3a2418; --good: #34c5a8; --bad: #ff7b6e; --scrim: rgba(6, 8, 16, .7);
  --cta-bg: #171b27; --cta-fg: #eef0f7; --cta-bd: #3a4258; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(38px, 5.6vw, 64px); font-weight: 800; line-height: 1.03; }
h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; line-height: 1.1; }
h3 { font-size: 20px; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: 20px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 12px; }
.eyebrow { font-family: var(--display); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 20px; color: var(--ink-2); max-width: 62ch; }
.body-2 { color: var(--ink-2); max-width: 65ch; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 22px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 10px; font-family: var(--display); font-weight: 700; font-size: 15px; border: 1px solid var(--rule-strong); background: var(--card); color: var(--ink); cursor: pointer; transition: transform .12s, box-shadow .12s, background .12s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--paper); }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn.sm { height: 38px; padding: 0 14px; font-size: 14px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.textlink { font-family: var(--display); font-weight: 700; font-size: 15px; }
.textlink::after { content: " →"; }

/* nav */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
.nav .navbar { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 28px; height: 28px; flex: none; }
.tabs-nav { display: flex; gap: 2px; margin-left: 8px; }
.tabs-nav a { position: relative; color: var(--ink-2); font-weight: 600; font-size: 15px; padding: 8px 11px; border-radius: 8px; }
.tabs-nav a:hover { text-decoration: none; background: var(--paper-2); color: var(--ink); }
.tabs-nav a[aria-current="page"] { color: var(--ink); }
.tabs-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -13px; height: 2px; background: var(--brand); border-radius: 2px; }
.nav .spacer { flex: 1; }
.nav-cta { display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--rule-strong); background: var(--card); color: var(--ink); cursor: pointer; place-items: center; }
.menu-btn svg { width: 20px; height: 20px; }
.mobile-menu { border-top: 1px solid var(--rule); background: var(--paper); padding-block: 8px 18px; }
.mobile-menu a.item { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--rule); color: var(--ink); font-family: var(--display); font-weight: 700; font-size: 17px; }
.mobile-menu a.item[aria-current="page"] { color: var(--brand-ink); }
.mobile-menu .ctas { margin-top: 16px; }
.mobile-menu .ctas .btn { flex: 1; }
@media (max-width: 1080px) { .nav-cta .ghost { display: none; } }
@media (max-width: 900px) { .tabs-nav { display: none; } .menu-btn { display: grid; } }
@media (min-width: 901px) { .mobile-menu { display: none !important; } }
@media (max-width: 420px) { .nav-cta .primary { display: none; } }

/* page hero (inner pages) */
.page-hero { padding-block: 64px 56px; border-bottom: 1px solid var(--rule); }
.page-hero .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.page-hero .grid > * { min-width: 0; }
@media (max-width: 900px) { .page-hero { padding-block: 44px 40px; } .page-hero .grid { grid-template-columns: 1fr; gap: 32px; } }
.page-hero h1 { font-size: clamp(36px, 4.8vw, 56px); }

/* photos */
.photo { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 3; max-width: 100%; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.wide { aspect-ratio: 16 / 9; }
.photo.tall { aspect-ratio: 4 / 5; }
.photo figcaption { position: absolute; left: 12px; bottom: 12px; right: 12px; display: flex; }
.photo figcaption span { background: var(--card); color: var(--ink-2); border-radius: 8px; padding: 6px 10px; font-size: 13px; box-shadow: var(--shadow); max-width: 100%; }
/* a product card floated over a photo: the photo sets the scene, the card shows the work */
.photo-overlay { position: relative; max-width: 460px; }
.photo-overlay .float { position: absolute; right: -14px; bottom: -22px; width: min(320px, 78%); }
@media (max-width: 900px) { .photo-overlay .float { right: 10px; bottom: -18px; } }
.mini { background: var(--card); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 6px; font-size: 13px; }
.mini .h { font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mini .row { display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mini .row span:first-child { font-family: var(--body); color: var(--ink-2); }
.mini .why { color: var(--ink-2); border-left: 2px solid var(--signal); padding-left: 8px; line-height: 1.4; }

/* hero (home) */
.hero { padding-block: 72px 40px; }
.hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 44px; align-items: center; }
.hero-grid > * { min-width: 0; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } .hero { padding-block: 48px 32px; } }
.hero h1 .why { color: var(--signal); }
.hero .ctas { margin-top: 28px; }
.fine { font-size: 14px; color: var(--muted); }

/* product mock: the P&L Variance sheet */
.sheet { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.sheet-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--rule); background: var(--paper-2); font-family: var(--display); font-size: 12.5px; font-weight: 700; color: var(--ink-2); overflow: hidden; }
.sheet-bar .tab { white-space: nowrap; padding: 4px 10px; border-radius: 6px; background: var(--card); border: 1px solid var(--rule); }
.sheet-bar .tab.on { border-color: var(--brand); color: var(--brand-ink); }
.sheet-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); flex: none; }
.sheet-meta { padding: 10px 14px; font-family: var(--mono); font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 84px 1fr; row-gap: 2px; }
.sheet-meta b { color: var(--ink-2); font-weight: 600; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sheet th { text-align: right; font-family: var(--display); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--rule-strong); }
.sheet th:first-child, .sheet td:first-child { text-align: left; }
.sheet th.why, .sheet td.why { text-align: left; }
.sheet td { padding: 6px 10px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.sheet td:first-child { font-family: var(--body); font-weight: 500; }
.sheet tr.total td { font-weight: 600; border-top: 1px solid var(--rule-strong); }
.sheet tr.sec td { font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--paper-2); text-align: left; }
.sheet td.why { font-family: var(--body); font-size: 12px; color: var(--ink-2); white-space: normal; min-width: 200px; line-height: 1.35; border-left: 2px solid var(--signal-soft); }
.sheet tr.total td.why { color: var(--ink); }
.up { color: var(--good); } .dn { color: var(--bad); }
.scroll-x { overflow-x: auto; }

/* proof strip */
.proof { border-block: 1px solid var(--rule); background: var(--paper-2); }
.proof .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.proof .cell { padding: 22px 18px; border-left: 1px solid var(--rule); }
.proof .cell:first-child { border-left: 0; padding-left: 0; }
.proof .k { font-family: var(--display); font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.proof .l { color: var(--muted); font-size: 14px; margin-top: 6px; }
@media (max-width: 720px) { .proof .wrap { grid-template-columns: 1fr; } .proof .cell { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); } .proof .cell:first-child { border-top: 0; } }

/* sections */
section.block { padding-block: 88px; }
section.block + section.block { border-top: 1px solid var(--rule); }
section.block.tint { background: var(--paper-2); }
@media (max-width: 720px) { section.block { padding-block: 60px; } }
.sec-head { display: grid; gap: 14px; max-width: 62ch; margin-bottom: 40px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.two > * { min-width: 0; }
.two.top { align-items: start; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; gap: 32px; } }
.feature-list { display: grid; gap: 18px; }
.feature { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.feature .ic { width: 30px; height: 26px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-family: var(--mono); font-size: 11.5px; font-weight: 600; }
.feature h3 { font-size: 17px; }
.feature p { color: var(--ink-2); font-size: 16px; }

/* three-up link cards (home → tabs) */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .cards3 { grid-template-columns: 1fr; } }
.lcard { display: grid; grid-template-rows: auto 1fr; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; color: var(--ink); transition: transform .15s, box-shadow .15s; }
.lcard:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.lcard .photo { border-radius: 0; aspect-ratio: 16 / 10; }
.lcard .in { padding: 20px 22px 22px; display: grid; gap: 8px; align-content: start; }
.lcard p { color: var(--ink-2); font-size: 16px; }
.lcard .textlink { margin-top: 6px; color: var(--brand-ink); }

/* steps (a real sequence, so numbered) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule-strong); }
.steps li { list-style: none; padding: 22px 24px 0 0; display: grid; gap: 8px; align-content: start; }
.steps li + li { padding-left: 24px; border-left: 1px solid var(--rule); }
.steps .n { font-family: var(--mono); font-size: 13px; color: var(--signal); font-weight: 600; }
.steps p { color: var(--ink-2); font-size: 16px; }
.steps ol, ol.steps { margin: 0; padding: 0; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } .steps li, .steps li + li { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--rule); } }

/* industry tiles: photo with caption bar beneath */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tiles { grid-template-columns: 1fr; } }
.tile { display: grid; gap: 12px; color: var(--ink); align-content: start; margin: 0; }
.tile:hover { text-decoration: none; }

.tile .photo { aspect-ratio: 4 / 3; }
.tile .photo img { transition: transform .4s; }
.tile b { font-family: var(--display); font-size: 17px; display: block; }
.tile span { color: var(--ink-2); font-size: 15px; display: block; margin-top: 2px; }

/* industry rows (industries page) */
.ind { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
.ind > * { min-width: 0; }
.ind.flip { grid-template-columns: 7fr 5fr; }
.ind.flip .photo { order: 2; }
@media (max-width: 900px) { .ind, .ind.flip { grid-template-columns: 1fr; gap: 24px; } .ind.flip .photo { order: 0; } }
.qa { display: grid; gap: 0; border-top: 1px solid var(--rule); margin-top: 18px; }
.qa div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15.5px; }
.qa dt { color: var(--ink); font-weight: 600; margin: 0; }
.qa dd { color: var(--ink-2); margin: 0; }
@media (max-width: 560px) { .qa div { grid-template-columns: 1fr; gap: 4px; } }

/* bridge chart */
.chart { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.chart .t { font-family: var(--display); font-weight: 700; font-size: 14px; }
.chart .s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.chart svg { width: 100%; height: auto; display: block; margin-top: 12px; }
.chart text { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.chart text.lbl { font-family: var(--body); font-size: 12px; fill: var(--ink-2); }
.chart text.val { fill: var(--ink); font-weight: 600; }
.chart .grid { stroke: var(--rule); }
.chart .axis { stroke: var(--rule-strong); }
.chart .pos { fill: var(--good); } .chart .neg { fill: var(--bad); } .chart .tot { fill: var(--rule-strong); }

/* drivers table */
.drivers { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.drivers .hd { padding: 12px 16px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.drivers .hd b { font-family: var(--display); font-size: 14px; }
.drivers .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.chip { font-family: var(--display); font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--rule); color: var(--ink-2); }
.chip.on { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-ink); }
.drivers table { width: 100%; border-collapse: collapse; font-size: 13px; }
.drivers th { text-align: right; padding: 8px 12px; font-family: var(--display); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--rule-strong); }
.drivers td { text-align: right; padding: 8px 12px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.drivers th:first-child, .drivers td:first-child { text-align: left; }
.drivers td:first-child { font-family: var(--body); font-weight: 500; }
.pill { display: inline-block; font-family: var(--display); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; border: 1px solid currentColor; }
.pill.new { color: var(--ink-2); } .pill.lost { color: var(--bad); } .pill.na { color: var(--muted); }
.pill.live { color: var(--good); } .pill.beta { color: var(--signal); } .pill.soon { color: var(--muted); }
.bar { display: inline-block; width: 46px; height: 6px; border-radius: 3px; background: var(--paper-2); vertical-align: middle; margin-right: 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--rule-strong); }
.drivers tr.plug td { color: var(--muted); font-style: italic; }
.drivers tr.plug td:first-child { font-style: normal; }
.drivers .ft { padding: 10px 16px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--rule-strong); }

/* excel ribbon mock */
.ribbon { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.ribbon .rtabs { display: flex; gap: 18px; padding: 8px 16px 0; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--rule); background: var(--paper-2); overflow: hidden; }
.ribbon .rtabs span { padding-bottom: 8px; white-space: nowrap; }
.ribbon .rtabs .on { color: var(--ink); border-bottom: 2px solid var(--brand); font-weight: 600; }
.ribbon .groups { display: flex; padding: 10px 8px; overflow-x: auto; }
.ribbon .grp { padding: 4px 14px; border-right: 1px solid var(--rule); text-align: center; color: var(--muted); font-size: 11px; white-space: nowrap; }
.ribbon .grp .b { display: block; width: 40px; height: 40px; border-radius: 8px; background: var(--paper-2); margin: 0 auto 6px; }
.ribbon .grp.vb { color: var(--ink); }
.ribbon .grp.vb .b { background: var(--brand); position: relative; }
.ribbon .grp.vb .b { display: grid; place-items: center; color: var(--paper); }
.ribbon .grp.vb .b svg { width: 78%; height: 78%; }
.ribbon .formula { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12.5px; overflow-x: auto; }
.ribbon .formula .cell { color: var(--muted); padding-right: 10px; border-right: 1px solid var(--rule); }
.ribbon .formula code { color: var(--ink); white-space: nowrap; }
.pane { border-top: 1px solid var(--rule); padding: 14px 16px; display: grid; gap: 10px; }
.pane .row { display: flex; gap: 8px; flex-wrap: wrap; }
.pane .fld { flex: 1; min-width: 120px; border: 1px solid var(--rule); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; color: var(--ink-2); background: var(--paper-2); }
.pane .fld small { display: block; color: var(--muted); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; font-family: var(--display); font-weight: 700; }
.pane .go { background: var(--brand); color: var(--paper); border-radius: 8px; padding: 9px; text-align: center; font-family: var(--display); font-weight: 700; font-size: 13px; }

/* reference table (integrations, formulas) */
.ref { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--card); }
.ref-wrap { border: 1px solid var(--rule); border-radius: var(--radius); overflow-x: auto; background: var(--card); }
.ref th { text-align: left; font-family: var(--display); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--rule-strong); background: var(--paper-2); white-space: nowrap; }
.ref td { padding: 14px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--ink-2); min-width: 150px; }
.ref tr:last-child td { border-bottom: 0; }
.ref td:first-child { color: var(--ink); font-weight: 600; min-width: 170px; }
.ref td .mono { font-size: 13px; color: var(--ink); }

/* trust cards */
.honest { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .honest { grid-template-columns: 1fr; } }
.honest .card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; }
.honest .card p { color: var(--ink-2); }
.honest .card .mono { font-size: 12px; color: var(--ink-2); background: var(--paper-2); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; overflow-x: auto; }

/* fact list (security) */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; border-top: 1px solid var(--rule); }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }
.facts div { padding: 18px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.facts b { font-family: var(--display); font-size: 16px; }
.facts span { color: var(--ink-2); font-size: 15.5px; }

/* founder */
.founder { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .founder { grid-template-columns: 1fr; gap: 24px; } }
.portrait { width: 100%; max-width: 220px; aspect-ratio: 1; border-radius: var(--radius); background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 64px; letter-spacing: -.03em; border: 1px solid var(--rule); }
.letter { display: grid; gap: 16px; max-width: 64ch; color: var(--ink-2); font-size: 18px; }
.letter .sig { color: var(--ink); font-family: var(--display); font-weight: 700; }
.letter .sig span { display: block; color: var(--muted); font-family: var(--body); font-weight: 400; font-size: 15px; }

/* principles */
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }
.principles div { padding: 22px 0; border-top: 1px solid var(--rule); display: grid; gap: 6px; }
.principles p { color: var(--ink-2); }

/* faq */
.faq { display: grid; border-top: 1px solid var(--rule); max-width: 80ch; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; padding: 18px 0; font-family: var(--display); font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 500; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 0 18px; color: var(--ink-2); max-width: 70ch; }

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid .card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 24px; display: grid; gap: 10px; align-content: start; }
.contact-grid .card p { color: var(--ink-2); }
.copy-row { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy-row button { font: inherit; border: 1px solid var(--rule); background: var(--card); color: var(--ink-2); border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: 12px; }

.mail-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.mail-link { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.mail-link:hover { color: var(--brand-ink); }
.contact-grid .card .btn { justify-self: start; }

/* photo CTA band */
.band { position: relative; border-radius: 20px; overflow: hidden; color: var(--on-photo); isolation: isolate; }
.band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.band::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--scrim) 0%, var(--scrim) 45%, rgba(12,16,32,.25) 100%); z-index: -1; }
.band .in { padding: 64px 48px; display: grid; gap: 14px; max-width: 620px; }
.band h2 { color: inherit; }
.band p { opacity: .9; font-size: 18px; }
.band .btn:not(.primary) { background: transparent; color: var(--on-photo); border-color: rgba(255,255,255,.55); }
@media (max-width: 720px) { .band .in { padding: 40px 24px; } .band::before { background: var(--scrim); } }

/* plain CTA */
.cta { background: var(--cta-bg); color: var(--cta-fg); border: 1px solid var(--cta-bd); border-radius: 20px; padding: 48px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 24px; align-items: center; }
.cta h2 { color: inherit; }
.cta p { opacity: .8; margin-top: 10px; }
.cta .ctas { justify-content: flex-end; }
@media (max-width: 800px) { .cta { grid-template-columns: 1fr; padding: 32px; } .cta .ctas { justify-content: flex-start; } }

/* legal pages */
.legal { max-width: 760px; padding-block: 48px 80px; }
.legal h1 { font-size: 40px; }
.legal h2 { font-size: 22px; margin: 34px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; }
.legal .meta { color: var(--muted); font-size: 14px; margin: 8px 0 24px; }

/* footer */
.site-foot { border-top: 1px solid var(--rule); background: var(--paper-2); padding-block: 56px 40px; color: var(--muted); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-grid > * { min-width: 0; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid .about { grid-column: 1 / -1; } }
.foot-grid h4 { font-family: var(--display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 0 0 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--ink-2); }
.foot-grid .about p { margin-top: 10px; max-width: 34ch; }
.foot-base { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: 13.5px; }
.foot-base .spacer { flex: 1; }
.foot-base a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .btn, .lcard, .tile .photo img { transition: none; }
  .btn:hover, .lcard:hover { transform: none; }
  .tile:hover .photo img { transform: none; }
}

/* ---------- Home hero: live Why drill (assets/hero-why.js) ---------- */
.sheet { position: relative; }
.sheet-bar button.tab { all: unset; cursor: pointer; white-space: nowrap; padding: 4px 10px; border-radius: 6px; background: var(--card); border: 1px solid var(--rule); color: var(--brand-ink); }
.sheet-bar button.tab:hover, .sheet-bar button.tab:focus-visible { border-color: var(--brand); }
.sheet-bar .hw-sep { color: var(--muted); }
.hw-live { position: relative; }
.hw-stage { position: relative; overflow: hidden; }
.hw-stage > .hw-panel { height: 100%; overflow-y: auto; scrollbar-width: thin; }
.hw-panel { transform-origin: 50% 50%; }
.hw-panel.out { position: absolute; inset: 0 0 auto 0; pointer-events: none; animation: hw-zoom-in .5s cubic-bezier(.6,0,.4,1) forwards; }
.hw-panel.out.back { animation-name: hw-zoom-out; }
.hw-panel.in { animation: hw-land .5s cubic-bezier(.2,.7,.2,1) both; }
.hw-panel.in.back { animation-name: hw-land-back; }
@keyframes hw-zoom-in { to { transform: scale(2.2); opacity: 0; filter: blur(5px); } }
@keyframes hw-land { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hw-zoom-out { to { transform: scale(.6); opacity: 0; } }
@keyframes hw-land-back { from { transform: scale(2.2); opacity: 0; filter: blur(5px); } to { transform: none; opacity: 1; filter: none; } }
.sheet td.why { padding: 0; }
.hw-why { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 10px; align-items: center; justify-content: space-between; width: 100%; padding: 6px 10px; font-family: var(--body); font-size: 12px; line-height: 1.35; color: var(--ink-2); }
.sheet tr.total .hw-why { color: var(--ink); }
.hw-why b { flex: none; font-family: var(--display); font-size: 11px; font-weight: 700; color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 999px; padding: 2px 8px; transition: background .15s, color .15s; }
.hw-why:hover b, .hw-why:focus-visible b, .hw-why.hw-flash b { background: var(--brand); color: var(--card); }
.hw-why:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.hw-pad { padding: 10px 14px 8px; }
.hw-pad .scroll-x table { min-width: 0; }
#heroWhyBar { overflow-x: auto; scrollbar-width: none; }
#heroWhyBar::-webkit-scrollbar { display: none; }
.hw-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 6px; }
.hw-eyebrow { font-family: var(--display); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hw-head h3 { margin: 2px 0 0; font-family: var(--display); font-size: 16px; }
.hw-head h3 small { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.hw-views { display: flex; gap: 6px; flex-wrap: wrap; }
.hw-btn { all: unset; cursor: pointer; font-family: var(--display); font-size: 11px; font-weight: 700; color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 999px; padding: 2px 9px; white-space: nowrap; transition: background .15s, color .15s; }
.hw-btn:hover, .hw-btn:focus-visible, .hw-btn.hw-flash { background: var(--brand); color: var(--card); outline: none; }
.hw-btn.quiet { border-color: var(--rule-strong); color: var(--ink-2); }
.hw-btn.quiet.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.hw-drv { display: grid; grid-template-columns: minmax(110px, 1.3fr) minmax(50px, 1fr) auto 64px; gap: 10px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--rule); font-size: 12.5px; }
.hw-lbl { min-width: 0; display: flex; flex-direction: column; }
.hw-lbl b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-lbl span { color: var(--muted); font-size: 11px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-bar { position: relative; height: 12px; }
.hw-bar i { position: absolute; top: 1px; bottom: 1px; border-radius: 2px; background: var(--good); }
.hw-bar i.dn { background: var(--bad); }
.hw-bar i.axis { top: -2px; bottom: -2px; width: 1px; background: var(--rule-strong); border-radius: 0; }
.hw-amt { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hw-act { text-align: right; }
.hw-total { border-bottom: 0; border-top: 1px solid var(--rule-strong); font-weight: 600; }
.hw-ties { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: 8px 0 0; font-size: 12px; color: var(--muted); min-height: 20px; }
.hw-pill { display: inline-flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); border-radius: 999px; padding: 2px 9px; font-weight: 600; font-size: 11.5px; }
.hw-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sheet .hw-pad td.l { text-align: left; font-family: var(--body); }
.hw-none { color: var(--muted); }
.hw-hint { padding: 8px 14px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); min-height: 34px; background: var(--paper-2); }
.hw-cursor { position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: color-mix(in srgb, var(--signal) 35%, transparent); border: 2px solid var(--signal); pointer-events: none; opacity: 0; transition: transform .6s cubic-bezier(.4,0,.2,1), opacity .25s; z-index: 3; }
.hw-cursor.on { opacity: 1; }
.hw-cursor.press { scale: .7; }
@media (max-width: 560px) { .hw-date { display: none; } .hw-drv { grid-template-columns: minmax(0, 1fr) auto auto; } .hw-bar { display: none; } }
@media (prefers-reduced-motion: reduce) { .hw-panel.in, .hw-panel.out { animation-duration: .01s; } .hw-cursor { display: none; } }

/* Excel page: formula reference */
.fn-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 14px; }
.fn { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; min-width: 0; scroll-margin-top: 90px; }
.fn h3 { margin: 0 0 8px; font-size: 15px; }
.fn h3 code { font-family: var(--mono); font-weight: 600; color: var(--brand-ink); overflow-wrap: anywhere; }
.fn p { margin: 0; color: var(--ink-2); font-size: 15px; }
.fn p .mono { overflow-wrap: anywhere; }
.fn:target { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* Phones: the hero report keeps Line, Δ ($) and Why so the "why" is readable without sideways scrolling */
@media (max-width: 640px) {
  #heroWhy table:has(th.why) tr > :nth-child(2), #heroWhy table:has(th.why) tr > :nth-child(4) { display: none; }
  #heroWhy table:has(th.why) td.why { min-width: 0; }
  #heroWhy table:has(th.why) td:first-child { white-space: normal; }
}
