/* ==========================================================================
   Tokens
   Palette "ledger": cool green-grey paper, deep green ink, one ledger-green accent.
   ========================================================================== */
:root {
  --bg: #F2F4F1;
  --surface: #FAFBF9;
  --ink: #13201B;
  --muted: #56635D;
  --rule: #D3DAD4;
  --accent: #1E5A47;
  --accent-soft: #DDE8E2;
  --track: #E4E9E5;
  --chart-focus: #1E5A47;
  --chart-context: #A3AEA8;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --wrap: 1120px;
  --gutter: 16px;
  --radius: 6px;
  --section-space: clamp(72px, 10vw, 128px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1412;
    --surface: #141C19;
    --ink: #E4EAE5;
    --muted: #8D9A94;
    --rule: #25302C;
    --accent: #82C4AA;
    --accent-soft: #1A2B25;
    --track: #1B2521;
    --chart-focus: #82C4AA;
    --chart-context: #56625D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1412;
  --surface: #141C19;
  --ink: #E4EAE5;
  --muted: #8D9A94;
  --rule: #25302C;
  --accent: #82C4AA;
  --accent-soft: #1A2B25;
  --track: #1B2521;
  --chart-focus: #82C4AA;
  --chart-context: #56625D;
  color-scheme: dark;
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}

h1, h2, h3, h4, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 8px 12px;
  z-index: 100;
}
.skip:focus { left: 8px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.nav { display: none; gap: 28px; }
.nav a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s ease;
}
.nav a:hover { color: var(--ink); }
@media (min-width: 720px) { .nav { display: flex; } }

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .15s ease;
}
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ==========================================================================
   Shared type
   ========================================================================== */
.eyebrow,
.section-label,
.role-dates,
.method-step,
.case-status,
.minor-head,
.bridge-caption,
.story-grid dt,
.case-grid dt,
.example-label,
.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow { color: var(--accent); }

.prose p + p { margin-top: 1em; }
.prose { color: var(--ink); max-width: 62ch; }
.prose-lg {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.2vw, 26px);
  line-height: 1.45;
  font-weight: 350;
  letter-spacing: -0.005em;
}

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  background: transparent;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { border-color: var(--ink); }
.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: clamp(56px, 9vw, 112px) 0 var(--section-space); }

.hero-title {
  margin-top: 20px;
  max-width: 17ch;
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(40px, 6.6vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.hero-lede {
  margin-top: 28px;
  max-width: 58ch;
  font-size: 18px;
  color: var(--muted);
}
.hero .actions { margin-top: 32px; }

/* ==========================================================================
   Signature: career bridge (horizontal waterfall)
   ========================================================================== */
.bridge {
  margin-top: clamp(56px, 8vw, 88px);
  padding: 28px 24px 22px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
}
.bridge-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.bridge-title { color: var(--ink); }
.bridge-sub { color: var(--muted); }

.bridge-rows { display: grid; gap: 14px; }

.bridge-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label value"
    "track track";
  align-items: center;
  gap: 6px 16px;
}
.bridge-label { grid-area: label; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.bridge-org { font-weight: 600; font-size: 15px; }
.bridge-gain { font-size: 14px; color: var(--muted); }
.bridge-value {
  grid-area: value;
  font-family: var(--font-mono);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--accent);
}

.bridge-track {
  grid-area: track;
  position: relative;
  height: 22px;
}
.bridge-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--offset, 0%);
  width: var(--len, 10%);
  background: var(--accent);
  border-radius: 2px;
  transform-origin: left center;
}
/* Faint baseline so the offset reads as "starting where the last one ended" */
.bridge-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px dotted var(--rule);
}

.is-total .bridge-org,
.is-total .bridge-value { color: var(--ink); font-weight: 600; }
.is-total { padding-top: 14px; border-top: 1px solid var(--rule); }
.is-total .bridge-bar { background: var(--ink); }
.is-total .bridge-track::before { display: none; }

@media (min-width: 760px) {
  .bridge { padding: 32px 36px 26px; }
  .bridge-row {
    grid-template-columns: 260px 1fr 80px;
    grid-template-areas: "label track value";
    gap: 24px;
  }
  .bridge-label { flex-direction: column; gap: 0; }
  .bridge-rows { gap: 18px; }
  .is-total { padding-top: 18px; }
  /* Dashed connector from each bar's end to the start of the next one */
  .bridge-row:not(.is-total) .bridge-bar::after {
    content: "";
    position: absolute;
    right: 0;
    top: 100%;
    height: var(--connector, 40px);
    border-right: 1px dashed var(--muted);
    opacity: .6;
  }
}

.bridge-note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}

/* Load sequence: bars build left to right, one after another */
@media (prefers-reduced-motion: no-preference) {
  .js .bridge-bar {
    animation: bar-in .7s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: calc(var(--i, 0) * 160ms + 250ms);
  }
  .js .bridge-bar::after {
    animation: fade-in .3s ease both;
    animation-delay: calc(var(--i, 0) * 160ms + 800ms);
  }
}
@keyframes bar-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade-in { from { opacity: 0; } }

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: var(--section-space) 0;
  border-top: 1px solid var(--rule);
}
.section-label { color: var(--accent); }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.section-intro { color: var(--muted); font-size: 15px; }

.split {
  display: grid;
  gap: 20px;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 260px 1fr; gap: 24px; }
}

/* ==========================================================================
   Experience
   ========================================================================== */
.role {
  display: grid;
  gap: 20px;
  padding: 40px 0;
  border-top: 1px solid var(--rule);
}
.role:first-of-type { border-top: 0; padding-top: 0; }
@media (min-width: 900px) {
  .role { grid-template-columns: 260px 1fr; gap: 24px; padding: 56px 0; }
  .role-meta { position: sticky; top: 92px; align-self: start; }
}

.role-dates { color: var(--muted); font-variant-numeric: tabular-nums; }
.role-org {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.4vw, 38px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.role-title { margin-top: 6px; font-size: 15px; color: var(--muted); }

.role-body { max-width: 720px; }
.role-summary { font-size: 18px; }

.story {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px dashed var(--rule);
}
.story-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 450;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.story-lead { margin-bottom: 20px; }

.story-grid,
.case-grid {
  display: grid;
  gap: 4px 20px;
}
.story-grid dt,
.case-grid dt {
  color: var(--muted);
  padding-top: 5px;
}
.story-grid dd,
.case-grid dd { margin-bottom: 14px; }
@media (min-width: 620px) {
  .story-grid { grid-template-columns: 110px 1fr; }
  .story-grid dd { margin-bottom: 12px; }
}

.outcome { color: var(--ink); }
.figure {
  display: block;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}

/* A genuine sequence, so it is numbered */
.method {
  counter-reset: step;
  display: grid;
  gap: 1px;
  margin-bottom: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--rule);
}
.method li {
  counter-increment: step;
  padding: 14px 16px;
  background: var(--surface);
  font-size: 15px;
  color: var(--muted);
}
.method-step {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
}
.method-step::before {
  content: counter(step) " ";
  color: var(--accent);
  margin-right: 4px;
}
@media (min-width: 620px) {
  .method { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .role .method { grid-template-columns: repeat(4, 1fr); }
}

.story-example {
  margin-bottom: 20px;
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 16px;
}
.example-label { color: var(--accent); margin-right: 8px; }

.role-compact .role-summary { font-size: 17px; }
.points { margin-top: 16px; display: grid; gap: 10px; }
.points li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
}
.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .78em;
  width: 10px;
  border-top: 1px solid var(--accent);
}

/* ==========================================================================
   Casework
   ========================================================================== */
.casework-intro { margin-bottom: 48px; }
.casework-intro .prose { font-size: 18px; }
@media (min-width: 900px) {
  .casework-intro { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
}
.method-inline { margin-bottom: 0; }

.cases {
  display: grid;
  gap: 16px;
}
@media (min-width: 760px) {
  .cases { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
.case {
  padding: 28px 24px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
}
.case-status {
  display: inline-block;
  padding: 3px 8px;
  border: 1px dashed var(--muted);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
}
.case-title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.case-kicker { margin-top: 6px; font-size: 15px; color: var(--accent); }
.case-grid {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  gap: 2px;
}
.case-grid dd { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.case-grid dd:last-child { margin-bottom: 0; }

/* ==========================================================================
   About
   ========================================================================== */
.about-lead {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.3;
  font-weight: 350;
  letter-spacing: -0.01em;
  max-width: 30ch;
}
@media (min-width: 900px) {
  #about .split { grid-template-columns: 1fr 1fr; gap: 56px; }
}
.about-cols {
  display: grid;
  gap: 32px;
}
@media (min-width: 620px) { .about-cols { grid-template-columns: 1fr 1fr; } }

.minor-head { color: var(--muted); margin-bottom: 12px; }
.plain { display: grid; gap: 8px; }
.plain li { font-size: 16px; }

.facts {
  margin-top: clamp(56px, 7vw, 80px);
  display: grid;
  border-top: 1px solid var(--rule);
}
.fact {
  display: grid;
  gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.fact .minor-head { margin-bottom: 0; padding-top: 3px; }
@media (min-width: 760px) {
  .fact { grid-template-columns: 260px 1fr; gap: 24px; }
}
.tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  font-size: 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: 2px;
}

/* ==========================================================================
   Contact + footer
   ========================================================================== */
.contact-title {
  max-width: 20ch;
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 36px;
}
.contact .btn-primary { word-break: break-all; }

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

/* ==========================================================================
   Casework cards on the home page
   ========================================================================== */
.case-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.case-link:hover { border-color: var(--muted); }
.case-link .case-title { margin-top: 0; }
.case-company {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.case-answer { margin-top: 14px; color: var(--muted); font-size: 16px; }
.case-more {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
}
.cases-note { margin-top: 20px; font-size: 15px; color: var(--muted); }

/* ==========================================================================
   Case page
   ========================================================================== */
.case-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); }
.back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--ink); }
.case-h1 {
  margin-top: 16px;
  max-width: 20ch;
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(36px, 5.6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.022em;
}
.case-facts {
  margin-top: 40px;
  display: grid;
  gap: 16px 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
@media (min-width: 760px) { .case-facts { grid-template-columns: repeat(3, 1fr); } }
.case-facts dt {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.case-facts dd { font-size: 15px; }
.disclosure {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--muted);
  max-width: 760px;
}

.case-body { padding-bottom: var(--section-space); }
.case-block {
  padding: clamp(40px, 6vw, 64px) 0;
  border-top: 1px solid var(--rule);
}
.case-block > .split > .section-label { padding-top: 6px; }
.case-content { max-width: 760px; min-width: 0; }

.founder-q {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.4;
  font-weight: 350;
  font-style: italic;
}
.founder-q-by { margin-top: 12px; font-size: 14px; color: var(--muted); }

.bottom-line {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.4;
  font-weight: 400;
}
.bottom-line + p { margin-top: 16px; color: var(--muted); }

.steps { counter-reset: step; display: grid; gap: 56px; }
.step { counter-increment: step; }
.step-title {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 450;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}
.step-title::before {
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  min-width: 14px;
}
.step p + p { margin-top: 1em; }
.step .chart { margin-top: 28px; }
.aside {
  margin-top: 20px;
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 16px;
}
.aside-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-right: 8px;
}

.memo-list { display: grid; gap: 14px; }
.memo-list li { position: relative; padding-left: 20px; }
.memo-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .8em;
  width: 10px;
  border-top: 1px solid var(--accent);
}
.memo-list strong { font-weight: 600; }
.sub-head {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 32px 0 14px;
}
.sub-head:first-child { margin-top: 0; }

.kpis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--surface); padding: 16px; }
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-value { margin-top: 4px; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }

.plan { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) { .plan { grid-template-columns: repeat(3, 1fr); } }
.plan li { background: var(--surface); padding: 16px; font-size: 15px; color: var(--muted); }
.plan .method-step { margin-bottom: 6px; }
.plan .method-step::before { content: none; }

.case-nav {
  display: grid;
  gap: 12px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
@media (min-width: 760px) { .case-nav { grid-template-columns: 1fr 1fr; } }
.case-nav a {
  display: block;
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color .15s ease;
}
.case-nav a:hover { border-color: var(--muted); }
.case-nav-label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.case-nav-title { font-family: var(--font-display); font-size: 21px; }

/* ==========================================================================
   Charts
   ========================================================================== */
.chart {
  padding: 20px 20px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
}
.chart-head { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.chart-title { font-weight: 600; font-size: 15px; }
.chart-sub { font-size: 13px; color: var(--muted); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.chart-frame { position: relative; margin-top: 12px; }
.chart-plot { width: 100%; }
.chart-plot svg { display: block; overflow: visible; }

.key { display: inline-block; flex: none; }
.key-ln { width: 14px; height: 2px; border-radius: 1px; }
.key-sq { width: 10px; height: 10px; border-radius: 2px; }
.key-dot { width: 8px; height: 8px; border-radius: 50%; }
.role-focus { background: var(--chart-focus); }
.role-context { background: var(--chart-context); }
.role-ink { background: var(--ink); }

.c-grid { stroke: var(--rule); stroke-width: 1; }
.c-ref { stroke: var(--muted); stroke-width: 1; }
.c-mark { stroke: var(--muted); stroke-width: 1; stroke-opacity: .5; }
.c-cross { stroke: var(--muted); stroke-width: 1; }
.c-tick { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.c-note { font-family: var(--font-body); font-size: 12px; fill: var(--muted); }
.c-end { font-family: var(--font-body); font-size: 12px; fill: var(--ink); font-variant-numeric: tabular-nums; }

.chart-tip {
  position: absolute;
  z-index: 2;
  min-width: 170px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
  font-size: 13px;
  pointer-events: none;
}
.tip-head { font-weight: 600; margin-bottom: 6px; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row + .tip-row { margin-top: 3px; }
.tip-name { color: var(--muted); margin-right: auto; }
.tip-val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; padding-left: 12px; }

.chart-table { margin-top: 8px; font-size: 13px; }
.chart-table summary {
  cursor: pointer;
  color: var(--muted);
  padding: 6px 0;
  width: max-content;
}
.chart-table summary:hover { color: var(--ink); }
.chart-table summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.table-scroll { overflow-x: auto; margin-top: 8px; }
.chart-table table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.chart-table th, .chart-table td { padding: 6px 10px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.chart-table th:first-child { text-align: left; }
.chart-table thead th { font-weight: 600; color: var(--muted); }
.chart-table tbody th { font-weight: 400; }
