:root {
  color-scheme: dark;
  --bg: #0e0e10;
  --paper: #18181b;
  --raised: #202023;
  --ink: #f2f0e9;
  --muted: #a2a2aa;
  --line: #2d2d32;
  --accent: #ff8a00;
  --accent-soft: #ff8a0014;
  --success: #96dab0;
  --danger: #ff9999;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --radius: 12px;
  --spring: cubic-bezier(.22, 1.35, .5, 1);
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; line-height: 1.65; }
::selection { background: var(--accent); color: var(--bg); }
button, input, select { font: inherit; }
button, a, input, select { touch-action: manipulation; }
a { color: inherit; text-underline-offset: 5px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
:where(button, a, input, select, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0 0 18px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.045em; text-wrap: balance; }
h1 { font-size: clamp(40px, 4.6vw, 66px); font-weight: 800; }
h2 { font-size: 32px; font-weight: 750; }
h3 { font-size: 21px; font-weight: 650; letter-spacing: -.025em; }
code, pre { font-family: var(--mono); }
code { font-size: .88em; overflow-wrap: anywhere; }
p code { background: var(--raised); color: #ffc680; padding: 3px 6px; border-radius: 4px; }
pre { max-width: 100%; overflow: auto; white-space: pre; font-size: 13px; line-height: 1.9; background: #111113; color: #dedee3; padding: 24px; border: 1px solid var(--line); border-radius: 8px; scrollbar-width: thin; }
pre code { font-size: inherit; }
.wrap { width: min(1240px, calc(100% - 96px)); margin-inline: auto; }
.accent { color: var(--accent); }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 100; padding: 10px 16px; background: var(--accent); color: var(--bg); border-radius: 6px; transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.header { background: #0e0e10ed; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); }
.header-inner { width: min(1360px, calc(100% - 96px)); margin: auto; min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 750; letter-spacing: -.04em; text-decoration: none; }
.brand-icon { display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid #ff8a0040; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-family: var(--mono); font-size: 16px; box-shadow: 0 0 24px #ff8a0008; }
.brand-light { font-weight: 400; color: var(--muted); }
nav { display: flex; gap: 28px; align-items: center; }
nav > a { font-size: 13px; text-decoration: none; color: var(--muted); }
nav > a:hover, nav > a[aria-current] { color: var(--accent); }
.button { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; gap: 20px; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; font-weight: 650; line-height: 1.4; text-decoration: none; color: var(--ink); transition: background 180ms, border-color 180ms, box-shadow 250ms, transform 300ms var(--spring); }
.button:hover { border-color: #62626b; background: #262629; }
.button:active { transform: scale(.98); }
.button.primary { background: var(--accent); color: #17100a; border-color: var(--accent); }
.button.primary:hover { background: #ffa12e; border-color: #ffa12e; box-shadow: 0 6px 28px #ff8a0028; }
.button.secondary, .button.small { background: #18181b; border-color: #35353a; }
.button.secondary:hover, .button.small:hover { background: #222225; border-color: #69616b; }
.button.small { min-height: 38px; padding: 9px 17px; border-radius: 50px; }
.text-button { background: none; border: 0; color: var(--ink); padding: 8px 0; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--accent); }
.text-button.danger { color: var(--danger); }
.text-button.danger:hover { color: #ffc2c2; }
.button.danger { background: var(--danger); border-color: var(--danger); color: var(--bg); }
.button.danger:hover { background: #ffc2c2; border-color: #ffc2c2; }
.full { width: 100%; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.eyebrow { font: 10px/1.7 var(--mono); text-transform: uppercase; letter-spacing: .13em; color: var(--accent); margin-bottom: 24px; }
.status-dot { display: inline-block; background: var(--accent); border-radius: 50%; width: 7px; height: 7px; margin-right: 10px; box-shadow: 0 0 12px #ff8a0070; }
.hero { display: grid; grid-template-columns: 1.14fr 1fr; align-items: center; gap: 64px; padding-block: 94px 82px; }
.hero-copy, .auth-intro, .guide-content, .terminal-stage { min-width: 0; }
.hero h1 { margin-bottom: 27px; line-height: 1.06; letter-spacing: -.055em; }
.hero h1 span { color: var(--accent); }
.lead { max-width: 590px; color: var(--muted); font-size: 17px; line-height: 1.8; }
.hero .actions { margin: 32px 0 29px; }
.hero .button.primary, .learning-banner .button { border-radius: 50px; padding-inline: 25px; }
.hero-note { display: flex; flex-direction: column; gap: 9px; font: 10px/1.7 var(--mono); color: var(--muted); margin: 0; }
.hero-note .protocols { color: #dadade; font-size: 11px; letter-spacing: .12em; }
.protocols b { margin-inline: 9px; font-weight: 400; color: #65656e; }
.terminal-stage { perspective: 1100px; }
.terminal { border-radius: 12px; background: #161618; border: 1px solid #383436; box-shadow: 0 24px 70px #0005, 0 0 90px #ff8a0007; min-width: 0; transition: transform 300ms var(--spring); }
.terminal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); font: 10px/1.4 var(--mono); color: var(--muted); }
.terminal-lights { display: flex; gap: 5px; }
.terminal-bar i { width: 6px; height: 6px; background: #424247; border-radius: 50%; }
.terminal-bar i:first-child { background: var(--accent); }
.terminal-file { color: #808089; }
.terminal-body { padding: 25px 25px 10px; }
.terminal pre { padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 11px; margin: 14px 0 22px; }
.code-comment { color: #9999a2; font: 11px/1.7 var(--mono); margin: 0; }
.code-green { color: #9ce5b9; }
.code-blue { color: #ffb35b; }
.terminal-divider { display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 20px; font: 10px var(--mono); color: var(--muted); }
.terminal-divider .code-green { font-size: 10px; padding: 4px 7px; margin-top: -4px; border: 1px solid #96dab02b; background: #96dab00a; border-radius: 4px; }
.terminal-footer { display: flex; justify-content: space-between; gap: 12px; padding: 13px 25px; border-top: 1px solid var(--line); font: 9px var(--mono); color: #93939e; }
.demo-label { letter-spacing: .1em; color: var(--accent); }
.terminal-caption { font-size: 10px; margin: 14px 0 0; padding-left: 14px; border-left: 1px solid #ff8a0060; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 30px 0; border-block: 1px solid var(--line); gap: 32px; }
.facts > div { display: flex; align-items: center; gap: 22px; }
.facts > div + div { border-left: 1px solid var(--line); padding-left: 32px; }
.facts strong { font-size: 27px; font-weight: 650; letter-spacing: -.03em; white-space: nowrap; }
.facts > div > span { color: var(--muted); font-size: 11px; max-width: 145px; line-height: 1.6; }
.fact-mark { display: inline-block; font: 13px var(--mono); color: var(--accent); margin-left: 10px; vertical-align: middle; }
.section { padding-block: 84px; }
.section-heading { margin-bottom: 36px; }
.section-heading h2 { font-size: clamp(30px, 3.2vw, 43px); margin-bottom: 16px; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.cards { display: grid; gap: 18px; }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card p { color: var(--muted); font-size: 14px; }
.card a { font-size: 13px; color: var(--ink); font-weight: 550; text-decoration: none; }
.card h3 { margin-bottom: 14px; }
.step-card { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; padding: 28px 28px 24px; transition: border-color 250ms; }
.step-card:hover, .step-card:focus-within { border-color: #ff8a0070; }
.step-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 42px; }
.step { font: 10px var(--mono); letter-spacing: .1em; color: var(--muted); }
.step-symbol { display: grid; place-items: center; flex-shrink: 0; white-space: nowrap; width: 42px; height: 42px; font: 20px var(--mono); color: var(--accent); border: 1px solid #ff8a002e; border-radius: 9px; background: #ff8a0008; }
.step-card p { margin-bottom: 26px; }
.step-card > a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); margin-top: auto; }
.step-card a span { color: var(--accent); font-size: 18px; transition: transform 300ms var(--spring); }
.step-card a:hover span { transform: translate(3px, -3px); }
.learning-banner { padding: 48px; background: radial-gradient(ellipse at 100% 0, #ff8a000b, transparent 65%), var(--paper); display: flex; align-items: center; gap: 44px; justify-content: space-between; border: 1px solid #ff8a003b; border-radius: 12px; margin-bottom: 84px; }
.learning-banner > div { max-width: 710px; }
.learning-banner h2 { font-size: 40px; }
.learning-banner p:last-child { margin: 0; color: var(--muted); max-width: 580px; font-size: 14px; }
.learning-banner .button { flex-shrink: 0; }
.footer { display: flex; gap: 24px; justify-content: space-between; align-items: center; padding-block: 28px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.footer .brand { font-size: 15px; color: var(--ink); }
.footer .brand span { color: var(--accent); }
.footer p { margin: 0; }
.footer > a:last-child { text-decoration: none; }
.footer a:hover { color: var(--accent); }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 100px; align-items: center; min-height: calc(100vh - 165px); padding-block: 70px; }
.auth-intro h1 { font-size: clamp(38px, 4.5vw, 62px); margin-bottom: 28px; }
.auth-intro .lead { font-size: 16px; }
.muted-link { font-size: 13px; color: var(--accent); }
.auth-card { padding: 34px; box-shadow: 0 18px 70px #0003; border-top-color: #ff8a0060; }
.auth-card h2 { font-size: 25px; margin-block: 28px 24px; }
.segmented { position: relative; display: flex; background: #101012; border: 1px solid var(--line); padding: 4px; border-radius: 9px; gap: 4px; isolation: isolate; }
.segmented button { position: relative; border: 0; background: none; flex: 1; padding: 11px 8px; border-radius: 5px; font-size: 12px; color: var(--muted); }
.segmented button.selected { background: #303033; color: var(--ink); font-weight: 600; }
label { display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 550; margin-bottom: 18px; color: #ceced4; }
input, select { width: 100%; min-width: 0; min-height: 46px; background: #111113; border: 1px solid #39393f; border-radius: 7px; padding: 10px 12px; color: var(--ink); font-size: 14px; transition: border-color 180ms, box-shadow 180ms; }
input:hover, select:hover { border-color: #5b5b64; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #ff8a0012; }
input::placeholder { color: #85858f; }
input[type=checkbox] { width: 18px; min-height: 18px; accent-color: var(--accent); flex-shrink: 0; }
label.checkbox { flex-direction: row; align-items: center; }
.help { font-size: 12px !important; color: var(--muted); line-height: 1.65; }
.auth-bottom { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 28px !important; font-size: 12px !important; margin-bottom: 0 !important; }
.auth-bottom a { color: var(--accent); }
.form-error { color: var(--danger); font-size: 13px; margin-bottom: 14px; }
.form-error:empty { display: none; }
.page-heading { padding-block: 60px 40px; }
.page-heading h1 { font-size: clamp(34px, 4vw, 54px); }
.page-heading.compact { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 44px 28px; }
.compact h1 { font-size: 34px; overflow-wrap: anywhere; }
.compact p { margin-bottom: 8px; }
.compact .eyebrow { margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 14px; }
.pill { border: 1px solid #ff8a0040; border-radius: 30px; padding: 7px 12px; font: 10px var(--mono); letter-spacing: .08em; color: var(--accent); background: #ff8a0008; }
.workspace { padding-bottom: 60px; }
.tabs { position: relative; isolation: isolate; border-bottom: 1px solid var(--line); gap: 28px; overflow-x: auto; align-items: stretch; margin-bottom: 30px; scrollbar-width: thin; }
.tabs button { white-space: nowrap; background: none; padding: 16px 0; color: var(--muted); border: 0; border-bottom: 2px solid transparent; font-size: 13px; }
.tabs button:hover { color: var(--ink); }
.tabs button.selected { color: var(--accent); border-color: var(--accent); }
.tabs.has-indicator button.selected { border-bottom-color: transparent; }
.tab-indicator { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); pointer-events: none; transition: transform 400ms var(--spring), width 400ms var(--spring); }
.segmented .tab-indicator { top: 4px; bottom: 4px; height: auto; border-radius: 5px; background: #303033; z-index: -1; }
.segmented.has-indicator button.selected { background: none; }
.access-banner { display: flex; align-items: center; justify-content: space-between; background: #ff8a0007; border: 1px solid #ff8a0033; border-radius: 10px; padding: 24px 28px; gap: 30px; margin-bottom: 20px; }
.access-banner > div { min-width: 0; }
.access-banner .eyebrow { display: block; margin-bottom: 8px; }
.access-banner code { display: block; font-size: 16px; color: #ffbd6e; }
.access-banner p { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.access-banner .button { flex-shrink: 0; }
.inline-links { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 22px; gap: 14px; }
.inline-links a { color: var(--muted); }
.inline-links a:hover { color: var(--accent); }
.reference-frame { border: 1px solid var(--line); border-radius: 10px; background: var(--bg); width: 100%; height: 850px; display: block; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.panel-heading h2 { font-size: 26px; margin-bottom: 10px; }
.panel-heading p { margin-bottom: 0; }
.panel-heading > .button { flex-shrink: 0; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 24px; }
.filters label { flex: 1; min-width: 130px; max-width: 280px; margin-bottom: 0; }
.filters .button { min-height: 46px; }
.table-scroll { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); margin-bottom: 20px; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
th { font-weight: 500; color: #ababB5; background: #202023; white-space: nowrap; font: 10px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
th, td { padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #ffffff03; }
td code { font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
td .text-button { font-size: 12px; padding: 0; text-align: left; }
td small { color: var(--muted); display: block; font-size: 10px; margin-top: 5px; }
td .row-actions { display: flex; gap: 0 13px; flex-wrap: wrap; white-space: nowrap; }
.badge { font: 10px/1.4 var(--mono); padding: 4px 7px; border: 1px solid #ffffff10; border-radius: 5px; white-space: nowrap; display: inline-block; background: #26262b; color: #bbbbc4; }
.badge.success { background: #96dab00a; border-color: #96dab02c; color: var(--success); }
.badge.error { background: #ff99990a; border-color: #ff99992c; color: var(--danger); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 25px 0; }
.metric { padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.metric strong { font-size: 32px; font-weight: 650; letter-spacing: -.04em; display: block; font-variant-numeric: tabular-nums; }
.metric:first-child strong { color: var(--accent); }
.metric span { font-size: 11px; color: var(--muted); }
#report-summary > .cards { margin-bottom: 28px; }
.bar-row { font-size: 12px; margin-bottom: 14px; }
.bar-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.bar-track { height: 5px; background: #2b2b30; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 5px; transform-origin: left; }
.pagination { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); }
.empty { padding: 36px !important; color: var(--muted); text-align: center; }
.key-card { margin-bottom: 24px; }
.password-card { max-width: 560px; }
.key-card h2, .password-card h2 { font-size: 25px; }
.token-result { margin-top: 22px; padding: 20px; background: #ff8a0007; border: 1px solid #ff8a0033; border-radius: 8px; }
.token-result input { font-family: var(--mono); font-size: 12px; }
.token-result p { margin: 12px 0 0; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; max-width: 950px; }
.span-all { grid-column: 1/-1; }
.settings-grid h3 { margin-top: 25px; }
.settings-actions { margin-top: 28px; max-width: 950px; }
.callout { border-left: 2px solid var(--accent); padding: 16px 22px; background: #ff8a000a; margin-bottom: 25px; font-size: 13px; }
.callout.error { border-color: var(--danger); background: #ff99990a; }
.notice { position: fixed; right: 24px; top: 94px; max-width: 430px; padding: 16px 24px; background: #202923; color: #daf3df; border: 1px solid #96dab044; border-radius: 10px; box-shadow: 0 8px 30px #0006; z-index: 60; font-size: 13px; }
.notice.error { background: #302020; color: #ffd0d0; border-color: #ff999944; }
dialog { border: 1px solid #444047; border-radius: 12px; padding: 30px; width: min(500px, calc(100vw - 32px)); max-height: 90vh; color: var(--ink); background: var(--paper); box-shadow: 0 28px 100px #0009; }
dialog::backdrop { background: #0009; backdrop-filter: blur(5px); }
.guide-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 65px; }
.guide-nav { position: sticky; top: 108px; height: fit-content; display: flex; flex-direction: column; gap: 4px; font-size: 12px; border-left: 1px solid var(--line); }
.guide-nav a { color: var(--muted); text-decoration: none; padding: 10px 16px; border-left: 2px solid transparent; margin-left: -1px; transition: color 180ms, background 180ms; }
.guide-nav a:hover, .guide-nav a[aria-current] { color: var(--accent); background: #ff8a0007; border-color: var(--accent); }
.guide-content { max-width: 850px; }
.guide-content section { padding-bottom: 36px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.guide-content h2 { font-size: 27px; }
.guide-content p { color: #b2b2ba; font-size: 15px; }
.guide-content h3 { font-size: 19px; margin-top: 24px; }
.quickstart-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.quickstart-steps { list-style: none; counter-reset: quickstart; padding: 0; margin: 0; }
.quickstart-steps li { counter-increment: quickstart; position: relative; padding: 0 0 26px 62px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.quickstart-steps li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.quickstart-steps li::before { content: counter(quickstart, decimal-leading-zero); position: absolute; left: 0; top: 0; font: 18px/1.4 var(--mono); color: var(--accent); }
.quickstart-steps h3 { font-size: 21px; margin-bottom: 10px; }
.quickstart-steps p { color: var(--muted); margin: 0; font-size: 15px; }
.quickstart-steps strong { color: var(--ink); font-weight: 500; }
.quickstart-steps a, .student-guide-content a { text-decoration-color: #ff8a0070; }
.useful-addresses { min-width: 0; }
.address-links { list-style: none; padding: 0; margin: 20px 0 24px; }
.address-links a { display: flex; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 14px; }
.address-links a:hover { color: var(--accent); }
.address-links a span { color: var(--accent); }
.quickstart-base { padding: 20px; background: var(--bg); border-radius: 8px; }
.quickstart-base .eyebrow { font-size: 10px; margin-bottom: 10px; }
.quickstart-base .help { margin: 10px 0 0; }
.student-guide-heading { max-width: 1240px; }
.student-guide-nav { max-height: calc(100vh - 132px); overflow-y: auto; align-items: stretch; }
.student-guide-nav h2 { font-size: 14px; letter-spacing: 0; padding: 0 16px; margin-bottom: 12px; }
.student-guide-content { padding-bottom: 50px; }
.student-guide-content li { color: #b2b2ba; font-size: 15px; margin-bottom: 10px; }
.student-guide-content ol, .student-guide-content ul { padding-left: 24px; margin: 0 0 22px; }
.student-guide-content strong { color: var(--ink); }
.student-guide-content th { white-space: normal; }
.student-guide-content th, .student-guide-content td { overflow-wrap: anywhere; }
.student-guide-content pre { margin: 20px 0; }
.student-guide-content .table-scroll { margin-top: 20px; }
.download-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.download-grid a { text-decoration: none; padding: 20px; transition: border-color 200ms, background 200ms; }
.download-grid a:hover { border-color: #ff8a0070; background: #ff8a0009; }
.download-grid strong { display: block; font-size: 15px; margin-bottom: 8px; color: #ffba6b; }
.download-grid span { font-size: 11px; color: var(--muted); }
.loading { padding: 50px; color: var(--muted); }
/* ReDoc owns its layout. Keep portal typography and tables out of its DOM. */
body[data-page=reference] { background: var(--bg); }
#redoc { font-family: var(--sans); }
#redoc h1, #redoc h2, #redoc h3 { text-wrap: wrap; }
#redoc h5, #redoc h5 span { color: var(--muted); border-bottom-color: var(--line); }
#redoc table { background: transparent; }
#redoc th { background: transparent; text-transform: none; letter-spacing: normal; }
#redoc td, #redoc th { border-bottom-color: var(--line); }
#redoc pre { border: 0; }
#redoc button:disabled { cursor: default; }
#redoc input { min-height: 36px; }
/* Motion is opt-in. Content is visible even if the enhancement script fails. */
[data-spotlight]::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(240px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), #ff8a0019, transparent 75%); opacity: 0; pointer-events: none; transition: opacity 250ms; }
[data-spotlight].pointer-active::before { opacity: 1; }
.button-ripple { position: absolute; z-index: -1; border-radius: 50%; background: currentColor; opacity: .18; pointer-events: none; animation: ripple-out 450ms ease-out forwards; }
[data-magnetic] { translate: var(--magnet-x, 0px) var(--magnet-y, 0px); transition: translate 300ms var(--spring), background 180ms, box-shadow 250ms, transform 180ms; }
@keyframes ripple-out { from { transform: scale(0); opacity: .22; } to { transform: scale(2.5); opacity: 0; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes bar-in { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  [data-panel]:not([hidden]), #report-panel:not([hidden]), .token-result:not([hidden]) { animation: panel-in 220ms ease-out; }
  .notice:not([hidden]), dialog[open] { animation: toast-in 350ms var(--spring); }
  .bar-fill { animation: bar-in 350ms ease-out; }
}
@media (min-width: 1400px) {
  .hero { padding-block: 110px 96px; }
}
@media (max-width: 1100px) {
  .wrap, .header-inner { width: calc(100% - 64px); }
  .hero { gap: 36px; }
  .hero h1 { font-size: 48px; }
  .hero .actions { gap: 10px; }
  .hero .button { padding-inline: 17px; font-size: 12px; }
  .terminal-body { padding-inline: 20px; }
  .terminal pre { font-size: 10px; }
  .facts > div { display: block; }
  .facts > div > span { display: block; margin-top: 5px; max-width: none; }
  .auth-layout { gap: 44px; grid-template-columns: minmax(0, 1fr) 410px; }
  .guide-layout { gap: 32px; grid-template-columns: 195px minmax(0, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 24px; }
  .step-top { margin-bottom: 30px; }
  .learning-banner { padding: 36px; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 60px; gap: 40px; }
  .hero-copy { max-width: 650px; }
  .hero h1 { font-size: 62px; }
  .terminal-stage { max-width: 650px; width: 100%; }
  .terminal pre { font-size: 12px; }
  .three.steps { grid-template-columns: minmax(0, 1fr); }
  .step-top { margin-bottom: 26px; }
  .auth-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; min-height: 0; padding-block: 50px; }
  .auth-card { width: min(100%, 560px); }
  .auth-intro h1 { font-size: 48px; }
  .learning-banner h2 { font-size: 34px; }
  .access-banner { flex-wrap: wrap; gap: 20px; }
}
@media (max-width: 760px) {
  .wrap, .header-inner { width: calc(100% - 36px); }
  .header-inner { min-height: 68px; gap: 14px; flex-wrap: wrap; padding-block: 12px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand-icon { width: 29px; height: 29px; font-size: 14px; }
  .brand-light { display: none; }
  .header nav { margin-left: auto; max-width: 100%; flex-wrap: wrap; justify-content: flex-end; gap: 14px; }
  nav > a { font-size: 11px; }
  .button.small { font-size: 11px; padding: 8px 12px; }
  .hero { padding-block: 44px; gap: 34px; }
  .hero h1 { font-size: clamp(38px, 8.4vw, 60px); }
  .hero .eyebrow { font-size: 9px; letter-spacing: .09em; margin-bottom: 23px; }
  .lead { font-size: 15px; }
  .hero .actions { margin-block: 26px 24px; }
  .hero .button { font-size: 12px; min-height: 46px; padding-inline: 17px; }
  .terminal-body { padding: 22px 17px 8px; }
  .terminal pre { font-size: 10px; }
  .terminal-bar { padding-inline: 17px; font-size: 9px; }
  .terminal-footer { padding-inline: 17px; font-size: 8px; }
  .terminal-caption { font-size: 9px; }
  .facts { gap: 16px; padding-block: 23px; }
  .facts > div + div { padding-left: 16px; }
  .facts strong { font-size: 19px; white-space: normal; }
  .fact-mark { display: none; }
  .facts > div > span { font-size: 10px; }
  .section { padding-block: 52px; }
  .section-heading h2 { font-size: 31px; }
  .section-heading .eyebrow { margin-bottom: 18px; }
  .three, .two { grid-template-columns: minmax(0, 1fr); }
  .learning-banner { display: block; padding: 27px 24px; margin-bottom: 52px; }
  .learning-banner h2 { font-size: 30px; }
  .learning-banner .button { margin-top: 26px; }
  .footer { flex-wrap: wrap; padding-block: 24px; gap: 14px; }
  .footer p { width: 100%; order: 3; font-size: 10px; }
  .footer > a:last-child { margin-left: auto; font-size: 10px; }
  .auth-layout { gap: 30px; padding-block: 38px; }
  .auth-intro h1 { font-size: 40px; }
  .auth-card { padding: 24px; }
  .auth-intro .eyebrow { margin-bottom: 18px; }
  .auth-intro .lead { font-size: 14px; }
  .page-heading { padding-block: 38px 28px; }
  .page-heading h1 { font-size: 34px; }
  .compact h1 { font-size: 28px; }
  .page-heading.compact { align-items: flex-start; gap: 12px; }
  .compact .pill { margin-top: 8px; font-size: 9px; }
  .tabs { gap: 23px; margin-bottom: 24px; }
  .tabs button { font-size: 12px; }
  .access-banner { padding: 20px; }
  .access-banner code { font-size: 12px; }
  .inline-links { flex-wrap: wrap; font-size: 12px; }
  .reference-frame { height: 760px; }
  .panel-heading { flex-wrap: wrap; gap: 14px; }
  .panel-heading h2 { font-size: 24px; }
  .panel-heading .button { min-height: 42px; font-size: 12px; }
  .filters label { min-width: calc(50% - 12px); max-width: none; }
  .metric { padding: 18px; }
  .metric strong { font-size: 28px; }
  .metric-grid { gap: 12px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-actions .actions { align-items: stretch; flex-direction: column; }
  .pagination { font-size: 10px; }
  .pagination .button { padding: 10px 12px; font-size: 11px; }
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .guide-nav { position: static; flex-direction: row; overflow: auto; white-space: nowrap; border-block: 1px solid var(--line); border-left: 0; padding-block: 8px; }
  .guide-nav a { padding: 8px 12px; }
  .guide-content h2 { font-size: 24px; }
  .guide-content p { font-size: 14px; }
  .quickstart-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .quickstart-steps li { padding-left: 46px; padding-bottom: 20px; margin-bottom: 20px; }
  .quickstart-steps h3 { font-size: 19px; }
  .quickstart-steps p, .student-guide-content li { font-size: 14px; }
  .quickstart-base { padding: 16px; }
  .student-guide-nav { flex-direction: column; align-items: stretch; max-height: none; overflow: visible; white-space: normal; padding-block: 18px; }
  .student-guide-nav a { margin-left: 0; }
  .student-guide-content th, .student-guide-content td { min-width: 150px; }
  .download-grid { grid-template-columns: minmax(0, 1fr); }
  .download-grid a { padding: 16px; }
  .download-grid strong { margin-bottom: 3px; }
  .notice { right: 16px; left: 16px; top: 94px; max-width: none; }
  pre { font-size: 11px; padding: 18px; }
  th, td { padding: 13px 12px; }
  .password-card { padding: 22px; }
  .token-result { padding: 14px; }
  html { scroll-padding-top: 130px; }
}
@media (hover: none), (pointer: coarse) {
  [data-tilt] { transform: none !important; }
  [data-magnetic] { translate: none !important; }
  [data-spotlight]::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-tilt] { transform: none !important; }
  [data-magnetic] { translate: none !important; }
  .button-ripple, [data-spotlight]::before { display: none; }
}

/* Research assignment and topic selection */
[hidden] { display: none !important; }
.assignment-facts { display:grid; grid-template-columns:repeat(4,1fr); gap:24px; border-top:1px solid var(--line); padding-top:28px; margin-top:48px; }
.assignment-facts strong { display:block; font-size:clamp(28px,4vw,44px); color:var(--accent); line-height:1.2; }
.assignment-facts span { display:block; color:var(--muted); margin-top:10px; font-size:14px; }
.assignment-text h2 { margin:44px 0 18px; scroll-margin-top:110px; }
.assignment-text h2:first-child { margin-top:0; }
.assignment-text p { white-space:normal; overflow-wrap:anywhere; }
.critical-note { border-color:var(--danger); }
.topic-controls { display:grid; grid-template-columns:1.3fr 1fr .7fr; gap:16px; margin:28px 0 16px; }
.topic-controls label { min-width:0; }
.topic-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.topic-card { padding:24px; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper); display:flex; flex-direction:column; transition:border-color .2s,background .2s; min-width:0; }
.topic-card:hover { border-color:#6f512e; background:#1e1d1c; }
.topic-card.is-mine { border-color:var(--accent); background:var(--accent-soft); }
.topic-meta { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.topic-number { font-family:var(--mono); font-size:24px; color:var(--accent); }
.topic-category { color:var(--muted); text-transform:uppercase; letter-spacing:.06em; font-size:10px; margin:20px 0 10px; }
.topic-card h3 { font-size:20px; line-height:1.35; margin:0 0 20px; font-weight:600; }
.topic-card details { font-size:14px; color:var(--muted); }
.topic-card summary { cursor:pointer; color:var(--ink); }
.topic-card details p { margin:12px 0; }
.topic-action { margin-top:auto; padding-top:22px; }
.topic-action button { width:100%; white-space:normal; }
.topic-action button:disabled { opacity:.65; }
.topic-catalog { scroll-margin-top:100px; }
.research-current { margin:24px 0 48px; }
.research-current h3 { font-size:24px; margin:20px 0; }
.custom-proposal { margin-top:48px; }
.custom-proposal form { max-width:760px; margin-top:24px; }
.custom-proposal fieldset { margin:0; padding:0; border:0; display:grid; gap:20px; min-width:0; }
textarea { width:100%; resize:vertical; min-height:100px; padding:12px 14px; background:var(--bg); border:1px solid var(--line); border-radius:8px; color:var(--ink); font:inherit; }
textarea:focus-visible,summary:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
fieldset:disabled { opacity:.55; }
.proposal-detail h4 { color:var(--muted); font-size:13px; font-weight:500; margin:18px 0 4px; }
.proposal-detail p,.teacher-comment { white-space:pre-wrap; overflow-wrap:anywhere; }
.research-history { margin-top:24px; border-top:1px solid var(--line); padding-top:18px; }
.research-history summary { cursor:pointer; }
.research-history ol { list-style:none; padding:0; }
.research-history li { border-left:2px solid var(--line); padding:8px 16px; margin:14px 0; }
.research-history time,.research-history strong,.research-history span { display:block; }
.research-history time { color:var(--muted); font-size:12px; }
.research-history span { font-size:14px; }
.research-students { display:grid; gap:12px; margin-top:24px; }
.research-student { padding:20px 24px; }
.research-student>summary { display:flex; align-items:center; justify-content:space-between; gap:16px; cursor:pointer; }
.research-student>summary small { display:block; color:var(--muted); margin-top:4px; }
.research-student-body { padding-top:20px; }
.badge.pending { color:var(--accent); border-color:var(--accent); }
#research-dialog { max-width:650px; width:calc(100% - 32px); }
#research-dialog-context { overflow-wrap:anywhere; }
@media (max-width:1100px) { .topic-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .topic-controls { grid-template-columns:1fr 1fr; } }
@media (max-width:650px) { .topic-grid,.topic-controls { grid-template-columns:1fr; } .topic-card { padding:20px; } .assignment-facts { grid-template-columns:1fr 1fr; gap:24px 16px; } .research-student>summary { align-items:flex-start; flex-direction:column; } .topic-catalog .panel-heading { align-items:flex-start; flex-direction:column; } }

.custom-proposal { scroll-margin-top:110px; }
@media (max-width:760px) {
  html { scroll-padding-top:190px; }
  .topic-catalog,.custom-proposal,.assignment-text h2 { scroll-margin-top:0; }
}
@media (max-width:360px) { html { scroll-padding-top:220px; } }
