:root {
    --bg: #0f1216;
    --panel: #161b21;
    --panel-2: #1c232b;
    --line: #273039;
    --text: #d9dee4;
    --muted: #7d8894;
    --accent: #5aa9ff;
    --buy: #3fbf7f;
    --sell: #ef6461;
    --flat: #8a95a1;
    --warn: #e0b341;
    --radius: 8px;
    --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
    color-scheme: dark;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 "Segoe UI", system-ui, sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.4rem; margin: 0; font-weight: 600; }
h1:focus { outline: none; }
h2 { font-size: 0.95rem; margin: 0; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

/* ---- shell ---- */
.shell { display: flex; min-height: 100vh; }
.side {
    width: 200px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--line);
    display: flex; flex-direction: column; padding: 1rem 0.75rem; gap: 2px;
    position: sticky; top: 0; height: 100vh;
}
.side a { color: var(--text); padding: 0.45rem 0.7rem; border-radius: 6px; }
.side a:hover { background: var(--panel-2); text-decoration: none; }
.side a.active { background: var(--panel-2); color: var(--accent); }
.brand { font-weight: 700; font-size: 1.1rem; padding: 0 0.7rem 1rem; letter-spacing: 0.02em; }
.brand span { color: var(--accent); font-weight: 400; margin-left: 0.3rem; }
.content { flex: 1; min-width: 0; padding: 1.5rem 2rem 3rem; max-width: 1400px; }

@media (max-width: 760px) {
    .shell { flex-direction: column; }
    .side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 0.5rem; }
    .brand { padding: 0.45rem 0.7rem; }
    .content { padding: 1rem; }
}

.page-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }

/* ---- cards & layout ---- */
.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1rem 1.25rem; margin-bottom: 1rem;
}
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 1rem; margin-bottom: 0.75rem; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid > .card { margin-bottom: 0; }
.grid + .card { margin-top: 1rem; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1rem; margin: 0 0 0.75rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.stats { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.stats div { display: flex; flex-direction: column; }
.stats span { color: var(--muted); font-size: 0.8rem; }
.stats b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stats small { color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.error { color: var(--sell); }
.pos { color: var(--buy); }
.neg { color: var(--sell); }
.event { margin: 0 0 0.75rem; }

/* ---- controls ---- */
.btn {
    background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
    padding: 0.4rem 0.9rem; font: inherit; cursor: pointer;
}
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0b1420; font-weight: 600; }
.btn.small { padding: 0.2rem 0.6rem; font-size: 0.82rem; }
.actions { display: flex; gap: 0.5rem; }

input, select {
    background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
    padding: 0.35rem 0.5rem; font: inherit;
}
input[type=number] { width: 5.5rem; }
input:focus, select:focus { outline: none; border-color: var(--accent); }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1.2rem; }
.filters label { display: flex; align-items: center; gap: 0.45rem; color: var(--muted); }
.filters label.grow { flex: 1; min-width: 14rem; }
.filters label.grow input { flex: 1; }
.filters .push { margin-left: auto; }
.filters.inline { margin-bottom: 0.5rem; }
.presets { display: flex; gap: 0.3rem; }

.confirm {
    margin-top: 0.9rem; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 6px;
    background: var(--panel-2); display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
}
.confirm p { margin: 0 0 0.3rem; flex-basis: 100%; }
.confirm.danger { border-color: var(--warn); }

pre.output {
    background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 0.75rem;
    font: 0.8rem/1.45 var(--mono); white-space: pre-wrap; overflow-x: auto; margin: 0.75rem 0 0;
    max-height: 32rem; overflow-y: auto;
}
pre.output.bad { border-color: var(--sell); }

/* ---- badges ---- */
.pill, .mode, .tag, .status {
    display: inline-block; border-radius: 999px; padding: 0.05rem 0.6rem; font-size: 0.78rem;
    border: 1px solid var(--line); color: var(--muted);
}
.pill.on { color: var(--buy); border-color: var(--buy); }
.pill.off { color: var(--muted); }
.mode.demo { color: var(--accent); border-color: var(--accent); }
.mode.real { color: #0b1420; background: var(--warn); border-color: var(--warn); font-weight: 600; }
.status.ok { color: var(--buy); border-color: var(--buy); }
.status.bad { color: var(--sell); border-color: var(--sell); }

.dir { font-weight: 600; text-transform: uppercase; font-size: 0.78rem; letter-spacing: 0.03em; }
.dir.buy { color: var(--buy); }
.dir.sell { color: var(--sell); }
.dir.flat { color: var(--flat); }

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
    border: 1px solid var(--line); border-left-width: 3px; border-radius: 5px; padding: 0.05rem 0.5rem;
    font-size: 0.8rem; background: var(--panel-2); white-space: nowrap;
}
.chip.buy { border-left-color: var(--buy); }
.chip.sell { border-left-color: var(--sell); }
.chip.flat { border-left-color: var(--flat); color: var(--muted); }
.chip.acted { border-color: var(--accent); }
.chip .num { font-variant-numeric: tabular-nums; color: var(--muted); }
.chip .tick { color: var(--accent); }

.conf { display: inline-flex; align-items: center; gap: 0.4rem; }
.conf-track { position: relative; width: 90px; height: 6px; background: var(--bg); border-radius: 3px; }
.conf-fill { position: absolute; inset: 0 auto 0 0; background: var(--flat); border-radius: 3px; }
.conf-fill.hit { background: var(--accent); }
.conf-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--warn); }
.conf-num { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---- analyses ---- */
.analysis { padding: 0; }
.analysis-head {
    width: 100%; display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1.25rem;
    background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.analysis-head:hover { background: var(--panel-2); }
.analysis-head .when { display: flex; flex-direction: column; min-width: 10.5rem; }
.analysis-head .chips { flex: 1; }
.analysis-head .caret { color: var(--muted); }
.analysis-body { padding: 0.25rem 1.25rem 1rem; border-top: 1px solid var(--line); }
.analysis-body .event { margin-top: 0.75rem; }

.verdict { border-top: 1px solid var(--line); padding: 0.75rem 0; }
.verdict-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; margin-bottom: 0.4rem; }
.verdict dl { display: grid; grid-template-columns: 3rem 1fr; gap: 0.3rem 0.75rem; margin: 0; }
.verdict dt { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; padding-top: 0.1rem; }
.verdict dd { margin: 0; }

/* shadow analysts: journal-only second opinions, visibly not the live brain */
.chip.shadow { border-style: dashed; border-left-style: solid; background: none; }
.chip-break { flex-basis: 100%; height: 0; }
.shadow-label {
    font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent);
    align-self: center; padding-right: 0.15rem;
}
.shadow-block {
    margin: 0.75rem -0.75rem 0.25rem; padding: 0.25rem 0.75rem 0.25rem;
    border: 1px dashed var(--line); border-radius: 8px; background: var(--panel-2);
}
.shadow-block h3 { margin: 0.6rem 0 0; font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; align-items: baseline; }

details summary { cursor: pointer; color: var(--muted); margin: 0.5rem 0; }
.headlines { margin: 0; padding-left: 1.2rem; color: var(--text); }
.headlines li { margin: 0.15rem 0; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 0.8rem; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
tr.clickable:hover, tr.selected { background: var(--panel-2); }
tr.detail > td { background: var(--panel-2); padding: 0 1rem; }
tr.detail .verdict { border-top: 0; }

/* ---- performance & charts ---- */
:root {
    /* dataviz categorical slots 1-3 (dark steps), validated on --panel.
       On the P&L chart slot 3 (not 2) sits next to --real: orange and the
       real-money yellow fail the separation check as a pair */
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --grid: #222a32;
    --axis: #3a4652;
}
.perf { margin-top: 1rem; }

/* ---- money: the accounts ---- */
/* real money (the mirror's REAL account): one yellow identity for its card and
   its P&L line. --real is the dataviz dark yellow step, validated on --panel;
   --warn stays the warning color. Figures keep their text/pos/neg ink. */
:root { --real: #c98500; }
.money { margin-top: 1rem; }
.money > .card-head { justify-content: flex-start; }
.money > .card-head .btn { margin-left: auto; }
.money-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.money-grid.single { grid-template-columns: minmax(0, 1fr); }
.money-grid > .card { margin-bottom: 0; }
@media (max-width: 1000px) { .money-grid { grid-template-columns: minmax(0, 1fr); } }
.acct .card-head { justify-content: flex-start; gap: 0.3rem 0.6rem; }
.acct-title { margin: 0; font-size: 1.05rem; font-weight: 600; }
.acct .stats { gap: 1rem 2rem; }
.acct:not(.main) .stats b { font-size: 1.1rem; }
.acct.main .stats b { font-size: 1.5rem; }
.acct-meta { margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; }
.acct-sub { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin: 0.9rem 0 0.4rem; text-transform: uppercase; letter-spacing: 0.04em; }
.acct .actions { margin-top: 0.9rem; }
.card.real { border-color: var(--real); box-shadow: inset 4px 0 0 var(--real); }
.card.real .acct-title::before {
    content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px;
    background: var(--real); margin-right: 0.5rem; vertical-align: 0;
}
.tag.real-tag { color: var(--text); border-color: var(--real); margin-left: 0.4rem; }

/* a statistic over too few trades (Fmt.MinSample): muted, tagged, never big or green */
.low-tag {
    display: inline-block; border: 1px dashed var(--line); border-radius: 999px; padding: 0 0.5rem;
    font-size: 0.72rem; color: var(--muted); white-space: nowrap;
}

/* ---- the info bubble: what used to be a paragraph under the card ---- */
.info { position: relative; display: inline-block; color: var(--muted); cursor: help; font-style: normal; font-weight: 400; line-height: 1; }
.info:hover, .info:focus { color: var(--accent); outline: none; }
.info:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 50%; }
.info::after {
    content: attr(data-tip); display: none; position: absolute; top: calc(100% + 6px); left: -0.6rem; z-index: 30;
    width: max-content; max-width: min(24rem, 80vw); white-space: normal; text-align: left; text-transform: none;
    letter-spacing: 0; font: 400 0.8rem/1.45 "Segoe UI", system-ui, sans-serif; color: var(--text);
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 0.5rem 0.7rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.info.left::after { left: auto; right: -0.6rem; }
.info:hover::after, .info:focus::after { display: block; }

/* ---- needs attention: only there when something is wrong ---- */
.attention {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 1rem; margin-bottom: 1rem;
    padding: 0.6rem 1rem; border: 1px solid var(--warn); border-left-width: 4px; border-radius: var(--radius);
    background: var(--panel);
}
.attention.bad { border-color: var(--sell); }
.attention > b { color: var(--warn); white-space: nowrap; }
.attention.bad > b { color: var(--sell); }
.attention ul { margin: 0; padding: 0; list-style: none; flex: 1; min-width: 16rem; display: grid; gap: 0.15rem; }
.attention li::before { content: "•"; color: var(--warn); margin-right: 0.5rem; }
.attention li.bad::before { color: var(--sell); }
.attention li a { margin-left: 0.4rem; white-space: nowrap; }

/* ---- bot card: settings as labelled chips ---- */
.page-head { align-items: center; }
.bot-card .card-head { justify-content: flex-start; }
.settings { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.75rem; }
.setting {
    display: inline-flex; align-items: baseline; gap: 0.4rem; border: 1px solid var(--line); border-radius: 5px;
    padding: 0.05rem 0.5rem; font-size: 0.8rem; background: var(--panel-2); white-space: nowrap;
}
.setting i { font-style: normal; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.perf-head { flex-wrap: wrap; justify-content: flex-start; }
.perf-head .push { margin-left: auto; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.seg button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 0.82rem; padding: 0.2rem 0.7rem; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--panel-2); color: var(--accent); }

/* paper-book bar slider: one stop per book, labelled underneath */
.bar-slider { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: var(--muted); }
.bar-slider b { color: var(--text); font-variant-numeric: tabular-nums; min-width: 2.2rem; }
.bar-track { display: flex; flex-direction: column; width: 11rem; }
.bar-track input { width: 100%; margin: 0; accent-color: var(--series-3); cursor: pointer; }
.bar-ticks { display: flex; justify-content: space-between; font-size: 0.72rem; font-variant-numeric: tabular-nums; padding: 0 0.2rem; }
.bar-ticks .live { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1.1rem; display: flex; flex-direction: column; gap: 0.1rem; }
.tile span { color: var(--muted); font-size: 0.8rem; }
.tile b { font-size: 1.6rem; font-weight: 600; }
.tile small { color: var(--muted); }
/* value · n=… on one line; a low-sample tile gives up its size and its color */
.kpi { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.5rem; }
.kpi i { font-style: normal; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.tile.low b { font-size: 1.15rem; font-weight: 500; color: var(--muted); }

.card.loading .chart, .card.loading .table-view { opacity: 0.5; transition: opacity 0.2s; }
.chart { position: relative; min-height: 40px; outline: none; }
.chart:focus-visible { box-shadow: 0 0 0 2px var(--accent); border-radius: 4px; }
.chart svg { display: block; overflow: visible; }
.c-grid { stroke: var(--grid); stroke-width: 1; }
.c-axis { stroke: var(--axis); stroke-width: 1; }
.c-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.c-label { fill: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; }
.c-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-dot { stroke: var(--panel); stroke-width: 2; }
.c-cross { stroke: var(--muted); stroke-width: 1; }
.c-band { fill: rgba(255, 255, 255, 0.05); }
/* nothing was running: a band, and the lines stop; .one = only one line's process was off */
.c-off { fill: rgba(255, 255, 255, 0.07); }
.c-off.one { fill: rgba(255, 255, 255, 0.035); }
.c-legend i.off { background: rgba(255, 255, 255, 0.14); border: 1px solid var(--axis); }
.c-marker { stroke: var(--text); stroke-opacity: 0.55; stroke-width: 1; }
.c-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.8rem; color: var(--muted); margin-bottom: 0.4rem; }
.c-legend span { display: inline-flex; align-items: center; gap: 0.4rem; }
.c-legend i { width: 10px; height: 10px; border-radius: 2px; }
.c-legend i.dash { width: 18px; height: 2px; border-radius: 0; }
.c-tip {
    position: absolute; top: 0.5rem; z-index: 5; pointer-events: none; min-width: 9rem; max-width: 22rem;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 0.45rem 0.65rem;
    font-size: 0.8rem; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.c-tip strong { display: block; font-size: 0.95rem; margin-bottom: 0.15rem; }
.c-tip div { display: flex; align-items: center; gap: 0.35rem; }
.c-tip i { width: 12px; height: 2px; border-radius: 1px; }
.table-view { margin-top: 0.5rem; }
.table-view table { font-size: 0.82rem; }
.table-view .table-wrap { max-height: 18rem; overflow-y: auto; }

/* ---- server resources strip (operators only, above everything) ---- */
:root { --sysbar-h: 28px; }
.sysbar {
    position: sticky; top: 0; z-index: 20; height: var(--sysbar-h);
    display: flex; align-items: center; gap: 1.4rem; padding: 0 1rem; overflow: hidden; white-space: nowrap;
    background: var(--bg); border-bottom: 1px solid var(--line); font-size: 0.78rem; color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.sysbar ~ .shell .side { top: var(--sysbar-h); height: calc(100vh - var(--sysbar-h)); }
.sys-item { display: flex; align-items: center; gap: 0.4rem; --spark: var(--accent); cursor: default; }
.sys-item b { color: var(--text); font-weight: 600; }
.sys-item b small { color: var(--muted); font-weight: 400; font-size: inherit; }
.sys-k { text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.7rem; }
.sys-item.warn { --spark: var(--warn); }
.sys-item.warn b { color: var(--warn); }
.sys-item.bad { --spark: var(--sell); }
/* Claude API spend: right after the machine figures. The process list goes
   last, so it is what gets clipped on a narrow window, never the spend */
.sys-api { display: flex; gap: 1.4rem; }
.sys-top { order: 2; }
.sys-item.bad b { color: var(--sell); }
.spark { display: block; }
.spark polyline { fill: none; stroke: var(--spark); stroke-width: 1.25; stroke-linejoin: round; }
.spark polygon { fill: var(--spark); fill-opacity: 0.15; }
.sys-top { margin-left: auto; display: flex; gap: 0.9rem; overflow: hidden; }
.sys-top b { color: var(--text); font-weight: 500; }
@media (max-width: 1100px) { .sys-top { display: none; } }
@media (max-width: 760px) {
    .sysbar { gap: 0.9rem; padding: 0 0.6rem; }
    .sysbar .spark { display: none; }
    .sysbar ~ .shell .side { top: auto; height: auto; }
}

/* ---- log ---- */
.log { padding: 0.5rem 0; font: 0.8rem/1.5 var(--mono); }
.log .line { display: grid; grid-template-columns: 5.2rem 4.8rem 11rem 1fr; gap: 0.6rem; padding: 0.1rem 1rem; }
.log .line:hover { background: var(--panel-2); }
.log .t { color: var(--muted); }
.log .s { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log .m { white-space: pre-wrap; overflow-wrap: anywhere; }
.log .lvl-warning .l, .log .lvl-warning .m { color: var(--warn); }
.log .lvl-error .l, .log .lvl-error .m, .log .lvl-critical .l, .log .lvl-critical .m { color: var(--sell); }
.log .lvl-info .l, .log .lvl-debug .l { color: var(--muted); }
@media (max-width: 760px) {
    .log .line { grid-template-columns: 5.2rem 1fr; }
    .log .l, .log .s { display: none; }
}

/* ---- signed-in user (sidebar) ---- */
.side .who { margin-top: auto; padding: 0.75rem 0.7rem 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.side .who a { padding: 0; }
.side .who a:hover { background: none; text-decoration: underline; }
.linklike { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.linklike:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 760px) {
    .side .who { margin-top: 0; border-top: 0; padding: 0.45rem 0.7rem; flex-direction: row; align-items: center; }
}

/* ---- sign-in ---- */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.login { width: min(26rem, 100%); display: flex; flex-direction: column; gap: 0.6rem; }
.login .brand { padding: 0 0 0.25rem; }
.login .error { margin: 0; }
.login .btn { align-self: flex-start; }
.auth-title { font-size: 1.2rem; }
.stack { display: flex; flex-direction: column; gap: 0.5rem; }
.stack label { color: var(--muted); }
.stack label.check { display: flex; align-items: center; gap: 0.45rem; }
.stack .btn { align-self: flex-start; margin-top: 0.25rem; }
input.code { font: 1.4rem var(--mono); letter-spacing: 0.35em; width: 9.5rem; text-align: center; }
.steps { padding-left: 1.2rem; margin: 0.25rem 0; display: flex; flex-direction: column; gap: 0.6rem; }
.steps li > * { display: block; }
.qr { width: 200px; height: 200px; margin: 0.6rem 0; background: #fff; padding: 8px; border-radius: 6px; image-rendering: pixelated; }
.key { font: 0.95rem var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 0.3rem 0.5rem; margin-top: 0.25rem; word-break: break-all; }
.validation-summary-errors ul, ul.validation-errors { margin: 0; padding-left: 1.1rem; color: var(--sell); }

/* Claude API spend: per-day bars */
details.card.spend > summary {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem; margin: 0; color: inherit; list-style: none;
}
details.card.spend > summary::-webkit-details-marker { display: none; }
details.card.spend > summary::before { content: "▸"; color: var(--muted); }
details.card.spend[open] > summary::before { content: "▾"; }
details.card.spend > summary .info { margin-left: auto; }
details.card.spend[open] > summary { margin-bottom: 0.75rem; }
.spend-days { display: grid; gap: 0.2rem; margin: 0.3rem 0 0.75rem; max-width: 560px; }
.spend-day { display: grid; grid-template-columns: 3.2rem 1fr 4.5rem; align-items: center; gap: 0.6rem; }
.spend-bar { height: 0.55rem; background: var(--line); border-radius: 3px; overflow: hidden; }
.spend-bar i { display: block; height: 100%; background: var(--accent); }
.spend-day .num { text-align: right; font-variant-numeric: tabular-nums; }
