:root {
  --bg: #171412;
  --surface: #1f1b18;
  --surface-2: #2a2421;
  --line: #302a27;
  --line-2: #433a35;
  --ink: #ebe4db;
  --ink-2: #b9afa5;
  --muted: #837870;
  --accent: #c2495f;
  --accent-2: #e06a80;
  --good: #5fae7a;
  --warn: #cf9a3a;
  --bad: #d95c5c;
  --info: #5b95cc;
  --run: #d06a2c;
  --gold: #f4c542;
  --dl-panel: #1c1815;
  --dl-drawer: #28221e;
  --dl-row-alt: #302924;
  --dl-edge: #473d36;
  --radius: 10px;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--mono); }
.dim { color: var(--muted); font-size: 13px; }

/* header */
.top { display: flex; align-items: center; gap: 18px; padding: 13px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); }
.brand { font-weight: 600; color: var(--ink); }
.top nav { display: flex; gap: 16px; margin-left: auto; font-size: 14px; }
.top nav a { color: var(--ink-2); }
.top nav a.on { color: var(--ink); }
#live { font-size: 12px; color: var(--good); display: inline-flex; align-items: center; gap: 6px; }
#live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
#live.off { color: var(--warn); }

main { max-width: 1280px; margin: 0 auto; padding: 26px 16px 50px; }
footer { max-width: 1280px; margin: 0 auto; padding: 0 16px 30px; color: var(--muted); font-size: 12px; }

/* hero */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: 18px; }
.hero-count { font-size: 46px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.hero-count .of { color: var(--muted); font-size: 24px; font-weight: 400; }
.hero-label { display: block; font-size: 14px; color: var(--ink-2); margin-top: 8px; font-weight: 400; letter-spacing: 0; }
.hero-sub { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.bar { display: block; height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar .fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .6s ease; }
.bar.big { height: 10px; margin-top: 16px; }
.stats { display: flex; gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; min-width: 128px; }
.stat b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--muted); }

.nextup { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: var(--radius);
  padding: 12px 16px; margin: 0 0 26px; font-size: 14px; color: var(--ink-2); }
.nextup b { color: var(--ink); }
.nextup .mono { color: var(--ink); }

/* catalog */
.layout { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
details.season { margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .15s; }
details.season:hover { border-color: var(--line-2); }
details.season.has-activity { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.season-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; user-select: none; }
.season-head::-webkit-details-marker { display: none; }
.chev { width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .2s; margin: 0 4px 0 2px; flex: none; }
details[open] > .season-head .chev { transform: rotate(45deg); margin-top: -3px; }
.season-head h2 { font-size: 15px; font-weight: 600; margin: 0; }
.season-count { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.season-right { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.season-note { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.season-note.is-one { color: var(--accent-2); font-weight: 600; }
.season-note.is-complete { color: var(--gold); }
.season-head .bar.mini { width: 120px; height: 3px; flex: none; }
details.season .grid { padding: 2px 14px 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 8px; }

.tile { position: relative; display: grid; grid-template-rows: auto 1fr auto auto; gap: 2px; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px 9px;
  min-height: 92px; color: var(--ink); cursor: pointer; font: inherit; overflow: hidden;
  transition: border-color .15s, transform .15s, background .3s; }
.tile:hover { border-color: var(--line-2); transform: translateY(-1px); }
.tile .tile-top { display: flex; justify-content: space-between; align-items: center; }
.tile .num { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.ico { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: -1px; }
.arch { display: inline-flex; color: var(--gold); }
.arch[hidden] { display: none; }
.archived { color: var(--gold); font-size: 12.5px; }
.archive-line .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--muted); vertical-align: 1px; }
.archive-line .dot.on { background: var(--good); box-shadow: 0 0 8px var(--good); }
.archive-line .dot.off { background: var(--warn); }
.archive-line b { color: var(--ink-2); font-weight: 600; }
#feed li.ev-verified span { color: var(--good); }
.tile .title { font-size: 12.5px; line-height: 1.25; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile .state { font-size: 10.5px; letter-spacing: .02em; font-weight: 600; color: var(--muted); margin-top: 3px; }
.tile .meta { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 14px; }
.tile .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 0; background: transparent; }
/* tile colors: green claimed · orange upscaling/upscaled · blue uploading/checking
   · gold completed, saved to permanent seed (washed, the "finished" look). After a failed
   attempt a tile is plain Open again, with a quiet count. */
.tile { --st: var(--muted); }
.tile.st-claimed { --st: var(--good); }
.tile.st-running, .tile.st-upscaled { --st: var(--run); }
.tile.st-uploading, .tile.st-checking { --st: var(--info); }
.tile.st-verified { --st: var(--good); }
.tile.st-saved { --st: var(--gold); }
.tile.st-failed { --st: var(--bad); }
.tile .state { color: var(--st); }
.tile .fill { background: var(--st); }
.tile:not(.st-open) .title { color: var(--ink); }
.tile.st-open { opacity: .72; }
.tile.st-open:hover { opacity: 1; }
.tile.st-claimed { border-color: color-mix(in srgb, var(--st) 35%, var(--line)); }
.tile.st-running, .tile.st-uploading { border-color: color-mix(in srgb, var(--st) 55%, var(--line)); background: color-mix(in srgb, var(--st) 7%, var(--surface)); }
.tile.st-upscaled, .tile.st-checking, .tile.st-verified { border-color: color-mix(in srgb, var(--st) 45%, var(--line)); }
.tile.st-saved, .tile.st-failed { border-color: color-mix(in srgb, var(--st) 70%, var(--line)); background: color-mix(in srgb, var(--st) 15%, var(--surface)); }
.tile.st-saved .meta { color: color-mix(in srgb, var(--st) 40%, var(--ink-2)); }
.tile.st-running .fill, .tile.st-uploading .fill, .tile.st-checking .fill { animation: pulse 2.4s ease-in-out infinite; }
.tile.quiet .state { color: color-mix(in srgb, var(--st) 55%, var(--muted)); }
.tile.quiet .fill { animation: none; background: var(--muted); }
.tile .arch { color: var(--gold); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); margin: -14px 0 18px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }

/* activity */
.feed { position: sticky; top: 70px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; max-height: calc(100vh - 90px); overflow: auto; }
.feed h2 { font-size: 13px; margin: 0 0 8px; color: var(--ink-2); font-weight: 600; }
#feed { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
#feed li { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
#feed li:first-child { border-top: 0; }
#feed time { color: var(--muted); font-family: var(--mono); font-size: 11px; padding-top: 1px; }
#feed li span { color: var(--ink-2); }
#feed li.ev-done span, #feed li.ev-verified span { color: var(--ink); }
#feed li.ev-expired span { color: var(--warn); }
.feed-note { font-size: 11px; color: var(--muted); margin: 12px 0 0; }

/* detail popover */
.detail { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 20; }
.detail[hidden] { display: none; }
.detail-card { background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; max-width: 560px; width: 100%; max-height: 85vh; overflow: auto; padding: 20px 22px; position: relative; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
#detail-close { position: absolute; top: 8px; right: 12px; background: none; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
.detail h3 { margin: 0 0 4px; font-size: 17px; padding-right: 24px; }
.detail h3 .mono { color: var(--muted); font-weight: 400; margin-right: 8px; font-size: 14px; }
.detail h4 { font-size: 12px; color: var(--muted); margin: 16px 0 6px; font-weight: 600; }
.detail p { margin: 6px 0; }
.drow { margin: 8px 0; }
.files { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.files li { padding: 5px 0; border-top: 1px solid var(--line); }
.hint { font-size: 12.5px; color: var(--ink-2); }
.hint code, .prose code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-family: var(--mono); font-size: 12px; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); }
.tag.st-claimed { color: var(--good); }
.tag.st-running, .tag.st-upscaled { color: var(--run); }
.tag.st-uploading, .tag.st-checking, .tag.st-done { color: var(--info); }
.tag.st-verified { color: var(--good); }
.tag.st-saved { color: var(--gold); }
.tag.st-failed { color: var(--bad); }
.tag .ico { vertical-align: -2px; }
.drow .dim { margin-left: 6px; }
.detail details.attempts { margin-top: 14px; }
.detail details.attempts > summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); }
.detail details.attempts > summary:hover { color: var(--ink-2); }
.detail details.attempts .files { margin-top: 6px; }
body.modal { overflow: hidden; }

/* prose pages */
.prose { max-width: 780px; }
.prose h1 { font-size: 26px; letter-spacing: -.02em; margin: 0 0 6px; }
.prose h2 { font-size: 16px; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose pre { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; overflow: auto; font-size: 12.5px; font-family: var(--mono); color: var(--ink); line-height: 1.5; }
.prose table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.prose th, .prose td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 500; font-size: 12px; }
.prose td .mono { font-size: 12.5px; }
details.board { margin: 18px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
details.board > summary { padding: 11px 14px; cursor: pointer; font-weight: 600; list-style: none; }
details.board > summary::-webkit-details-marker { display: none; }
details.board > summary::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 10px 2px 2px;
  border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(-45deg); transition: transform .2s; }
details.board[open] > summary::before { transform: rotate(45deg); }
details.board table { margin: 0 0 6px; }
details.board th:first-child, details.board td:first-child { padding-left: 14px; }
details.board > p { padding: 0 14px 10px; margin: 0; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--run); box-shadow: 0 0 8px var(--run); }
.reg { display: flex; gap: 8px; flex-wrap: wrap; }
.reg[hidden] { display: none; }
.reg input { flex: 1 1 220px; max-width: 320px; background: var(--bg); border: 1px solid var(--line-2); color: var(--ink);
  border-radius: 8px; padding: 9px 12px; font: inherit; }
.reg input:focus { outline: none; border-color: var(--accent); }
.reg button { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; }
.reg button:disabled { opacity: .6; cursor: default; }
.reg button.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--ink-2); font-weight: 400; }
.reg button.ghost:hover { border-color: var(--bad); color: var(--bad); }
#reg-out .reg { margin-top: 10px; }
#reg-out .err { color: var(--bad); }
/* brand */
.brand { display: inline-flex; align-items: center; gap: 10px; line-height: 1.1; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-text { display: inline-flex; flex-direction: column; gap: 4px; }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 18px; font-weight: 600; letter-spacing: -.005em; color: var(--ink); }
.brand-tag { font-size: 12px; font-weight: 400; letter-spacing: .03em; color: var(--muted); }

/* about page */
.prose.about { max-width: 1000px; }
.prose.about table td:first-child { color: var(--muted); white-space: nowrap; width: 1%; padding-right: 24px; }
.prose.about table tr:first-child th { display: none; }
.cmp { margin: 18px 0 28px; }
.cmp-view { --pos: 50%; position: relative; width: 100%; border-radius: 8px; overflow: hidden; background: var(--surface-2);
  border: 1px solid var(--line); user-select: none; touch-action: pan-y; }
.cmp-view img { display: block; width: 100%; height: auto; }
.cmp-before { position: absolute; inset: 0; height: 100% !important; object-fit: cover; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--ink);
  box-shadow: 0 0 6px rgba(0, 0, 0, .6); pointer-events: none; }
.cmp-line::after { content: ""; position: absolute; top: 50%; left: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border-radius: 50%; background: var(--ink); box-shadow: 0 1px 6px rgba(0, 0, 0, .5);
  background-image: linear-gradient(90deg, transparent 9px, var(--bg) 9px, var(--bg) 11px, transparent 11px, transparent 17px, var(--bg) 17px, var(--bg) 19px, transparent 19px); }
.cmp-label { position: absolute; top: 10px; padding: 3px 8px; border-radius: 99px; font-size: 11.5px; color: var(--ink);
  background: rgba(0, 0, 0, .55); pointer-events: none; }
.cmp-l { left: 10px; }
.cmp-r { right: 10px; }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.cmp-range:focus-visible + * { outline: none; }
.cmp-view:has(.cmp-range:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.cmp figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.opts td:first-child { white-space: nowrap; }

.endpoint { padding: 12px 0; border-bottom: 1px solid var(--line); }
.endpoint .ep-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.endpoint .ep-head .mono { color: var(--ink); font-size: 13.5px; word-break: break-all; }
.endpoint .method { font-family: var(--mono); font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; background: var(--surface-2); }
.endpoint .m-get { color: var(--info); }
.endpoint .m-post { color: var(--run); }
.endpoint .ep-body { display: block; margin: 8px 0 0; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.endpoint p { margin: 8px 0 0; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .feed { position: static; max-height: none; }
  .hero { grid-template-columns: 1fr; }
  .stats { flex-wrap: wrap; }
  .top { padding: 12px 16px; gap: 12px; }
  .top nav { gap: 12px; }
  .season-head .bar.mini { display: none; }
}
@media (max-width: 600px) {
  .top { flex-wrap: wrap; row-gap: 6px; }
  .brand { white-space: nowrap; }
  .top nav { margin-left: 0; width: 100%; gap: 16px; }
  .hero-count { font-size: 40px; }
  .stat { min-width: 0; flex: 1 1 40%; }
  .season-head { padding: 11px 12px; gap: 8px; }
  .season-note { font-size: 12px; }
}

/* downloads: a drawer per kind of file, a drawer per season inside, striped rows */
details.dl-cat { margin: 18px 0; padding: 0 12px 6px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--dl-panel); }
.dl-cat-head { display: flex; align-items: baseline; gap: 12px; padding: 14px 2px 12px; cursor: pointer; list-style: none; user-select: none; }
.dl-cat-head::-webkit-details-marker { display: none; }
.dl-cat-head h2 { font-size: 18px; margin: 0; }
.dl-cat-head .chev { align-self: center; }
details.dl-cat[open] > .dl-cat-head .chev { transform: rotate(45deg); margin-top: -3px; }
.dl-note { margin: -4px 2px 12px; }
details.season.dl-season { background: var(--dl-drawer); border-color: var(--dl-edge); box-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
details.season.dl-season[open] { border-color: #5a4e45; }
details.season.dl-season:hover { border-color: #5a4e45; }
details.dl-season > .dl { margin: 0 0 4px; }
.dl th { padding-left: 14px; }
.dl td { border-bottom: none; padding: 8px 14px; }
.dl tbody tr:nth-child(odd) td { background: var(--dl-drawer); }
.dl tbody tr:nth-child(even) td { background: var(--dl-row-alt); }
.dl tbody tr.pack td { background: var(--dl-drawer); border-bottom: 1px solid var(--dl-edge); }
.dl td.file { white-space: nowrap; }
@media (max-width: 600px) {
  .dl-cat-head { flex-wrap: wrap; row-gap: 2px; }
  .dl td, .dl th { padding-left: 8px; padding-right: 8px; }
}
.prose .season-head h2, .prose .dl-cat-head h2 { margin: 0; }
.prose details.dl-season { margin-bottom: 12px; }
.dl td.ep .ep-id { display: block; font-size: 14.5px; line-height: 1.25; letter-spacing: .03em; }
.dl td.ep .ep-title { display: block; font-size: 17px; color: var(--ink); line-height: 1.3; }
.dl tr.pack td b { font-size: 17px; font-weight: 600; }
/* same column positions in every season's table */
.dl { table-layout: fixed; }
.dl th:first-child { width: 56%; }

/* holding page (COORD_PLACEHOLDER) */
body.holding { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.holding-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.holding-mark { width: min(200px, 46vw); height: auto; margin-bottom: 26px; }
.holding-name { font-size: clamp(30px, 7vw, 54px); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; margin: 0; }
.holding-tag { font-size: clamp(14px, 3.2vw, 18px); letter-spacing: .06em; color: var(--muted); margin: 12px 0 0; }
.holding-status { display: inline-flex; align-items: center; gap: 8px; margin: 30px 0 0; padding: 7px 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line)); border-radius: 999px;
  background: color-mix(in srgb, var(--warn) 9%, var(--surface)); color: var(--warn); font-size: 13px; letter-spacing: .02em; }
.holding-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 8px currentColor; animation: pulse 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .holding-status::before { animation: none; } }

/* command blocks with a Copy button (copy.js), anywhere on the site */
pre.cmd { position: relative; margin: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 9px 76px 9px 12px; font: 12.5px/1.55 var(--mono); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; overflow: visible; }
pre.cmd code { font: inherit; background: none; padding: 0; color: inherit; }
.copy-btn { position: absolute; top: 6px; right: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2);
  border-radius: 6px; padding: 2px 10px; font: 12px/1.5 var(--sans); cursor: pointer; }
.copy-btn:hover { color: var(--ink); border-color: var(--accent); }
.copy-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.copy-btn.done { color: var(--good); border-color: color-mix(in srgb, var(--good) 55%, var(--line-2)); }
.detail pre.cmd { margin-top: 12px; }
.cmd-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; margin: 0 0 10px; }
.cmd-note { font-size: 13px; color: var(--ink-2); padding-top: 8px; }
.cmd-note p { margin: 0; }

/* contributing: the step-by-step setup (content/setup.md) */
.prose.contrib { max-width: 1000px; }
.prose .hash { word-break: break-all; font-size: 11.5px; }
details.tutorial { margin: 22px 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--dl-panel); padding: 0 20px 6px; }
details.tutorial > summary { display: flex; align-items: center; gap: 10px; padding: 15px 0; cursor: pointer; list-style: none;
  font-size: 18px; font-weight: 600; color: var(--ink); user-select: none; }
details.tutorial > summary::-webkit-details-marker { display: none; }
details.tutorial[open] > summary .chev { transform: rotate(45deg); margin-top: -3px; }
.setup-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.setup-tabs button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 124px; padding: 8px 14px 9px;
  border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); color: var(--ink-2); font: inherit; cursor: pointer; text-align: left; }
.setup-tabs button b { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.setup-tabs .gpu { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.setup-tabs .gpu::before { content: ""; width: 12px; height: 3px; border-radius: 2px; background: var(--gpu, var(--muted)); }
.gpu-nvidia { --gpu: #76b900; }
.gpu-amd { --gpu: #e03a3e; }
.gpu-apple { --gpu: #a2aaad; }
.setup-tabs button:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line-2)); }
.setup-tabs button[aria-selected="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--surface)); }
.setup-tabs button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.setup-intro p { margin: 0 0 6px; }
.setup-intro strong { color: var(--warn); }
.setup-intro [data-for="win-nvidia"] strong { color: var(--good); }
.setup-error { color: var(--bad); font-weight: 600; }
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0 4px; }
ol.steps > li.step { counter-increment: step; position: relative; padding: 0 0 16px 46px; }
ol.steps > li.step[hidden], .only[hidden] { display: none; }
ol.steps > li.step::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink); font-size: 13px; font-weight: 600; }
ol.steps > li.step::after { content: ""; position: absolute; left: 14px; top: 34px; bottom: 8px; width: 1px; background: var(--line); }
ol.steps > li.step:last-of-type::after { display: none; }
.step h3 { font-size: 15.5px; margin: 4px 0 10px; color: var(--ink); }
.step p { margin: 0 0 10px; }
.step ol, .step ul { margin: 0 0 10px; padding-left: 20px; }
.step li { margin-bottom: 4px; }
.dir-field label { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 14px; }
.dir-input { background: var(--bg); border: 1px solid var(--line-2); color: var(--ink); border-radius: 8px; padding: 7px 10px; font: 13px var(--mono); width: 270px; max-width: 58vw; }
.dir-input:focus { outline: none; border-color: var(--accent); }
.dir-input.bad { border-color: var(--bad); }
.dir-error { display: block; margin-top: 6px; color: var(--bad); font-size: 12.5px; }
.dir-error[hidden] { display: none; }
details.opts-drawer .opts, details.opts-drawer table { margin: 0 0 6px; }
details.opts-drawer td:first-child { white-space: nowrap; }
@media (max-width: 760px) {
  .cmd-row { grid-template-columns: 1fr; gap: 5px; margin-bottom: 14px; }
  .cmd-note { padding-top: 0; }
  details.tutorial { padding: 0 12px 4px; }
  ol.steps > li.step { padding-left: 38px; }
  .setup-tabs button { min-width: 0; flex: 1 1 42%; }
  details.opts-drawer td:first-child { white-space: normal; }
}
