@font-face { font-family: "Schibsted"; src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "JBMono"; src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
    --paper: #F2EEE5; --card: #FBF9F4; --sunk: #E9E4D8;
    --ink: #15201C; --ink-2: #47534D; --ink-3: #7A837D; --line: #DDD6C7; --line-2: #CEC6B4;
    --deep: #173A31; --deep-2: #24544A; --brass: #A97624; --brass-2: #D9B46A;
    --gain: #23704B; --gain-bg: #DCEBDF; --loss: #AE3F2A; --loss-bg: #F3DDD5; --warn: #94650F; --warn-bg: #F4E7C8;
    --sans: "Schibsted", system-ui, sans-serif; --mono: "JBMono", ui-monospace, monospace;
    --stage: #10291F;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font: 400 15px/1.45 var(--sans); color: var(--ink); background: var(--stage); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; border-radius: 6px; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.up { color: var(--gain); } .down { color: var(--loss); }

/* ---------- desktop stage ---------- */
body::before { content: ""; position: fixed; inset: 0; background:
    radial-gradient(900px 600px at 78% 40%, rgba(217, 180, 106, .10), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 44px); pointer-events: none; }
.stage { position: fixed; left: clamp(40px, 9vw, 170px); top: 50%; transform: translateY(-50%); width: min(500px, 40vw); color: #EDE7D8; }
.stage-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.stage-brand .mark { width: 30px; height: 30px; }
.stage .mk-bg { fill: #EDE7D8; } .stage .mk-line { stroke: var(--stage); } .stage .mk-keel { stroke: var(--brass); }
.stage-title { margin-top: 34px; font-size: clamp(38px, 3.6vw, 54px); line-height: 1.02; font-weight: 700; letter-spacing: -.035em; }
.stage-lede { margin-top: 18px; font-size: 16.5px; color: rgba(237, 231, 216, .78); max-width: 430px; }
.stage-steps { list-style: none; margin-top: 28px; display: grid; gap: 12px; counter-reset: s; }
.stage-steps li { display: grid; grid-template-columns: 30px 88px 1fr; align-items: baseline; font-size: 14px; color: rgba(237, 231, 216, .72); counter-increment: s; }
.stage-steps li::before { content: "0" counter(s); font: 500 12px var(--mono); color: var(--brass-2); }
.stage-steps b { color: #EDE7D8; font-weight: 600; }
.stage-tail { margin-top: 30px; border: 1px solid rgba(237, 231, 216, .14); border-radius: 14px; padding: 14px 16px; background: rgba(0, 0, 0, .14); }
.tail-head { display: flex; align-items: center; gap: 8px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: rgba(237, 231, 216, .55); }
.tail-head .dot { width: 6px; height: 6px; border-radius: 50%; background: #6FC193; box-shadow: 0 0 0 3px rgba(111, 193, 147, .18); }
#tail { list-style: none; margin-top: 10px; display: grid; gap: 7px; font: 400 12px/1.4 var(--mono); color: rgba(237, 231, 216, .8); }
#tail li { display: grid; grid-template-columns: 62px 1fr; gap: 6px; }
#tail li time { color: rgba(237, 231, 216, .42); }
#tail li.fresh { animation: tailIn .5s ease both; }
@keyframes tailIn { from { opacity: 0; transform: translateY(-4px); } }
.stage-note { margin-top: 18px; font-size: 12px; color: rgba(237, 231, 216, .45); }

.ribbon { position: fixed; left: 18px; bottom: 16px; z-index: 50; font: 500 11px/1 var(--sans); letter-spacing: .04em; color: rgba(237, 231, 216, .75); text-decoration: none; padding: 6px 10px; border: 1px solid rgba(237, 231, 216, .22); border-radius: 99px; background: rgba(16, 41, 31, .5); }
.ribbon:hover { color: #fff; border-color: var(--brass-2); }

.device { position: fixed; top: 50%; right: clamp(40px, 14vw, 260px); transform: translateY(-50%); width: 400px; height: min(840px, calc(100vh - 44px)); border-radius: 48px; padding: 10px; background: #0A1712; box-shadow: 0 50px 100px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .07) inset, 0 0 0 2px #1E3A30; }
.device .app { border-radius: 39px; }

/* ---------- app shell ---------- */
.app { position: relative; height: 100%; overflow: hidden; background: var(--paper); display: flex; flex-direction: column; isolation: isolate; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand .mark { width: 26px; height: 26px; }
.mk-bg { fill: var(--deep); } .mk-line { stroke: var(--paper); stroke-width: 3; stroke-linecap: round; fill: none; } .mk-keel { stroke: var(--brass-2); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; fill: none; }
.stage .mk-line, .stage .mk-keel { stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.top-right { display: flex; align-items: center; gap: 10px; }
.mode { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--deep); background: var(--gain-bg); padding: 5px 9px; border-radius: 99px; }
.mode-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gain); }
.mode.halt { background: var(--loss-bg); color: var(--loss); } .mode.halt .mode-dot { background: var(--loss); }
.clock { font: 500 12px var(--mono); color: var(--ink-3); }
main { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 2px 18px 22px; scrollbar-width: none; }
main::-webkit-scrollbar { display: none; }
main:focus { outline: none; }
.view-in { animation: viewIn .28s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }

.tabs { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); background: var(--card); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
.tabs button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 0 2px; font-size: 10.5px; font-weight: 600; color: var(--ink-3); border-radius: 10px; }
.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.tabs button[aria-current="page"] { color: var(--deep); }
.tabs button[aria-current="page"] svg { stroke-width: 2.1; }
.badge { position: absolute; top: 1px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--brass); color: #fff; font: 700 10px/17px var(--mono); }
.badge:empty, .badge[data-n="0"] { display: none; }

/* ---------- common ---------- */
h2.h { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin: 6px 0 2px; }
.sub { color: var(--ink-3); font-size: 13px; }
.sec { margin-top: 22px; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.sec-head h3 { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.sec-head .link { font-size: 13px; font-weight: 600; color: var(--deep-2); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.foot { margin-top: 26px; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 3px 8px; border-radius: 99px; text-transform: uppercase; }
.chip.buy { background: var(--gain-bg); color: var(--gain); } .chip.sell { background: var(--loss-bg); color: var(--loss); }
.chip.muted { background: var(--sunk); color: var(--ink-2); }
.tk { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font: 700 10.5px var(--mono); letter-spacing: .02em; color: #fff; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: 13px; font-weight: 650; font-size: 14.5px; transition: transform .12s, background .2s, opacity .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--deep); color: #F6F1E4; }
.btn.primary:hover { background: var(--deep-2); }
.btn.ghost { background: var(--sunk); color: var(--ink); }
.btn.line { border: 1px solid var(--line-2); color: var(--ink); background: var(--card); }
.btn[disabled] { opacity: .38; cursor: not-allowed; transform: none; }
.btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- portfolio ---------- */
.hero { padding: 8px 2px 2px; }
.hero .label { font-size: 13px; color: var(--ink-3); }
.hero .value { font: 600 38px/1.05 var(--mono); letter-spacing: -.04em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hero .value small { font-size: 22px; color: var(--ink-3); }
.hero .delta { margin-top: 6px; font: 500 13.5px var(--mono); }
.hero .delta span.sep { color: var(--ink-3); margin: 0 6px; }
.chart { margin-top: 12px; }
.chart svg { display: block; width: 100%; height: 86px; }
.ranges { display: flex; gap: 4px; margin-top: 6px; }
.ranges button { font: 600 11.5px var(--mono); padding: 5px 10px; border-radius: 8px; color: var(--ink-3); }
.ranges button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.pending { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 13px 14px; border-radius: 16px; background: var(--deep); color: #F3EDDF; text-align: left; width: 100%; }
.pending .pn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(217, 180, 106, .16); font: 700 18px var(--mono); color: var(--brass-2); flex: none; }
.pending.none .pn { background: var(--card); }
.pending b { display: block; font-size: 14.5px; }
.pending span { font-size: 12.5px; color: rgba(243, 237, 223, .7); }
.pending svg { margin-left: auto; width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.pending.none { background: var(--sunk); color: var(--ink); } .pending.none span { color: var(--ink-3); } .pending.none .pn { color: var(--deep); }

.alloc { display: grid; grid-template-columns: 130px 1fr; gap: 16px; align-items: center; padding: 16px; }
.donut { position: relative; width: 130px; height: 130px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 15; transition: stroke-dasharray .7s cubic-bezier(.3, .7, .2, 1), stroke-dashoffset .7s cubic-bezier(.3, .7, .2, 1); }
.donut .mid { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .mid b { font: 600 17px var(--mono); }
.donut .mid span { font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.legend { list-style: none; display: grid; gap: 5px; font-size: 12.5px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend .num { color: var(--ink-2); font-size: 12px; }

.gauges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gauge { padding: 11px 11px 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.gauge span { display: block; font-size: 11px; color: var(--ink-3); line-height: 1.25; min-height: 28px; }
.gauge b { display: block; font: 600 15px var(--mono); margin-top: 4px; }
.gauge .bar { height: 4px; border-radius: 4px; background: var(--sunk); margin-top: 8px; overflow: hidden; }
.gauge .bar i { display: block; height: 100%; border-radius: 4px; background: var(--deep-2); transition: width .6s; }
.gauge.hot .bar i { background: var(--loss); } .gauge.hot b { color: var(--loss); }

.positions { list-style: none; }
.pos { display: grid; grid-template-columns: 40px minmax(0, 1fr) 52px auto; gap: 10px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.pos:last-child { border-bottom: 0; }
.pos .nm b { display: block; font-size: 14px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos .nm span { font-size: 12px; color: var(--ink-3); }
.pos .spark { width: 52px; height: 26px; }
.pos .nm { min-width: 0; }
.pos .val { text-align: right; }
.pos .val b { display: block; font: 600 13.5px var(--mono); }
.pos .val span { font: 500 12px var(--mono); }
.pos.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 30% { background: var(--gain-bg); } 100% { background: transparent; } }
.cashrow .tk { background: var(--sunk); color: var(--ink-2); }

/* ---------- proposals ---------- */
.pcard { margin-top: 14px; overflow: hidden; transition: opacity .4s, transform .4s; }
.pcard.leaving { opacity: 0; transform: translateX(30px); }
.p-head { display: flex; align-items: center; gap: 12px; padding: 15px 15px 0; }
.p-head .ttl { flex: 1; min-width: 0; }
.p-head .ttl b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.p-head .ttl span { font-size: 12.5px; color: var(--ink-3); }
.p-amt { text-align: right; }
.p-amt b { display: block; font: 600 17px var(--mono); }
.p-amt span { font: 500 11.5px var(--mono); color: var(--ink-3); }
.p-meta { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 15px 0; align-items: center; }
.conv { font-size: 11.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.conv i { display: inline-flex; gap: 2px; } .conv i b { width: 5px; height: 10px; border-radius: 2px; background: var(--line-2); } .conv i b.on { background: var(--brass); }
.exp { margin-left: auto; font: 500 11.5px var(--mono); color: var(--ink-3); }
.p-why { padding: 12px 15px 0; font-size: 14px; color: var(--ink); line-height: 1.5; }
.p-why .ai { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--deep-2); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; }
.p-why .ai svg { width: 14px; height: 14px; fill: var(--brass); }
.p-inv { margin: 10px 15px 0; padding: 9px 11px; border-radius: 11px; background: var(--sunk); font-size: 12.5px; color: var(--ink-2); }
.p-inv b { color: var(--ink); font-weight: 650; }
.diff { margin: 12px 15px 0; display: grid; grid-template-columns: 1fr auto auto auto; gap: 4px 10px; font-size: 12px; align-items: center; }
.diff .h { color: var(--ink-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; }
.diff .num { text-align: right; font-size: 12px; }
.checks { margin: 13px 15px 0; border-top: 1px solid var(--line); padding-top: 11px; }
.checks-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.checks-head .sum { font: 600 11.5px var(--mono); padding: 3px 8px; border-radius: 99px; }
.sum.ok { background: var(--gain-bg); color: var(--gain); } .sum.bad { background: var(--loss-bg); color: var(--loss); } .sum.warn { background: var(--warn-bg); color: var(--warn); }
.checks ul { list-style: none; display: grid; gap: 5px; }
.checks li { display: grid; grid-template-columns: 18px 1fr auto; gap: 7px; align-items: center; font-size: 12.5px; }
.checks li .ic { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; }
.checks li .ic svg { width: 10px; height: 10px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.checks li.pass .ic { background: var(--gain); } .checks li.fail .ic { background: var(--loss); } .checks li.warn .ic { background: var(--brass); }
.checks li .v { font: 500 11.5px var(--mono); color: var(--ink-2); text-align: right; }
.checks li.fail { color: var(--loss); font-weight: 600; } .checks li.fail .v { color: var(--loss); }
.checks li.warn .v { color: var(--warn); }
.blocked-note { margin: 10px 15px 0; font-size: 12.5px; color: var(--loss); background: var(--loss-bg); padding: 9px 11px; border-radius: 11px; }
.p-actions { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 8px; padding: 14px 15px 15px; }
.p-actions .btn { height: 44px; padding: 0 8px; font-size: 14px; }

.pipeline { list-style: none; margin: 14px 15px 15px; display: grid; gap: 0; }
.pipeline li { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: start; padding-bottom: 12px; color: var(--ink-3); font-size: 13.5px; transition: color .3s; }
.pipeline li::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.pipeline li:last-child::before { display: none; }
.pipeline li .nd { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--card); display: grid; place-items: center; transition: all .3s; }
.pipeline li .nd svg { width: 11px; height: 11px; stroke: #fff; stroke-width: 3; fill: none; opacity: 0; }
.pipeline li .t { font: 500 11.5px var(--mono); }
.pipeline li.on { color: var(--ink); } .pipeline li.on .nd { border-color: var(--deep-2); }
.pipeline li.on .nd::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--deep-2); animation: pulse 1s infinite; }
.pipeline li.done { color: var(--ink); } .pipeline li.done .nd { background: var(--gain); border-color: var(--gain); } .pipeline li.done .nd svg { opacity: 1; } .pipeline li.done .nd::after { display: none; }
.pipeline li.done::before { background: var(--gain); }
.pipeline small { display: block; color: var(--ink-3); font-size: 12px; }
@keyframes pulse { 50% { transform: scale(.5); opacity: .5; } }
.filled-banner { margin: 0 15px 15px; padding: 11px 13px; border-radius: 12px; background: var(--gain-bg); color: var(--gain); font-size: 13.5px; font-weight: 600; display: flex; justify-content: space-between; }

.empty { text-align: center; padding: 40px 20px 10px; color: var(--ink-3); }
.empty svg { width: 54px; height: 54px; stroke: var(--line-2); fill: none; stroke-width: 1.5; }
.empty b { display: block; color: var(--ink); font-size: 16px; margin: 10px 0 4px; }

/* ---------- log ---------- */
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 12px -18px 0; padding: 0 18px 2px; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--card); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.logday { margin: 18px 2px 6px; font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; }
.entry { width: 100%; text-align: left; display: block; padding: 0; margin-bottom: 8px; }
.entry-row { width: 100%; text-align: left; border-radius: 18px; display: grid; grid-template-columns: 40px 1fr auto; gap: 11px; align-items: center; padding: 12px 13px; }
.entry-row .nm b { font-size: 14px; font-weight: 650; }

.entry-row .res { text-align: right; }
.entry-row .res b { display: block; font: 600 13px var(--mono); }
.entry-row .res span { font: 500 11.5px var(--mono); }
.dec { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; margin-left: 6px; vertical-align: 2px; }
.dec.approved { background: var(--gain-bg); color: var(--gain); } .dec.adjusted { background: #DDE5EE; color: #34557A; }
.dec.rejected { background: var(--sunk); color: var(--ink-2); } .dec.expired { background: var(--warn-bg); color: var(--warn); } .dec.blocked { background: var(--loss-bg); color: var(--loss); }
.trail { display: none; border-top: 1px solid var(--line); padding: 10px 13px 13px; }
.entry.open .trail { display: block; }
.trail p { font-size: 13px; color: var(--ink-2); margin-bottom: 9px; }
.trail ol { list-style: none; display: grid; gap: 5px; font: 400 11.5px/1.45 var(--mono); color: var(--ink-2); }
.trail ol li { display: grid; grid-template-columns: 58px 1fr; gap: 6px; }
.trail ol time { color: var(--ink-3); }

/* ---------- runs ---------- */
.next { padding: 16px; background: var(--deep); color: #F3EDDF; border-color: var(--deep); }
.next .k { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--brass-2); }
.next .cd { font: 600 34px/1.1 var(--mono); margin-top: 6px; letter-spacing: -.03em; }
.next .w { font-size: 13px; color: rgba(243, 237, 223, .72); margin-top: 2px; }
.next .btn { margin-top: 14px; width: 100%; background: #F3EDDF; color: var(--deep); }
.next .btn[disabled] { opacity: .5; }
.stream { margin-top: 12px; padding: 14px; font-size: 13.5px; line-height: 1.55; }
.stream .ai { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: var(--deep-2); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
.stream .ai svg { width: 14px; height: 14px; fill: var(--brass); }
.stream .steps { list-style: none; font: 400 12px/1.6 var(--mono); color: var(--ink-3); margin-bottom: 8px; }
.stream .steps li.ok::before { content: "\2713  "; color: var(--gain); }
.caret { display: inline-block; width: 7px; height: 15px; background: var(--deep-2); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.stream .btn { margin-top: 12px; width: 100%; }
.jobs { list-style: none; }
.job { display: grid; grid-template-columns: 10px 1fr auto; gap: 11px; align-items: start; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.job .st { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--gain); }
.job .st.idle { background: var(--line-2); } .job .st.run { background: var(--brass); animation: pulse 1s infinite; }
.job b { font-size: 13.5px; font-weight: 650; display: block; }
.job span { font-size: 12px; color: var(--ink-3); }
.job .r { text-align: right; font: 500 11.5px var(--mono); color: var(--ink-2); }
.job .r span { display: block; font-family: var(--mono); }
.runs { list-style: none; }
.run { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; align-items: baseline; }
.run:last-child { border-bottom: 0; }
.run .id { font: 500 11.5px var(--mono); color: var(--ink-3); }
.run .o { color: var(--ink); } .run .o small { display: block; color: var(--ink-3); font-size: 11.5px; }
.run .d { font: 500 11.5px var(--mono); color: var(--ink-3); }
.run.warn .o::after { content: " \00B7  retry"; color: var(--warn); font-size: 11.5px; }

/* ---------- limits ---------- */
.lim { padding: 14px 15px; border-bottom: 1px solid var(--line); }
.lim:last-child { border-bottom: 0; }
.lim-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lim-top label { font-size: 14px; font-weight: 650; }
.lim-top output { font: 600 14px var(--mono); color: var(--deep); }
.lim p { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin-top: 4px; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--deep-2) var(--p, 50%), var(--line) var(--p, 50%)); }
input[type=range]::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--deep-2) var(--p, 50%), var(--line) var(--p, 50%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--card); border: 2px solid var(--deep); margin-top: -9px; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--card); border: 2px solid var(--deep); }
.toggle { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 15px; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.toggle b { font-size: 14px; font-weight: 600; display: block; }
.toggle span { font-size: 12px; color: var(--ink-3); }
.sw { position: relative; width: 46px; height: 28px; border-radius: 99px; background: var(--line-2); transition: background .2s; flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.sw[aria-checked="true"] { background: var(--deep-2); }
.sw[aria-checked="true"]::after { transform: translateX(18px); }
.kill .sw[aria-checked="true"] { background: var(--loss); }
.kill { background: var(--card); border: 1px solid var(--line); border-radius: 18px; }
.impact { margin-top: 12px; padding: 11px 13px; border-radius: 13px; background: var(--sunk); font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.impact b { color: var(--ink); }
.impact button { font-size: 13px; font-weight: 650; color: var(--deep-2); white-space: nowrap; }
.reset { margin-top: 16px; width: 100%; }

/* ---------- sheet ---------- */
.scrim { position: absolute; inset: 0; background: rgba(12, 24, 19, .42); z-index: 20; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; background: var(--card); border-radius: 26px 26px 0 0; padding: 10px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: 0 -10px 40px rgba(0, 0, 0, .18); animation: up .32s cubic-bezier(.2, .8, .2, 1) both; max-height: 86%; overflow-y: auto; }
@keyframes up { from { transform: translateY(100%); } }
.sheet .grab { width: 38px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 0 auto 12px; }
.sheet h3 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.sheet .sub { margin-top: 2px; }
.adj-amt { font: 600 34px var(--mono); letter-spacing: -.03em; margin-top: 16px; text-align: center; }
.adj-amt small { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-top: 2px; }
.presets { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.presets button { font: 600 12px var(--mono); padding: 6px 10px; border-radius: 8px; background: var(--sunk); }
.sheet .checks { margin: 14px 0 0; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-top: 16px; }
.reasons { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.reasons button { padding: 9px 13px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 550; }
.reasons button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.toast { position: absolute; left: 50%; bottom: 84px; transform: translate(-50%, 20px); opacity: 0; z-index: 30; background: var(--ink); color: var(--paper); font-size: 13.5px; font-weight: 550; padding: 11px 16px; border-radius: 14px; white-space: nowrap; transition: all .3s cubic-bezier(.2, .8, .2, 1); pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    body { overflow: auto; background: var(--paper); }
    body::before, .stage { display: none; }
    .ribbon { left: 50%; bottom: auto; top: 0; transform: translateX(-50%); border-radius: 0 0 8px 8px; padding: 3px 9px 4px; font-size: 9.5px; background: var(--ink); color: rgba(242, 238, 229, .9); border: 0; }
    .top { padding-top: 24px; }
    .device { position: static; transform: none; width: auto; height: 100dvh; padding: 0; border-radius: 0; background: none; box-shadow: none; }
    .device .app { border-radius: 0; }
}
@media (min-width: 901px) and (max-width: 1180px) {
    .stage { width: min(380px, 40vw); left: 40px; }
    .stage-steps li { grid-template-columns: 26px 1fr; } .stage-steps li span { grid-column: 2; }
    .device { right: 40px; }
}
@media (min-width: 901px) and (max-height: 760px) { .stage-tail { display: none; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.checks .more { margin-top: 8px; font-size: 12.5px; font-weight: 650; color: var(--deep-2); padding: 4px 0; }
.entry-row .nm span.meta { display: block; font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.entry-row .nm .dec { margin: 0 6px 0 0; vertical-align: 1px; }
.job .ln { display: block; margin-top: 2px; color: var(--ink-2); }
.job .r { white-space: nowrap; }
.stream .steps { font: 400 12.5px/1.6 var(--sans); }
.entry-row .nm, .entry-row .res, .entry-row .nm b, .entry-row .res b, .entry-row .res span { display: block; }
.entry-row .nm { min-width: 0; }
.entry { overflow: hidden; }
.pipeline li.fail { color: var(--loss); } .pipeline li.fail .nd { background: var(--loss); border-color: var(--loss); }
