/* canvas · LAN cell — one stylesheet, no framework, no web fonts (a LAN may have no internet). */

:root {
  color-scheme: light dark;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --raised: #eef0f4;
  --line: #dde1e8;
  --text: #151a22;
  --muted: #5d6675;
  --accent: #2f6fed;
  --accent-soft: #e5edfd;
  --ok: #15945f;
  --warn: #b7791f;
  --danger: #d23b3b;
  --layer: #c9d3e3;
  --layer-full: #8fa3c4;
  --lit: #10b981;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 8px 24px rgb(0 0 0 / 6%);
  --radius: 12px;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #151b24;
    --raised: #1c2430;
    --line: #29323f;
    --text: #e6eaf0;
    --muted: #8d98a8;
    --accent: #6ea0ff;
    --accent-soft: #1b2944;
    --ok: #34d399;
    --warn: #f0b64d;
    --danger: #f07171;
    --layer: #2d3a4d;
    --layer-full: #4d6285;
    --lit: #6ee7b7;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px rgb(0 0 0 / 30%);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: .8rem; font-weight: 650; color: var(--muted); }
p { margin: .4rem 0; }
small { font-size: .8rem; }
.muted { color: var(--muted); }
.fine { font-size: .78rem; color: var(--muted); }
.error { color: var(--danger); font-size: .85rem; }
.grow { flex: 1; min-width: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Buttons */
button { cursor: pointer; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: .45rem .8rem; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.secondary { background: var(--raised); }
button.danger { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
button.link { border: 0; background: none; color: var(--accent); padding: .2rem 0; text-align: left; }
button.icon { border: 0; background: none; padding: .25rem .45rem; font-size: 1.05rem; line-height: 1; color: var(--muted); }
button.icon:hover { color: var(--text); }
button.small { padding: .2rem .55rem; font-size: .8rem; }
button.wide { width: 100%; }

/* Splash and sign-in */
.splash { min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: .75rem; padding: 1.5rem; text-align: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.auth { width: min(440px, 100%); padding: 1.75rem; text-align: left; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; }
.logo { width: 22px; height: 22px; flex: none; }
.logo rect { fill: var(--layer); }
.logo rect.lit { fill: var(--lit); }
.tabs { display: flex; gap: .25rem; margin: 1rem 0; background: var(--raised); padding: .25rem; border-radius: 10px; }
.tab { flex: 1; border: 0; background: none; padding: .45rem; border-radius: 8px; color: var(--muted); }
.tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.form { display: grid; gap: .75rem; }
.field { display: grid; gap: .3rem; }
.field > span { font-size: .85rem; color: var(--muted); }
.field input, .field select, .rename input { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.field input[type="range"] { padding: 0; accent-color: var(--accent); }
.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .88rem; }
.check input { margin-top: .2rem; accent-color: var(--accent); }

/* The frame (its columns: shell.css) */

/* A room's column: this device, the people, the cell */
.panel { display: grid; gap: 1.1rem; padding: 1rem; }
.panel-head { display: flex; align-items: center; gap: .6rem; }
.panel-head small { display: block; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); }
.pulse.live { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.who { display: flex; align-items: center; gap: .6rem; }
.who small { display: block; }
.avatar { --hue: 210; width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff; background: hsl(var(--hue) 55% 45%); }
.avatar.private { background: var(--muted); }
.person-head .avatar { width: 24px; height: 24px; font-size: .65rem; }
.device { margin-top: .75rem; display: grid; gap: .6rem; padding: .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.device-name { display: flex; align-items: center; gap: .25rem; }
.rename { display: flex; gap: .4rem; }
.rename input { flex: 1; min-width: 0; }
.big-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.big { display: grid; gap: .2rem; text-align: left; padding: .7rem .75rem; border-radius: 10px; background: var(--surface); min-height: 88px; align-content: start; }
.big-title { font-weight: 700; }
.big-sub { font-size: .76rem; color: var(--muted); }
.big.on { border-color: var(--accent); background: var(--accent-soft); }
.big.share.on { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.big.warn { border-color: var(--warn); }
.bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: .2rem; }
.bar .fill { --fill: 0%; display: block; height: 100%; width: var(--fill); background: var(--accent); transition: width .2s; }
.switch { display: flex; gap: .55rem; align-items: center; font-size: .86rem; }
.switch input { accent-color: var(--accent); width: 1rem; height: 1rem; }
.people, .devices { list-style: none; margin: 0; padding: 0; }
.person { margin: .4rem 0 .7rem; }
.person-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .25rem; }
.devices { display: grid; gap: .15rem; margin-left: 1rem; padding-left: .6rem; border-left: 2px solid var(--line); }
.device-row { display: flex; gap: .55rem; align-items: center; padding: .35rem .45rem; border-radius: 8px; cursor: pointer; }
.device-row:hover { background: var(--raised); }
.device-row .dname { display: block; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.device-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.device-row.online .dot { background: var(--accent); }
.device-row.serving .dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.device-row.loading .dot { background: var(--warn); animation: blink 1.2s infinite; }
.device-row.offline { opacity: .55; }
.coverage { display: flex; gap: 3px; height: 10px; margin: .4rem 0; }
.coverage .seg { --grow: 1; flex: var(--grow); border-radius: 3px; background: var(--danger); }
.coverage .seg.short { background: var(--warn); }
.coverage .seg.full { background: var(--ok); }

/* The chat */
.chat-inner { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-head { padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.chat-head-row { display: flex; gap: .5rem; align-items: center; max-width: 820px; margin: 0 auto; }
.conversations { flex: 1; min-width: 0; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.messages { flex: 1; overflow-y: auto; padding: 1.25rem 1rem; display: grid; align-content: start; gap: 1rem; }
.messages > * { width: 100%; max-width: 820px; margin: 0 auto; }
.empty { text-align: center; padding: 12dvh 1rem; }
.msg { display: grid; gap: .3rem; content-visibility: auto; contain-intrinsic-size: auto 120px; }
.msg.user { justify-items: end; }
.bubble { padding: .7rem .9rem; border-radius: 14px; max-width: 100%; overflow-wrap: anywhere; }
.msg.user .bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; max-width: 85%; }
.msg.model .bubble { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.pending .bubble { border-color: var(--accent); }
.draft { color: var(--muted); animation: breathe 1.6s ease-in-out infinite; white-space: pre-wrap; }
.thinking { color: var(--muted); }
.meta { font-size: .74rem; color: var(--muted); padding: 0 .3rem; }
.md p { margin: 0 0 .6rem; }
.md p:last-child { margin-bottom: 0; }
.md pre { background: var(--raised); padding: .7rem; border-radius: 8px; overflow-x: auto; }
.md code { font: .85em ui-monospace, SFMono-Regular, Consolas, monospace; }
.md :not(pre) > code { background: var(--raised); padding: .1rem .3rem; border-radius: 4px; }
.md ul, .md ol { margin: .2rem 0 .6rem; padding-left: 1.3rem; }
.composer { border-top: 1px solid var(--line); padding: .75rem 1rem 1rem; display: grid; gap: .5rem; background: var(--bg); }
.composer > * { width: 100%; max-width: 820px; margin: 0 auto; }
.composer textarea { resize: none; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-height: 3.2rem; max-height: 30dvh; }
.composer-row { display: flex; gap: .6rem; align-items: center; }
.via { flex: 1; font-size: .78rem; min-width: 0; }
.blocks { display: flex; gap: .35rem; align-items: center; font-size: .8rem; color: var(--muted); }
.blocks select { padding: .3rem; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }

/* Sheets */
.scrim { position: fixed; inset: 0; background: rgb(0 0 0 / 45%); display: grid; place-items: center; padding: 1rem; z-index: 10; animation: fade .12s ease-out; }
.sheet { width: min(600px, 100%); max-height: 92dvh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); cursor: auto; }
.sheet.wide { width: min(1080px, 100%); }
.sheet-head { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 1; }
.sheet-head h2 { margin: 0; }
.share-sheet, .map, .pairing { padding: 1rem 1.1rem 1.2rem; display: grid; gap: .9rem; }
.block { display: grid; gap: .55rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.block > button { justify-self: start; }
.block:last-of-type { border-bottom: 0; }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; background: var(--raised); padding: 3px; border-radius: 10px; }
.segmented button { border: 0; background: none; padding: .35rem .7rem; font-size: .83rem; color: var(--muted); }
.segmented button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chips button { font-size: .8rem; border-radius: 999px; padding: .25rem .7rem; }
.chips button.on { background: var(--accent-soft); border-color: var(--accent); }
.preview p { margin: .15rem 0; }
.perms { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.perm { display: flex; gap: .6rem; align-items: center; }
.perm small { display: block; }
.perm-state { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.sheet-foot { position: sticky; bottom: 0; display: flex; gap: 1rem; align-items: center; padding: .9rem 0 0; background: var(--surface); }
.sheet-foot .fine { flex: 1; margin: 0; }
.pairing .code { font: 700 2.4rem/1 ui-monospace, Consolas, monospace; letter-spacing: .12em; text-align: center; padding: 1rem; background: var(--raised); border-radius: 12px; }
.pairing .link { word-break: break-all; font-size: .85rem; color: var(--accent); }
/* A QR code stays dark on light in either scheme: scanners read it so. */
.qr { width: min(220px, 70%); justify-self: center; border-radius: 8px; }
.qr .paper { fill: #fff; }
.qr .ink { fill: #000; }

/* Native nodes' keys, and what the cell sees */
.nodes, .privacy-body { padding: 1rem 1.1rem 1.2rem; display: grid; gap: .9rem; }
.form.inline { grid-template-columns: 1fr auto; align-items: end; }
.groups { border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; display: grid; gap: .35rem; }
.groups legend { font-size: .85rem; color: var(--muted); padding: 0 .3rem; }
.command { margin: 0; padding: .7rem .8rem; background: var(--raised); border-radius: 8px; font: .82rem/1.45 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-all; user-select: all; }
.fresh { display: grid; gap: .5rem; padding: .8rem; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-soft); }
.fresh > button, .operator-key > button { justify-self: start; }
.keys { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.machine-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.machine { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; display: grid; gap: .45rem; background: var(--surface); }
.machine.offline { opacity: .8; }
.machine-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem; }
.machine-head .state { margin-left: auto; font-size: .78rem; border-radius: 999px; padding: .1rem .55rem; background: var(--raised); color: var(--muted); }
.machine-head .state.lending { background: var(--accent-soft); color: var(--text); }
.machine-head .state.resting { background: var(--raised); color: var(--warn); }
.machine .facts { margin: 0; font-size: .82rem; }
.machine .note { margin: 0; font-size: .82rem; color: var(--warn); }
.machine-controls { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: end; }
.machine-controls .hours select + select { margin-left: .3rem; }
.machine-orders { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.key-row { display: flex; gap: .6rem; align-items: center; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; }
.operator-key { display: grid; gap: .5rem; margin-top: .8rem; }
section.privacy { padding: 1rem 1.1rem 0; }
.sheet > div > button.secondary { margin: .9rem 1.1rem 1.2rem; }
.row-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .5rem; }
button.via { font-size: .8rem; color: var(--muted); text-decoration: underline dotted; }
.rate { display: flex; gap: .25rem; margin-top: .25rem; opacity: .6; }
.rate:hover, .rate:focus-within { opacity: 1; }
.rate button.on { opacity: 1; background: var(--accent-soft); border-radius: 6px; }

/* The partition map */
.map-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; }
.stat { display: grid; gap: .1rem; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.stat b { font-size: 1.02rem; }
.delta { color: var(--ok); }
.pick { grid-column: 1 / -1; margin: 0; font-size: .88rem; }
.strip { width: 100%; height: auto; display: block; font-size: 12px; }
.strip text { fill: currentColor; }
.strip text.small { font-size: 11px; }
.strip text.strong { font-weight: 700; }
.strip .head rect { fill: var(--raised); stroke: var(--line); }
.strip .layer { fill: var(--layer); }
.strip .layer.full { fill: var(--layer-full); }
.strip .replica { --hue: 210; cursor: pointer; }
.strip .replica rect { fill: hsl(var(--hue) 60% 50% / 22%); stroke: hsl(var(--hue) 60% 55%); stroke-width: 1.2; }
.strip .replica.you rect { stroke-dasharray: 5 3; stroke-width: 2; }
.strip .replica.loading rect { opacity: .55; }
.strip .replica.focus rect { stroke-width: 3; }
.strip .missing rect { fill: none; stroke: var(--danger); stroke-dasharray: 4 4; }
.strip .missing text { fill: var(--danger); }
.strip .spare rect { fill: none; stroke: var(--muted); stroke-dasharray: 4 4; }
.strip .spare text { fill: var(--muted); }
.table-wrap { overflow-x: auto; }
.roles { width: 100%; border-collapse: collapse; font-size: .82rem; }
.roles th, .roles td { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.roles th { color: var(--muted); font-weight: 600; }
.roles tr.you td { background: var(--accent-soft); }
.roles tr.over td { color: var(--danger); }

/* A cell hosted by tabs: the landing, joining, the owner's console */
.landing { width: min(520px, 100%); display: grid; gap: 1.2rem; }
.landing > .form { padding-top: 1rem; border-top: 1px solid var(--line); }
.nearby ul { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .4rem; }
.nearby li { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--ok); border-radius: 10px; background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.waiting { text-align: center; justify-items: center; }
.waiting > button { justify-self: center; }
.breathing { font-weight: 600; animation: breathe 1.6s ease-in-out infinite; }
button.passkey { width: 100%; margin-top: .6rem; padding: .6rem; font-weight: 600; }
.recovery, .console, .knock { padding: 1rem 1.1rem 1.2rem; display: grid; gap: .8rem; }
.code.big { font: 700 1.35rem/1.4 ui-monospace, Consolas, monospace; letter-spacing: .06em; text-align: center; padding: .9rem; background: var(--raised); border-radius: 12px; user-select: all; word-break: break-all; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; }
.console section { display: grid; gap: .5rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.console section:last-child { border-bottom: 0; }
.console section > button { justify-self: start; }
.knocks, .hosts { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.knocks li, .hosts li { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 10px; }
.knocks li { border-color: var(--accent); background: var(--accent-soft); animation: fade .2s ease-out; }

/* The switch to help, and its presets */
.switch-wrap { display: grid; gap: .15rem; }
button.way { font-size: .76rem; }
.presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; }
.preset { display: grid; gap: .25rem; text-align: left; padding: .7rem .75rem; border-radius: 10px; }
.preset.on { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }

/* What the page says before anyone asks */
.preflight { display: grid; gap: .3rem; padding: .7rem .85rem; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); font-size: .88rem; }
.preflight > button { justify-self: start; }
.goal { display: grid; gap: .35rem; padding: .55rem .7rem; border: 1px dashed var(--warn); border-radius: 10px; }
.goal > button { justify-self: start; }
body.pill { margin: 0; display: grid; place-items: center; height: 100dvh; padding: 0 .8rem; font: 600 .9rem/1.3 system-ui, sans-serif; background: var(--surface); color: var(--text); text-align: center; }
.ask-notify { justify-self: start; font-size: .78rem; }

/* The doctor */
.doctor { display: grid; gap: .7rem; }
.doctor-summary { font-weight: 600; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.finding { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; font-size: .88rem; }
.finding p { margin: 0; }
.finding .fix { margin-top: .2rem; color: var(--muted); font-size: .82rem; }
.finding > button { flex: none; align-self: center; }
.finding .mark { flex: none; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; border-radius: 50%; font-size: .78rem; font-weight: 700; color: #fff; background: var(--muted); }
.finding.good .mark { background: var(--ok); }
.finding.warning { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.finding.warning .mark { background: var(--warn); }
.finding.problem { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.finding.problem .mark { background: var(--danger); }
.finding.unknown .mark { animation: breathe 1.4s ease-in-out infinite; }
.doctor-form { display: grid; gap: .5rem; }
.doctor-form textarea { width: 100%; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: inherit; font: inherit; resize: vertical; }
.ticket { padding: .55rem .7rem; border-radius: 10px; background: color-mix(in srgb, var(--ok) 12%, var(--surface)); font-weight: 600; }

/* GPUs: what the browser offers, what each would do, a faster one it hides */
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .6rem; }
.block-head h3 { margin: 0; }
.gpu-list, .model-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.gpu { display: grid; gap: .3rem; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.gpu.on { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.gpu.off { opacity: .6; }
.gpu-pick { align-items: center; font-size: .92rem; }
.gpu-pick b { margin-right: .4rem; }
.gpu .facts, .gpu .outlook, .gpu .lend-state { margin: 0; font-size: .84rem; }
.gpu .facts button { margin-left: .45rem; }
.gpu .lend-state { color: var(--muted); }
.gpu-controls { display: grid; gap: .5rem; padding-top: .4rem; border-top: 1px dashed var(--line); }
.badge { display: inline-block; font-size: .7rem; padding: .05rem .45rem; border-radius: 999px; background: var(--raised); color: var(--muted); vertical-align: middle; }
.badge.real { background: var(--accent-soft); color: var(--text); }
.together { padding: .55rem .75rem; border-radius: 10px; background: var(--raised); }
.together p { margin: .15rem 0; font-size: .86rem; }
.hint { display: grid; gap: .35rem; padding: .7rem .8rem; border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--warn) 8%, var(--surface)); font-size: .88rem; }
.hint p { margin: 0; }
.hint > button { justify-self: start; }
.steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.steps code { font: .82rem ui-monospace, Consolas, monospace; background: var(--raised); padding: .05rem .35rem; border-radius: 4px; word-break: break-all; }
.steps button { margin-left: .3rem; }
.engine-gpus { display: grid; gap: .45rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.switched { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border: 1px solid var(--ok); border-radius: 10px; background: color-mix(in srgb, var(--ok) 12%, var(--surface)); font-size: .88rem; }
.switched p { margin: 0; }
.elsewhere { display: grid; gap: .45rem; }
.elsewhere h3 { margin: .3rem 0 0; }
.handoff { display: grid; gap: .4rem; }
.handoff > button { justify-self: start; }
.handoff .row { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.handoff code { font: .8rem ui-monospace, Consolas, monospace; background: var(--raised); padding: .3rem .45rem; border-radius: 6px; word-break: break-all; min-width: 0; }
.gpu-field small { display: block; max-width: 22rem; }

/* The model: what the cell runs, the others, and how one would spread */
button.model-chip { border: 1px solid var(--line); border-radius: 999px; padding: 0 .5rem; font-size: .76rem; background: var(--raised); color: var(--text); }
.models { padding: 1rem 1.1rem 1.2rem; display: grid; gap: .9rem; }
.model { display: grid; gap: .45rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; }
.model.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
.model-pick { display: grid; gap: .2rem; text-align: left; border: 0; background: none; padding: 0; }
.model-pick b { font-size: 1rem; }
.model-pick .badge { justify-self: start; }
.model .facts p { margin: .15rem 0; font-size: .86rem; }
.model .facts a { font-size: .82rem; color: var(--accent); }
.availability { font-size: .8rem; font-weight: 600; }
.availability.ready { color: var(--ok); }
.availability.download { color: var(--warn); }
.availability.unavailable { color: var(--danger); }
.spread { gap: .7rem; }
.verdict { padding: .55rem .75rem; border-radius: 10px; border: 1px dashed var(--danger); font-size: .88rem; }
.verdict.whole { border: 1px solid var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.verdict p { margin: .1rem 0; }
.switching { display: grid; gap: .25rem; padding: .55rem .75rem; border-radius: 10px; background: var(--accent-soft); font-size: .88rem; }
.model-options { border: 0; padding: 0; margin: 0; display: grid; gap: .45rem; }
.model-options legend { font-size: .85rem; color: var(--muted); margin-bottom: .3rem; }
.model-option { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.model-option.on { border-color: var(--accent); background: var(--accent-soft); }
.model-option input { margin-top: .25rem; accent-color: var(--accent); }
.model-option small { display: block; }
.model-option .preview { margin-top: .2rem; color: var(--text); font-weight: 600; }

/* Notices */
#toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 20; }
.toast-list { display: grid; gap: .5rem; }
.toast { display: flex; gap: .6rem; align-items: center; max-width: 360px; padding: .65rem .8rem; background: var(--text); color: var(--bg); border-radius: 10px; box-shadow: var(--shadow); animation: fade .15s ease-out; }
.toast button { color: inherit; }

/* The bench (a page set up by its address) */
.bench { max-width: 42rem; margin: 2rem auto; padding: 0 1rem; }
.bench label { display: block; margin: .5rem 0; }
.bench textarea { width: 100%; }
.bench #status { padding: .75rem 1rem; border-radius: .5rem; background: var(--raised); }
.bench #answer { white-space: pre-wrap; word-break: break-word; }

@keyframes blink { 50% { opacity: .35; } }
@keyframes breathe { 50% { opacity: .55; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
