@font-face
{
    font-family: Space;
    src: url("./fonts/space.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
}
@font-face
{
    font-family: Source;
    src: url("./fonts/serif.woff2") format("woff2");
    font-weight: 200 900;
    font-display: swap;
}
@font-face
{
    font-family: Plex;
    src: url("./fonts/mono.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
:root
{
    --ink: #0A1222;
    --panel: #0F1A30;
    --raised: #15233F;
    --grid: #1F2E4D;
    --hairline: #2B3C61;
    --fog: #E6ECF7;
    --haze: #95A3BF;
    --paper: #F2ECDF;
    --paper-ink: #18202F;
    --paper-muted: #5A6274;
    --paper-rule: #DDD3C0;
    --signal: #34E2F2;
    --amber: #F4A93B;
    --loss: #FF6B81;
    color-scheme: dark;
    scroll-behavior: smooth;
    scroll-padding-top: 85px;
}
*
{
    box-sizing: border-box;
}
body
{
    margin: 0;
    background: var(--ink);
    color: var(--fog);
    font-family: Space, system-ui, sans-serif;
}
a
{
    color: inherit;
    text-underline-offset: 5px;
}
button, input
{
    font: inherit;
}
button, a, input
{
    -webkit-tap-highlight-color: transparent;
}
button, input, a
{
    outline-offset: 4px;
}
:focus-visible
{
    outline: 2px solid var(--signal);
}
button
{
    cursor: pointer;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: var(--ink);
    color: var(--fog);
    padding: 11px 18px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: background .15s, transform .15s;
}
button:hover, .button:hover
{
    transform: translateY(-1px);
    background: var(--raised);
}
button[aria-pressed="true"], .primary, .button.primary
{
    background: var(--signal);
    border-color: var(--signal);
    color: var(--ink);
}
button:disabled
{
    cursor: wait;
    opacity: .7;
}
svg
{
    display: block;
    width: 100%;
}
svg text
{
    fill: var(--haze);
    font-family: Plex, monospace;
    font-size: 12px;
}
svg .display
{
    font-family: Space, sans-serif;
    fill: var(--fog);
}
svg .signal
{
    fill: var(--signal);
}
svg .amber
{
    fill: var(--amber);
}
svg .papertext
{
    fill: var(--paper-ink);
}
.icon
{
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.container
{
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}
.mono, .kicker, .eyebrow
{
    font-family: Plex, monospace;
    font-size: 11px;
    line-height: 1.65;
    letter-spacing: .025em;
}
.kicker, .eyebrow
{
    color: var(--haze);
    text-transform: uppercase;
    letter-spacing: .09em;
}
.skip
{
    position: fixed;
    z-index: 100;
    left: 16px;
    top: -100px;
    padding: 14px;
    background: var(--signal);
    color: var(--ink);
}
.skip:focus
{
    top: 10px;
}
header
{
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #0a1222ed;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--hairline);
}
.header-inner
{
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand
{
    display: inline-flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 600;
}
.mark
{
    width: 25px;
    height: 25px;
    flex-shrink: 0;
}
.rail
{
    display: flex;
    flex: 1;
    max-width: 570px;
    justify-content: space-between;
}
.rail a
{
    position: relative;
    flex: 1;
    color: var(--haze);
    text-align: center;
    text-decoration: none;
    font: 10px Plex, monospace;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 8px 0;
}
.rail a::before
{
    content: "";
    display: block;
    width: 7px;
    height: 7px;
    border: 1px solid var(--hairline);
    border-radius: 50%;
    margin: 0 auto 6px;
    background: var(--ink);
    position: relative;
    z-index: 2;
}
.rail a::after
{
    content: "";
    position: absolute;
    top: 11px;
    left: 55%;
    width: 90%;
    border-top: 1px solid var(--hairline);
}
.rail a:last-child::after
{
    display: none;
}
.rail .passed::before
{
    background: var(--signal);
    border-color: var(--signal);
}
.rail [aria-current="step"]
{
    color: var(--fog);
}
.rail [aria-current="step"]::before
{
    background: var(--signal);
    border-color: var(--signal);
    border-radius: 2px;
    box-shadow: 0 0 12px #34e2f23d;
}
.timer
{
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 7px 12px;
    white-space: nowrap;
}
.timer small
{
    display: block;
    color: var(--haze);
    font: 8px Plex, monospace;
    letter-spacing: .08em;
}
.timer strong
{
    font: 14px Plex, monospace;
    font-variant-numeric: tabular-nums;
}
.mobile-stage, .header-progress
{
    display: none;
}
.hero
{
    min-height: calc(100svh - 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 55px;
}
.hero-grid
{
    display: grid;
    grid-template-columns: 5fr 6fr;
    gap: 42px;
    align-items: center;
}
.hero .kicker
{
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 20px;
}
.live-dot
{
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--signal);
}
h1
{
    font-size: clamp(48px, 5.34vw, 68px);
    line-height: 1.06;
    letter-spacing: -.035em;
    font-weight: 600;
    max-width: 11ch;
    margin: 0;
}
.hero-deck
{
    font: 20px/1.6 Source, Georgia, serif;
    color: var(--haze);
    max-width: 470px;
    margin: 24px 0 27px;
}
.actions
{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}
.button
{
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.text-link
{
    font-size: 12px;
}
.hero-note
{
    font: 10px/1.8 Plex, monospace;
    color: var(--haze);
    max-width: 390px;
    margin-top: 22px;
}
.dot-grid
{
    background-color: var(--panel);
    background-image: radial-gradient(circle, var(--grid) 1px, transparent 1px);
    background-size: 22px 22px;
}
.hero-visual
{
    border: 1px solid var(--hairline);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    background-image: radial-gradient(ellipse at 60% 48%, #34e2f213, transparent 65%), radial-gradient(circle, var(--grid) 1px, transparent 1px);
    background-size: 100% 100%, 22px 22px;
    background-repeat: no-repeat, repeat;
    box-shadow: inset 0 0 80px #0a122255;
}
.hero-visual .plate
{
    position: absolute;
    top: 20px;
    left: 24px;
    color: var(--haze);
    font-size: 9px;
}
.hero-bottom
{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 65px;
    padding: 20px 0 26px;
    border-top: 1px solid var(--hairline);
    color: var(--haze);
}
.chapter-strip
{
    display: flex;
    gap: 21px;
}
.chapter-strip a
{
    color: var(--haze);
    text-decoration: none;
    font: 10px Plex, monospace;
}
.chapter-strip b
{
    color: var(--signal);
    font-weight: 400;
    margin-right: 5px;
}
.scene
{
    padding-top: 120px;
    border-top: 1px solid var(--hairline);
    display: grid;
    grid-template-columns: 5fr 6fr;
    grid-template-areas: "intro diagram" "beats diagram";
    column-gap: 56px;
    align-items: start;
    position: relative;
}
.scene-intro
{
    grid-area: intro;
}
h2
{
    font-size: 40px;
    line-height: 1.15;
    letter-spacing: -.025em;
    font-weight: 600;
    margin: 12px 0 32px;
}
.scene-number
{
    color: var(--signal);
    margin-right: 12px;
}
.beats
{
    grid-area: beats;
    padding: 0 0 30vh;
}
.beat
{
    padding: 27px 29px;
    border: 1px solid var(--paper-rule);
    background: var(--paper);
    color: var(--paper-ink);
    border-radius: 16px;
    margin-bottom: 60vh;
    opacity: .55;
    transform: translateY(12px);
    transition: opacity .4s, transform .4s;
}
.beat:last-child
{
    margin-bottom: 0;
}
.beat.active
{
    opacity: 1;
    transform: none;
}
.beat .beat-index
{
    color: var(--paper-muted);
    font: 10px Plex, monospace;
}
.beat p
{
    font: 19px/1.6 Source, Georgia, serif;
    margin: 14px 0 0;
}
pre
{
    font-family: Plex, monospace;
    font-size: 11px;
    line-height: 1.8;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.beat pre
{
    margin: 22px 0 0;
    background: #E9E1D0;
    border: 1px solid var(--paper-rule);
    border-radius: 10px;
    padding: 14px;
}
.diagram-panel
{
    grid-area: diagram;
    position: sticky;
    top: 96px;
    height: calc(100svh - 128px);
    min-height: 550px;
    max-height: 780px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--hairline);
    border-radius: 20px;
    overflow: hidden;
}
.figure-title
{
    color: var(--haze);
    padding: 22px 24px 0;
    margin: 0;
}
.diagram
{
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
}
.diagram > svg
{
    max-height: 100%;
}
.control-bar
{
    background: var(--raised);
    border-top: 1px solid var(--hairline);
    padding: 16px 20px;
}
.control-label
{
    display: block;
    margin: 0 0 10px;
    color: var(--haze);
    font: 10px Plex, monospace;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.control-row
{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.segments
{
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.segments button
{
    font-size: 11px;
    padding: 9px 13px;
}
.segments.address button:last-child
{
    flex-basis: 100%;
    width: fit-content;
    flex-grow: 0;
}
.caption
{
    color: var(--haze);
    font: 11px/1.65 Plex, monospace;
    margin: 12px 0 0;
    min-height: 36px;
    overflow-wrap: anywhere;
}
.error
{
    color: var(--loss);
}
.dns-form
{
    display: flex;
    gap: 8px;
}
.dns-form input
{
    width: 100%;
    min-width: 0;
    border: 1px solid var(--hairline);
    background: var(--ink);
    border-radius: 10px;
    color: var(--fog);
    padding: 10px;
    font: 12px Plex, monospace;
}
.dns-form button
{
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 12px;
}
.presets
{
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.presets button
{
    padding: 5px 8px;
    min-height: 30px;
    font: 9px Plex, monospace;
    border-style: dashed;
}
.range-row
{
    display: flex;
    align-items: center;
    gap: 16px;
}
input[type="range"]
{
    width: 100%;
    accent-color: var(--signal);
    min-height: 44px;
    cursor: pointer;
}
.range-row output
{
    color: var(--signal);
    font: 20px Plex, monospace;
    min-width: 48px;
}
.ticks
{
    display: flex;
    justify-content: space-between;
    padding-right: 65px;
    color: var(--haze);
    font: 9px Plex, monospace;
}
.inspector
{
    margin: 0 20px 18px;
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 16px;
    background: var(--ink);
}
.inspector pre
{
    margin: 6px 0 0;
    color: var(--fog);
    font-size: 10px;
}
.inspector small
{
    display: block;
    color: var(--haze);
    font: 9px/1.5 Plex, monospace;
    margin-top: 10px;
}
.recap
{
    padding-top: 140px;
    padding-bottom: 100px;
    border-top: 1px solid var(--hairline);
    text-align: center;
}
.recap h2
{
    font-size: 48px;
}
.section-deck
{
    font: 20px/1.6 Source, Georgia, serif;
    color: var(--haze);
    max-width: 620px;
    margin: 0 auto 40px;
}
.recap-panel
{
    border: 1px solid var(--hairline);
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 28px;
}
.stats
{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 20px 0 30px;
}
.stat + .stat
{
    border-left: 1px solid var(--hairline);
}
.stat strong
{
    font-size: 40px;
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}
.stat span
{
    font: 10px Plex, monospace;
    color: var(--haze);
}
.recap-status
{
    min-height: 20px;
    color: var(--haze);
}
.glossary
{
    padding-top: 100px;
    padding-bottom: 120px;
    border-top: 1px solid var(--hairline);
}
.glossary-grid
{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.term
{
    padding: 22px;
    border-radius: 14px;
    background: var(--paper);
    color: var(--paper-ink);
    border: 1px solid var(--paper-rule);
}
.term-top
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.term h3
{
    font: 14px Plex, monospace;
    margin: 0;
}
.term a
{
    font: 10px Plex, monospace;
    white-space: nowrap;
    text-decoration: none;
    border: 1px solid #bbb3a6;
    border-radius: 999px;
    padding: 5px 8px;
}
.term p
{
    font: 16px/1.6 Source, Georgia, serif;
    margin-bottom: 0;
}
footer
{
    border-top: 1px solid var(--hairline);
    padding: 48px 0 32px;
    color: var(--haze);
}
.footer-grid
{
    display: grid;
    grid-template-columns: 1fr 1.2fr .8fr;
    gap: 48px;
}
footer .brand
{
    color: var(--fog);
}
footer p
{
    font: 15px/1.65 Source, Georgia, serif;
}
.footer-links
{
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 17px;
    font-size: 12px;
}
.footer-bottom
{
    border-top: 1px solid var(--hairline);
    margin-top: 32px;
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
}
.trail
{
    stroke: var(--signal);
    stroke-width: 1.5;
    stroke-dasharray: 3 6;
    fill: none;
    animation: drift 2s linear infinite;
}
.packet
{
    offset-path: path("M 300 328 C 400 320 365 220 450 246 S 520 352 595 295 L 612 222");
    animation: travel 3.2s linear infinite;
}
.scene[data-beat="0"] .beat-late
{
    opacity: .22;
}
.scene[data-beat="1"] .beat-last
{
    opacity: .3;
}
.beat-late, .beat-last
{
    transition: opacity .7s;
}
.tile
{
    animation: arrive .7s both;
}
.tile.resent
{
    animation-delay: 1.1s !important;
}
@keyframes arrive
{
    0% { opacity: 0; transform: translate(190px, -100px); }
    100% { opacity: 1; transform: none; }
}
@keyframes travel
{
    to { offset-distance: 100%; }
}
@keyframes drift
{
    to { stroke-dashoffset: -18; }
}
@media (min-width: 1400px)
{
    .hero-grid { gap: 56px; }
    .hero-deck { font-size: 21px; }
}
@media (max-width: 1023px)
{
    .rail, .brand .wordmark, .timer small { display: none; }
    .mobile-stage { display: block; font: 11px Plex, monospace; color: var(--haze); }
    .header-inner { gap: 12px; }
    .header-progress { display: block; height: 2px; position: absolute; bottom: 0; left: 0; background: var(--signal); width: 0; }
    .hero-grid { grid-template-columns: 1fr 1fr; gap: 25px; }
    h1 { font-size: 48px; }
    .hero-deck { font-size: 18px; }
    .hero-bottom > span { display: none; }
    .chapter-strip { width: 100%; justify-content: space-between; gap: 10px; }
    .scene { grid-template-columns: 1fr; grid-template-areas: "intro" "diagram" "beats"; padding-top: 72px; }
    .scene-intro { max-width: 620px; }
    .diagram-panel { top: 72px; z-index: 3; height: 52svh; min-height: 400px; max-height: 560px; margin-bottom: 35px; }
    .diagram > svg { height: 100%; }
    .control-bar { padding: 12px 18px; }
    .figure-title { padding: 13px 18px 0; font-size: 9px; }
    .caption { margin-top: 7px; min-height: 20px; font-size: 10px; }
    .beat { margin-bottom: 40svh; padding: 23px; }
    .beats { padding-bottom: 15vh; }
    .segments.address button:last-child { flex-basis: auto; }
    .glossary-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { gap: 25px; }
    .inspector { padding: 10px 14px; margin: 0 18px 10px; }
    .inspector pre { font-size: 9px; line-height: 1.4; }
    .inspector small { font-size: 8px; }
}
@media (max-width: 620px)
{
    .container { padding: 0 16px; }
    .hero { padding-top: 39px; }
    .hero-grid { grid-template-columns: 1fr; gap: 28px; }
    .hero .kicker { font-size: 9px; margin-bottom: 17px; }
    h1 { font-size: 40px; line-height: 44px; max-width: 12ch; letter-spacing: -.025em; }
    .hero-deck { font-size: 18px; line-height: 1.55; margin: 20px 0 23px; }
    .actions { gap: 18px; }
    .button { padding: 0 16px; font-size: 12px; }
    .text-link { font-size: 11px; }
    .hero-note { margin-top: 17px; font-size: 9px; max-width: 335px; }
    .hero-visual { border-radius: 20px; }
    .hero-visual .plate { font-size: 8px; top: 14px; left: 16px; }
    .hero-bottom { margin-top: 28px; padding: 18px 0; }
    .chapter-strip { flex-wrap: wrap; justify-content: flex-start; gap: 14px; }
    .chapter-strip a { font-size: 9px; }
    .chapter-strip b { margin-right: 3px; }
    h2 { font-size: 30px; line-height: 36px; margin-bottom: 25px; }
    .scene { padding-top: 72px; }
    .diagram-panel { min-height: 430px; height: 52svh; border-radius: 16px; }
    #scene-5 .diagram-panel { min-height: 535px; }
    .beat { padding: 20px; border-radius: 14px; }
    .beat p { font-size: 17px; line-height: 27px; }
    .control-bar { padding: 12px; }
    .control-label { font-size: 9px; }
    .segments button { font-size: 10px; padding: 9px 10px; }
    .segments.address button:last-child { flex-basis: 100%; }
    .dns-form button { padding: 10px; }
    .presets { gap: 5px; }
    .presets button { font-size: 8px; padding: 4px 6px; }
    .recap { padding: 80px 0 65px; }
    .recap h2 { font-size: 34px; line-height: 1.15; }
    .section-deck { font-size: 18px; }
    .stats { grid-template-columns: repeat(2, 1fr); row-gap: 25px; }
    .stat:nth-child(3) { border-left: 0; }
    .stat strong { font-size: 32px; }
    .glossary { padding: 72px 0; }
    .glossary-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
    .footer-bottom { font-size: 9px; gap: 15px; flex-wrap: wrap; }
    .footer-grid .wordmark { display: inline; }
}
@media (prefers-reduced-motion: reduce)
{
    *, *::before, *::after
    {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }
    .diagram-panel { position: static; }
    .beat { opacity: 1; transform: none; }
    .scene .beat-late, .scene .beat-last { opacity: 1 !important; }
    .packet { offset-distance: 100%; }
    #replay { display: none; }
}
