/* ==========================================================================
   Levell Up Finance — marketing site
   Design tokens and layout per design handoff (high-fidelity recreation).
   Fonts: Sora (headings/body/UI), Space Mono (eyebrows/labels/numbers).
   ========================================================================== */

:root {
  /* Brand / ink */
  --ink: #14293D;            /* primary text / dark sections */
  --navy-deep: #0F2439;      /* hero + CTA deepest navy */
  --navy-card: #14304A;      /* money-flow card */

  /* Emerald family */
  --emerald: #159E6B;        /* primary accent / links / buttons */
  --emerald-hover: #17A876;  /* button hover */
  --emerald-link-hover: #10784F; /* text-link hover (darker) */
  --emerald-bright: #2FCF92; /* on dark: wordmark dot, "good" */
  --emerald-soft: #6FDCAE;   /* on dark: improved figures */
  --emerald-deep: #0E7A50;   /* deliverable counts */

  --terracotta: #E4886A;     /* "bad" contrast word */
  --terracotta-soft: #F0A88E;
  --terracotta-deep: #A65A38;
  --terracotta-count: #9E5434;
  --terracotta-was: #C58C78;

  /* Surfaces */
  --bg: #EFF0F0;             /* body background */
  --white: #FFFFFF;
  --chip-bg: #E4E7E8;
  --chip-bad-bg: #FBF1EC;
  --chip-bad-border: #EFD3C6;
  --dash-bar: #F7F8F8;

  /* Text on light */
  --muted: #52657A;          /* body text muted */
  --faint: #8A93A0;          /* faint labels / meta */

  /* Text on dark */
  --on-dark: #AFC0CD;
  --on-dark-muted: #7C93A6;
  --on-dark-bright: #C9D6E0;
  --on-dark-brighter: #cfe0d8;
  --nav-link: #B5C4D0;

  /* Borders */
  --border-1: #E0E2E2;
  --border-2: #E4E7EB;
  --border-3: #DDE0E2;
  --border-4: #EEF0F1;
  --ledger-hover: #E7E9E9;

  /* Hairlines on dark */
  --hair: rgba(255,255,255,0.14);
  --hair-soft: rgba(255,255,255,0.12);
  --hair-strong: rgba(255,255,255,0.18);

  /* Radii */
  --r-btn: 8px;
  --r-card: 16px;
  --r-big: 20px;
  --r-pill: 999px;
  --r-sw: 3px;

  /* Type */
  --font-sans: 'Sora', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, 'Courier New', monospace;

  /* Layout */
  --container: 1200px;
  --gutter: 44px;

  /* Dashboard preview: iframe is authored at 1600x1100 and scaled to fit */
  --dash-scale: 0.695;
  --dash-height: 460px;
}

/* ------------------------------- Reset ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }

::selection { background: var(--emerald); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--emerald);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--r-btn) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

section[id], main[id] { scroll-margin-top: 20px; }

/* ------------------------------- Buttons -------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  padding: 16px 26px;
  border: none;
  border-radius: var(--r-btn);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn .arrow { font-weight: 600; }
.btn-primary { background: var(--emerald); color: #fff; }
.btn-primary:hover { background: var(--emerald-hover); }
.btn-ghost {
  background: transparent;
  color: #fff;
  padding: 14.5px 24px;
  border: 1.5px solid rgba(255,255,255,0.25);
}
.btn-ghost:hover { border-color: #fff; }
.btn-sm { font-size: 14px; padding: 11px 20px; }

/* ================================ HERO ================================== */
.hero {
  background: var(--navy-deep);
  color: var(--on-dark);
}

/* Nav */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { flex: none; }
.brand-word {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.015em;
  color: #fff;
}
.dot { color: var(--emerald-bright); }

.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-menu > a:not(.btn) {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--nav-link);
  transition: color .15s ease;
}
.nav-menu > a:not(.btn):hover { color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 38px;
  padding: 0 9px;
  background: transparent;
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-btn);
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Credential rule */
.credrule {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.credrule > span:first-child { color: var(--on-dark-brighter); }
.credrule > span:not(.credrule-hair) { white-space: nowrap; }
.credrule-accent { color: var(--emerald-bright); }
.credrule-hair { flex: 1 1 0; min-width: 12px; height: 1px; background: var(--hair); }
.credrule-hair-sm { flex: 1 1 0; max-width: none; }

/* Hero body */
.hero-body {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: start;
  padding: 34px 0 36px;
}
.hero-copy { display: flex; flex-direction: column; }
h1, .hero-copy h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(2.25rem, 1.15rem + 4.3vw, 3.75rem); /* 36 -> 60px */
  line-height: 1.03;
  letter-spacing: -0.03em;
  color: #fff;
  text-wrap: balance;
}
.bad { color: var(--terracotta); }
.good { color: var(--emerald-bright); }
.hero-lede {
  margin-top: 20px;
  max-width: 500px;
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--on-dark);
  text-wrap: pretty;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Money-Flow panel */
.mf-card {
  background: var(--navy-card);
  border: 1px solid var(--hair-soft);
  border-radius: var(--r-card);
  padding: 28px 28px 26px;
}
.mf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mf-title { font-weight: 600; font-size: 15.5px; color: #fff; }
.mf-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8FB8CE;
  border: 1px solid var(--hair-strong);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
.mf-bar {
  display: flex;
  height: 46px;
  margin-top: 18px;
  border-radius: 7px;
  overflow: hidden;
}
.mf-seg { flex: 0 0 auto; height: 100%; }
.mf-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #6E8698;
}
.mf-legend { margin-top: 16px; display: flex; flex-direction: column; gap: 13px; }
.mf-legend li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
}
.mf-sw { width: 11px; height: 11px; border-radius: var(--r-sw); }
.mf-label { font-size: 14px; color: var(--on-dark-bright); }
.mf-val { font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: #fff; justify-self: end; }
.mf-profit { margin-top: 3px; padding-top: 14px; border-top: 1px solid var(--hair-soft); }
.mf-profit .mf-label { color: #fff; font-weight: 600; }
.mf-profit .mf-val { color: var(--emerald-bright); font-size: 16px; }

/* ==================== CASH-FLOW LEAK BAND (before / after) ==================
   Two complete diagrams sit on the same centrelines and cross-fade. One float
   (0 = before, 1 = after) drives the SVG layer opacities and, under 700px, the
   numbers and widths of the bar layout. See main.js.
   ========================================================================= */
.flow { padding: 4px 0 40px; border-top: 1px solid var(--hair-soft); }
.flow-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 26px;
  margin-bottom: 18px;
}
.flow-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #fff;
}
.flow-sub { margin-top: 5px; font-size: 14px; line-height: 1.5; color: var(--on-dark); max-width: 640px; }
.flow-chip {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--on-dark);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-pill);
  padding: 6px 13px;
}

.flow-panel {
  background: var(--navy-card);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-card);
  padding: 20px 24px 16px;
}
.flow-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.flow-side {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: none;
  border: 0;
  padding: 0;
  transition: opacity .2s ease;
}
.flow-side-name { font-family: var(--font-sans); font-weight: 700; font-size: 15px; color: #fff; white-space: nowrap; }
.flow-side-tag {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.flow-side-tag-before { color: var(--terracotta); }
.flow-side-tag-after { color: var(--emerald-bright); }
.flow-hint {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark);
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-pill);
  padding: 4px 11px;
  white-space: nowrap;
  transition: opacity .3s ease;
}

.flow-stage { position: relative; cursor: pointer; user-select: none; }
.flow-stage:focus-visible { outline: 2px solid var(--emerald-bright); outline-offset: 6px; border-radius: 6px; }
.flow-svg { width: 100%; height: auto; display: block; }
.flow-lbl-short { display: none; }

/* Phone bar layout — hidden until the SVG gets too small to read */
.flow-bars { display: none; flex-direction: column; gap: 15px; }
.flow-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.flow-bar-name { font-family: var(--font-sans); font-size: 15px; color: var(--on-dark-bright); }
.flow-bar-val { font-family: var(--font-mono); font-weight: 700; font-size: 16px; color: var(--terracotta-soft); }
.flow-bar-val-muted { color: var(--on-dark); }
.flow-bar-track { height: 11px; border-radius: 6px; background: rgba(255,255,255,0.09); }
.flow-bar-fill { display: block; height: 100%; border-radius: 6px; width: 100%; }
.flow-bar-total { border-top: 1px solid var(--hair); padding-top: 15px; }
.flow-bar-total .flow-bar-head { margin-bottom: 7px; }
.flow-bar-total .flow-bar-name { font-weight: 700; font-size: 16px; color: #fff; }
.flow-bar-total .flow-bar-val { font-size: 22px; color: var(--emerald-bright); }
.flow-bar-total .flow-bar-track { height: 14px; border-radius: 7px; }
.flow-bar-total .flow-bar-fill { border-radius: 7px; }

/* Before -> after summary metrics */
.flow-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
}
.flow-metric-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: 9px;
}
.flow-metric-vals {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.flow-metric-vals .was { font-size: 22px; color: var(--terracotta-was); }
.flow-metric-vals .to { font-size: 14px; color: var(--on-dark-muted); }
.flow-metric-vals .now { font-size: 26px; color: var(--emerald-bright); }

/* The four leaks */
.flow-leaks { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hair); }
.flow-leaks-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  margin-bottom: 16px;
}
.flow-leaks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.leak { display: flex; align-items: flex-start; gap: 11px; }
.leak-num {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  color: var(--terracotta);
  border: 1px solid rgba(228,136,106,0.5);
  border-radius: 5px;
  padding: 2px 6px;
}
.leak-title { display: block; font-weight: 600; font-size: 14px; color: #fff; margin-bottom: 3px; }
.leak-body { font-size: 13px; line-height: 1.45; color: var(--on-dark); }

/* Verticals strip */
.verticals {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 30px;
  padding: 22px 0;
  border-top: 1px solid var(--hair-soft);
}
.verticals-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.verticals-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.verticals-list > span:not(.sep) { font-weight: 600; font-size: 15px; color: var(--on-dark-bright); }
.verticals-list .sep { color: var(--emerald-bright); font-weight: 600; }

/* ============================ Light sections ============================= */
.section-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(1.7rem, 1.15rem + 2vw, 2.125rem); /* 27 -> 34px */
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.1;
}
.section-sub {
  margin-top: 8px;
  font-weight: 600;
  font-size: 19px;
  color: var(--emerald);
}
.section-para { margin-top: 12px; font-size: 16px; color: var(--muted); max-width: 720px; }

/* Services / What we build */
.offers { padding: 32px 0 12px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.head-link {
  flex: none;
  font-weight: 600;
  font-size: 15px;
  color: var(--emerald);
  transition: color .15s ease;
}
.head-link:hover { color: var(--emerald-link-hover); }

.ledger { margin-top: 22px; border-top: 2px solid var(--ink); }
.ledger-row {
  display: grid;
  grid-template-columns: 60px 1fr 260px 34px;
  gap: 28px;
  align-items: start;
  padding: 30px 8px;
  border-bottom: 1px solid var(--border-3);
  color: inherit;
  transition: background-color .15s ease;
}
.ledger-row:hover { background: var(--ledger-hover); }
.ledger-index { font-family: var(--font-mono); font-weight: 700; font-size: 15px; color: var(--emerald); }
.ledger-title { font-family: var(--font-sans); font-weight: 700; font-size: 24px; color: var(--ink); }
.ledger-desc { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 560px; }
.ledger-outcome { display: flex; flex-direction: column; gap: 4px; }
.ledger-outcome-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.ledger-outcome-val { font-size: 15px; font-weight: 600; color: var(--ink); }
.ledger-arrow { font-size: 20px; color: var(--emerald); justify-self: end; }

/* Industries */
.industries { padding: 30px 0 20px; }
.fit-profile {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  margin-top: 30px;
  color: #fff;
  background: var(--navy-deep);
  border-radius: var(--r-card);
}
.fit-profile::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -95px;
  width: 230px;
  height: 230px;
  border: 46px solid rgba(47,207,146,0.08);
  border-radius: 50%;
  pointer-events: none;
}
.fit-story { padding: 36px 40px; }
.fit-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald-bright);
}
.fit-title {
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.fit-body { margin-top: 15px; max-width: 700px; font-size: 15px; line-height: 1.65; color: var(--on-dark); }
.fit-facts {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-content: center;
  padding: 30px 36px;
  background: rgba(255,255,255,0.045);
  border-left: 1px solid var(--hair-soft);
}
.fit-fact { padding: 4px 0 20px; }
.fit-fact strong {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.2vw, 29px);
  color: var(--emerald-bright);
}
.fit-fact span { display: block; margin-top: 4px; font-size: 12px; color: var(--on-dark-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.fit-note { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--hair-soft); font-size: 13.5px; line-height: 1.55; color: var(--on-dark); }
.fit-note span { display: block; margin-bottom: 5px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--emerald-bright); }
.ind-lede { margin-top: 28px; }
.ind-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.ind-card { background: var(--white); border: 1px solid var(--border-2); border-radius: var(--r-card); padding: 30px; }
.ind-index { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--emerald); }
.ind-title { margin-top: 10px; font-family: var(--font-sans); font-weight: 700; font-size: 21px; color: var(--ink); line-height: 1.2; }
.ind-body { margin-top: 10px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }

/* ========================== Selected work / cases ======================== */
.work { padding: 36px 0 24px; }
.work-pick {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  padding-bottom: 4px;
}
.work-legal { margin-top: 26px; max-width: 760px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

.case-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0; }
.case-tab {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 20px;
  border-radius: 10px;
  background: var(--white);
  color: var(--muted);
  border: 1px solid var(--border-3);
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.case-tab-num { font-family: var(--font-mono); font-weight: 700; font-size: 12.5px; color: var(--faint); }
.case-tab:hover { border-color: var(--ink); color: var(--ink); }
.case-tab.is-active { background: var(--navy-deep); color: #fff; border-color: var(--navy-deep); }
.case-tab.is-active .case-tab-num { color: var(--emerald-bright); }

.case { border-top: 2px solid var(--ink); padding-top: 28px; }
.case[hidden] { display: none; }

.case-top {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 28px;
}
.case-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 14px;
}
.case-title {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(1.3rem, 0.95rem + 1.3vw, 1.875rem); /* 21 -> 30px */
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
  margin-bottom: 16px;
}
.case-lede { max-width: 600px; font-size: 16px; line-height: 1.6; color: var(--muted); }

.case-questions {
  background: var(--white);
  border: 1px solid var(--border-2);
  border-radius: 14px;
  padding: 22px 24px;
}
.case-questions-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.case-questions li {
  padding: 9px 0;
  border-top: 1px solid var(--border-4);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}

.case-result {
  background: var(--navy-deep);
  border-radius: var(--r-card);
  padding: 30px 34px 28px;
  margin-bottom: 30px;
}
.case-result-label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald-bright);
  margin-bottom: 22px;
}
.case-metrics { display: flex; flex-wrap: wrap; row-gap: 26px; }
.case-metric { flex: 1; min-width: 210px; padding-right: 34px; }
.case-metric + .case-metric { border-left: 1px solid var(--hair); padding-left: 34px; }
.case-metric-val {
  display: block;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}
.case-metric-val-sm { font-size: 28px; }
.case-metric-val-good { color: var(--emerald-bright); }
.case-metric-cap { display: block; max-width: 300px; margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--on-dark); }
.case-result-notes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font-size: 14px;
  line-height: 1.45;
  color: var(--on-dark-bright);
}
.case-result-notes-3 { grid-template-columns: repeat(3, 1fr); }

.case-split {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 26px;
}
.case-sub-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 13px;
}
.case-sub-head-bad { border-top: 2px solid var(--terracotta); margin-bottom: 16px; }
.case-sub-head-good { border-top: 2px solid var(--emerald); margin-bottom: 4px; }
.case-sub-title { font-family: var(--font-sans); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); }
.case-sub-count { font-family: var(--font-mono); font-weight: 700; font-size: 11.5px; letter-spacing: 0.08em; white-space: nowrap; }
.case-sub-count-bad { color: var(--terracotta-count); }
.case-sub-count-good { color: var(--emerald-deep); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  background: var(--chip-bg);
  padding: 6px 11px;
  border-radius: 6px;
}
.chip-bad {
  color: var(--terracotta-deep);
  background: var(--chip-bad-bg);
  border: 1px solid var(--chip-bad-border);
  padding: 8px 13px;
  border-radius: 7px;
}

.deliverables { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.deliverables > span {
  padding: 11px 0;
  border-top: 1px solid var(--border-2);
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--ink);
}

.case-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 18px;
  padding-top: 16px;
  margin-bottom: 30px;
  border-top: 1px solid var(--border-3);
}
.case-stack-label {
  flex: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Dashboard preview. The iframe is authored at 1600x1100 and scaled down —
   never resized — so the dashboard's own layout stays intact. */
.dash { background: var(--white); border: 1px solid var(--border-3); border-radius: var(--r-card); overflow: hidden; }
.dash-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  background: var(--dash-bar);
  border-bottom: 1px solid var(--border-2);
}
.dash-dots { display: flex; gap: 6px; }
.dash-dots span { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--border-3); }
.dash-name { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.dash-note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.dash-window { position: relative; height: var(--dash-height); overflow: hidden; }
.dash-window iframe {
  width: 1600px;
  height: 1100px;
  border: 0;
  transform: scale(var(--dash-scale));
  transform-origin: top left;
  pointer-events: none; /* keep page scroll from being captured by the preview */
}
.dash-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 24px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 78%);
}
.btn-dash { font-size: 15px; padding: 14px 24px; }

/* How it works */
.how { padding: 36px 0 56px; }
.how-grid { margin-top: 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.how-step { border-top: 2px solid var(--ink); padding-top: 20px; }
.how-step-final { border-top-color: var(--emerald); }
.how-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.how-step-final .how-label { color: var(--emerald); }
.how-title { margin-top: 10px; font-family: var(--font-sans); font-weight: 700; font-size: 19px; color: var(--ink); }
.how-body { margin-top: 8px; font-size: 14.5px; line-height: 1.55; color: var(--muted); }

/* CTA band */
.cta { padding: 0; margin-bottom: 56px; }
.cta-card {
  background: var(--navy-deep);
  border-radius: var(--r-big);
  padding: 68px 56px;
}
.cta-title {
  max-width: 620px;
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(1.9rem, 1.1rem + 2.9vw, 2.625rem); /* 30 -> 42px */
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: #fff;
  text-wrap: balance;
}
.cta-para { max-width: 620px; margin-top: 16px; font-size: 18px; line-height: 1.6; color: var(--on-dark); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.cta-legal { max-width: 720px; margin-top: 28px; font-size: 12.5px; line-height: 1.5; color: #6E8698; }

/* Footer */
.site-footer { border-top: 1px solid var(--border-1); padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 24px; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; }
.footer-word { font-family: var(--font-sans); font-weight: 700; font-size: 16px; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.footer-links a { font-size: 14.5px; color: var(--muted); transition: color .15s ease; }
.footer-links a:hover { color: var(--emerald); }
.footer-domain { font-family: var(--font-mono); font-size: 12px; color: var(--faint); }

/* ============================== Responsive ============================== */

/* Credential rule: drop the connector hairlines and let phrases wrap */
@media (max-width: 1040px) {
  .credrule { flex-wrap: wrap; gap: 6px 16px; }
  .credrule-hair { display: none; }
}

/* Tablet: hero stacks, how-grid to 2 cols, cases stack */
@media (max-width: 980px) {
  .hero-body { grid-template-columns: 1fr; gap: 34px; }
  .mf-card { max-width: 520px; }
  .how-grid { grid-template-columns: repeat(2, 1fr); }

  .flow-metrics, .flow-leaks-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-lbl-full { display: none; }
  .flow-lbl-short { display: block; }

  .case-top, .case-split { grid-template-columns: 1fr; gap: 26px; }
  .case-result-notes, .case-result-notes-3 { grid-template-columns: 1fr; gap: 12px; }
  .case-metric { padding-right: 0; }
  .case-metric + .case-metric { border-left: 0; padding-left: 0; }
  :root { --dash-scale: 0.5; --dash-height: 330px; }
}

/* Nav collapses to hamburger */
@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    background: var(--navy-card);
    border: 1px solid var(--hair-soft);
    border-radius: 12px;
    z-index: 50;
  }
  .nav-menu.open { display: flex; }
  .nav-menu > a:not(.btn) { padding: 11px 10px; border-radius: 6px; }
  .nav-menu > a:not(.btn):hover { background: rgba(255,255,255,0.05); }
  .nav-cta { justify-content: center; margin-top: 6px; }
}

/* Small tablet / large phone */
@media (max-width: 720px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 14px; }

  /* Credential rule stacks, and phrases may wrap (no forced single line on phones) */
  .credrule { flex-direction: column; align-items: flex-start; gap: 7px; }
  .credrule > span:not(.credrule-hair) { white-space: normal; }
  .credrule-hair { display: none; }

  /* Ledger: stack number + text, relocate outcome below, hide arrow */
  .ledger-row { grid-template-columns: 44px 1fr; gap: 6px 18px; padding: 26px 4px; }
  .ledger-main { grid-column: 2; }
  .ledger-outcome { grid-column: 2; margin-top: 14px; }
  .ledger-arrow { display: none; }

  /* Industries to single column */
  .ind-grid { grid-template-columns: 1fr; }

  /* The Sankey diagram is unreadable at this width: swap in the bar layout */
  .flow-panel { padding: 18px 16px; }
  .flow-svg { display: none; }
  .flow-bars { display: flex; }
  .case-result { padding: 26px 22px 24px; }
  .deliverables { grid-template-columns: 1fr; }
  :root { --dash-scale: 0.36; --dash-height: 270px; }
}

/* Phone */
@media (max-width: 560px) {
  :root { --gutter: 20px; --dash-scale: 0.26; --dash-height: 220px; }
  .how-grid { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; justify-content: center; white-space: normal; flex-wrap: wrap; line-height: 1.3; text-align: center; }
  .cta-card { padding: 44px 24px; }
  .hero-lede { font-size: 17px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }

  .flow-metrics, .flow-leaks-grid { grid-template-columns: 1fr; gap: 18px; }
  .flow-title { font-size: 19px; }
  .flow-hint { display: none; }
  .case-tab { width: 100%; }
}

@media (max-width: 560px) {
  .flow-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }
  .flow-metric { min-width: 0; text-align: center; }
  .flow-metric-label {
    min-height: 0;
    margin-bottom: 7px;
    font-size: 9px;
    line-height: 1.35;
    letter-spacing: 0.08em;
  }
  .flow-metric-vals {
    justify-content: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
    letter-spacing: -0.025em;
  }
  .flow-metric-vals .was { font-size: 19px; }
  .flow-metric-vals .to { font-size: 11px; }
  .flow-metric-vals .now { font-size: 23px; }
}

@media (max-width: 430px) {
  :root { --dash-scale: 0.2; --dash-height: 180px; }
  .dash-note { display: none; }
}

/* ===================== Legal / content pages ===================== */
.subheader { background: var(--navy-deep); }
.subheader .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.back-link { font-size: 14.5px; font-weight: 500; color: var(--nav-link); transition: color .15s ease; white-space: nowrap; }
.back-link:hover { color: #fff; }

.legal { padding: 48px 0 64px; }
.legal .prose { max-width: 760px; }
.legal .eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--emerald); margin-bottom: 12px; }
.legal h1 { font-family: var(--font-sans); font-weight: 800; font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.375rem); letter-spacing: -0.025em; line-height: 1.1; color: var(--ink); }
.legal .updated { margin-top: 10px; font-size: 14px; color: var(--faint); }
.legal h2 { font-family: var(--font-sans); font-weight: 700; font-size: 20px; color: var(--ink); margin-top: 34px; }
.legal p { margin-top: 12px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.legal .bullets { margin-top: 12px; }
.legal .bullets li { position: relative; padding-left: 20px; margin-top: 8px; font-size: 16px; line-height: 1.7; color: var(--muted); }
.legal .bullets li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 2px; background: var(--emerald); }
.legal a { color: var(--emerald); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--emerald-link-hover); }
.legal strong { color: var(--ink); font-weight: 600; }


@media (max-width: 800px) {
  .fit-profile { grid-template-columns: 1fr; }
  .fit-story { padding: 30px 26px 26px; }
  .fit-facts { padding: 26px; border-left: 0; border-top: 1px solid var(--hair-soft); }
}

@media (max-width: 480px) {
  .fit-facts { grid-template-columns: 1fr; }
  .fit-fact + .fit-fact { padding-top: 12px; border-top: 1px solid var(--hair-soft); }
}
