/* ═══════════ DESIGN TOKENS ═══════════ */
:root {
  --bg: #fff;
  --surface: #F5F5F7;
  --border: #D2D2D7;
  --divider: #E8E8ED;
  --t1: #1D1D1F;
  --t2: #86868B;
  --t3: #AEAEB2;
  --blue: #0071E3;
  --green: #34C759;
  --orange: #FF9500;
  --red: #FF3B30;
  --purple: #5856D6;
  --teal: #30B0C7;
  --apple-ease: cubic-bezier(0.25, 0.1, 0.25, 1);

  /* level accent colors */
  --accent-0: #FF3B30;
  --accent-1: #0071E3;
  --accent-2: #FF9500;
  --accent-3: #FF3B30;
  --accent-4: #34C759;
  --accent-5: #5856D6;
  --accent-6: #5856D6;
}

/* ═══════════ RESET ═══════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; overflow: hidden; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  color: var(--t1);
  background: var(--bg);
  line-height: 1.6;
}

/* ═══════════ SKIP LINK ═══════════ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--t1);
  color: #fff;
  border-radius: 8px;
  font-size: .875rem;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ═══════════ TYPOGRAPHY ═══════════ */
h2 {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.022em;
  line-height: 1.12;
  margin-bottom: 48px;
}
h3 {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -.016em;
  margin-bottom: 20px;
}
h3.lv {
  font-size: 1.5rem;
  margin-bottom: 6px;
  padding-top: 4px;
}
/* ═══════════ CATEGORY SHIFT PAGE ═══════════ */
.category-shift-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(88,86,214,.06) 0%, transparent 70%);
  z-index: -1;
}
.category-shift-page .page-inner {
  justify-content: center;
}
.category-shift-inner {
  text-align: center;
  max-width: 540px;
  width: 100%;
}
.category-shift-label {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--purple);
  opacity: .6;
  margin-bottom: 20px;
}
.category-shift-hero {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
  color: var(--t1);
  margin-bottom: 20px;
}
.category-shift-sub {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--t2);
  line-height: 1.55;
  margin: 0;
}
.category-shift-sub em {
  color: var(--t1);
  font-style: italic;
}

/* ═══════════ CATEGORY TAG (L6 compact reminder) ═══════════ */
.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--purple);
  background: rgba(88,86,214,.06);
  border: 1px solid rgba(88,86,214,.12);
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 12px;
}
p { margin-bottom: 14px; font-size: 1rem; }
strong { font-weight: 600; }
em { font-style: italic; }
code {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: .875em;
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 4px;
}
.fl { font-weight: 600; }
.fl::after { content: ": "; }

/* ═══════════ INTRO / RUNNING EXAMPLE ═══════════ */
.intro {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 28px;
}
.intro h3 { margin-bottom: 14px; }
.intro ol, .intro ul { margin: 10px 0 10px 22px; line-height: 1.7; }
.intro li { margin-bottom: 3px; }
.rn { font-weight: 600; }
.tension {
  background: var(--bg);
  border-radius: 12px;
  padding: 18px 22px;
  margin-top: 18px;
  border: 1px solid var(--border);
}
.tension p:last-child { margin-bottom: 0; }
.ol { list-style: none; margin: 10px 0; padding: 0; }
.ol li { padding: 5px 0 5px 18px; position: relative; font-size: .9375rem; }
.ol li::before { content: "\2022"; position: absolute; left: 0; color: var(--t3); }
.tag {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 5px;
  margin-left: 5px;
  vertical-align: middle;
  letter-spacing: .01em;
}
.tag-c { background: #DBEAFE; color: #1E40AF; }
.tag-h { background: #FFF7ED; color: #C2410C; }
.tag-n { background: #FDE8E8; color: #B91C1C; }

/* ═══════════ BLOCKQUOTE ═══════════ */
blockquote {
  border-left: 3px solid var(--divider);
  padding: 14px 22px;
  margin: 14px 0 18px;
  font-size: .9375rem;
  line-height: 1.65;
  background: var(--surface);
  border-radius: 0 12px 12px 0;
}
blockquote p { margin-bottom: 10px; }
blockquote p:last-child { margin-bottom: 0; }

/* ═══════════ TABLES ═══════════ */
.tw {
  overflow-x: auto;
  margin: 20px 0 28px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.5; }
thead { background: var(--surface); }
th {
  text-align: left;
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
td:first-child { font-weight: 600; white-space: nowrap; color: var(--t2); }

/* ═══════════ HR DIVIDER ═══════════ */
hr {
  border: none;
  height: 1px;
  background: var(--divider);
  margin: 0;
  transform-origin: center;
}

/* ═══════════ EVIDENCE FOOTER ═══════════ */
.ef {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 28px;
  margin-top: 36px;
  font-size: .9375rem;
  line-height: 1.6;
}

/* ═══════════ CONFIDENTIAL FOOTER ═══════════ */
.conf-footer {
  text-align: center;
  padding: 12px 0 0;
  margin-top: 20px;
  border-top: 1px solid var(--divider);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--t3);
  line-height: 1.8;
}
.conf-footer span {
  display: block;
  font-size: .625rem;
  font-weight: 400;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--t3);
  margin-top: 2px;
}

/* ═══════════ HERO AUDIENCE ═══════════ */
.hero-audience {
  font-size: 0.8125rem;
  color: var(--t2);
  max-width: 540px;
  margin-bottom: 0;
}

/* ═══════════ CATEGORY SHIFT ECONOMICS LINE ═══════════ */
.category-shift-econ {
  font-size: .9375rem;
  font-weight: 400;
  color: var(--t2);
  line-height: 1.55;
  margin: 16px 0 24px;
}

/* ═══════════ FRONTIER DEMO (knowledge compression visual) ═══════════ */
.rc-demo { width: 100%; max-width: 540px; margin: 40px auto 0; }
.rc-demo-panels {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: center;
}
.rc-panel-raw { text-align: left; }
.rc-panel-core { text-align: left; }
.rc-panel-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}
.rc-panel-raw .rc-panel-label { color: var(--t3); }
.rc-panel-core .rc-panel-label { color: var(--purple); opacity: .7; }

/* Abstract document stack */
.rc-doc-stack { position: relative; height: 180px; width: 100%; }
.rc-doc {
  position: absolute;
  width: 85%;
  height: 120px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 6px;
  padding: 12px 14px;
  overflow: hidden;
}
.rc-doc::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(transparent, var(--surface));
}
.rc-doc:nth-child(1) { top: 0; left: 0; z-index: 3; }
.rc-doc:nth-child(2) { top: 8px; left: 8px; z-index: 2; opacity: .7; }
.rc-doc:nth-child(3) { top: 16px; left: 16px; z-index: 1; opacity: .4; }
.rc-doc:nth-child(4) { top: 24px; left: 24px; z-index: 0; opacity: .2; }
.rc-lines { display: flex; flex-direction: column; gap: 5px; }
.rc-line { height: 3px; background: var(--border); border-radius: 1.5px; }
.rc-line:nth-child(1) { width: 90%; }
.rc-line:nth-child(2) { width: 75%; }
.rc-line:nth-child(3) { width: 85%; }
.rc-line:nth-child(4) { width: 60%; }
.rc-line:nth-child(5) { width: 80%; }
.rc-line:nth-child(6) { width: 70%; }
.rc-line:nth-child(7) { width: 55%; }
.rc-line:nth-child(8) { width: 88%; }
.rc-raw-note { font-size: .5625rem; color: var(--t3); letter-spacing: .02em; margin-top: 8px; }

/* Center arrow */
.rc-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
}
.rc-arrow-line {
  width: 32px;
  height: 1px;
  background: var(--border);
  position: relative;
}
.rc-arrow-line::after {
  content: "";
  position: absolute;
  right: -1px; top: -3px;
  width: 0; height: 0;
  border-left: 5px solid var(--border);
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
}
.rc-arrow-stat {
  font-size: .5625rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: .03em;
  white-space: nowrap;
}

/* Knowledge graph */
.rc-graph-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 85%;
}
.rc-graph-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.rc-graph-svg line {
  stroke: rgba(88,86,214,.2);
  stroke-width: 1.5;
  stroke-linecap: round;
}
.rc-node {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.rc-node--hub { width: 14px; height: 14px; }
.rc-node-entity   { background: #EEEDFC; box-shadow: 0 0 6px rgba(88,86,214,.25); }
.rc-node-rule     { background: #E8F8EC; box-shadow: 0 0 6px rgba(52,199,89,.25); }
.rc-node-relation { background: #E8F1FC; box-shadow: 0 0 6px rgba(0,113,227,.2); }

.rc-core-stat { font-size: .6875rem; font-weight: 500; margin-top: 8px; }
.rc-core-stat strong { font-weight: 600; color: var(--purple); }
.rc-core-note { font-size: .5625rem; color: var(--purple); opacity: .6; letter-spacing: .02em; margin-top: 4px; }

/* ═══════════ EVIDENCE SECTION ═══════════ */

/* Technology row — two columns */
.ev-tech-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.ev-tech-col {
  background: var(--surface);
  border-radius: 12px;
  padding: 18px 20px;
}
.ev-tech-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.ev-tech-desc {
  font-size: 0.75rem;
  color: var(--t3);
  line-height: 1.4;
  margin-bottom: 14px;
}
.ev-tech-metric {
  margin-bottom: 10px;
}
.ev-tech-metric:last-child {
  margin-bottom: 0;
}
.ev-tech-value {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}
.ev-tech-label {
  font-size: 0.6875rem;
  color: var(--t2);
  line-height: 1.35;
}

/* Evidence hero card — full-width */
.ev-tech-col--hero {
  grid-column: 1 / -1;
}
.ev-tech-col--hero .ev-tech-value {
  font-size: 1.75rem;
}

/* Comparison bar group */
.ev-compare { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ev-compare:last-child { margin-bottom: 0; }
.ev-compare-label { font-size: 0.6875rem; color: var(--t2); line-height: 1.35; margin-bottom: 6px; }

/* Scenario comparison (evidence hero) */
.ev-scenario-compare { margin-bottom: 14px; }

.ev-scenario-query {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.ev-scenario-q-icon { color: var(--t3); flex-shrink: 0; }
.ev-scenario-q-text {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--t1);
  line-height: 1.35;
}

.ev-scenario-act { margin-bottom: 10px; }
.ev-scenario-act-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.ev-scenario-act--std .ev-scenario-act-label { color: var(--t3); }
.ev-scenario-act--rc .ev-scenario-act-label { color: var(--purple); }

.ev-scenario-files {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.ev-scenario-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 6px;
}
.ev-scenario-file svg { flex-shrink: 0; }
.ev-scenario-file-name {
  font-size: 0.625rem;
  color: var(--t2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.ev-scenario-file-tokens {
  font-size: 0.5rem;
  font-weight: 600;
  color: #c46a0a;
  white-space: nowrap;
  margin-left: auto;
  font-variant-numeric: tabular-nums;
}

.ev-scenario-token-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.ev-scenario-token-bar {
  flex: 1;
  height: 6px;
  background: rgba(0,0,0,0.04);
  border-radius: 3px;
  overflow: hidden;
}
.ev-scenario-token-fill {
  height: 100%;
  border-radius: 3px;
  transform-origin: left;
}
.ev-scenario-token-fill--std {
  width: 100%;
  background: linear-gradient(90deg, #e8820a, #d4580a);
  opacity: 0.7;
}
.ev-scenario-token-fill--rc {
  width: 1.2%;
  min-width: 4px;
  background: var(--purple);
}
.ev-scenario-token-count {
  font-size: 0.625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--t2);
  white-space: nowrap;
}
.ev-scenario-act--std .ev-scenario-token-count { color: #c46a0a; }
.ev-scenario-act--std .ev-scenario-token-unit { color: #c46a0a; }
.ev-scenario-token-count--rc { color: var(--purple); }
.ev-scenario-token-unit {
  font-size: 0.5625rem;
  color: var(--t3);
}

.ev-scenario-pain {
  font-size: 0.5625rem;
  color: #b05a08;
  letter-spacing: .01em;
  margin-bottom: 2px;
}

.ev-scenario-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
}
.ev-scenario-divider::before,
.ev-scenario-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--divider);
}
.ev-scenario-divider span {
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--t3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ev-scenario-node-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ev-scenario-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(88,86,214,0.06);
  border: 1px solid rgba(88,86,214,0.2);
  border-radius: 6px;
  font-size: 0.5625rem;
  font-weight: 600;
  color: var(--purple);
}
.ev-scenario-helper {
  font-size: 0.5625rem;
  color: var(--purple);
  letter-spacing: .01em;
}

/* Dot score */
.ev-dots { display: flex; gap: 4px; flex-wrap: nowrap; align-items: center; margin-bottom: 4px; }
.ev-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--purple); opacity: 0; flex-shrink: 0; }

/* Metrics horizontal layout */
.ev-metrics-row { display: flex; gap: 24px; margin-top: 4px; }

/* ── Compression section ── */
.cmp-bar-section { margin-top: 16px; }

.cmp-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.cmp-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(0,0,0,.04);
  border-radius: 4px;
  overflow: hidden;
}

.cmp-bar-fill {
  height: 100%;
  border-radius: 4px;
  transform-origin: left;
}

.cmp-bar-fill--source {
  width: 100%;
  background: linear-gradient(90deg, rgba(255,149,0,.5), rgba(255,149,0,.25));
}

.cmp-bar-fill--output {
  width: 0.03%;
  min-width: 3px;
  background: var(--purple);
}

.cmp-bar-label {
  font-size: .625rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--t2);
  white-space: nowrap;
  min-width: 48px;
}

.cmp-bar-label--output { color: var(--purple); }

.cmp-bar-pct {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--purple);
}

.cmp-grid-label {
  font-size: .5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--t3);
  margin-bottom: 6px;
}

.cmp-core-size {
  display: block;
  font-size: .5625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--purple);
  opacity: .8;
  margin-top: 2px;
}

.cmp-stat-grid { margin-top: 16px; }

#compression .rc-doc-stack { height: 152px; }
#compression .rc-demo-panels { align-items: stretch; gap: 0 24px; }
#compression .rc-arrow { justify-content: center; position: relative; }
#compression .rc-arrow-stat { position: absolute; bottom: calc(50% + 6px); left: 50%; transform: translateX(-50%); }
#compression .rc-raw-note { color: var(--t2); }

.cmp-left-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  gap: 0 10px;
}
.cmp-left-grid .rc-panel-label { grid-column: 1; }
.cmp-left-grid .rc-doc-stack { grid-column: 1; align-self: center; }
.cmp-left-grid .rc-raw-note { grid-column: 2; grid-row: 2; align-self: center; margin-top: -12px; }

.cmp-right-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  gap: 0 20px;
}
.cmp-right-grid .rc-panel-label { grid-column: 2; }
.cmp-right-grid .cmp-output-meta { grid-column: 1; grid-row: 2; align-self: center; margin-top: -12px; }
.cmp-right-grid > div:last-child { grid-column: 2; grid-row: 2; align-self: center; }

.cmp-output-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* Production label */
.ev-prod-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}

/* Production cards */
.ev-prod-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.ev-prod-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 18px 20px;
}
.ev-prod-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--t2);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 12px;
}
.ev-prod-desc {
  font-size: 0.75rem;
  color: var(--t3);
  line-height: 1.4;
}
.ev-prod-transfers {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ev-prod-transfer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--t2);
  line-height: 1.3;
}
.ev-transfer-from {
  font-weight: 600;
  color: var(--t1);
}
.ev-transfer-arrow {
  color: var(--purple);
  opacity: .6;
  flex-shrink: 0;
}
.ev-transfer-to {
  color: var(--t3);
}

/* Stat grid (inside production cards) */
.ev-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ev-stat {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.ev-stat-value {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--t1);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}
.ev-stat-label {
  font-size: 0.625rem;
  color: var(--t2);
  line-height: 1.35;
}

/* ═══════════ CASE STUDY: MindSim ═══════════ */

/* Timeline container */
.cs-timeline {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
}

/* Act card */
.cs-act {
  background: var(--surface);
  border-radius: 16px;
  padding: 24px 28px 20px;
  margin-bottom: 16px;
}

/* Connecting hairline between acts */
.cs-act + .cs-act {
  position: relative;
}
.cs-act + .cs-act::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 16px;
  background: var(--divider);
}

/* Act header: number pill + title */
.cs-act-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.cs-act-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 20px;
  font-size: .6875rem;
  font-weight: 700;
  color: var(--purple);
  background: rgba(88,86,214,.08);
  border-radius: 10px;
  letter-spacing: .02em;
}
.cs-act-title {
  font-size: .9375rem;
  font-weight: 600;
  color: var(--t1);
}

/* 3-column grid: input | process | output */
.cs-act-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0;
}

/* Input + output columns */
.cs-input,
.cs-output {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Document icon + label */
.cs-doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.cs-doc-svg {
  display: block;
}
.cs-doc-label {
  font-size: .6875rem;
  font-weight: 500;
  color: var(--t2);
  letter-spacing: .01em;
}

/* Process arrow column */
.cs-process {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
}
.cs-arrow-line {
  width: 48px;
  height: 1px;
  background: var(--border);
  position: relative;
  transform-origin: left;
}
.cs-arrow-line::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -3px;
  width: 0;
  height: 0;
  border-left: 5px solid var(--border);
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
}
.cs-process-label {
  font-size: .5625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--purple);
  opacity: .7;
  white-space: nowrap;
}

/* 4x4 core grid */
.cs-core-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 72px;
  height: 72px;
  gap: 4px;
}

/* Cell states */
.cs-cell {
  border-radius: 3px;
}
.cs-cell--new {
  background: var(--purple);
}
.cs-cell--stable {
  background: rgba(88,86,214,.12);
  border: 1px solid rgba(88,86,214,.08);
}
.cs-cell--changed {
  background: var(--purple);
}

/* Core label below grid */
.cs-core-label {
  font-size: .5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--purple);
  opacity: .6;
}
.cs-core-sublabel {
  font-size: .5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--purple);
  opacity: .38;
  white-space: nowrap;
}

/* Stat row below each act */
.cs-act-stat {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
}
.cs-stat-value {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.cs-stat-desc {
  font-size: .75rem;
  color: var(--t2);
}
.cs-act-desc {
  font-size: .8125rem;
  color: var(--t2);
  line-height: 1.6;
  margin: 0;
}

/* Case study testimonials */
.cs-testimonial {
  border-left: none;
  background: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
}
.cs-testimonials {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(88,86,214,.08);
}
.cs-testimonial {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 350ms var(--apple-ease), transform 350ms var(--apple-ease);
  transition-delay: var(--d, 0ms);
}
.is-visible .cs-testimonial {
  opacity: 1;
  transform: translateY(0);
}
.cs-testimonial p {
  font-size: .8125rem;
  font-style: italic;
  color: var(--t1);
  line-height: 1.55;
  margin: 0 0 6px;
}
.cs-testimonial cite {
  display: block;
  font-size: .6875rem;
  font-style: normal;
  font-weight: 600;
  color: var(--t3);
  letter-spacing: .01em;
}

/* Token size labels on input/output */
.cs-doc-tokens,
.cs-core-tokens {
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.cs-doc-tokens {
  color: var(--t2);
}
.cs-core-tokens {
  color: var(--purple);
  opacity: .7;
}

/* Act 3 — tally labels beneath core token count */
.cs-loop-tally {
  display: block;
  font-size: .5625rem;
  font-weight: 500;
  color: var(--t3);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  line-height: 1.5;
}

/* Act 3 — cycling transcript carousel */
.cs-loop-carousel {
  position: relative;
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-loop-frame {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.cs-loop-name {
  font-size: .625rem;
  font-weight: 500;
  color: var(--t2);
  white-space: nowrap;
}
.cs-loop-tokens {
  font-size: .5625rem;
  font-weight: 600;
  color: var(--t3);
  font-variant-numeric: tabular-nums;
}

/* Delta badges between arrow and core */
.cs-loop-deltas {
  position: relative;
  height: 16px;
  margin-top: 4px;
}
.cs-loop-delta {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: .625rem;
  font-weight: 600;
  color: var(--purple);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Infinity symbol finale */
.cs-infinity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 0 4px;
}
.cs-infinity-icon {
  font-size: 2rem;
  color: var(--purple);
  line-height: 1;
}
.cs-infinity-text {
  font-size: .75rem;
  color: var(--t2);
  text-align: center;
}

/* ═══════════ PORTABILITY PAGE (hub-and-spoke) ═══════════ */
.cs-port-hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 28px;
}
.cs-port-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
}
.cs-port-grid--hub {
  width: 72px;
  height: 72px;
}
.cs-port-grid--mini {
  width: 40px;
  height: 40px;
  gap: 2px;
}
.cs-port-grid--mini .cs-cell {
  border-radius: 2px;
}
.cs-port-size {
  font-size: .625rem;
  font-weight: 600;
  color: var(--purple);
  opacity: .7;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* SVG connection lines */
.cs-port-lines {
  width: 100%;
  max-width: 540px;
  height: 100px;
  margin: -8px auto -12px;
}
.cs-port-line {
  stroke: rgba(88,86,214,.2);
  stroke-width: 1.5;
  stroke-linecap: round;
  fill: none;
}
/* Spoke cards */
.cs-port-spokes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 540px;
  width: 100%;
}
.cs-port-spoke {
  background: var(--surface);
  border-radius: 16px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.cs-port-spoke-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(88,86,214,.06);
  border-radius: 10px;
}
.cs-port-spoke-title {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--t1);
}
.cs-port-spoke-desc {
  font-size: .75rem;
  color: var(--t2);
  line-height: 1.45;
}
/* Self-update bar */
.cs-port-update {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
}
.cs-port-update-text {
  font-size: .6875rem;
  font-weight: 500;
  color: var(--t2);
}
/* Tagline */
.cs-port-tagline {
  text-align: center;
  margin-top: 16px;
}
.cs-port-tagline-text {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--t2);
}

/* ═══════════ RUNS ANYWHERE PAGE ═══════════ */
.ra-container { max-width: 540px; margin: 0 auto; }
.ra-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 28px;
}
.ra-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
}
.ra-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(88,86,214,.06);
  border-radius: 10px;
  margin-bottom: 12px;
}
.ra-card-name {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--t1);
  margin-bottom: 4px;
}
.ra-card-desc {
  font-size: .6875rem;
  color: var(--t2);
  line-height: 1.5;
  margin-bottom: 14px;
}
.ra-card-envs {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
}
.ra-card-env {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .625rem;
  font-weight: 500;
  color: var(--t1);
  line-height: 1;
}
.ra-card-env svg {
  flex-shrink: 0;
}

/* ═══════════ EVIDENCE COST GRAPH ═══════════ */
.ev-graph {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--divider);
}
.ev-graph-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--t3);
  margin-bottom: 8px;
}
.ev-graph-chart {
  position: relative;
  width: 100%;
  height: 160px;
}
.ev-graph-svg {
  width: 100%;
  height: 100%;
}
.ev-graph-line-std {
  stroke: #e8820a;
  stroke-width: 2;
  fill: none;
}
.ev-graph-line-rc {
  stroke: var(--purple);
  stroke-width: 2;
  fill: none;
}
.ev-graph-area-std { fill: rgba(232,130,10,.08); }
.ev-graph-area-rc  { fill: rgba(88,86,214,.06); }
.ev-graph-x-labels {
  display: flex;
  justify-content: space-between;
  padding: 4px 7.5% 0;
  font-size: .5625rem;
  color: var(--t3);
  font-variant-numeric: tabular-nums;
}
.ev-graph-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}
.ev-graph-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .5625rem;
  color: var(--t2);
}
.ev-graph-legend-swatch {
  width: 12px;
  height: 2px;
  border-radius: 1px;
}
.ev-graph-legend-swatch--std { background: #e8820a; }
.ev-graph-legend-swatch--rc  { background: var(--purple); }
.ev-graph-savings {
  text-align: center;
  margin-top: 10px;
}
.ev-graph-savings-value {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.ev-graph-savings-label {
  font-size: .625rem;
  color: var(--t2);
  margin-top: 2px;
}

/* ═══════════ CLOSING PAGE (mic-drop ending) ═══════════ */
.closing-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(88,86,214,.06) 0%, transparent 70%);
  z-index: -1;
}
.closing-page .page-inner {
  justify-content: center;
}
.closing-inner {
  text-align: center;
  max-width: 600px;
  width: 100%;
}
.closing-acts {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin: 32px 0 40px;
}
.closing-act {
  flex: 1;
  max-width: 200px;
  text-align: left;
}
.closing-act-name {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--purple);
  margin-bottom: 8px;
}
.closing-act-desc {
  font-size: 0.8125rem;
  color: var(--t1);
  line-height: 1.5;
  margin-bottom: 8px;
}
.closing-act-proof {
  font-size: 0.6875rem;
  color: var(--t2);
  line-height: 1.4;
  font-style: italic;
}
.closing-punchline {
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--t1);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.45;
}
.closing-essay-link {
  display: inline-block;
  margin-top: 24px;
  font-size: .875rem;
  color: var(--t3);
  text-decoration: none;
  letter-spacing: .01em;
}
.closing-essay-link:hover { color: var(--purple); }
.closing-divider {
  width: 48px;
  height: 1px;
  background: var(--divider);
  margin: 32px auto 0;
}
.closing-conf-footer {
  border-top: none;
  margin-top: 20px;
  padding-top: 0;
}

/* ═══════════ NARRATIVE ARC TAG ═══════════ */
.arc-tag {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  font-size: .5625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--purple);
  background: rgba(88, 86, 214, .06);
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 10px;
}

/* ═══════════ RESPONSIVE BASE ═══════════ */
@media (max-width: 640px) {
  h2 { font-size: 1.5rem; }
  h3.lv { font-size: 1.25rem; }
  .category-shift-hero { font-size: 1.75rem; }
  .category-shift-sub { font-size: .9375rem; }

  /* Frontier demo responsive */
  .rc-demo-panels { grid-template-columns: 1fr; gap: 8px; }
  .rc-arrow { flex-direction: row; padding: 8px 0; justify-content: center; }
  .rc-arrow-line { width: 1px; height: 24px; }
  .rc-arrow-line::after {
    right: auto; top: auto; bottom: -1px; left: -3px;
    border-left: 3.5px solid transparent; border-right: 3.5px solid transparent;
    border-top: 5px solid var(--border); border-bottom: none;
  }
  .rc-doc-stack { height: 150px; }
  .rc-doc { height: 100px; width: 80%; }
  .rc-node { width: 8px; height: 8px; }
  .rc-node--hub { width: 11px; height: 11px; }

  /* Evidence responsive */
  .ev-tech-row { grid-template-columns: 1fr; }
  .ev-tech-col { padding: 14px 16px; }
  .ev-tech-value { font-size: 1.125rem; }
  .ev-tech-col--hero .ev-tech-value { font-size: 1.375rem; }
  .ev-scenario-files { grid-template-columns: repeat(2, 1fr); }
  .ev-scenario-file svg { width: 14px; height: 18px; }
  .ev-scenario-file-name { font-size: 0.5625rem; }
  .ev-scenario-file-tokens { font-size: 0.4375rem; }
  .ev-scenario-q-text { font-size: 0.75rem; }
  .ev-scenario-node-row { flex-wrap: wrap; }
  .ev-dots { gap: 3px; }
  .ev-dot { width: 4px; height: 4px; }
  .ev-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .ev-stat { padding: 8px 6px; }
  .ev-stat-value { font-size: 1rem; }
  .ev-prod-card { padding: 14px 16px; }

  /* Runs Anywhere responsive */
  .ra-grid { grid-template-columns: 1fr; max-width: 300px; margin: 0 auto; }
  .arc-tag { font-size: .5rem; padding: 2px 8px; }

  /* Evidence graph responsive */
  .ev-graph-chart { height: 120px; }

  /* Portability responsive */
  .cs-port-spokes { grid-template-columns: 1fr; max-width: 300px; }
  .cs-port-lines { display: none; }
  .cs-port-center::after {
    content: "";
    display: block;
    width: 1px;
    height: 24px;
    background: var(--divider);
    margin-top: 4px;
  }

  /* Case study responsive */
  .cs-act { padding: 18px 20px 16px; }
  .cs-act-row { grid-template-columns: 1fr; gap: 12px; justify-items: center; }
  .cs-arrow-line {
    width: 1px;
    height: 24px;
    transform-origin: top;
  }
  .cs-arrow-line::after {
    right: auto; top: auto;
    bottom: -1px; left: -3px;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 5px solid var(--border);
    border-bottom: none;
  }
  .cs-core-grid { width: 64px; height: 64px; }
  .cs-core-sublabel { font-size: .4375rem; }

  /* Compression section responsive */
  .cmp-bar-label { font-size: .5625rem; min-width: 40px; }
  .cmp-bar-pct { font-size: .5rem; }
  .cmp-grid-label { font-size: .5rem; }

  /* Closing page responsive */
  .closing-acts { gap: 16px; flex-direction: column; align-items: center; }
  .closing-act { max-width: 300px; text-align: center; }
  .closing-act-name { font-size: 1.25rem; }
  .closing-act-desc { font-size: 0.75rem; }
  .closing-act-proof { font-size: 0.625rem; }
  .closing-punchline { font-size: 1.0625rem; }
}

/* ═══════════ MOBILE MINIMUM FONT SIZES ═══════════ */
@media (max-width: 768px) {
  .conf-footer span,
  .tl-legend,
  .ex0-prompt-attach-meta,
  .ex0-compose-attach,
  .ex-response-label,
  .ex-tl-times span,
  .pl-axis-labels,
  .br-axis-labels span,
  .pl-bar,
  .br-bar,
  .cw-bar,
  .cw-plan { font-size: .6875rem; }

  .tl-label,
  .ladder-label,
  .pl-name,
  .br-name { overflow: hidden; text-overflow: ellipsis; }

  .tw { overscroll-behavior-x: contain; }
}

/* ═══════════ REDUCED MOTION ═══════════ */
@media (prefers-reduced-motion: reduce) {
  .cs-testimonial {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
