/* ==========================================================================
   EORC — design tokens & global styles
   Source designs: claude.ai/design project f6079cf0 (Contact/About)
                   claude.ai/design project b13591e8 (Home/Technology, "EORC
                   Homepage" — the generated figures drawn by js/figures.js)
                   claude.ai/design canvas f8a19cc2 (benchmark bar charts and
                   platform workflow, rebuilt in HTML/CSS from the old PNGs)
   Dark base alternating with light rounded-top sections, mint accent.
   ========================================================================== */

:root {
  /* surfaces */
  --bg-dark: #0b0d10;
  --bg-light: #f5f6f8;
  --card-bg: #ffffff;

  /* text on light */
  --ink: #16191d;
  --ink-mid: #3a414b;
  --ink-soft: #5b6470;

  /* text on dark */
  --paper: #f2f4f6;
  --paper-75: rgba(242, 244, 246, 0.75);
  --paper-66: rgba(242, 244, 246, 0.66);
  --paper-62: rgba(242, 244, 246, 0.62);
  --paper-50: rgba(242, 244, 246, 0.5);
  --paper-40: rgba(242, 244, 246, 0.4);

  /* accent (mint) */
  --accent: oklch(0.78 0.14 170);        /* on dark backgrounds */
  --accent-bright: oklch(0.85 0.14 170); /* hover */
  --accent-deep: oklch(0.52 0.14 170);   /* on light backgrounds */
  --accent-mid: oklch(0.62 0.14 170);    /* bullets, focus rings */
  --on-accent: #07120d;

  /* benchmark chart series — dark enough for white value labels */
  --series-a: oklch(0.53 0.14 252);      /* solution time, variables */
  --series-b: oklch(0.54 0.13 162);      /* constraints */

  /* links (teal) */
  --link: oklch(0.55 0.13 195);
  --link-hover: oklch(0.45 0.15 195);

  --card-border: rgba(22, 25, 29, 0.07);
  --card-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);

  --font-sans: 'Instrument Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.21, 1);
}

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

/* Figure controls ship as [hidden] and are un-hidden by js/figures.js, so a
   visitor without JavaScript never sees a dead control. Author `display`
   rules would otherwise beat the user-agent's [hidden] rule. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
::selection { background: oklch(0.78 0.14 170 / 0.35); }

img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }

input, textarea, button { font-family: var(--font-sans); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Read out to screen readers, never drawn. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  background: rgba(10, 12, 15, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  font-weight: 700;
  letter-spacing: 0.1em;
  font-size: 15px;
}
.brand:hover { color: #ffffff; }

.brand-mark {
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 3px;
  display: block;
}

.nav-spacer { flex: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 13px;
  color: var(--paper-75);
}
.nav-links a:hover { color: #ffffff; }
.nav-links a[aria-current="page"] { color: #ffffff; font-weight: 600; }

.nav-links .nav-cta {
  font-weight: 600;
  color: var(--on-accent);
  background: var(--accent);
  padding: 8px 16px;
  border-radius: 980px;
}
.nav-links .nav-cta:hover { background: var(--accent-bright); color: var(--on-accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--paper);
  margin: 4px 0;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

@media (max-width: 760px) {
  .nav { gap: 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(10, 12, 15, 0.96);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding: 8px 0 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 24px; font-size: 15px; }
  .nav-links .nav-cta { margin: 8px 24px 0; display: inline-block; padding: 10px 18px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section-light {
  position: relative;
  z-index: 2;
  background: var(--bg-light);
  border-radius: 36px 36px 0 0;
  margin-top: -36px;
  padding: 120px 24px 110px;
}

.section-dark { background: var(--bg-dark); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 500;
}
.on-dark .eyebrow, .eyebrow.on-dark { color: var(--accent); }

.section-title {
  font-size: clamp(34px, 4.4vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 650;
  color: var(--ink);
  max-width: 760px;
  margin: 18px 0 0;
}

.muted-line { display: block; color: var(--paper-40); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 980px;
  font-weight: 600;
  font-size: 16px;
  border: none;
  cursor: pointer;
}

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-bright); color: var(--on-accent); }
.btn-primary:disabled { opacity: 0.6; cursor: default; }

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--paper);
  padding: 14px 28px;
  font-weight: 500;
  background: transparent;
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  color: var(--paper);
}

.btn-dark { background: var(--ink); color: #ffffff; }
.btn-dark:hover { background: #000000; color: #ffffff; }

.btn-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero-dark {
  position: relative;
  overflow: hidden;
  background: var(--bg-dark);
  text-align: center;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 70% at 50% 0%, oklch(0.78 0.14 170 / 0.12) 0%, rgba(11, 13, 16, 0) 60%);
  pointer-events: none;
}

.hero-title {
  font-size: clamp(42px, 5.8vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.033em;
  font-weight: 650;
  color: var(--paper);
  margin: 22px 0 0;
}

.hero-lede {
  font-size: 18px;
  line-height: 1.6;
  color: var(--paper-66);
  margin: 26px auto 0;
}

@keyframes hint {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.65; }
  50% { transform: rotate(45deg) translate(5px, 5px); opacity: 0.2; }
}

.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  margin-left: -7px;
}
.scroll-hint span {
  display: block;
  width: 12px; height: 12px;
  border-right: 2px solid rgba(255, 255, 255, 0.55);
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  animation: hint 2.2s ease-in-out infinite;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 56px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 30px 28px;
  box-shadow: var(--card-shadow);
}

.card-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-deep);
}

.card h3 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 14px 0 8px;
  color: var(--ink);
}

.card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.card-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

/* ==========================================================================
   Feature rows (Technology)
   ========================================================================== */

.feature-row {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  gap: 64px;
  align-items: center;
  flex-wrap: wrap;
}
.feature-row.reverse { flex-wrap: wrap-reverse; }

.feature-copy { flex: 1; min-width: 320px; }
.feature-media { flex: 1.1; min-width: 340px; }
@media (max-width: 420px) {
  .feature-copy { min-width: 0; }
  .feature-media { min-width: 0; flex-basis: 100%; }
}

.feature-title {
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 650;
  color: var(--ink);
  margin: 16px 0 0;
}

.feature-copy > p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 18px 0 0;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.feature-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-mid);
}
.feature-list li::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--accent-mid);
  border-radius: 2px;
  margin-top: 7px;
  flex: none;
}

.media-frame {
  background: var(--card-bg);
  border: 1px solid rgba(22, 25, 29, 0.08);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.1);
}
.media-frame img {
  width: 100%;
  display: block;
  border-radius: 12px;
}

/* ==========================================================================
   Team (About)
   ========================================================================== */

.team-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  gap: 18px;
}
.team-card img {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.team-card .name { font-size: 17px; font-weight: 650; color: var(--ink); }
.team-card .role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 3px;
}
.team-card .links { display: flex; gap: 14px; margin-top: 8px; }
.team-card .links a { font-size: 13px; color: oklch(0.5 0.13 195); font-weight: 500; }
.team-card .links a:hover { color: oklch(0.4 0.15 195); }

/* ==========================================================================
   Forms (Contact)
   ========================================================================== */

.contact-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  align-items: start;
}
@media (max-width: 960px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.form-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 44px 40px;
  box-shadow: var(--card-shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .form-card { padding: 32px 24px; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(22, 25, 29, 0.14);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--ink);
  background: #fbfcfd;
  outline: none;
}
.field textarea { resize: vertical; }
.field input:focus,
.field textarea:focus {
  border-color: var(--accent-mid);
  background: #ffffff;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.form-footer .hint { font-size: 13px; color: var(--ink-soft); }

.form-status { font-size: 14px; color: var(--ink-soft); display: none; width: 100%; }
.form-status.show { display: block; }
.form-status.err { color: #b42318; }
.form-status.ok { color: var(--accent-deep); }

.form-success { text-align: center; padding: 40px 20px; }
.form-success .check-ring {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: oklch(0.78 0.14 170 / 0.16);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-success .check-ring span {
  display: block;
  width: 16px; height: 9px;
  border-left: 3px solid var(--accent-deep);
  border-bottom: 3px solid var(--accent-deep);
  transform: rotate(-45deg);
  margin-top: -4px;
}
.form-success h3 { font-size: 24px; font-weight: 650; color: var(--ink); margin: 22px 0 8px; }
.form-success p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); }

/* mailto panel filling the contact card while there is no form */
.contact-invite { text-align: center; padding: 56px 20px; }
.contact-invite h3 { font-size: 24px; font-weight: 650; color: var(--ink); margin: 0 0 10px; }
.contact-invite p { font-size: 15px; line-height: 1.6; color: var(--ink-soft); max-width: 440px; margin: 0 auto; }
.contact-invite .contact-actions { margin: 28px auto 0; }
.contact-invite .contact-fallback { font-size: 13px; margin: 22px auto 0; }
.contact-fallback a, .link-btn { color: var(--link); font-weight: 500; }
.contact-fallback a:hover, .link-btn:hover { color: var(--link-hover); }

/* a button that reads as a link (clipboard copy) */
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.contact-aside {
  background: var(--bg-dark);
  border-radius: 28px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.contact-aside .aside-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.contact-aside .aside-email {
  display: block;
  font-size: 19px;
  font-weight: 600;
  color: var(--paper);
  margin-top: 10px;
}
.contact-aside .aside-email:hover { color: var(--accent-bright); }
.contact-aside .aside-value {
  font-size: 16px;
  color: rgba(242, 244, 246, 0.8);
  margin-top: 10px;
  line-height: 1.5;
}
.contact-aside .aside-note {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
}
.contact-aside .aside-note p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(242, 244, 246, 0.55);
}

/* honeypot — visually removed, still submittable by bots */
.hp-field {
  position: absolute;
  left: -9999px;
}

/* ==========================================================================
   CTA + footer
   ========================================================================== */

.cta-title {
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 650;
  color: var(--paper);
}

.cta-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--paper-62);
  margin: 24px auto 0;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  text-align: left;
}
.site-footer .footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-footer .footer-mark {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  display: block;
}
.site-footer .copyright { font-size: 13px; color: var(--paper-50); }
.site-footer .footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer .footer-links a { font-size: 13px; color: rgba(242, 244, 246, 0.7); }
.site-footer .footer-links a:hover { color: #ffffff; }

/* ==========================================================================
   Statement (Home — "What we do")
   ========================================================================== */

.statement {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.statement p {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.32;
  color: rgba(242, 244, 246, 0.92);
  margin: 24px 0 0;
  text-wrap: pretty;
}
.statement .lit { color: var(--accent); }

/* ==========================================================================
   Figure panels — generated diagrams (js/figures.js)
   Every panel keeps its labels, legend and caption in the markup, so the
   panel still reads as a labelled frame if the diagram never renders.
   ========================================================================== */

.figure-panel {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  padding: 24px;
}

.figure-panel-light {
  background: var(--card-bg);
  border: 1px solid rgba(22, 25, 29, 0.08);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 20px 50px rgba(16, 24, 40, 0.08);
}

/* Hero panel: open-bottomed, bleeding into the dark section below it. */
.hero-figure {
  position: relative;
  max-width: 1180px;
  margin: 60px auto 0;
  border-radius: 26px 26px 0 0;
  border-bottom: 0;
  padding: 24px 26px 28px;
  text-align: left;
}

/* Dark network frame sitting inside a light section. */
.figure-panel-dark {
  background: var(--bg-dark);
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 26px 60px rgba(16, 24, 40, 0.16);
}

.figure-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.figure-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.figure-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--paper-40);
}

.figure-svg { width: 100%; display: block; margin-top: 16px; }
.figure-svg.fixed-h { height: 262px; }
.figure-svg.auto-h { height: auto; }

/* Equal side columns keep the middle label ("today") centred under x = 50%,
   whatever the widths of the outer two; on narrow screens the gap makes an
   outer label wrap rather than run into it. */
.figure-axis {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-40);
  padding: 0 2px;
}
.figure-axis span:last-child { text-align: right; }

.figure-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 8px;
  padding-top: 14px;
}

.figure-caption {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(242, 244, 246, 0.45);
}
.figure-panel-light .figure-caption { color: var(--ink-soft); }

.figure-foot .horizon-title { font-size: 15px; font-weight: 600; color: var(--paper); }
.figure-foot .horizon-body {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(242, 244, 246, 0.6);
  margin-top: 4px;
  max-width: 520px;
}

/* "Schematic — not model output" style disclaimers. */
.figure-note {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: rgba(242, 244, 246, 0.34);
  margin-top: 14px;
}
.figure-note.on-light { color: var(--ink-soft); }

/* ==========================================================================
   Figure controls
   ========================================================================== */

/* Segmented tab control. */
.seg {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  width: fit-content;
  flex-wrap: wrap;
}

.seg button {
  border: 0;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  background: transparent;
  color: var(--paper-62);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.seg button:hover { color: var(--paper); }
.seg button[aria-pressed="true"] {
  background: oklch(0.78 0.14 170 / 0.18);
  color: var(--accent);
}

/* Carrier filter pills. */
.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-row button {
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--paper-62);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 13px;
  border-radius: 999px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.filter-row button:hover { border-color: rgba(255, 255, 255, 0.3); color: var(--paper); }
.filter-row button[aria-pressed="true"] {
  background: oklch(0.78 0.14 170 / 0.18);
  color: var(--accent);
  border-color: transparent;
}

/* Uncertainty slider. */
.range-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}
.range-row .range-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper-50);
  white-space: nowrap;
}
.range-row input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.range-row .range-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  width: 80px;
  text-align: right;
}

/* Uncertainty-source tags. */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 20px;
  padding-top: 18px;
}
.chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--paper-62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 11px;
  border-radius: 999px;
}

.seg button:focus-visible,
.filter-row button:focus-visible,
.range-row input[type="range"]:focus-visible {
  outline: 2px solid var(--accent-mid);
  outline-offset: 2px;
}

/* ==========================================================================
   Figure internals
   ========================================================================== */

@keyframes flow { to { stroke-dashoffset: -140; } }

.net-link, .net-node { transition: opacity 0.45s var(--ease); }
.net-flow { animation: flow 2.6s linear infinite; }

/* ==========================================================================
   Benchmark bar charts
   Real text and CSS: names, values, ticks and takeaway are all markup, so
   the chart reads the same with or without JavaScript. Each bar's width is
   its --v over the chart's --max; js/figures.js only plays the grow-in.
   ========================================================================== */

.bars {
  --label-w: 140px;
  --grid: rgba(22, 25, 29, 0.08);
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--ink-mid);
}

.bars-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.bars-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bars-legend span::before {
  content: "";
  width: 11px; height: 11px;
  border-radius: 3px;
  background: var(--swatch);
}

.bars-row,
.bars-axis {
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr);
  column-gap: 14px;
}
.bars-axis > * { grid-column: 2; }

.bars-name {
  align-self: center;
  text-align: right;
  line-height: 1.3;
  color: var(--ink);
}

/* Solid axis on the left; a faint gridline at the end of every quarter. */
.bars-track {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 60px;
  padding: 10px 0;
  border-left: 1px solid var(--ink);
  background: linear-gradient(to right, transparent calc(100% - 1px), var(--grid) calc(100% - 1px)) 0 0 / 25% 100%;
}

.bars-note {
  padding-left: 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.bar-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: calc(var(--v) / var(--max) * 100%);
  min-width: 3px;
  height: 24px;
  border-radius: 0 6px 6px 0;
  background: var(--series-a);
}
.bar.b { background: var(--series-b); }

.bar-value {
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
  color: #ffffff;
}
.bar-value.out { padding: 0; color: var(--ink-soft); }

.bars-ticks {
  position: relative;
  height: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
}
.bars-ticks span {
  position: absolute;
  top: 7px;
  left: calc(var(--at) * 100%);
  transform: translateX(-50%);
  white-space: nowrap;
}

.bars-unit {
  margin-top: 4px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.bars-caption { display: block; text-align: center; }
.bars-takeaway {
  display: block;
  max-width: 460px;
  margin: 22px auto 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: balance;
}
.bars-takeaway strong { color: var(--accent-deep); font-weight: 700; white-space: nowrap; }
.bars-footnote {
  display: block;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(22, 25, 29, 0.08);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: balance;
}

/* Small chart sitting at the foot of a Home card. */
.bars.compact { --label-w: 64px; font-size: 13px; }
.bars.compact .bars-legend { font-size: 12.5px; margin-bottom: 10px; }
.bars.compact .bars-track { min-height: 48px; padding: 8px 0; }
.bars.compact .bars-note { padding-left: 8px; font-size: 12px; }
.bars.compact .bar { height: 20px; }
.bars.compact .bar-value { font-size: 10.5px; }
.bars.compact .bars-takeaway { margin-top: 14px; font-size: 13px; }

.card-chart {
  margin-top: auto;
  padding: 16px 16px 18px;
  background: #ffffff;
  border: 1px solid rgba(22, 25, 29, 0.06);
  border-radius: 14px;
}

/* Grow-in, armed by js/figures.js only when it will also play it. */
.bars.is-armed .bar { clip-path: inset(0 100% 0 0); }
.bars.is-armed .bar-value.out { opacity: 0; }
.bars.is-in .bar {
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.9s var(--ease) calc(var(--i, 0) * 140ms);
}
.bars.is-in .bar-value.out {
  opacity: 1;
  transition: opacity 0.5s var(--ease) calc(var(--i, 0) * 140ms + 600ms);
}

.bars-row { transition: opacity 0.3s var(--ease); }
@media (hover: hover) {
  .bars-plot:hover .bars-row:not(:hover) { opacity: 0.4; }
}

@media (max-width: 560px) {
  .bars { --label-w: 96px; }
  .bars-ticks .minor { display: none; }
}

/* ==========================================================================
   Platform workflow — data analytics → algorithms ↓ models → results
   Real text in the markup; js/figures.js only plays the flow-in.
   ========================================================================== */

.workflow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 2.1fr) 32px minmax(0, 1fr);
  text-align: center;
}

.wf-core { display: flex; flex-direction: column; }

.wf-stage {
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.wf-data { --tint: oklch(0.975 0.012 165); --line: oklch(0.82 0.07 165); --title: oklch(0.45 0.1 165); }
.wf-alg,
.wf-models { --tint: oklch(0.975 0.01 250); --line: oklch(0.82 0.06 250); --title: oklch(0.45 0.11 250); }
.wf-results { --tint: oklch(0.98 0.008 25); --line: oklch(0.82 0.07 20); --title: oklch(0.48 0.13 25); }
.wf-models { flex: 1; }

.wf-title {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--title);
}

.wf-stage p,
.wf-list {
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-mid);
}

.wf-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wf-data .wf-list,
.wf-results .wf-list { flex: 1; justify-content: space-around; }

.wf-chips { gap: 8px; }
.wf-chips li {
  padding: 8px 12px;
  background: oklch(0.95 0.018 250);
  border-radius: 8px;
}

.wf-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-deep);
}
.wf-arrow.down { padding: 8px 0; }
.wf-arrow svg { width: 22px; height: 22px; display: block; }
.wf-arrow.down svg { transform: rotate(90deg); }

@media (max-width: 860px) {
  .workflow { grid-template-columns: minmax(0, 1fr); }
  .wf-arrow { padding: 10px 0; }
  .wf-arrow svg { transform: rotate(90deg); }
  .wf-list { gap: 8px; }
}

/* Flow-in on `translate`, hover lift on `transform`: separate properties, so
   the animation's fill never pins the stage in place. */
@keyframes wf-in {
  from { opacity: 0; translate: 0 14px; }
  to { opacity: 1; translate: 0 0; }
}
.workflow.is-armed .wf-stage,
.workflow.is-armed .wf-arrow { opacity: 0; }
.workflow.is-in .wf-stage,
.workflow.is-in .wf-arrow { animation: wf-in 0.7s var(--ease) calc(var(--i, 0) * 140ms) both; }

@media (hover: hover) {
  .wf-stage:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.09);
  }
}

@media (max-width: 560px) {
  .figure-panel, .figure-panel-light { padding: 18px; }
  .hero-figure { padding: 18px 18px 22px; border-radius: 20px 20px 0 0; }
  .range-row { flex-wrap: wrap; gap: 10px; }
  .range-row input[type="range"] { flex-basis: 100%; order: 3; }
  .range-row .range-value { text-align: left; width: auto; }
  .seg button { padding: 8px 13px; font-size: 12px; }
}

/* ==========================================================================
   Motion
   ========================================================================== */

[data-zoom] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scroll-hint span { animation: none; }
  .net-flow { animation: none; }
  .net-link, .net-node { transition: none; }
  .bar, .bar-value, .bars-row, .wf-stage { transition: none; }
  .wf-stage, .wf-arrow { animation: none; }
}
