:root {
  --navy: #101928; --navy-deep: #0b1420; --ink: #182638; --muted: #5a687c;
  --blue: #aabefb; --deep-blue: #314f90; --copper: #ffb08a; --warm: #9b4d2e;
  --paper: #f2f4f8; --light: #f7f8fb; --line: #d1d9e8;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--navy); color: var(--ink); font: 1rem/1.58 var(--sans); }
a { color: inherit; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
button:disabled, select:disabled, input:disabled { opacity: .55; cursor: default; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #ed8d62; outline-offset: 4px; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 1.15rem; }
.shell { width: min(100% - 3rem, 1180px); margin-inline: auto; }
.skip { position: fixed; z-index: 20; left: 1rem; top: 1rem; transform: translateY(-200%); color: white; background: var(--navy); padding: .6rem 1rem; border-radius: .25rem; }
.skip:focus { transform: none; }
.site-header { background: var(--navy-deep); color: #edf1ff; border-bottom: 1px solid #293650; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; min-height: 4.35rem; }
.brand { display: inline-flex; align-items: center; gap: .56rem; text-decoration: none; white-space: nowrap; font: 750 .8rem/1.25 var(--mono); letter-spacing: .08em; }
.brand img { flex: none; }
.brand span { color: #aab9d9; font-weight: 450; font-size: .66rem; letter-spacing: .015em; }
.nav nav { display: flex; align-items: center; flex-wrap: wrap; gap: .9rem 1.3rem; font-size: .81rem; }
.nav nav a { color: #c5d0e6; text-decoration: none; }
.nav nav a:hover { color: white; }
.source { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; color: #e7edff; border: 1px solid #43516a; border-radius: .36rem; padding: .34rem .65rem; text-decoration: none; white-space: nowrap; }
.source span { color: var(--blue); }
.hero { position: relative; isolation: isolate; overflow: hidden; color: #eef1fb; background: radial-gradient(ellipse at 74% 20%, #263956 0, #162137 53%, var(--navy-deep) 100%); }
.hero::before { content: ""; pointer-events: none; position: absolute; inset: 0; z-index: -1; opacity: .45; background-image: linear-gradient(90deg,#90a6d312 1px,transparent 1px), linear-gradient(#90a6d312 1px,transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(90deg, transparent, #000 76%); }
.hero-grid { display: grid; grid-template-columns: 1.06fr 1fr; align-items: center; gap: clamp(1.8rem, 5.8vw, 5rem); padding-block: clamp(3.25rem, 7.5vw, 6.2rem) 3.3rem; }
.hero-copy h1, .section-intro h2, .handbook-cta h2 { font: 450 clamp(3.5rem, 7vw, 6.45rem)/.94 var(--serif); letter-spacing: -.075em; margin: .75rem 0 1.3rem; }
.hero-copy h1 em { display: block; color: var(--blue); font-weight: 450; }
.hero-copy > p:not(.kicker) { max-width: 49ch; color: #c6d1e8; font-size: clamp(1rem, 1.25vw, 1.16rem); margin: 0; }
.kicker, .micro { font: 740 .71rem/1.4 var(--mono); letter-spacing: .105em; margin: 0; }
.kicker { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .56rem; color: #b9c9e8; }
.kicker span { color: #798fb6; }
.kicker i { width: .43rem; height: .43rem; border-radius: 50%; background: var(--copper); }
.actions { display: flex; gap: .9rem 1.3rem; align-items: center; flex-wrap: wrap; margin-top: 1.55rem; }
.button { border: 1px solid transparent; border-radius: .38rem; font: 720 .86rem/1.3 var(--sans); min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; padding: .55rem .85rem; gap: .55rem; text-decoration: none; white-space: nowrap; transition: background-color .2s ease, border-color .2s ease; }
.button.primary { background: var(--blue); color: #101c32; }
.button.primary:hover { background: #c7d4ff; }
.button.dark-ghost { color: #dce6ff; border-color: #596c8c; background: #223149; }
.button.dark-ghost:hover { border-color: var(--blue); }
.text-link { font-weight: 650; font-size: .84rem; text-underline-offset: 4px; }
.hero-chart { margin: 0; background: #111b2d; border: 1px solid #4c5d7c; border-radius: .75rem; box-shadow: 0 24px 52px #070e1d70; overflow: hidden; }
.hero-chart-top { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid #34435b; color: #b9c9e8; font: .69rem/1.2 var(--mono); letter-spacing: .08em; }
.hero-chart-top i { display: inline-block; width: .38rem; height: .38rem; border-radius: 50%; margin-right: .35rem; background: var(--blue); vertical-align: .06rem; }
.hero-chart svg, .replay-graphs svg, .gap-card svg { display: block; width: 100%; height: auto; }
.hero-chart figcaption, .gap-card figcaption { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding: .1rem 1rem .95rem; color: #d0daf0; font-size: .77rem; }
.hero-chart figcaption > span, .gap-card figcaption > span, .replay-graphs figcaption > span { display: inline-flex; align-items: center; gap: .42rem; }
.hero-chart figcaption > span:last-child { color: #b4c5e7; margin-left: auto; font: .65rem/1.4 var(--mono); }
.swatch { display: inline-block; width: 1rem; height: 0; border-top: 2px solid; }
.swatch.base { color: #d0daf0; border-top-style: dashed; }
.swatch.eve { color: var(--blue); }
.swatch.nii { color: var(--copper); }
.hero-metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin-block: 0; border-top: 1px solid #485a77; padding-block: .9rem 1.2rem; }
.hero-metrics > div, .metrics-row > div { min-width: 0; padding: .72rem .9rem .72rem 1.15rem; border-left: 1px solid #46536e; }
.hero-metrics > div:first-child, .metrics-row > div:first-child { border-left: 0; padding-left: 0; }
.hero-metrics dt, .metrics-row dt { font: 720 .67rem/1.4 var(--mono); letter-spacing: .065em; color: #b8c7e5; }
.hero-metrics dd, .metrics-row dd { margin: .25rem 0 .06rem; font-size: clamp(1.27rem, 2.9vw, 2.15rem); line-height: 1.2; font-weight: 710; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hero-metrics div > span, .metrics-row div > span { display: block; font-size: .77rem; color: #bac6df; }
.band { padding-block: clamp(3.3rem, 6.7vw, 5.4rem); }
.paper { background: var(--paper); }
.blue-band { background: #e4eaf6; }
.method { background: #e9edf5; }
.section-intro { display: grid; grid-template-columns: minmax(155px, .31fr) 1fr; align-items: start; gap: .7rem 1.3rem; margin-bottom: 1.85rem; }
.section-intro > .kicker { margin-top: .55rem; color: #46608d; }
.section-intro h2, .handbook-cta h2 { font-size: clamp(2.5rem, 5vw, 4.55rem); margin: 0 0 .65rem; }
.section-intro div > p { max-width: 68ch; color: var(--muted); margin: 0; }
.desk-grid { display: grid; grid-template-columns: minmax(235px,.41fr) minmax(0,1fr); align-items: start; gap: 1rem; }
.ticket { padding: clamp(1rem, 2.1vw, 1.45rem); background: #fcfdff; border: 1px solid var(--line); border-radius: .72rem; min-width: 0; }
.ticket-top, .replay-top, .figure-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .65rem; }
.ticket-top { margin-bottom: 1rem; }
.ticket .micro, .figure-head .micro { color: #4e6594; }
.ticket h3, .replay h3, .gap-card h3, .products-grid h3, .method-grid h3 { margin: .3rem 0 0; font: 500 1.8rem/.99 var(--serif); letter-spacing: -.05em; }
.ticket-mark { color: #536ba0; background: #e8edf9; border-radius: .38rem; padding: .18rem .43rem; }
.ticket label { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; font-size: .87rem; font-weight: 690; }
.ticket select { width: 100%; margin-top: .31rem; padding: .5rem .56rem; color: var(--ink); border: 1px solid #9eaed0; background: #f2f5fc; border-radius: .37rem; }
.range-field { margin-top: .89rem; }
.ticket output { font: 680 .75rem/1.4 var(--mono); color: #354f89; white-space: nowrap; }
input[type="range"] { width: 100%; margin: .35rem 0 .1rem; display: block; accent-color: #5675b5; cursor: pointer; }
.range-hints { display: flex; justify-content: space-between; gap: .4rem; font: .65rem/1.3 var(--mono); color: #596b8a; margin-top: .15rem; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.button.run { background: #293f70; color: white; }
.button.run:hover { background: #3d5590; }
.button.sample { background: #edf1fb; color: #293f70; border-color: #b8c5e1; }
.button.sample:hover { border-color: #687eac; }
.fine, .method-aside { font-size: .82rem; color: #58677b; line-height: 1.55; }
.fine { margin: .9rem 0 0; }
.method-aside { max-width: 82ch; margin: .8rem 0 0; }
.replay { border-radius: .72rem; overflow: hidden; border: 1px solid #455a7a; background: #182437; color: #e9eefc; min-width: 0; }
.replay-top { padding: 1.05rem clamp(.9rem, 2.6vw, 1.5rem) .55rem; align-items: flex-start; flex-wrap: wrap; }
.replay-top .micro { color: #b4c3e4; }
.clock { display: flex; align-items: center; gap: .5rem; background: #243450; border: 1px solid #4c6184; border-radius: .4rem; padding: .4rem .58rem; color: #f0f4ff; }
.clock i { flex: none; width: .39rem; height: .39rem; border-radius: 50%; background: #9aaccd; }
.replay:has(#replay-play[aria-pressed="true"]) .clock i { background: var(--copper); animation: pulse 1.4s ease-out infinite; }
@keyframes pulse { from { box-shadow: 0 0 0 0 #ffb08a70; } to { box-shadow: 0 0 0 7px #ffb08a00; } }
.clock strong, .clock span { display: block; font: .72rem/1.38 var(--mono); white-space: nowrap; }
.clock strong { font-weight: 760; }
.clock span { color: #b7c8e6; font-size: .64rem; }
.replay-case { color: #b8c7e4; font: .74rem/1.5 var(--mono); padding: 0 clamp(.9rem, 2.6vw, 1.5rem) .6rem; }
.mode-rail { display: flex; align-items: center; gap: .65rem; padding: .22rem clamp(.9rem, 2.6vw, 1.5rem) .72rem; color: #bfcde9; font-size: .78rem; }
.segments { display: inline-flex; border: 1px solid #526689; border-radius: .34rem; padding: .12rem; gap: .12rem; background: #111c2d; }
.segments button { padding: .2rem .65rem; border: 0; border-radius: .25rem; font-size: .77rem; color: #d4e0f9; background: transparent; }
.segments button[aria-pressed="true"] { background: #aabefb; color: #10203a; font-weight: 760; }
.replay-graphs { border-block: 1px solid #354767; background: #111b2e; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.replay-graphs figure { margin: 0; min-width: 0; }
.replay-graphs figure + figure { border-left: 1px solid #354767; }
.replay-graphs figcaption { padding: .7rem .8rem 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem .55rem; color: #e9eeff; font-size: .77rem; }
.replay-graphs figcaption strong { font: 710 .9rem/1.2 var(--mono); white-space: nowrap; }
.replay-graphs figcaption span { font-weight: 650; }
#live-eve { color: var(--blue); }
#live-nii { color: var(--copper); }
.transport { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: .75rem 1rem; padding: .85rem clamp(.9rem, 2.6vw, 1.5rem) .45rem; }
.transport-buttons { display: flex; flex-wrap: wrap; align-items: end; gap: .35rem; }
.transport-buttons .button { min-height: 2.35rem; padding-inline: .65rem; font-size: .77rem; }
#replay-play { min-width: 4.6rem; }
.speed { display: grid; gap: .15rem; color: #c2cdec; font: .67rem/1.2 var(--mono); }
.speed select { min-height: 2.1rem; border: 1px solid #617594; border-radius: .32rem; color: #eaf0ff; background: #273955; padding: .2rem .34rem; color-scheme: dark; }
.scrub { min-width: 0; }
.scrub .range-hints { color: #aebee0; }
#replay-scrub { accent-color: var(--blue); }
#replay-status { min-height: 1.8rem; margin: 0; padding: .15rem clamp(.9rem, 2.6vw, 1.5rem) .68rem; color: #c6d1e9; font-size: .76rem; }
.chart-axis { fill: #5b6d89; font: 13px var(--mono); font-variant-numeric: tabular-nums; }
.chart-grid { stroke: #d8e0ef; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-zero { stroke: #98a9c3; stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.hero-chart .chart-axis, .replay .chart-axis { fill: #becce8; }
.hero-chart .chart-grid, .replay .chart-grid { stroke: #2c3c58; }
.metrics-row { display: grid; grid-template-columns: repeat(4, 1fr); margin: 1.25rem 0 0; padding: .4rem 0; border-block: 1px solid var(--line); }
.metrics-row > div { border-color: var(--line); }
.metrics-row dt, .metrics-row div > span { color: #50617a; }
.metrics-row dd { color: #1c335a; }
.scenario-grid, .balance-grid { display: grid; grid-template-columns: minmax(235px,.46fr) minmax(0,1fr); gap: 1rem; align-items: stretch; }
.balance-grid { grid-template-columns: minmax(0,1fr) minmax(260px,.62fr); }
.outlier { min-width: 0; padding: clamp(1rem, 3vw, 1.7rem); color: #edf2ff; background: #1d2b44; border: 1px solid #455c83; border-radius: .68rem; }
.outlier .micro { color: #bac9e8; }
.outlier > strong { display: block; font: 500 clamp(2.95rem, 5vw, 4.65rem)/1.02 var(--serif); letter-spacing: -.07em; margin: .62rem 0 .72rem; }
.outlier[data-breach="true"] > strong { color: var(--copper); }
.threshold-track { height: .48rem; border-radius: 3rem; position: relative; background: #364a6e; }
.threshold-track > span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--blue); transition: width .3s ease; }
.outlier[data-breach="true"] .threshold-track > span { background: var(--copper); }
.threshold-track > i { position: absolute; width: 2px; height: .9rem; top: -.21rem; background: white; }
.threshold-caption { display: flex; justify-content: space-between; gap: .45rem; font: .71rem/1.4 var(--mono); margin-top: .55rem; }
.outlier > p:last-child { margin-bottom: 0; color: #c7d4ef; font-size: .85rem; }
.table-card, .gap-card { min-width: 0; border: 1px solid var(--line); border-radius: .68rem; background: #fcfdff; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: .83rem; }
caption { padding: .7rem .85rem; text-align: left; color: #556b93; font: 720 .69rem/1.4 var(--mono); letter-spacing: .035em; }
th, td { padding: .57rem .65rem; border-top: 1px solid #e0e6f1; text-align: left; }
thead th { color: #495e82; background: #f0f3f9; font-size: .72rem; font-weight: 750; }
tbody th { font-weight: 680; }
th:not(:first-child), td:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child { border-bottom: 0; }
tbody tr[data-current="true"] { background: #edf1ff; }
td[data-negative="true"] { color: #964d32; font-weight: 730; }
.screen-tag { font-size: .7rem; font-weight: 760; padding: .18rem .32rem; border-radius: .25rem; color: #2e5369; background: #e6eef8; white-space: nowrap; }
.screen-tag[data-breach="true"] { color: #8b4026; background: #f9e4d8; }
.gap-card { margin: 0; padding: .9rem .8rem .24rem; }
.gap-card .figure-head { padding-inline: .22rem; }
.gap-card .figure-head > span { color: #617596; font: .68rem/1.4 var(--mono); white-space: nowrap; }
.gap-card figcaption { padding: 0 .35rem .62rem; color: #536683; }
.gap-card .swatch.eve { color: #557cbd; }
.gap-card .swatch.nii { color: #b76a4c; }
.products-grid, .method-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: 1.25rem; }
.products-grid > div, .method-grid > article { background: #fbfcff; border: 1px solid var(--line); border-radius: .6rem; padding: .95rem 1rem; }
.products-grid .micro, .method-grid .micro { color: #4b6595; }
.products-grid p:not(.micro), .method-grid p:not(.micro) { color: #55657b; font-size: .88rem; margin: .55rem 0 .25rem; }
.products-grid dl { margin: .75rem 0 0; font-size: .82rem; }
.products-grid dl div { display: flex; justify-content: space-between; gap: .5rem; border-top: 1px solid var(--line); padding: .32rem 0; }
.products-grid dd { margin: 0; color: #334c81; white-space: nowrap; font-family: var(--mono); }
.method-grid { grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0; }
.study-strip { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem; align-items: center; justify-content: space-between; padding: .9rem 0 0; margin-top: 1rem; border-top: 1px solid #c9d4e7; }
.study-strip div > span, .study-strip strong { display: block; font-size: .82rem; }
.study-strip div > span { color: var(--muted); }
.handbook-cta { background: #1a2941; color: #edf3ff; padding-block: clamp(2.3rem, 5vw, 3.4rem); }
.handbook-cta .shell, .site-footer .shell { display: flex; gap: 1rem 1.75rem; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.handbook-cta h2 { font-size: clamp(2.2rem, 4.4vw, 3.9rem); margin: .45rem 0 .6rem; }
.handbook-cta p:not(.kicker) { margin: 0; color: #bdcae6; }
.site-footer { background: #0b1420; color: #bcc9e3; padding-block: 1rem; font-size: .8rem; border-top: 1px solid #3b4a66; }
.app-error { margin: 0; padding: .75rem 1rem; color: #4d2519; background: #f9dfd0; text-align: center; }
@media (max-width: 960px) {
  .brand span { display: none; }
  .hero-grid { gap: 1.6rem; }
  .replay-graphs { grid-template-columns: 1fr; }
  .replay-graphs figure + figure { border-left: 0; border-top: 1px solid #354767; }
  .replay-graphs svg { max-height: 190px; }
}
@media (max-width: 700px) {
  .shell { width: calc(100% - 2rem); }
  .nav { flex-wrap: wrap; gap: .5rem .9rem; padding-block: .65rem; }
  .nav nav { order: 3; width: 100%; gap: .32rem .9rem; padding-top: .42rem; border-top: 1px solid #303e57; }
  .hero-grid, .section-intro, .desk-grid, .scenario-grid, .balance-grid { grid-template-columns: 1fr; }
  .hero-grid { padding-block: 2.6rem 1.45rem; }
  .hero-copy h1 { font-size: clamp(3.15rem, 10.7vw, 4.8rem); }
  .hero-metrics, .metrics-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .hero-metrics > div:nth-child(3), .metrics-row > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .hero-metrics > div:nth-child(n+3) { border-top: 1px solid #46536e; }
  .metrics-row > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .section-intro { margin-bottom: 1.22rem; }
  .section-intro > .kicker { margin-top: 0; }
  .section-intro h2 { font-size: clamp(2.45rem, 8vw, 3.7rem); }
  .method-grid { grid-template-columns: 1fr; }
  .chart-axis { font-size: 16px; }
}
@media (max-width: 410px) {
  .transport, .products-grid { grid-template-columns: 1fr; }
  .chart-axis { font-size: 18px; }
  th, td { padding: .55rem .36rem; font-size: .74rem; }
  thead th { font-size: .65rem; }
  .screen-tag { font-size: .62rem; }
  .hero-metrics > div, .metrics-row > div { padding-left: .75rem; padding-right: .35rem; }
  .replay-top h3 { font-size: 1.55rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .replay:has(#replay-play[aria-pressed="true"]) .clock i { animation: none; }
  .button, .threshold-track > span { transition: none; }
}

.ticket .scenario-label { margin-top: .89rem; }
.comparison-note { margin-top: 1rem; padding: .8rem 1rem; border: 1px solid #b6c5e5; border-left: 4px solid #5974b5; border-radius: .35rem; color: #263d68; background: #f2f5fd; font-size: .86rem; }
.comparison-note .micro { display: block; color: #425c91; margin-bottom: .24rem; }
