/* Robotics Center instrument-lab style, shared with eval.roboticscenter.ai and dexterity.roboticscenter.ai.
   Serif display, grotesk body, mono labels. Hairlines, not boxes. One accent, used sparingly.
   The RAX wordmark keeps its own colors. */
:root {
    --bg: #f4f3ef;
    --surface: #faf9f6;
    --surface-2: #ecebe5;
    --ink: #111214;
    --ink-2: #45474b;
    --head: #111214;
    --muted: #5f6166;
    --accent: #9c3d22;
    --accent-soft: #efe3dc;
    --link: #111214;
    --card: #faf9f6;
    --rule: #dcd9d1;
    --rule-strong: #bdbab1;
    --faint: #e6e3dc;
    --ok: #2f7550;
    --ok-soft: #e0ebe2;
    --stop: #66731f;
    --stop-soft: #ebedd9;
    --op: #a8641a;
    --op-soft: #f2e8d9;
    --warn: #b83a2b;
    --assist: #8c6a10;
    --assist-soft: #f2ead2;
    --manual: #3b6597;
    --manual-soft: #e2e8ef;
    --code-bg: #ecebe5;
    --radius: 2px;
    --serif: 'Instrument Serif', 'Iowan Old Style', 'Times New Roman', serif;
    --font: 'Inter Tight', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #08090b; --surface: #0f1012; --surface-2: #16181b;
        --ink: #ecebe6; --ink-2: #c2c2bd; --head: #ecebe6; --muted: #a2a39f;
        --accent: #d27a55; --accent-soft: #2a1912; --link: #ecebe6;
        --card: #0f1012; --rule: #24262a; --rule-strong: #3a3d42; --faint: #1b1d20;
        --ok: #6fbf8e; --ok-soft: #13231a; --stop: #b4c25a; --stop-soft: #1f2312; --op: #e0a15a; --op-soft: #261b10;
        --warn: #e0705f; --assist: #d9b44f; --assist-soft: #262010;
        --manual: #7fa6d8; --manual-soft: #141d28; --code-bg: #16181b;
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #08090b; --surface: #0f1012; --surface-2: #16181b;
    --ink: #ecebe6; --ink-2: #c2c2bd; --head: #ecebe6; --muted: #a2a39f;
    --accent: #d27a55; --accent-soft: #2a1912; --link: #ecebe6;
    --card: #0f1012; --rule: #24262a; --rule-strong: #3a3d42; --faint: #1b1d20;
    --ok: #6fbf8e; --ok-soft: #13231a; --stop: #b4c25a; --stop-soft: #1f2312; --op: #e0a15a; --op-soft: #261b10;
    --warn: #e0705f; --assist: #d9b44f; --assist-soft: #262010;
    --manual: #7fa6d8; --manual-soft: #141d28; --code-bg: #16181b;
    color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; transition: text-decoration-color .2s, color .2s; }
a:hover { text-decoration-color: currentColor; }
img, video { max-width: 100%; display: block; }
code, .mono { font-family: var(--mono); font-size: 0.86em; }
p code, li code, td code { background: var(--surface-2); padding: 1px 5px; border-radius: var(--radius); }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--bg); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 40px; }
section { padding-top: 104px; scroll-margin-top: 70px; }
.sub-h { scroll-margin-top: 80px; }

/* ---------------- nav ---------------- */
.nav {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    backdrop-filter: saturate(1.2) blur(14px); -webkit-backdrop-filter: saturate(1.2) blur(14px);
    border-bottom: 1px solid var(--rule);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.nav-brand { display: flex; align-items: center; gap: 8px; color: var(--head); white-space: nowrap; text-decoration: none; }
.nav-brand b { font-family: 'Rubik', var(--font); font-weight: 800; font-size: 1.05rem; }
.nav-brand span { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
/* the Robotics Center RC monogram, masked so it takes the heading color in both themes */
.nav-rc {
    display: block; height: 15px; aspect-ratio: 604 / 327; background: var(--head);
    /* the R and C bodies fill the top of the image (the R's tail hangs below), so drop it until they center on RAX */
    transform: translateY(16%);
    -webkit-mask: url(../img/logos/rc-monogram.png) center / contain no-repeat;
    mask: url(../img/logos/rc-monogram.png) center / contain no-repeat;
}
.nav-links { display: flex; gap: 6px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { position: relative; display: block; padding: 6px 8px; color: var(--muted); font-size: 0.86rem; letter-spacing: .01em; white-space: nowrap; text-decoration: none; }
.nav-links a:hover, .nav-links a.on { color: var(--head); }
.nav-links a.on::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 0; height: 1px; background: var(--accent); }
.theme-btn {
    display: grid; place-items: center; width: 34px; height: 34px; flex: none;
    border: 1px solid transparent; border-radius: 50%; background: none; color: var(--muted); cursor: pointer;
    transition: color .2s, border-color .2s;
}
.theme-btn:hover { color: var(--head); border-color: var(--rule-strong); }
.theme-btn svg { width: 17px; height: 17px; display: none; stroke-width: 1.5; }
.theme-btn[data-mode="system"] .i-system, .theme-btn[data-mode="light"] .i-light,
.theme-btn[data-mode="dark"] .i-dark { display: block; }

/* ---------------- hero ---------------- */
.hero { padding-top: 96px; }
/* a narrower column than the rest of the page, so the left-aligned text fills it */
.wrap.hero { max-width: 980px; }
/* one size drives both marks, so RAX and the Robotics Center wordmark keep their proportions and share a baseline at every width */
.brand { --brand: clamp(2.4rem, 7vw, 4.6rem); display: flex; align-items: center; gap: 18px; margin-bottom: 36px; }
.word {
    font-family: 'Rubik', var(--font); font-weight: 900;
    font-size: var(--brand); line-height: 1; letter-spacing: -0.01em;
    display: flex; gap: 0.02em; padding-bottom: 0.08em;
}
.word span { --c: #ff5a4e; --d: #c43a30; color: var(--c);
    text-shadow: 0 1px 0 var(--d), 0 2px 0 var(--d), 0 3px 0 var(--d), 0 4px 0 var(--d), 0 5px 0 var(--d), 0 9px 14px rgba(15, 23, 32, 0.18); }
.word span:nth-child(2) { --c: #ffb21e; --d: #c7830c; }
.word span:nth-child(3) { --c: #12bcc0; --d: #087f86; }
.brand-x { font-weight: 300; font-size: calc(var(--brand) * 0.5); line-height: 1; color: var(--muted); align-self: center; }
/* the Robotics Center wordmark, masked so it takes the theme's heading color. It is sized by width
   (about 0.62 of the RAX height tall) and may shrink to keep the row on one line on narrow screens. */
.rc-mark {
    display: block; flex: 0 1 calc(var(--brand) * 5.7); min-width: 0; aspect-ratio: 795 / 83;
    /* the small caps sit above the image center; shift down until they center on the × */
    transform: translateY(12%);
    background: var(--head);
    -webkit-mask: url(../img/logos/robotics-center.svg) center / contain no-repeat;
    mask: url(../img/logos/robotics-center.svg) center / contain no-repeat;
}
.rc-mark:hover { background: var(--accent); }
h1 {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(2.3rem, 4.6vw, 3.7rem); line-height: 1.04; letter-spacing: -0.01em;
    color: var(--head); max-width: 22ch; text-wrap: balance;
}
h1 .hl { font-style: italic; color: var(--accent); }
.hero .lede { margin-top: 24px; }
.byline { margin-top: 26px; font-size: 1rem; color: var(--ink); display: flex; flex-wrap: wrap; align-items: baseline; }
.byline a, .byline b { color: var(--ink); font-weight: 500; }
.byline .author { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; letter-spacing: 0; text-decoration: none; }
.byline .author:hover { color: var(--accent); }
.byline .aff { color: var(--muted); margin-left: 12px; }
/* the wordmark is white on transparent, used as a mask so it takes the theme's text color */
.byline .aff-logo {
    /* an empty box aligns its bottom edge to the baseline; drop it so the small caps sit on the baseline */
    display: block; margin-left: 16px; position: relative; top: 4px;
    height: 17px; aspect-ratio: 795 / 83; background: var(--ink);
    -webkit-mask: url(../img/logos/robotics-center.svg) center / contain no-repeat;
    mask: url(../img/logos/robotics-center.svg) center / contain no-repeat;
}
.byline .aff-logo:hover { background: var(--accent); }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: var(--radius);
    font-weight: 500; font-size: 0.9rem; line-height: 1.25; letter-spacing: .005em;
    color: var(--bg); background: var(--head); border: 1px solid var(--head); text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.soon { background: transparent; border-color: var(--rule-strong); color: var(--muted); cursor: default; }
.btn.soon:hover { background: transparent; color: var(--muted); }
.emb-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; margin-top: 18px; }
.emb-strip.band { justify-content: flex-start; margin-top: 64px; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.emb-strip.band .emb-names { justify-content: flex-start; }
.emb-label { font-family: var(--mono); font-size: 0.7rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.emb-names { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.emb-names span { font-weight: 500; font-size: 0.95rem; color: var(--muted); white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }

.frame { background: #08090b; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; position: relative; }
.frame video { width: 100%; aspect-ratio: 1440 / 404; background: #08090b; }
.hero-video { margin-top: 48px; }
.caption { font-family: var(--mono); font-size: 0.72rem; letter-spacing: .03em; color: var(--muted); margin-top: 12px; line-height: 1.55; }
.caption b { color: var(--ink); font-weight: 600; }

.keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 44px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.key { --c: var(--accent); background: transparent; padding: 22px 22px 24px; position: relative; transition: background .3s var(--ease); }
.key + .key { border-left: 1px solid var(--rule); }
.key:hover { background: var(--surface); }
.key::before { content: ''; position: absolute; left: 22px; top: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.key.red { --c: #e0483d; } .key.yellow { --c: #d99210; } .key.teal { --c: #0b9ea3; } .key.green { --c: var(--ok); }
.key .tag { font-family: var(--mono); font-size: 0.68rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.key .n { font-family: var(--serif); font-weight: 400; font-size: 3rem; line-height: 1; color: var(--head); letter-spacing: -0.01em; margin-top: 12px; font-variant-numeric: tabular-nums; }
.key .n small { font-size: 0.45em; color: var(--muted); margin-left: 4px; }
.key .l { font-size: 0.88rem; color: var(--muted); margin-top: 10px; line-height: 1.45; }

/* ---------------- headings ---------------- */
.eyebrow { font-family: var(--mono); font-size: 0.7rem; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 18px; }
section > .eyebrow { padding-top: 18px; border-top: 1px solid var(--rule); }
h2 {
    font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.04;
    letter-spacing: -0.01em; color: var(--head); margin-bottom: 16px; text-wrap: balance;
}
.lede { color: var(--muted); font-size: clamp(1.04rem, 1.5vw, 1.18rem); line-height: 1.55; max-width: 64ch; margin-bottom: 30px; }
.sub-h { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; line-height: 1.1; color: var(--head); letter-spacing: -0.005em; margin: 72px 0 18px; }
.sub-h .ax { font-family: var(--mono); font-size: 0.66rem; font-weight: 400; color: var(--accent); border: 1px solid var(--accent); padding: 3px 8px; border-radius: var(--radius); margin-right: 14px; vertical-align: 7px; letter-spacing: 0.12em; }
.prose { max-width: 70ch; }
.prose p + p { margin-top: 14px; }
.prose ul { margin: 12px 0 0 20px; }
.prose li + li { margin-top: 6px; }
.prose li::marker { color: var(--muted); }

/* ---------------- setup ---------------- */
.photos { display: grid; grid-template-columns: 16fr 9fr; gap: 16px; }
.photos img { width: 100%; height: 100%; object-fit: cover; border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.views { margin-top: 16px; }
.views img { width: 100%; border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.fig-narrow { max-width: 220px; margin: 0 auto 24px; text-align: center; }
.fig-narrow img { width: 100%; border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.spec { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.93rem; border-top: 1px solid var(--ink); }
.spec th { text-align: left; font-family: var(--mono); font-size: 0.68rem; font-weight: 400; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); width: 150px; padding: 14px 16px 12px 0; vertical-align: top; }
.spec td { padding: 11px 0; color: var(--ink); }
.spec tr + tr th, .spec tr + tr td { border-top: 1px solid var(--rule); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }

.loop { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 8px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.loop .step { position: relative; padding: 24px 24px 24px 0; transition: background .3s var(--ease); }
.loop .step + .step { padding-left: 24px; border-left: 1px solid var(--rule); }
.loop .step::after { content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--rule-strong); }
.loop .step + .step::after { left: 24px; }
.loop .step:last-child::after { background: var(--accent); }
.loop .k { font-family: var(--mono); font-size: 0.7rem; letter-spacing: .12em; color: var(--muted); }
.loop .step:last-child .k { color: var(--accent); }
.loop h4 { font-size: 1.05rem; color: var(--head); margin: 8px 0 6px; font-weight: 500; }
.loop p { font-size: 0.92rem; color: var(--muted); line-height: 1.55; }
.loop .phase { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); margin-top: 14px; text-transform: uppercase; letter-spacing: 0.12em; }

.arch { display: grid; grid-template-columns: 1.3fr 28px 1fr 28px 1.2fr 28px 1.3fr; align-items: center; margin-top: 30px; }
.arch .col { display: grid; gap: 10px; }
.arch .box { background: transparent; border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 12px 14px; font-weight: 500; font-size: 0.92rem; color: var(--head); line-height: 1.3; }
.arch .box small { display: block; font-family: var(--mono); font-weight: 400; font-size: 0.68rem; letter-spacing: .02em; color: var(--muted); margin-top: 4px; }
.arch .box.strong { background: var(--surface); border-color: var(--ink); }
.arch .box.new { background: var(--accent-soft); border-color: var(--accent); }
.arch .arr { height: 1px; background: var(--rule-strong); position: relative; margin: 0 4px; }
.arch .arr::after { content: ''; position: absolute; right: -2px; top: -4px; border: 4.5px solid transparent; border-left: 7px solid var(--rule-strong); border-right: 0; }
.port-tbl td:first-child { font-weight: 500; color: var(--head); white-space: nowrap; }
.port { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 22px; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.port .card { background: transparent; border: 0; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-radius: 0; padding: 22px 22px 24px; }
.port h4 { font-size: 1rem; color: var(--head); font-weight: 500; margin-bottom: 6px; }
.port p { font-size: 0.9rem; color: var(--muted); line-height: 1.5; }

/* ---------------- task blocks ---------------- */
.prompt {
    border-left: 1px solid var(--accent); background: transparent; padding: 4px 0 4px 20px;
    font-size: 0.98rem; color: var(--ink-2); max-width: 72ch; margin: 8px 0 32px;
}
.prompt .tag { font-family: var(--mono); font-size: 0.66rem; color: var(--accent); display: block; margin-bottom: 6px; letter-spacing: 0.14em; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-bottom: 32px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
#t1stats { grid-template-columns: repeat(6, 1fr); }
.stat { background: transparent; padding: 18px 18px 16px 0; }
.stat + .stat { padding-left: 18px; border-left: 1px solid var(--rule); }
.stat .n { font-family: var(--serif); font-weight: 400; font-size: 2.3rem; line-height: 1; color: var(--head); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat .n span { color: var(--accent); }
.stat .l { font-family: var(--mono); font-size: 0.68rem; letter-spacing: .04em; color: var(--muted); margin-top: 10px; line-height: 1.45; }

/* evolution timeline */
.evo { position: relative; margin-top: 10px; border-top: 1px solid var(--rule); padding-top: 14px; }
.evo::before { content: ''; position: absolute; left: 87px; top: 22px; bottom: 8px; width: 1px; background: var(--rule-strong); }
.evo-item { display: grid; grid-template-columns: 70px 1fr; gap: 36px; padding: 10px 0 18px; position: relative; }
.evo-item::before {
    content: ''; position: absolute; left: 83px; top: 18px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--bg); border: 1px solid var(--ink);
}
.evo-item.win::before { background: var(--accent); border-color: var(--accent); }
.evo-when { font-family: var(--mono); font-size: 0.7rem; letter-spacing: .06em; color: var(--muted); text-align: right; padding-top: 7px; line-height: 1.4; }
.evo-body h4 { font-size: 1.05rem; font-weight: 500; color: var(--head); margin-bottom: 4px; }
.evo-body p { font-size: 0.95rem; color: var(--muted); max-width: 72ch; }
.evo-body .learned { margin-top: 10px; font-size: 0.9rem; color: var(--ink); background: transparent; border-left: 1px solid var(--accent); border-radius: 0; padding: 2px 0 2px 14px; max-width: 72ch; }
.evo-body .learned b { font-family: var(--mono); color: var(--accent); font-weight: 400; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; margin-right: 10px; }
.quote { font-family: var(--serif); font-style: italic; font-size: 1.12em; color: var(--ink); }

/* trial browser */
.browser { border: 1px solid var(--rule); border-top-color: var(--ink); border-radius: 0; padding: 18px; background: var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
    font: inherit; font-family: var(--mono); font-size: 0.78rem; font-weight: 400; min-width: 40px; padding: 6px 9px;
    border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; text-align: center;
    transition: border-color .2s;
}
.chip:hover:not(:disabled) { border-color: currentColor; }
.chip.success { background: var(--ok-soft); color: var(--ok); }
.chip.stop { background: var(--stop-soft); color: var(--stop); }
.chip.assisted { background: var(--assist-soft); color: var(--assist); }
.chip.manual { background: var(--manual-soft); color: var(--manual); }
.chip.on { border-color: currentColor; box-shadow: 0 0 0 1px currentColor inset; }
.chip:disabled { opacity: 0.45; cursor: default; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-family: var(--mono); font-size: 0.68rem; letter-spacing: .04em; color: var(--muted); margin: -4px 0 16px; }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.legend .success i { background: var(--ok); } .legend .stop i { background: var(--stop); }
.legend .assisted i { background: var(--assist); } .legend .manual i { background: var(--manual); }
.legend .fail i { background: var(--warn); }
.trial-note { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: baseline; }
.trial-note .t { font-family: var(--mono); font-size: 0.78rem; font-weight: 400; letter-spacing: .06em; color: var(--accent); white-space: nowrap; }
.trial-note p { font-size: 0.93rem; color: var(--ink-2); }

/* stage bars */
.stagebars { margin-top: 8px; border-top: 1px solid var(--rule); padding-top: 10px; }
.sb-row { display: grid; grid-template-columns: 120px 1fr 52px; gap: 12px; align-items: center; margin: 6px 0; font-size: 0.85rem; }
.sb-row .lbl { color: var(--muted); font-family: var(--mono); font-size: 0.72rem; }
.sb-row .tot { text-align: right; font-family: var(--mono); font-size: 0.8rem; color: var(--head); font-variant-numeric: tabular-nums; }
.sb { display: flex; height: 14px; border-radius: 1px; overflow: hidden; gap: 1px; }
.sb i { display: block; height: 100%; }
.sb-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-family: var(--mono); font-size: 0.68rem; color: var(--muted); }
.sb-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }

/* tables */
.tbl-wrap { overflow-x: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
table.runs { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 640px; }
table.runs th { text-align: left; font-family: var(--mono); font-weight: 400; color: var(--muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.12em; padding: 12px 14px 12px 0; background: transparent; white-space: nowrap; }
table.runs td { padding: 11px 14px 11px 0; border-top: 1px solid var(--rule); vertical-align: top; }
table.runs td.num { font-family: var(--mono); font-size: 0.82rem; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
table.runs tr.play { cursor: pointer; transition: background .2s; }
table.runs tr.play:hover td { background: var(--surface); }
table.runs tr.on td { background: var(--accent-soft); }
table.runs tr.on td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
table.runs td:first-child, table.runs th:first-child { padding-left: 10px; }
.pill { display: inline-block; font-family: var(--mono); font-size: 0.64rem; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: var(--radius); white-space: nowrap; }
.pill.success { background: var(--ok-soft); color: var(--ok); }
.pill.stop { background: var(--stop-soft); color: var(--stop); }
.pill.assisted { background: var(--assist-soft); color: var(--assist); }
.pill.muted { background: transparent; color: var(--muted); border: 1px solid var(--rule-strong); }

/* dialogue */
.dialog { display: grid; gap: 0; max-width: 860px; border-top: 1px solid var(--rule); }
.turn { display: grid; grid-template-columns: 92px 1fr; gap: 18px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.turn .who { font-family: var(--mono); font-size: 0.66rem; font-weight: 400; letter-spacing: .12em; padding-top: 4px; text-align: right; }
.turn.agent .who { color: var(--accent); }
.turn.op .who { color: var(--op); }
.turn.code .who { color: var(--ink); }
.turn .msg { background: transparent; border-radius: 0; padding: 0; font-size: 0.94rem; color: var(--ink-2); }
.turn.op .msg { color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 1.12rem; line-height: 1.4; }
.turn.code .msg { color: var(--ink); }

/* code */
pre.code {
    font-family: var(--mono); font-size: 0.78rem; line-height: 1.6; background: var(--code-bg);
    border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; color: var(--ink);
}
pre.code .c { color: var(--muted); }
pre.code .k { color: var(--accent); font-weight: 400; }
.code-cap { font-family: var(--mono); font-size: 0.66rem; font-weight: 400; letter-spacing: .14em; color: var(--muted); margin: 14px 0 8px; }

/* ---------------- comparison ---------------- */
.vs { display: grid; grid-template-columns: 1fr; gap: 26px; }
.vs .side h4 { font-family: var(--mono); font-size: 0.7rem; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--head); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.vs .side h4 .dot { width: 7px; height: 7px; border-radius: 50%; }
.vs .rax .dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.vs .astra .dot { background: var(--muted); }
.vs .frame video { aspect-ratio: 1440 / 404; }
.slot {
    aspect-ratio: 1440 / 404; border: 1px dashed var(--rule-strong); border-radius: var(--radius); background: var(--surface);
    display: grid; place-items: center; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 0.74rem; letter-spacing: .04em; padding: 12px;
}
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 16px 0 0; }
.seg { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: var(--radius); overflow: hidden; }
.seg button { font: inherit; font-family: var(--mono); font-size: 0.78rem; padding: 6px 12px; border: 0; background: none; color: var(--ink); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule-strong); }
.seg button.on { background: var(--head); color: var(--bg); }
.ctl-btn { font: inherit; font-size: 0.86rem; font-weight: 500; padding: 6px 14px; border-radius: var(--radius); border: 1px solid var(--head); background: var(--head); color: var(--bg); cursor: pointer; transition: background .2s, border-color .2s; }
.ctl-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.ctl-note { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }

.speed { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 30px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.card { background: transparent; border-radius: 0; padding: 26px 28px 26px 0; }
.card + .card { padding-left: 28px; border-left: 1px solid var(--rule); }
.card .x { font-family: var(--serif); font-weight: 400; font-size: 4rem; line-height: 1; color: var(--head); letter-spacing: -0.01em; }
.card .x span { color: var(--accent); }
.card .t { font-family: var(--mono); font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin: 10px 0 20px; }
.hbar { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-top: 8px; }
.hbar .track { position: relative; height: 22px; }
.hbar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 1px; background: var(--rule-strong); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.hbar.rax i { background: var(--accent); }
.hbar.astra i.ph { background: repeating-linear-gradient(135deg, var(--rule) 0 6px, transparent 6px 12px); border: 1px dashed var(--muted); }
.hbar b { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-weight: 400; color: var(--head); white-space: nowrap; font-size: 0.74rem; }
.hbar.rax b { color: #fff; }
.ph-val { color: var(--muted); border-bottom: 1px dashed var(--muted); }

.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.skill { border: 0; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-radius: 0; overflow: hidden; display: flex; flex-direction: column; transition: background .3s var(--ease); }
.skill:hover { background: var(--surface); }
.skill .crop { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #08090b; cursor: pointer; }
.skill .crop video, .skill .crop img { position: absolute; top: 0; width: 300%; max-width: none; height: auto; transition: left 0.35s ease; }
.skill .crop img.still { width: 100%; left: 0; }
.skill .views-sel { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 4px; }
.skill .views-sel button { font: inherit; font-family: var(--mono); font-size: 0.66rem; letter-spacing: .04em; padding: 3px 7px; border-radius: var(--radius); border: 0; cursor: pointer; background: rgba(8,9,11,0.6); color: #ecebe6; }
.skill .views-sel button.on { background: #ecebe6; color: #111214; }
.skill .spd { position: absolute; left: 8px; bottom: 8px; font-family: var(--mono); font-size: 0.66rem; color: #ecebe6; background: rgba(8,9,11,0.6); padding: 3px 7px; border-radius: var(--radius); }
.skill .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.skill .src { font-family: var(--mono); font-size: 0.64rem; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; }
.skill h4 { font-size: 1.04rem; font-weight: 500; color: var(--head); line-height: 1.3; }
.skill p { font-size: 0.9rem; color: var(--muted); }
.skill details { margin-top: auto; padding-top: 8px; }
.skill summary { font-size: 0.84rem; font-weight: 500; color: var(--ink); cursor: pointer; list-style: none; }
.skill summary:hover { color: var(--accent); }
.skill summary::-webkit-details-marker { display: none; }
.skill summary::before { content: '+ '; font-family: var(--mono); color: var(--muted); }
.skill details[open] summary::before { content: '\2212  '; }
.skill pre.code { margin-top: 8px; font-size: 0.72rem; }
.skill.text-only .body { padding-top: 18px; }

.matrix td.y { color: var(--ok); font-weight: 400; font-size: 1.35rem; line-height: 1; }
.matrix td.n { color: var(--warn); font-weight: 400; font-size: 1.35rem; line-height: 1; }
.matrix td.ph, .matrix td .ph-val { color: var(--muted); }

.succ { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 30px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.rate-row { display: grid; grid-template-columns: 70px 1fr 64px; gap: 10px; align-items: center; margin: 8px 0; font-size: 0.85rem; }
.rate-row .who { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); font-weight: 400; }
.rate-row .track { height: 22px; background: var(--surface-2); border-radius: 1px; position: relative; overflow: hidden; }
.rate-row .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 1px; background: var(--accent); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.rate-row.astra .track i { background: var(--muted); }
.rate-row.astra .track i.ph { background: repeating-linear-gradient(135deg, var(--rule-strong) 0 6px, transparent 6px 12px); }
.rate-row .v { text-align: right; font-family: var(--mono); font-size: 0.82rem; color: var(--head); font-variant-numeric: tabular-nums; }
.rate-row .v small { color: var(--muted); font-size: 0.72rem; margin-left: 4px; }
.def { font-size: 0.82rem; color: var(--muted); margin-top: 14px; line-height: 1.5; max-width: 80ch; }


#credits { padding-bottom: 90px; }
.credit-authors { margin-top: 14px; max-width: 820px; font-size: 0.92rem; color: var(--muted); }
footer { margin-top: 110px; padding: 30px 0 50px; border-top: 1px solid var(--rule); font-size: 0.85rem; color: var(--muted); }
footer p + p { margin-top: 6px; }

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
    .wrap { padding-left: 24px; padding-right: 24px; }
    .keys { grid-template-columns: repeat(2, 1fr); }
    .key:nth-child(3) { border-left: 0; }
    .key:nth-child(n+3) { border-top: 1px solid var(--rule); }
    .key:nth-child(n+3)::before { display: none; }
    .stats, #t1stats { grid-template-columns: repeat(2, 1fr); }
    .stat, .stat + .stat { padding: 16px 16px 14px; border-left: 0; border-bottom: 1px solid var(--rule); }
    .stat:nth-child(odd) { padding-left: 0; }
    .stat:nth-child(even) { border-left: 1px solid var(--rule); }
    .stats { border-bottom: 0; }
    .two, .vs, .speed, .succ, .skills { grid-template-columns: 1fr; }
    .card + .card { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
    .loop { grid-template-columns: 1fr; }
    .loop .step, .loop .step + .step { padding: 22px 0 22px 0; border-left: 0; }
    .loop .step + .step { border-top: 1px solid var(--rule); }
    .loop .step::after, .loop .step + .step::after { display: none; }
    .port { grid-template-columns: 1fr; }
    .arch { grid-template-columns: 1fr; gap: 0; }
    .arch .arr { width: 1px; height: 22px; margin: 4px auto; }
    .arch .arr::after { right: -4px; top: auto; bottom: -2px; border: 4.5px solid transparent; border-top: 7px solid var(--rule-strong); border-bottom: 0; }
    .port-tbl td:first-child { white-space: normal; }
    .sub-h { font-size: 1.6rem; }
    .evo::before { left: 4px; }
    .evo-item { grid-template-columns: 1fr; gap: 2px; padding-left: 28px; }
    .evo-item::before { left: 0; }
    .evo-when { text-align: left; padding-top: 0; }
    .turn { grid-template-columns: 1fr; gap: 4px; }
    .turn .who { text-align: left; padding-top: 0; }
    .spec th { width: 110px; }
}
@media (max-width: 720px) {
    .wrap { padding-left: 16px; padding-right: 16px; }
    .nav .wrap { flex-wrap: wrap; height: auto; gap: 0 16px; padding-top: 10px; }
    .nav-brand { margin-right: auto; }
    .nav-links {
        order: 3; flex-basis: 100%; margin: 6px -16px 0; padding: 0 16px; gap: 14px;
        -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
        mask-image: linear-gradient(to right, #000 85%, transparent);
    }
    .nav-links a { padding: 8px 0 10px; }
    .nav-links a.on::after { left: 0; right: 0; }
    section { scroll-margin-top: 104px; }
    .sub-h { scroll-margin-top: 112px; }
}
