/* Three local design directions share markup and keep the same product behavior. */
:root {
  color-scheme: light;
  --bg: #f7f7fa; --panel: #fff; --ink: #262536; --muted: #666575;
  --line: #e3e2eb; --lime: #6e49bd; --accent: #6e49bd;
  --accent-soft: #f0eafa; --accent-ink: #fff; --danger: #b43a4a;
  --amber: #8b621d; --success: #287250; --code-bg: #f5f3fa;
  --radius: 14px; --shadow: 0 8px 30px #25213708;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-family: var(--sans); font-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 15px/1.65 var(--sans); }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button:disabled, .primary:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img, svg { max-width: 100%; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -.035em; }
h2 { font-size: 25px; } h3 { font-size: 19px; }
p { margin-bottom: 1em; }
code, pre { font-family: var(--mono); }
::selection { background: var(--accent-soft); color: var(--ink); }
.muted, .lede, .page-description, .hero-description { color: var(--muted); }
.eyebrow { display: block; margin: 0 0 12px; color: var(--accent); font: 700 11px/1.5 var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 12px 18px; background: var(--panel); color: var(--ink); }
.skip-link:focus { top: 12px; }
.button, .primary, .download-link, .nav button, .nav a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; max-width: 100%; padding: 10px 18px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--ink); text-decoration: none;
  font-size: 14px; font-weight: 600; line-height: 1.45; text-align: center;
  transition: background .15s, border-color .15s, transform .15s;
}
.button:hover, .nav a:hover, .nav button:hover { border-color: var(--accent); background: var(--accent-soft); }
.button-primary, .primary, .download-link { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.button-primary:hover, .primary:hover, .download-link:hover { filter: brightness(.94); background: var(--accent); color: var(--accent-ink); }
.button-secondary { background: transparent; }
.button-small { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.primary { width: 100%; cursor: pointer; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 760; letter-spacing: -.045em; white-space: nowrap; }
.brand-mark { display: inline-grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font: 700 17px/1 var(--mono); letter-spacing: -.1em; }
.brand-mark svg { width: 21px; height: 21px; }
.brand > span:last-child { line-height: 1.2; }
.brand-caption { display: block; margin-top: 5px; color: var(--muted); font: 500 8px/1.5 var(--mono); letter-spacing: .105em; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(1240px, calc(100% - 80px)); min-height: 88px; margin: auto; border-bottom: 1px solid var(--line); }
.public-nav, .nav { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; font-size: 13px; }
.public-nav > a:not(.button) { padding: 10px 0; color: var(--muted); text-decoration: none; }
.public-nav > a:hover { color: var(--accent); }
.public-nav form, .nav form { margin: 0; }
.stage-badge, .status-badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; color: var(--muted); background: var(--panel); font: 600 10px/1.5 var(--mono); letter-spacing: .025em; }
.stage-badge { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.version-tag { display: inline-block; margin-left: 5px; padding: 2px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 500 10px/1.5 var(--mono); vertical-align: middle; letter-spacing: 0; }

/* Workspace and existing pages. */
.workspace-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 34px; position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; padding: 32px 22px 22px; border-right: 1px solid var(--line); background: var(--panel); overflow-y: auto; }
.sidebar .brand { margin: 0 8px; font-size: 21px; }
.sidebar-nav { display: grid; gap: 26px; }
.nav-group { display: grid; gap: 4px; }
.nav-label { margin: 0 12px 6px; color: var(--muted); font: 650 10px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 7px; color: var(--muted); text-decoration: none; font-size: 13px; line-height: 1.5; }
.nav-item:hover { color: var(--ink); background: var(--bg); }
.nav-item.active, .nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav-icon { width: 17px; flex-shrink: 0; text-align: center; opacity: .8; }
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.sidebar-footer, .sidebar-foot { display: grid; gap: 10px; margin-top: auto; padding: 20px 10px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.sidebar-foot p { margin: 0; line-height: 1.9; }
.workspace-main { min-width: 0; width: 100%; max-width: 1660px; padding: 0 44px 64px; }
.workspace-content { min-width: 0; }
.workspace-content > header:not(.page-heading) { margin-bottom: 28px; }
.workspace-content > header:not(.page-heading) h1 { margin: 0 0 10px; font-size: clamp(28px, 3.2vw, 40px); font-weight: 690; }
.workspace-content > header:not(.page-heading) .lede { max-width: 760px; margin: 0; font-size: 14px; }
.workspace-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font: 10px/1.8 var(--mono); }
.workspace-topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; min-height: 85px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.workspace-topbar > :first-child { margin: 0; }
.user-menu { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 16px; font-size: 12px; }
.user-menu > span { color: var(--muted); max-width: 20em; overflow-wrap: anywhere; }
.account-menu { position: relative; }
.account-menu summary { padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); font-size: 12px; }
.account-menu summary { display: flex; align-items: center; gap: 9px; max-width: min(350px, 80vw); overflow-wrap: anywhere; list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.avatar { display: inline-grid; place-items: center; flex: 0 0 23px; width: 23px; height: 23px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: 600 10px/1 var(--mono); }
.account-dropdown { text-wrap: pretty; }
.account-menu > div, .account-menu > nav, .account-menu > ul { position: absolute; right: 0; z-index: 20; display: grid; gap: 3px; min-width: 180px; max-width: min(320px, 85vw); padding: 8px; margin: 8px 0 0; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px #10102818; }
.account-menu a, .account-menu button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--ink); font: inherit; text-align: left; text-decoration: none; }
.account-menu a:hover, .account-menu button:hover { background: var(--accent-soft); }
.account-menu form { margin: 0; }
.page-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-heading:has(> .page-title) { row-gap: 8px; }
.page-heading > .eyebrow, .page-heading > .page-title, .page-heading > .page-description { flex-basis: 100%; margin: 0; }
.page-title, .workspace-main > header h1 { margin: 0 0 10px; font-size: clamp(28px, 3.2vw, 40px); font-weight: 690; }
.page-description, .workspace-main > header .lede { max-width: 760px; margin: 0; font-size: 14px; line-height: 1.8; }
.workspace-main > header { margin-bottom: 28px; }
.shell { width: min(1140px, calc(100% - 48px)); margin: auto; padding: 36px 0 64px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 36px; }
.panel { min-width: 0; margin-top: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: 13px; }
.panel-head h2, .panel-head h3, .panel-head p { margin: 0; }
.meta { color: var(--muted); font: 11px/1.6 var(--mono); overflow-wrap: anywhere; }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { text-align: left; padding: 18px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: color-mix(in srgb, var(--bg) 65%, var(--panel)); color: var(--muted); font: 650 10px/1.4 var(--mono); letter-spacing: .045em; white-space: nowrap; }
td { font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 45%, var(--panel)); }
.rank { color: var(--accent); font: 650 15px/1.5 var(--mono); white-space: nowrap; }
.metric { font: 600 12px/1.5 var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.strategy { min-width: 185px; max-width: 380px; }
.strategy strong, .strategy small { display: block; overflow-wrap: anywhere; }
.strategy strong { font-weight: 630; font-size: 13px; }
.strategy small { margin-top: 5px; color: var(--muted); font: 10px/1.6 var(--mono); }
.warning { display: inline-block; padding: 4px 7px; border: 1px solid color-mix(in srgb, var(--amber) 25%, transparent); border-radius: 5px; background: color-mix(in srgb, var(--amber) 6%, var(--panel)); color: var(--amber); font: 500 10px/1.6 var(--mono); overflow-wrap: anywhere; }
.empty { padding: 60px 24px; color: var(--muted); text-align: center; }
.empty h2, .empty h3 { color: var(--ink); }
.card, .docs-card { min-width: 0; padding: 28px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card { width: min(460px, 100%); margin: 28px auto 0; }
.card h1 { font-size: 30px; }
.card h2, .docs-card h2 { margin: 0 0 14px; font-size: 21px; }
.docs { display: grid; gap: 20px; margin-top: 24px; }
.docs-card h3 { margin: 26px 0 12px; font-size: 16px; }
.docs-card p, .docs-list { color: var(--muted); font-size: 13px; line-height: 1.85; }
.docs-list { padding-left: 22px; }
.docs-list li { padding-left: 4px; margin-bottom: 8px; }
.docs-card code { color: var(--accent); overflow-wrap: anywhere; }
.code { max-width: 100%; margin: 16px 0; padding: 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--code-bg); color: var(--ink); font: 12px/1.85 var(--mono); white-space: pre; }
.code code { color: inherit; overflow-wrap: normal; }
.endpoint { display: inline-block; padding: 4px 7px; margin-right: 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font: 650 11px/1.5 var(--mono); }
.download-link { margin-top: 8px; }
.token-card { width: 100%; max-width: none; margin: 24px 0 0; }
.token-panel { margin-top: 24px; }
.token-value { color: var(--accent); font: 600 12px/1.8 var(--mono); overflow-wrap: anywhere; user-select: all; }
.danger-button { padding: 8px 11px; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); border-radius: 6px; background: transparent; color: var(--danger); font-size: 12px; }
.danger-button:hover { background: color-mix(in srgb, var(--danger) 7%, var(--panel)); }
.field { margin: 22px 0; }
.field label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 12px; font-weight: 600; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea { display: block; width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); }
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
.field .helptext, .field small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.field ul { padding-left: 20px; color: var(--muted); font-size: 11px; }
.card form > div:not(.field) { margin: 20px 0; }
.card form > div > label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.card form > div > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.card form > div > select, .card form > div > textarea { display: block; width: 100%; min-width: 0; padding: 11px 13px; min-height: 46px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--ink); }
.card .helptext, .card .helptext ul { color: var(--muted); font-size: 11px; line-height: 1.8; }
.card .helptext ul { padding-left: 20px; }
.field .errorlist { color: var(--danger); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
.notice { padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.notice + .notice { margin-top: 10px; }
.errorlist { padding-left: 20px; color: var(--danger); font-size: 12px; line-height: 1.8; }

/* Public landing: the preview is illustrative, never styled as a live result. */
.landing-main { width: min(1160px, calc(100% - 80px)); margin: auto; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 64px; padding: 104px 0 88px; }
.hero-copy { min-width: 0; }
.hero-title { margin: 0 0 28px; font-size: clamp(44px, 4.8vw, 68px); font-weight: 720; letter-spacing: -.06em; line-height: 1.14; text-wrap: balance; }
.hero-title span, .hero-title em { color: var(--accent); font-style: normal; }
.hero-description { max-width: 540px; margin-bottom: 30px; font-size: 15px; line-height: 1.95; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 26px; color: var(--muted); font: 11px/1.7 var(--mono); }
.hero-visual { position: relative; isolation: isolate; min-width: 0; padding: 28px 0 28px 24px; }
.hero-visual::before { content: ""; position: absolute; inset: 0 -22px 0 0; z-index: -1; border-radius: 28px; background: var(--accent-soft); }
.preview-window { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 20px 55px #40345810; overflow: hidden; }
.preview-window-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font: 10px/1.5 var(--mono); }
.preview-window-bar > span:first-child { color: var(--accent); }
.preview-window-bar { flex-wrap: wrap; }
.preview-score { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; padding: 28px 22px; }
.preview-score:has(> h2) { display: block; }
.preview-score > h2 { margin: 14px 0; font-size: 30px; font-weight: 620; letter-spacing: -.045em; line-height: 1.4; }
.preview-score strong { display: block; color: var(--ink); font: 600 36px/1.2 var(--mono); letter-spacing: -.07em; }
.preview-score p, .preview-score small { margin: 0; color: var(--muted); font-size: 11px; }
.preview-rows { padding: 0 18px 18px; }
.preview-rows > div { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 8px; border-top: 1px solid var(--line); color: var(--muted); font: 11px/1.6 var(--mono); }
.preview-rows strong { color: var(--ink); font-weight: 600; }
ol.preview-rows { margin: 0; list-style: none; }
.preview-rows > li { display: grid; grid-template-columns: 26px minmax(0, 1fr) 16px; align-items: center; gap: 14px; padding: 16px 5px; border-top: 1px solid var(--line); }
.preview-rows > li .step-number { margin: 0; color: var(--accent); font: 500 11px/1.5 var(--mono); }
.preview-rows > li strong { display: block; font-size: 12px; }
.preview-rows > li small { display: block; margin-top: 3px; color: var(--muted); font: 10px/1.7 var(--mono); overflow-wrap: anywhere; }
.preview-rows > li > span:last-child { color: var(--muted); font-size: 13px; }
.preview-caption { margin: 14px 0 0; color: var(--muted); font: 10px/1.7 var(--mono); text-align: right; }
.section { padding: 65px 0; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; font-size: 30px; }
.section-heading p { max-width: 440px; margin: 0; color: var(--muted); font-size: 13px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step-card { min-width: 0; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.step-number, .step-card > span:first-child { display: block; margin-bottom: 28px; color: var(--accent); font: 600 12px/1.5 var(--mono); }
.step-card h3 { margin-bottom: 12px; font-size: 19px; }
.step-card p { margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.step-card > a { display: inline-block; margin-top: 22px; color: var(--accent); font-size: 12px; text-decoration: none; font-weight: 600; }
.step-card > a:hover { text-decoration: underline; }
.principles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.principle { min-width: 0; }
.principle h3 { font-size: 18px; }
.principle p { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.track-card { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 48px; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.track-card h3 { font-size: 25px; }
.track-card p { color: var(--muted); font-size: 13px; }
.track-card > .button { justify-self: end; align-self: center; }
.track-card > dl:only-child { grid-column: 1 / -1; }
.track-card h2 { font-size: 27px; }
.track-card .button { margin-top: 20px; }
.track-facts { display: grid; gap: 0; margin: 0; }
.track-facts > div { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.track-facts > div:first-child { padding-top: 0; }
.track-facts dt { color: var(--muted); }
.track-facts dd { margin: 0; font-weight: 600; }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; width: min(1160px, calc(100% - 80px)); margin: auto; padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 16px; }
body[data-ui="studio"].public-page { background: var(--panel); }

/* Authentication: content and form remain independent at narrow widths. */
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 84px; width: min(1060px, calc(100% - 80px)); min-height: calc(100vh - 90px); margin: auto; padding: 72px 0; }
.auth-story { max-width: 460px; }
.auth-story h1 { margin: 0 0 24px; font-size: clamp(36px, 4vw, 54px); line-height: 1.2; letter-spacing: -.055em; }
.auth-story p { color: var(--muted); font-size: 14px; line-height: 1.9; }
.auth-form-panel { min-width: 0; }
body.auth-page[data-ui] .landing-main { width: 100%; max-width: none; }
.auth-story-facts { display: grid; gap: 12px; margin: 26px 0 30px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.auth-story-facts > span::before { content: "—"; margin-right: 12px; color: var(--accent); }
.auth-card { width: 100%; max-width: 460px; padding: 36px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.auth-card h1, .auth-card h2 { margin: 0 0 10px; font-size: 27px; }
.auth-card > p { color: var(--muted); font-size: 12px; }
.auth-card .notice { margin-top: 22px; }
.auth-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 20px; color: var(--muted); font-size: 12px; }
.auth-card .auth-help { margin: 22px 0 12px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.text-link { color: var(--accent); font-size: 12px; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.preview-credentials { margin-top: 26px; padding-top: 18px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 11px; }
.preview-credentials summary { padding-block: 6px; }
.preview-credentials p { margin: 12px 0 0; overflow-wrap: anywhere; }
.rules-document { margin: 24px 0; }
.rules-document > summary { color: var(--ink); font-weight: 600; font-size: 14px; }
.rules-document .code { white-space: pre-wrap; overflow-wrap: anywhere; }
.faq-content { max-width: 940px; margin: auto; }
.faq-content details { border-top: 1px solid var(--line); }
.faq-content summary { padding: 17px 0; color: var(--ink); font-size: 13px; font-weight: 550; }
.faq-content details p { max-width: 750px; padding: 0 18px 8px; margin: 0; }
.faq-content details[open] summary { color: var(--accent); }

/* Run list/detail primitives; structured information never relies on color alone. */
.run-grid, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.run-grid > *, .detail-grid > * { min-width: 0; }
.detail-list { display: grid; grid-template-columns: minmax(120px, .65fr) minmax(0, 1.7fr); margin: 0; padding: 8px 22px; }
.detail-list > div { display: grid; grid-template-columns: minmax(110px, .7fr) minmax(0, 1.6fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.detail-list > div { grid-column: 1 / -1; }
.detail-list dt { color: var(--muted); font-size: 12px; }
.detail-list dd { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.detail-list > dt, .detail-list > dd { padding: 14px 0; border-bottom: 1px solid var(--line); }
.detail-list > dt { padding-right: 16px; }
.detail-list > dd { font-family: var(--mono); font-size: 12px; }
.detail-list > :nth-last-child(-n+2) { border-bottom: 0; }
.workspace-details > summary { padding: 18px 22px; color: var(--muted); font-size: 13px; font-weight: 600; }
.workspace-details[open] > summary { border-bottom: 1px solid var(--line); }
.workspace-onboarding { padding-bottom: 0; }
.run-detail .empty { margin: 0; padding: 20px 22px; text-align: left; }
.run-detail .empty p:last-child { margin-bottom: 0; }
.run-detail .panel > .empty + .empty { padding-top: 0; }
.detail-grid .empty { padding: 26px 22px; margin: 0; text-align: left; }
.panel > .meta { margin: 0; padding: 16px 22px; border-top: 1px solid var(--line); }
.timeline { padding-left: 22px; margin: 20px 0; border-left: 1px solid var(--line); list-style: none; }
.timeline > li { position: relative; padding: 0 0 25px 0; overflow-wrap: anywhere; }
.panel > .timeline { margin: 24px 28px 24px 32px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.timeline > li::before { content: ""; position: absolute; top: .45em; left: -27px; width: 9px; height: 9px; border: 2px solid var(--panel); border-radius: 50%; background: var(--accent); outline: 1px solid var(--line); }
.timeline time { display: block; color: var(--muted); font: 10px/1.8 var(--mono); }
.status-badge.success, .status-badge.evaluated, .status-evaluated { color: var(--success); }
.status-badge.failed, .status-failed { color: var(--danger); }
.status-badge.paused, .status-paused { color: var(--amber); }
.status-badge[data-state="evaluated"] { color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, var(--line)); }
.status-badge[data-state="running"], .status-badge[data-state="in_progress"] { color: var(--accent); background: var(--accent-soft); }
.status-badge[data-state="compile_failed"], .status-badge[data-state="contract_failed"], .status-badge[data-state="runtime_failed"] { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }
.status-badge[data-state="paused"], .status-badge[data-state="infrastructure_failed"], .status-badge[data-state="evaluator_failed"] { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 30%, var(--line)); }
.status-badge[data-state="submitted"], .status-badge[data-state="pending"], .status-badge[data-state="queued"], .status-badge[data-state="superseded"] { color: var(--muted); }

/* Comparison UI is deliberately separate from the product navigation. */
.design-switcher { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; padding: 9px 18px; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 11px/1.6 var(--mono); }
.design-switcher-label { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 10px; margin-right: 12px; color: var(--ink); font-weight: 600; text-decoration: none; }
.design-switcher-label span { color: var(--muted); font-size: 10px; font-weight: 400; }
.design-switcher nav { display: flex; flex-wrap: wrap; gap: 4px; }
.design-option { display: inline-flex; align-items: center; min-height: 32px; padding: 5px 10px; border: 1px solid transparent; border-radius: 5px; text-decoration: none; }
.design-option:hover, .design-option.active, .design-option[aria-current="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--line); }
.design-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 30px 0; }
.design-card { display: flex; flex-direction: column; min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.design-card h2, .design-card h3 { margin: 18px 0 10px; font-size: 21px; }
.design-card p { color: var(--muted); font-size: 12px; }
.design-card > .eyebrow { margin: 20px 0 8px; color: var(--accent); font-size: 10px; }
.design-card > .eyebrow + h2 { margin-top: 0; }
.design-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.design-card-actions { align-items: center; margin-top: auto; padding-top: 14px; }
.design-card-actions > a:not(.button) { padding: 8px 2px; font-size: 11px; color: var(--muted); }
.design-preview { display: grid; grid-template-columns: 24% 1fr; min-height: 160px; border: 1px solid #e4e1ed; border-radius: 7px; overflow: hidden; background: #f8f7fb; color: #4b465c; }
.design-mini-sidebar { display: flex; flex-direction: column; gap: 10px; padding: 16px 10px; border-right: 1px solid #e4e1ed; background: #fff; }
.design-mini-sidebar span, .design-mini-sidebar i { height: 5px; width: 85%; border-radius: 2px; background: #ded5ed; }
.design-mini-main { display: flex; flex-direction: column; gap: 9px; padding: 18px; }
.design-mini-main > span, .design-mini-main > i { display: block; height: 8px; background: #e8e4f0; border-radius: 2px; }
.design-mini-main > :first-child { width: 55%; height: 14px; margin-bottom: 14px; background: #9d87be; }
.design-card[data-concept="terminal"] .design-preview, .design-preview.terminal { grid-template-columns: 1fr; grid-template-rows: 28px 1fr; background: #10191d; border-color: #344048; color: #ddedee; }
.design-card[data-concept="terminal"] .design-mini-sidebar, .design-preview.terminal .design-mini-sidebar { flex-direction: row; align-items: center; padding: 9px; border-right: 0; border-bottom: 1px solid #344048; background: #152126; }
.design-card[data-concept="editorial"] .design-preview, .design-preview.editorial { grid-template-columns: 1fr; grid-template-rows: 34px 1fr; background: #f8f5ee; border-color: #dbd7cb; }
.design-card[data-concept="editorial"] .design-mini-sidebar, .design-preview.editorial .design-mini-sidebar { flex-direction: row; align-items: center; padding: 10px 16px; border-right: 0; border-bottom: 1px solid #dbd7cb; background: #f8f5ee; }
.design-mini-sidebar > span:first-child { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; margin-bottom: 8px; font: 700 11px/1 var(--mono); color: #6e49bd; background: #eee8f6; }
.design-mini-main > span:first-child { width: auto; height: auto; min-height: 10px; margin-bottom: 2px; color: #6d657c; background: transparent; font: 500 7px/1.5 var(--mono); letter-spacing: .09em; }
.design-mini-main > strong { font: 650 17px/1.3 var(--sans); letter-spacing: -.035em; }
.design-mini-table { display: grid; gap: 6px; margin-top: 8px; }
.design-mini-table i { display: block; height: 5px; border-radius: 1px; background: #e4deee; }
.design-card[data-concept="terminal"] .design-mini-sidebar > span:first-child, .design-card[data-concept="editorial"] .design-mini-sidebar > span:first-child { margin-bottom: 0; width: 18px; height: 18px; }
.design-card[data-concept="terminal"] .design-mini-sidebar > span:first-child { color: #69dfce; background: #25403e; }
.design-card[data-concept="terminal"] .design-mini-main > span:first-child { color: #9aaeb8; }
.design-card[data-concept="terminal"] .design-mini-main > strong { color: #69dfce; font: 500 15px/1.5 var(--mono); }
.design-card[data-concept="terminal"] .design-mini-table i { background: #2e424a; }
.design-card[data-concept="editorial"] .design-mini-main > strong { color: #23374b; font: 500 23px/1.1 Georgia, serif; }
.design-card[data-concept="editorial"] .design-mini-table i { background: #ddd9cd; }
.design-preview { min-height: 200px; }

/* B — Terminal: a dense, horizontal, developer-facing instrument. */
body[data-ui="terminal"] {
  color-scheme: dark; --bg: #10171c; --panel: #151f26; --ink: #e3ecef; --muted: #9aaeb8;
  --line: #2c3c46; --accent: #69dfce; --lime: #69dfce; --accent-soft: #203b3b;
  --accent-ink: #102723; --danger: #ffa79e; --amber: #e2bc70; --success: #85d8b0;
  --code-bg: #0b1216; --radius: 4px; --shadow: none;
  font-family: var(--mono); font-size: 13px;
}
body[data-ui="terminal"] .button, body[data-ui="terminal"] .primary,
body[data-ui="terminal"] .download-link { border-radius: 3px; font-family: var(--mono); font-size: 12px; }
body[data-ui="terminal"] .brand { font-family: var(--mono); font-size: 19px; letter-spacing: -.07em; }
body[data-ui="terminal"] .brand-mark { border-radius: 3px; background: transparent; border: 1px solid var(--accent); color: var(--accent); }
body[data-ui="terminal"] .site-header { width: calc(100% - 64px); min-height: 72px; }
body[data-ui="terminal"] .public-nav { font: 11px/1.6 var(--mono); gap: 24px; }
body[data-ui="terminal"] .workspace-shell { display: block; }
body[data-ui="terminal"] .sidebar { position: relative; display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 20px 30px; height: auto; min-height: 76px; padding: 16px 30px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
body[data-ui="terminal"] .sidebar .brand { margin: 0; }
body[data-ui="terminal"] .sidebar-nav { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
body[data-ui="terminal"] .nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
body[data-ui="terminal"] .nav-label { margin: 0 5px 0 0; font-size: 9px; }
body[data-ui="terminal"] .nav-item { padding: 7px 10px; min-height: 36px; border-radius: 3px; font-size: 11px; }
body[data-ui="terminal"] .sidebar-footer, body[data-ui="terminal"] .sidebar-foot { display: none; }
body[data-ui="terminal"] .workspace-main { max-width: none; padding: 0 32px 48px; }
body[data-ui="terminal"] .workspace-topbar { min-height: 60px; margin-bottom: 26px; }
body[data-ui="terminal"] .page-title, body[data-ui="terminal"] .workspace-main > header h1 { font-family: var(--mono); font-size: clamp(24px, 2.5vw, 34px); letter-spacing: -.055em; }
body[data-ui="terminal"] .workspace-content > header:not(.page-heading) h1 { font-family: var(--mono); font-size: clamp(24px, 2.5vw, 34px); letter-spacing: -.055em; }
body[data-ui="terminal"] .panel { margin-top: 18px; }
body[data-ui="terminal"] .panel-head { padding: 13px 17px; }
body[data-ui="terminal"] th, body[data-ui="terminal"] td { padding: 12px 17px; }
body[data-ui="terminal"] .leaderboard-data th, body[data-ui="terminal"] .leaderboard-data td { padding-block: 12px; }
body[data-ui="terminal"] .metric { color: var(--ink); }
body[data-ui="terminal"] .docs-card { padding: 24px; }
body[data-ui="terminal"] .landing-main { width: min(1240px, calc(100% - 64px)); }
body[data-ui="terminal"] .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); gap: 60px; padding: 76px 0 64px; }
body[data-ui="terminal"] .hero-title { font-family: var(--mono); font-size: clamp(38px, 4vw, 56px); font-weight: 600; line-height: 1.25; letter-spacing: -.07em; }
body[data-ui="terminal"] .hero-visual { padding: 0; }
body[data-ui="terminal"] .hero-visual::before { display: none; }
body[data-ui="terminal"] .preview-window { border-radius: 3px; box-shadow: 9px 9px 0 #0a1116; }
body[data-ui="terminal"] .preview-window-bar { background: #1a2932; }
body[data-ui="terminal"] .preview-score strong { color: var(--accent); font-size: 40px; }
body[data-ui="terminal"] .preview-score > h2 { font: 500 27px/1.4 var(--mono); letter-spacing: -.04em; }
body[data-ui="terminal"] .preview-rows .step-number { margin: 0; }
body[data-ui="terminal"] .hero-proof { padding-top: 20px; border-top: 1px dashed var(--line); }
body[data-ui="terminal"] .section { padding: 44px 0; }
body[data-ui="terminal"] .section-heading h2 { font: 600 23px/1.4 var(--mono); letter-spacing: -.04em; }
body[data-ui="terminal"] .steps-grid { gap: 0; border: 1px solid var(--line); }
body[data-ui="terminal"] .step-card { border: 0; border-right: 1px solid var(--line); padding: 25px; }
body[data-ui="terminal"] .step-card:last-child { border-right: 0; }
body[data-ui="terminal"] .step-number { margin-bottom: 18px; }
body[data-ui="terminal"] .track-card { padding: 28px; }
body[data-ui="terminal"] .auth-layout { gap: 60px; }
body[data-ui="terminal"] .auth-story h1 { font-family: var(--mono); font-size: 40px; line-height: 1.3; }
body[data-ui="terminal"] .auth-card { border-radius: 4px; border-top: 2px solid var(--accent); }
body[data-ui="terminal"] .auth-card h1, body[data-ui="terminal"] .auth-card h2 { font-family: var(--mono); font-size: 24px; }
body[data-ui="terminal"] .design-switcher { padding-block: 6px; font-size: 10px; }

/* C — Editorial: a spacious paper-like publication, with horizontal navigation. */
body[data-ui="editorial"] {
  color-scheme: light; --bg: #f8f6ef; --panel: #fffef9; --ink: #23374b; --muted: #68717a;
  --line: #dadbcf; --accent: #254b72; --lime: #254b72; --accent-soft: #e8edf1;
  --accent-ink: #fffef9; --danger: #b14a43; --amber: #886124; --success: #3f7054;
  --code-bg: #f0eee7; --radius: 2px; --shadow: none;
}
body[data-ui="editorial"] .brand { font-size: 25px; letter-spacing: -.05em; }
body[data-ui="editorial"] .brand-mark { width: 34px; height: 34px; background: transparent; color: var(--ink); border: 1px solid var(--ink); border-radius: 50%; }
body[data-ui="editorial"] .site-header { min-height: 104px; border-bottom-color: var(--ink); }
body[data-ui="editorial"] .button, body[data-ui="editorial"] .primary, body[data-ui="editorial"] .download-link { border-radius: 2px; padding-inline: 22px; }
body[data-ui="editorial"] .workspace-shell { display: block; }
body[data-ui="editorial"] .sidebar { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 20px 44px; width: min(1360px, calc(100% - 96px)); height: auto; position: relative; padding: 26px 0 20px; margin: auto; border-right: 0; border-bottom: 1px solid var(--ink); background: transparent; overflow: visible; }
body[data-ui="editorial"] .sidebar .brand { margin: 0; }
body[data-ui="editorial"] .sidebar-nav { display: flex; flex-wrap: wrap; gap: 10px 32px; }
body[data-ui="editorial"] .nav-group { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
body[data-ui="editorial"] .nav-label { width: 100%; padding: 0; margin: 0; font-size: 9px; }
body[data-ui="editorial"] .nav-item { min-height: 36px; padding: 5px 0; border-radius: 0; font-size: 12px; border-bottom: 2px solid transparent; }
body[data-ui="editorial"] .nav-item.active { border-color: var(--accent); background: transparent; }
body[data-ui="editorial"] .nav-item:hover { background: transparent; border-color: var(--line); }
body[data-ui="editorial"] .sidebar-footer, body[data-ui="editorial"] .sidebar-foot { display: none; }
body[data-ui="editorial"] .workspace-main { max-width: 1360px; width: calc(100% - 96px); margin: auto; padding: 0 0 72px; }
body[data-ui="editorial"] .workspace-topbar { min-height: 64px; margin-bottom: 52px; border-bottom: 0; }
body[data-ui="editorial"] .page-title, body[data-ui="editorial"] .workspace-main > header h1 { font: 500 clamp(36px, 4vw, 55px)/1.2 Georgia, "Songti SC", "Noto Serif CJK SC", serif; letter-spacing: -.055em; }
body[data-ui="editorial"] .workspace-content > header:not(.page-heading) h1 { font: 500 clamp(36px, 4vw, 55px)/1.2 Georgia, "Songti SC", serif; letter-spacing: -.055em; }
body[data-ui="editorial"] .page-heading, body[data-ui="editorial"] .workspace-main > header { margin-bottom: 38px; }
body[data-ui="editorial"] .panel { border-inline: 0; border-radius: 0; }
body[data-ui="editorial"] .panel-head { padding: 20px 18px; }
body[data-ui="editorial"] th, body[data-ui="editorial"] td { padding: 20px 18px; }
body[data-ui="editorial"] .rank { font: 500 23px/1.3 Georgia, serif; }
body[data-ui="editorial"] .landing-main { width: min(1160px, calc(100% - 96px)); }
body[data-ui="editorial"] .hero { grid-template-columns: minmax(0, 1.4fr) minmax(0, .85fr); align-items: end; padding: 96px 0 84px; gap: 76px; }
body[data-ui="editorial"] .hero-title { font: 500 clamp(52px, 5.6vw, 82px)/1.13 Georgia, "Songti SC", "Noto Serif CJK SC", serif; letter-spacing: -.055em; }
body[data-ui="editorial"] .hero-title span, body[data-ui="editorial"] .hero-title em { color: var(--ink); }
body[data-ui="editorial"] .hero-description { font-size: 16px; line-height: 2; }
body[data-ui="editorial"] .hero-visual { padding: 0 0 4px; }
body[data-ui="editorial"] .hero-visual::before { display: none; }
body[data-ui="editorial"] .preview-window { border-radius: 0; border: 0; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); box-shadow: none; background: transparent; }
body[data-ui="editorial"] .preview-window-bar { padding-inline: 0; font-size: 10px; }
body[data-ui="editorial"] .preview-score { padding: 28px 0; }
body[data-ui="editorial"] .preview-score strong { font: 500 48px/1.1 Georgia, serif; }
body[data-ui="editorial"] .preview-score > h2 { font: 500 35px/1.4 Georgia, "Songti SC", serif; }
body[data-ui="editorial"] .preview-rows { padding: 0; }
body[data-ui="editorial"] .preview-rows > div { padding: 14px 0; }
body[data-ui="editorial"] .preview-rows > li { padding: 16px 0; }
body[data-ui="editorial"] .preview-rows .step-number { margin: 0; padding: 0; border: 0; font: 500 11px/1.5 var(--mono); }
body[data-ui="editorial"] .hero-proof { gap: 12px; margin-top: 32px; }
body[data-ui="editorial"] .section { padding: 70px 0; }
body[data-ui="editorial"] .section-heading h2 { font: 500 36px/1.25 Georgia, "Songti SC", serif; }
body[data-ui="editorial"] .steps-grid { gap: 40px; }
body[data-ui="editorial"] .step-card { padding: 0; border: 0; background: transparent; }
body[data-ui="editorial"] .step-number, body[data-ui="editorial"] .step-card > span:first-child { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--muted); font: 400 27px/1.3 Georgia, serif; }
body[data-ui="editorial"] .step-card h3 { font-size: 21px; }
body[data-ui="editorial"] .principles-grid { gap: 44px; }
body[data-ui="editorial"] .principle { padding-left: 20px; border-left: 2px solid var(--ink); }
body[data-ui="editorial"] .track-card { padding: 30px 0; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: transparent; }
body[data-ui="editorial"] .track-card h3 { font: 500 31px/1.25 Georgia, serif; }
body[data-ui="editorial"] .track-card h2 { font: 500 31px/1.25 Georgia, "Songti SC", serif; }
body[data-ui="editorial"] .auth-layout { width: min(1100px, calc(100% - 96px)); gap: 100px; }
body[data-ui="editorial"] .auth-story h1 { font: 500 clamp(36px, 3.8vw, 54px)/1.22 Georgia, "Songti SC", serif; text-wrap: balance; }
body[data-ui="editorial"] .auth-story h1 .accent-text { white-space: nowrap; }
body[data-ui="editorial"] .auth-card { padding: 34px 0 34px 40px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; }
body[data-ui="editorial"] .auth-card h1, body[data-ui="editorial"] .auth-card h2 { font: 500 32px/1.3 Georgia, "Songti SC", serif; }

/* Layout breakpoints also handle a desktop browser at 200% zoom. */
@media (min-width: 1700px) {
  .workspace-main { padding-inline: 64px; }
}
@media (max-width: 1120px) {
  .workspace-shell { grid-template-columns: 208px minmax(0, 1fr); }
  .sidebar { padding-inline: 16px; }
  .workspace-main { padding-inline: 28px; }
  .hero, body[data-ui="terminal"] .hero, body[data-ui="editorial"] .hero { gap: 36px; }
  .hero-title { font-size: 49px; }
  .public-nav { gap: 14px; }
  .auth-layout, body[data-ui="editorial"] .auth-layout { gap: 46px; }
  .design-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .site-header, body[data-ui="terminal"] .site-header { width: calc(100% - 40px); min-height: 80px; gap: 14px; flex-wrap: wrap; padding-block: 18px; }
  .workspace-shell { display: block; }
  .sidebar, body[data-ui="terminal"] .sidebar, body[data-ui="editorial"] .sidebar { position: static; width: 100%; height: auto; min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding: 20px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .sidebar .brand { margin: 0; }
  .sidebar-nav, body[data-ui="terminal"] .sidebar-nav, body[data-ui="editorial"] .sidebar-nav { display: flex; flex-wrap: wrap; gap: 12px 20px; }
  .nav-group, body[data-ui="terminal"] .nav-group, body[data-ui="editorial"] .nav-group { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-label, body[data-ui="terminal"] .nav-label, body[data-ui="editorial"] .nav-label { display: none; }
  .nav-item, body[data-ui="terminal"] .nav-item, body[data-ui="editorial"] .nav-item { min-height: 40px; padding: 8px 10px; font-size: 12px; }
  .sidebar-footer, .sidebar-foot { display: none; }
  .workspace-main, body[data-ui="terminal"] .workspace-main, body[data-ui="editorial"] .workspace-main { width: 100%; padding: 0 24px 48px; }
  .workspace-topbar, body[data-ui="editorial"] .workspace-topbar { min-height: 72px; margin-bottom: 28px; }
  .landing-main, body[data-ui="terminal"] .landing-main, body[data-ui="editorial"] .landing-main { width: calc(100% - 48px); }
  .hero, body[data-ui="terminal"] .hero, body[data-ui="editorial"] .hero { grid-template-columns: 1fr; gap: 42px; padding: 56px 0; }
  .hero-copy { max-width: 650px; }
  .hero-description { max-width: 600px; }
  .hero-visual { width: min(580px, 100%); padding: 20px; }
  .hero-visual::before { inset: 0; }
  body[data-ui="editorial"] .hero-title { font-size: clamp(45px, 8vw, 72px); }
  body[data-ui="editorial"] .hero-visual { width: 100%; }
  .steps-grid { gap: 14px; }
  .step-card { padding: 20px; }
  .principles-grid { gap: 22px; }
  .track-card { gap: 24px; }
  .auth-layout, body[data-ui="terminal"] .auth-layout, body[data-ui="editorial"] .auth-layout { grid-template-columns: 1fr; width: min(600px, calc(100% - 48px)); min-height: 0; gap: 24px; padding: 42px 0 60px; }
  .auth-story { max-width: 100%; }
  .auth-story h1, body[data-ui="terminal"] .auth-story h1, body[data-ui="editorial"] .auth-story h1 { font-size: 36px; }
  .auth-card { max-width: none; }
  body[data-ui="editorial"] .auth-card { padding: 28px 0; border-left: 0; border-top: 1px solid var(--line); }
  .site-footer { width: calc(100% - 48px); }
  .auth-page .landing-main { width: 100%; }
}
@media (max-width: 580px) {
  .site-header, body[data-ui="terminal"] .site-header { width: calc(100% - 32px); }
  .public-nav { width: 100%; justify-content: flex-start; gap: 10px 16px; }
  .public-nav .button { min-height: 40px; padding: 8px 13px; font-size: 12px; }
  .workspace-main, body[data-ui="terminal"] .workspace-main, body[data-ui="editorial"] .workspace-main { padding-inline: 16px; }
  .workspace-topbar { padding-block: 16px; }
  .user-menu { justify-content: flex-start; gap: 10px; }
  .page-title, .workspace-main > header h1 { font-size: 29px; }
  body[data-ui="editorial"] .page-title, body[data-ui="editorial"] .workspace-main > header h1 { font-size: 36px; }
  .page-description, .workspace-main > header .lede { font-size: 13px; }
  .panel-head { padding: 16px; align-items: flex-start; }
  .card, .docs-card { padding: 20px; }
  .auth-card { padding: 26px 22px; }
  .landing-main, body[data-ui="terminal"] .landing-main, body[data-ui="editorial"] .landing-main { width: calc(100% - 40px); }
  .hero-title, body[data-ui="terminal"] .hero-title { font-size: 38px; }
  body[data-ui="editorial"] .hero-title { font-size: 45px; }
  .hero-description { font-size: 14px; }
  .hero-actions { align-items: stretch; }
  .hero-actions .button { flex: 1 1 140px; }
  .hero-proof { gap: 8px 14px; font-size: 10px; }
  .hero-visual { padding: 14px; }
  .section, body[data-ui="editorial"] .section { padding: 42px 0; }
  .section-heading h2 { font-size: 27px; }
  .steps-grid, .principles-grid, .track-card, .design-gallery, .run-grid, .detail-grid { grid-template-columns: 1fr; }
  .steps-grid, body[data-ui="editorial"] .steps-grid { gap: 18px; }
  body[data-ui="terminal"] .steps-grid { gap: 0; }
  body[data-ui="terminal"] .step-card { border-right: 0; border-bottom: 1px solid var(--line); }
  body[data-ui="terminal"] .step-card:last-child { border-bottom: 0; }
  body[data-ui="editorial"] .step-card { padding-bottom: 14px; }
  .track-card { padding: 24px; }
  .principles-grid, body[data-ui="editorial"] .principles-grid { gap: 28px; }
  .detail-list > div { grid-template-columns: 1fr; gap: 6px; }
  .detail-list { grid-template-columns: 1fr; padding-inline: 16px; }
  .detail-list > dt { padding-bottom: 0; border-bottom: 0; }
  .detail-list > dd { padding-top: 6px; }
  .detail-list > :nth-last-child(2) { border-bottom: 0; }
  .track-card > .button { justify-self: start; margin-top: 0; }
  .design-switcher { justify-content: flex-start; padding-inline: 12px; gap: 4px; }
  .design-switcher > span { flex-basis: 100%; }
  .design-switcher-label { flex-basis: 100%; padding: 4px 0; }
  .design-switcher nav { gap: 2px; }
  .design-option { padding-inline: 8px; }
  .site-footer { width: calc(100% - 40px); }
  .auth-page .landing-main { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .button, .primary, .nav-item.active, .stage-badge, .status-badge, .warning { border: 1px solid ButtonText; }
  .hero-visual::before { display: none; }
}
