@font-face { font-family: "FSB Sans"; src: url("/fonts/dmsans.woff") format("woff"); font-weight: 400 800; font-style: normal; font-display: swap; }

:root {
  --bg: 238 242 246; --surface: 255 255 255; --sunk: 246 249 251; --ink: 17 28 40; --mute: 88 102 117;
  --line: 223 230 237; --line2: 200 210 220; --fire: 214 77 18; --onfire: 255 255 255;
  --teal: 12 124 115; --warn: 168 98 6; --danger: 190 38 38;
  --r-lg: 16px; --r-md: 12px; --r-sm: 9px;
  --sans: "FSB Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root.dark {
  --bg: 12 18 26; --surface: 19 28 40; --sunk: 15 23 33; --ink: 231 237 244; --mute: 139 155 171;
  --line: 34 47 62; --line2: 52 68 86; --fire: 255 139 77; --onfire: 33 14 4;
  --teal: 52 211 190; --warn: 245 190 70; --danger: 250 125 125;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; font-family: var(--sans); font-size: 15px; line-height: 1.5; color: rgb(var(--ink)); background: rgb(var(--bg)); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }
code { font-family: var(--mono); font-size: .88em; }
[hidden] { display: none !important; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid rgb(var(--fire)); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgb(var(--fire) / .25); }
.tnum { font-variant-numeric: tabular-nums; }
.pixel { image-rendering: pixelated; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 2rem 1rem 5rem; outline: none; }
.fade { animation: fade .2s ease-out; }

/* header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgb(var(--surface) / .8); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px); border-bottom: 1px solid rgb(var(--line)); }
.bar { max-width: 72rem; margin: 0 auto; padding: 0 1rem; height: 3.5rem; display: flex; align-items: center; gap: .75rem; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; white-space: nowrap; }
.logo .a { fill: rgb(var(--fire)); } .logo .b { fill: rgb(var(--fire)); opacity: .68; } .logo .c { fill: rgb(var(--fire)); opacity: .4; }
.nav { display: flex; gap: .15rem; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; margin-left: .5rem; }
.nav::-webkit-scrollbar { display: none; }
.navlink { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 8px; font-size: .88rem; font-weight: 600; color: rgb(var(--mute)); white-space: nowrap; transition: color .15s, background-color .15s; }
.navlink:hover { color: rgb(var(--ink)); background: rgb(var(--line) / .55); }
.navlink.active { color: rgb(var(--ink)); background: rgb(var(--line) / .85); }
.count { font-size: .75rem; font-weight: 600; color: rgb(var(--mute)); font-variant-numeric: tabular-nums; }
.bar-end { display: flex; align-items: center; gap: .6rem; }
.me { display: flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 600; }
.icon-btn { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 8px; background: transparent; color: rgb(var(--mute)); transition: color .15s, background-color .15s; }
.icon-btn:hover { color: rgb(var(--ink)); background: rgb(var(--line) / .6); }
.i-moon { display: none; } :root.dark .i-moon { display: block; } :root.dark .i-sun { display: none; }
.avatar { flex: none; border-radius: 6px; image-rendering: pixelated; background: rgb(var(--line)); }

/* controls */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.5rem; padding: 0 1.05rem; border: 1px solid rgb(var(--line2)); border-radius: var(--r-sm); background: rgb(var(--surface)); color: rgb(var(--ink)); font-size: .9rem; font-weight: 600; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, transform .08s; }
.btn:hover:not(:disabled) { border-color: rgb(var(--ink) / .5); background: rgb(var(--sunk)); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { min-height: 2rem; padding: 0 .75rem; font-size: .82rem; }
.btn-block { width: 100%; }
.btn-primary { background: rgb(var(--fire)); border-color: rgb(var(--fire)); color: rgb(var(--onfire)); }
.btn-primary:hover:not(:disabled) { background: rgb(var(--fire) / .88); border-color: rgb(var(--fire) / .88); }
.btn-quiet { background: transparent; border-color: transparent; color: rgb(var(--mute)); }
.btn-quiet:hover:not(:disabled) { background: rgb(var(--line) / .6); border-color: transparent; color: rgb(var(--ink)); }
.btn-danger { color: rgb(var(--danger)); border-color: rgb(var(--danger) / .45); }
.btn-danger:hover:not(:disabled) { background: rgb(var(--danger) / .1); border-color: rgb(var(--danger)); }
.btn-danger-solid { background: rgb(var(--danger)); border-color: rgb(var(--danger)); color: #fff; }
.btn-danger-solid:hover:not(:disabled) { background: rgb(var(--danger) / .88); }
.btn.busy { color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 1rem; height: 1rem; border: 2px solid rgb(var(--ink)); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-primary.busy::after { border-color: rgb(var(--onfire)); border-right-color: transparent; }
.link { border: 0; background: none; padding: 0; font-size: .84rem; font-weight: 600; color: rgb(var(--fire)); }
.link:hover { text-decoration: underline; }

.input { width: 100%; min-height: 2.5rem; padding: .5rem .8rem; border: 1px solid rgb(var(--line2)); border-radius: var(--r-sm); background: rgb(var(--surface)); color: rgb(var(--ink)); font-size: .92rem; transition: border-color .15s, box-shadow .15s; }
textarea.input { resize: vertical; line-height: 1.55; }
.input:focus { outline: none; border-color: rgb(var(--fire)); box-shadow: 0 0 0 3px rgb(var(--fire) / .18); }
.input::placeholder { color: rgb(var(--mute) / .75); }
.label { display: block; margin-bottom: .4rem; font-size: .85rem; font-weight: 600; }
.hint { font-size: .82rem; color: rgb(var(--mute)); }
.form { display: flex; flex-direction: column; gap: 1.15rem; }
.row2 { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row3 { display: grid; gap: .85rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.field-head .label { margin: 0; }
.check { display: flex; align-items: center; gap: .6rem; font-size: .9rem; cursor: pointer; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: rgb(var(--fire)); }
.right { text-align: right; }
.actions-end { display: flex; justify-content: flex-end; }

.seg { display: inline-flex; padding: 3px; gap: 2px; background: rgb(var(--sunk)); border: 1px solid rgb(var(--line)); border-radius: 10px; }
.seg button { min-height: 1.9rem; padding: 0 .85rem; border: 0; border-radius: 7px; background: transparent; color: rgb(var(--mute)); font-size: .84rem; font-weight: 600; transition: background-color .15s, color .15s; }
.seg button:hover { color: rgb(var(--ink)); }
.seg button.on { background: rgb(var(--surface)); color: rgb(var(--ink)); box-shadow: 0 0 0 1px rgb(var(--line2)), 0 1px 2px rgb(0 0 0 / .08); }

/* surfaces */
.panel { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); padding: 1.35rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.panel-head h2, .panel > h2 { font-size: 1.1rem; font-weight: 700; }
.stack-y { display: flex; flex-direction: column; gap: .85rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .65rem; border: 1px solid rgb(var(--line)); border-radius: 999px; font-size: .78rem; font-weight: 500; color: rgb(var(--mute)); }
.chip button { border: 0; background: none; padding: 0; line-height: 1; font-size: 1rem; color: rgb(var(--mute)); }
.chip button:hover { color: rgb(var(--danger)); }
.badge { --c: 71 85 105; display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: rgb(var(--c) / .14); color: rgb(var(--c)); }
.badge::before { content: ""; width: .42rem; height: .42rem; border-radius: 50%; background: currentColor; }
.st-QUEUED { --c: 37 99 235; } .st-BUILDING { --c: var(--fire); } .st-WAITING { --c: var(--warn); } .st-COMPLETE { --c: var(--teal); } .st-STOPPED { --c: var(--mute); }
:root.dark .st-READY, :root.dark .st-DRAFT { --c: 148 163 184; } :root.dark .st-QUEUED { --c: 120 170 255; }
.st-BUILDING::before { animation: pulse 1.4s ease-in-out infinite; }
.empty { padding: 3.5rem 1.5rem; text-align: center; border: 1px dashed rgb(var(--line2)); border-radius: var(--r-lg); }
.empty h3 { font-size: 1.15rem; font-weight: 700; }
.empty p { margin-top: .4rem; color: rgb(var(--mute)); }
.empty .btn { margin-top: 1.25rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head h1 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); font-weight: 800; }
.page-head p { margin-top: .3rem; }
.crumb { display: inline-flex; align-items: center; gap: .25rem; margin-bottom: 1rem; font-size: .86rem; font-weight: 600; color: rgb(var(--mute)); }
.crumb:hover { color: rgb(var(--ink)); }
.err-text { font-size: .9rem; color: rgb(var(--danger)); }

/* hero */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem; margin-bottom: 2rem; padding: 2.5rem; overflow: hidden; border: 1px solid rgb(var(--line)); border-radius: 20px; background: rgb(var(--surface)); }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgb(var(--line)) 1px, transparent 1px), linear-gradient(90deg, rgb(var(--line)) 1px, transparent 1px); background-size: 28px 28px; background-position: -1px -1px; opacity: .7; -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 100%); mask-image: linear-gradient(100deg, transparent 20%, #000 100%); pointer-events: none; }
.hero > * { position: relative; }
.hero h1 { max-width: 15ch; font-size: clamp(2.1rem, 5.2vw, 3.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; }
.hero p.lead { max-width: 34rem; margin-top: 1rem; color: rgb(var(--mute)); font-size: 1.05rem; line-height: 1.55; }
.hero .btn { margin-top: 1.5rem; }
.stats { display: flex; flex-wrap: wrap; gap: .35rem 1.75rem; margin-top: 1.5rem; font-size: .88rem; color: rgb(var(--mute)); }
.stats b { color: rgb(var(--ink)); font-weight: 700; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .input { width: 16rem; max-width: 100%; }

/* progress visuals */
.layers { position: relative; height: 10px; border-radius: 4px; overflow: hidden; background: rgb(var(--line)); }
.layers > i { position: absolute; inset: 0 auto 0 0; width: var(--p); background: rgb(var(--fire)); transition: width .7s cubic-bezier(.2, .7, .2, 1); }
.layers::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / var(--n) - 1px), rgb(var(--surface)) calc(100% / var(--n) - 1px), rgb(var(--surface)) calc(100% / var(--n))); }
.stack { --sh: 6px; display: flex; flex-direction: column-reverse; gap: 3px; width: 9.5rem; }
.stack i { position: relative; display: block; height: var(--sh); border-radius: 2px; overflow: hidden; background: rgb(var(--line)); }
.stack i::before { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--f, 0) * 100%); background: rgb(var(--fire)); transition: width .65s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.stack i.cur::before { box-shadow: 0 0 12px rgb(var(--fire) / .85); }
.stack-cap { margin-top: .65rem; font-size: .78rem; color: rgb(var(--mute)); text-align: right; font-variant-numeric: tabular-nums; }
.hero .stack { --sh: 8px; width: 8.5rem; }
.mini { flex: 1; min-width: 3rem; height: 5px; border-radius: 3px; overflow: hidden; background: rgb(var(--line)); }
.mini > i { display: block; height: 100%; width: var(--w, 0%); background: rgb(var(--teal)); transition: width .5s ease; }

/* cards */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); }
.card { display: flex; flex-direction: column; gap: .8rem; padding: 1.1rem 1.2rem; border: 1px solid rgb(var(--line)); border-radius: var(--r-lg); background: rgb(var(--surface)); transition: border-color .15s, background-color .15s; }
.card:hover { border-color: rgb(var(--fire) / .65); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.card-title { font-size: 1.1rem; font-weight: 700; overflow-wrap: anywhere; }
.card-meta { display: flex; align-items: center; gap: .5rem; font-size: .84rem; color: rgb(var(--mute)); }
.card-meta .dims { margin-left: auto; font-variant-numeric: tabular-nums; }
.card-foot { display: flex; justify-content: space-between; font-size: .8rem; color: rgb(var(--mute)); font-variant-numeric: tabular-nums; }
.skel-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr)); }
.skel { height: 10rem; border-radius: var(--r-lg); background: linear-gradient(90deg, rgb(var(--line) / .5), rgb(var(--line) / .9), rgb(var(--line) / .5)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

/* detail */
.detail { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.col-main, .col-side { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.hero-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.title-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .85rem; }
.title-row h1 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); font-weight: 800; overflow-wrap: anywhere; }
.byline { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; font-size: .9rem; color: rgb(var(--mute)); }
.pct-row { display: flex; align-items: center; gap: .85rem; margin-top: 1.5rem; }
.pct-big { font-size: clamp(3rem, 8vw, 4.4rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.sub { margin-top: .6rem; font-size: .92rem; color: rgb(var(--mute)); }
.rate { min-height: 1.4em; margin-top: .15rem; font-size: .88rem; font-weight: 600; color: rgb(var(--ink)); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: 1rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid rgb(var(--line)); }
.facts dt { font-size: .78rem; color: rgb(var(--mute)); }
.facts dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.cmd { display: flex; align-items: center; justify-content: space-between; gap: .6rem; width: 100%; min-height: 2.5rem; padding: 0 .85rem; border: 1px dashed rgb(var(--line2)); border-radius: var(--r-sm); background: rgb(var(--sunk)); color: rgb(var(--ink)); transition: border-color .15s; }
.cmd:hover { border-color: rgb(var(--fire)); }
.cmd code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd svg { flex: none; color: rgb(var(--mute)); }
.btn-row { display: flex; gap: .6rem; }
.btn-row .btn { flex: 1; }

/* materials */
.sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.sum .k { font-size: .8rem; color: rgb(var(--mute)); }
.sum .v { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sum .v.bad { color: rgb(var(--fire)); } .sum .v.good { color: rgb(var(--teal)); }
.sum-bar { margin: .85rem 0 1.15rem; }
.live { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 600; color: rgb(var(--mute)); }
.live i { width: .5rem; height: .5rem; border-radius: 50%; background: rgb(var(--teal)); animation: pulse 1.8s ease-in-out infinite; }
.live[data-s="retry"] i { background: rgb(var(--warn)); }
.live[data-s="poll"] i { background: rgb(var(--mute)); animation: none; }
.table-wrap { max-height: 30rem; overflow: auto; border: 1px solid rgb(var(--line)); border-radius: var(--r-md); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.tbl th { position: sticky; top: 0; z-index: 1; padding: .6rem .9rem; background: rgb(var(--sunk)); border-bottom: 1px solid rgb(var(--line)); text-align: left; font-size: .78rem; font-weight: 600; color: rgb(var(--mute)); white-space: nowrap; }
.tbl td { padding: .62rem .9rem; border-top: 1px solid rgb(var(--line)); vertical-align: middle; }
.tbl tbody tr:first-child td { border-top: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .mname { text-transform: capitalize; }
.stockcell { display: flex; align-items: center; gap: .7rem; min-width: 8rem; }
.stockcell .num { min-width: 2.5rem; }
.swatch { display: inline-block; width: .85rem; height: .85rem; margin-right: .6rem; border-radius: 3px; vertical-align: -2px; background: linear-gradient(135deg, hsl(var(--h) 62% 64%), hsl(var(--h) 56% 44%)); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); }
.miss { color: rgb(var(--fire)); font-weight: 700; }
.c-miss small { display: block; font-size: .74rem; font-weight: 400; color: rgb(var(--mute)); }
.ok { display: inline-flex; color: rgb(var(--teal)); }
tr.flash td { animation: flash 1.3s ease-out; }
.empty-note { padding: 2rem 1rem; text-align: center; font-size: .9rem; color: rgb(var(--mute)); }

/* description markdown */
.prose p { margin-bottom: .75rem; line-height: 1.65; max-width: 70ch; }
.prose p:last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3 { margin: 1rem 0 .5rem; font-weight: 800; }
.prose h1 { font-size: 1.4rem; } .prose h2 { font-size: 1.2rem; } .prose h3 { font-size: 1.05rem; }
.prose ul { margin: 0 0 .75rem; padding-left: 1.25rem; }
.prose a { color: rgb(var(--fire)); text-decoration: underline; }
.prose code { padding: .05rem .35rem; border-radius: 5px; background: rgb(var(--line) / .6); }

/* upload + auth */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem; min-height: 7.5rem; padding: 1rem; border: 2px dashed rgb(var(--line2)); border-radius: var(--r-md); text-align: center; font-size: .9rem; color: rgb(var(--mute)); cursor: pointer; transition: border-color .15s, background-color .15s; }
.dropzone:hover, .dropzone.over { border-color: rgb(var(--fire)); background: rgb(var(--fire) / .06); }
.dropzone.has-file { border-style: solid; color: rgb(var(--ink)); }
.narrow { max-width: 42rem; margin: 0 auto; }
.auth { max-width: 28rem; margin: 2rem auto 0; }
.auth h1 { font-size: 1.5rem; font-weight: 800; }
.auth form { display: flex; gap: .6rem; margin-top: 1.4rem; }
.code-digits { display: flex; gap: .5rem; margin: 1rem 0; }
.code-digits span { display: grid; place-items: center; width: 3rem; height: 3.6rem; border: 1px solid rgb(var(--line2)); border-radius: 10px; background: rgb(var(--sunk)); color: rgb(var(--fire)); font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.waiting { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: rgb(var(--mute)); }
.waiting::before { content: ""; width: .95rem; height: .95rem; border: 2px solid rgb(var(--fire)); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }

/* toasts + dialog */
#toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: flex; flex-direction: column; gap: .5rem; max-width: calc(100vw - 2rem); }
.toast { padding: .7rem .95rem; border: 1px solid rgb(var(--line)); border-left: 4px solid rgb(var(--teal)); border-radius: 10px; background: rgb(var(--surface)); box-shadow: 0 12px 32px -14px rgb(0 0 0 / .4); font-size: .88rem; animation: rise .2s ease-out; }
.toast.err { border-left-color: rgb(var(--danger)); }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
dialog { width: calc(100vw - 2rem); max-width: 26rem; margin: auto; padding: 1.5rem; border: 1px solid rgb(var(--line)); border-radius: 18px; background: rgb(var(--surface)); color: rgb(var(--ink)); box-shadow: 0 28px 70px -24px rgb(0 0 0 / .55); }
dialog::backdrop { background: rgb(8 12 18 / .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .18s ease-out; }
dialog h2 { font-size: 1.25rem; font-weight: 800; }
dialog .btn-row { justify-content: flex-end; margin-top: 1.4rem; }
dialog .btn-row .btn { flex: none; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes flash { from { background: rgb(var(--fire) / .18); } to { background: transparent; } }

@media (min-width: 64rem) {
  .detail { grid-template-columns: minmax(0, 1fr) 20rem; }
  .col-side { position: sticky; top: 4.75rem; }
}
@media (max-width: 40rem) {
  .hero { grid-template-columns: 1fr; padding: 1.5rem; }
  .hero .stack { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stack { order: -1; }
  .hero-stack .stack { width: 100%; --sh: 5px; flex-direction: row; gap: 2px; height: 10px; }
  .hero-stack .stack i { height: 100%; flex: 1; }
  .hero-stack .stack i::before { inset: 0; width: 100%; height: auto; transform-origin: left; transform: scaleX(var(--f, 0)); transition-property: transform; }
  .hero-stack .stack-cap { text-align: left; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .sum { gap: .6rem; }
  .sum .v { font-size: 1.25rem; }
  .stockcell .mini { display: none; }
  .toolbar .input { width: 100%; }
  .me span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
}

/* ---------- docs ---------- */
.docs{display:grid;grid-template-columns:190px minmax(0,1fr);gap:3.5rem;font-size:16px;line-height:1.65}
.docs h1,.docs h2,.docs p,.docs ul,.docs ol,.docs dl,.docs dd{margin:0}
.docs code{font-family:var(--mono);font-size:.86em}
.drail{position:sticky;top:5rem;align-self:start;display:flex;flex-direction:column;gap:5px}
.drail a{display:flex;align-items:center;gap:.7rem;color:rgb(var(--mute));font-size:.88rem;padding:2px 0;cursor:pointer;transition:color .2s}
.drail i{flex:none;width:34px;height:14px;border-radius:3px;border:1.5px solid rgb(var(--line2));transition:background .25s,border-color .25s}
.drail a.on{color:rgb(var(--ink));font-weight:600}.drail a.placed i{background:rgb(var(--fire));border-color:rgb(var(--fire))}.drail a.on i{box-shadow:0 0 0 3px rgb(var(--fire)/.25)}
.dmain{min-width:0}
.docs .dhero{display:flex;flex-direction:column;gap:1.6rem;padding:1rem 0 3rem}
.docs .dhero h1{font-size:clamp(2.6rem,7vw,4.4rem);font-weight:800;letter-spacing:-.045em;line-height:.98;max-width:11ch}
.docs .dhero p{font-size:1.15rem;color:rgb(var(--mute));max-width:46ch}
.dslabs{display:flex;flex-direction:column-reverse;gap:4px;width:min(100%,340px)}
.dslabs i{display:block;height:16px;border-radius:3px;background:rgb(var(--fire));opacity:0;animation:place .5s cubic-bezier(.2,.8,.3,1) forwards}
.dslabs i:nth-child(1){width:100%;animation-delay:.1s}.dslabs i:nth-child(2){width:94%;animation-delay:.3s}.dslabs i:nth-child(3){width:94%;animation-delay:.5s}.dslabs i:nth-child(4){width:76%;animation-delay:.7s}.dslabs i:nth-child(5){width:58%;animation-delay:.9s}.dslabs i:nth-child(6){width:32%;animation-delay:1.1s}
@keyframes place{from{opacity:0;transform:translateY(-18px)}to{opacity:1;transform:none}}
.docs section{padding:2.4rem 0;border-top:1px solid rgb(var(--line));max-width:64ch;scroll-margin-top:5rem}
.docs section h2{font-size:1.7rem;font-weight:750;letter-spacing:-.03em;line-height:1.1;margin-bottom:1rem}
.docs section p+p,.docs section p+ul,.docs section ul+p,.docs section p+ol,.docs section ol+p,.docs section p+dl,.docs section p+.note{margin-top:.9rem}
.docs ul{padding-left:1.15rem}.docs li+li{margin-top:.35rem}
.docs ol{list-style:none;padding:0;counter-reset:s}
.docs ol li{counter-increment:s;position:relative;display:block;padding-left:2.1rem}
.docs ol li+li{margin-top:.6rem}
.docs ol li::before{content:counter(s);position:absolute;left:0;top:0;width:1.4rem;font-weight:800;color:rgb(var(--fire))}
.docs code.c{display:inline;background:rgb(var(--surface));border:1px solid rgb(var(--line));padding:.1rem .4rem;border-radius:6px;line-height:1.4;white-space:nowrap;-webkit-box-decoration-break:clone;box-decoration-break:clone}
.docs .note{border-left:3px solid rgb(var(--teal));padding:.1rem 0 .1rem 1rem;color:rgb(var(--mute))}
.dtiers{margin-top:1.3rem;display:flex;flex-direction:column;gap:.7rem}
.dtier{display:grid;gap:.25rem}.dtier div{height:34px;border-radius:5px;background:rgb(var(--fire));display:flex;align-items:center;padding:0 .8rem;color:rgb(var(--onfire));font-weight:700;font-size:.9rem;white-space:nowrap}
.dtier span{color:rgb(var(--mute));font-size:.86rem}
.docs dl.cmd{display:grid;grid-template-columns:max-content 1fr;gap:.55rem 1.6rem}
.docs dl.cmd dt{white-space:nowrap}.docs dl.cmd dd{color:rgb(var(--mute))}
.docs .faq p b{display:block;color:rgb(var(--ink))}.docs .faq p+p{margin-top:1.1rem}
@media(max-width:820px){
.docs{grid-template-columns:1fr;gap:0}
.drail{flex-direction:row;gap:4px;padding:.8rem 0;top:3.5rem;z-index:5;background:rgb(var(--bg))}
.drail a span{display:none}.drail a{flex:1;padding:6px 0}.drail i{width:100%;height:8px}
.docs code.c{white-space:normal;word-break:break-word}.docs dl.cmd{grid-template-columns:1fr;gap:.1rem}.docs dl.cmd dd{margin-bottom:.7rem}}
@media(prefers-reduced-motion:reduce){.dslabs i{animation:none;opacity:1}}
