/* Glimpsed Studio editor. Tokens follow questionnaire/index.html; light or dark follows the system. */
:root {
  --bg: #0b0a09; --surface: #141210; --surface-2: #1d1a17; --line: #2f2a24; --line-strong: #4a4238;
  --fg: #f3ece0; --muted: #a59a8a; --amber: #f9bc4f; --amber-hi: #fad961; --orange: #f76b1c;
  --crimson: #c80000; --crimson-fg: #ff6a5c; --on-accent: #1a1206; --tint: rgba(249,188,79,.10);
  --track: #2a2520; --ok: #8fd18a; --stage: #070606; --wordmark: #f9bc4f;
  --display: "Julius Sans One", "Optima", "Gill Sans", "Trebuchet MS", sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --chat-w: clamp(280px, 26vw, 380px);
  --panel-w: clamp(300px, 27vw, 400px);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) {
  --bg: #f1efec; --surface: #fbfaf8; --surface-2: #ffffff; --line: #ddd7cd; --line-strong: #b9b0a2;
  --fg: #1c1814; --muted: #6a6055; --amber: #b26a00; --amber-hi: #fad961; --orange: #d4540c;
  --crimson: #b40000; --crimson-fg: #b40000; --on-accent: #1a1206; --tint: rgba(247,107,28,.09);
  --track: #e2dcd2; --ok: #2c7a2a; --stage: #e6e2dc; --wordmark: #b26a00; color-scheme: light } }
:root[data-theme="light"] {
  --bg: #f1efec; --surface: #fbfaf8; --surface-2: #ffffff; --line: #ddd7cd; --line-strong: #b9b0a2;
  --fg: #1c1814; --muted: #6a6055; --amber: #b26a00; --amber-hi: #fad961; --orange: #d4540c;
  --crimson: #b40000; --crimson-fg: #b40000; --on-accent: #1a1206; --tint: rgba(247,107,28,.09);
  --track: #e2dcd2; --ok: #2c7a2a; --stage: #e6e2dc; --wordmark: #b26a00; color-scheme: light }

*, *::before, *::after { box-sizing: border-box; }
html, body, #app { height: 100%; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 var(--body); margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
a { color: var(--amber); text-underline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.25; text-wrap: balance; }
h1 { font-size: 28px; }
h2 { font-size: 19px; }
h3 { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-top: 18px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.warn { color: var(--amber); }
.grow { flex: 1 1 auto; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help { color: var(--muted); max-width: 65ch; }
.empty { color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 8px; padding: 14px; font-size: 14px; }
.eyebrow { font-family: var(--display); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: var(--amber); }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); padding: 8px 16px; border-radius: 8px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--fg); white-space: nowrap; }
.btn:hover { border-color: var(--fg); }
.btn.small { padding: 5px 12px; font-size: 14px; }
.btn.primary { background: linear-gradient(180deg, var(--amber-hi), var(--orange)); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { border-color: var(--crimson-fg); color: var(--crimson-fg); background: transparent; }
.btn[disabled] { opacity: .4; cursor: default; filter: none; }
.linkbtn { background: none; border: 0; padding: 2px 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; font-size: 14px; }
.linkbtn:hover { color: var(--fg); }
.linkbtn.danger:hover { color: var(--crimson-fg); }
.x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.x:hover { color: var(--crimson-fg); background: var(--surface-2); }
.field, textarea.field, select.field { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 11px; }
.field:hover { border-color: var(--line-strong); }
textarea.field { resize: vertical; }
select.field { padding: 7px 8px; }
.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 14px; }
.lbl > .field, .lbl > a, .lbl > div { color: var(--fg); font-size: 15px; }
.check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 12px; }
.line { display: flex; align-items: center; gap: 10px; }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; border: 1px solid var(--line-strong); color: var(--muted); border-radius: 4px; padding: 0 5px; margin-left: 6px; text-transform: lowercase; white-space: nowrap; }
.tag.live { border-color: var(--ok); color: var(--ok); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 4px 2px 12px; font-size: 13px; background: var(--tint); max-width: 100%; }
.chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-x { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 15px; padding: 0 6px; border-radius: 999px; }
.chip-x:hover { color: var(--fg); }
.ring { border-radius: 50%; display: block; flex: none; }

/* status line */
.status-line { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px)); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--fg); padding: 8px 16px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.status-line.on { opacity: 1; }
.status-line[data-kind="error"] { border-color: var(--crimson-fg); color: var(--crimson-fg); }
@media (prefers-reduced-motion: no-preference) { .status-line { transition: opacity .2s ease; } }

/* dialogs */
.dlg { border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--fg); padding: 0; width: min(440px, calc(100vw - 32px)); }
.dlg.wide { width: min(560px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(0,0,0,.45); }
.dlg-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.dlg-body > .field { margin-top: 4px; }
.addr-field { display: flex; align-items: center; gap: 6px; }
.addr-field .field { flex: 1; }

/* signed out */
.signin { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.wordmark { font-family: var(--display); color: var(--wordmark); letter-spacing: .2em; text-transform: uppercase; font-size: 24px; font-weight: 400; }
.devlogin { display: flex; flex-direction: column; gap: 8px; width: min(300px, 100%); margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }

/* quiet pages */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.brand > span { font-family: var(--display); letter-spacing: .16em; font-size: 13px; text-transform: uppercase; }
.textnav { display: flex; gap: 4px; flex-wrap: wrap; }
.textnav a, .textnav button { color: var(--muted); text-decoration: none; padding: 5px 10px; border-radius: 6px; background: none; border: 0; cursor: pointer; font-size: 14px; }
.textnav a:hover, .textnav button:hover { color: var(--fg); background: var(--surface-2); }
.textnav [aria-current="page"], .textnav [aria-pressed="true"] { color: var(--fg); background: var(--tint); }
.page { max-width: 920px; margin: 0 auto; padding: 36px 24px 64px; display: flex; flex-direction: column; gap: 18px; }
.page.narrow { max-width: 680px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.block { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
.page .block h2 { margin-bottom: 2px; }
.plainlist { list-style: none; margin: 0; padding: 0; }
.plainlist > li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.plainlist > li:last-child { border-bottom: 0; }
.inline-form { display: flex; gap: 8px; }
.panel-note { border: 1px solid var(--amber); background: var(--tint); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.secret { font-family: var(--mono); word-break: break-all; background: var(--surface); padding: 6px 8px; border-radius: 6px; }

.sitelist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.sitelist > li { border-bottom: 1px solid var(--line); }
.sitelist > li.empty, .sitelist > li.muted { border: 0; padding: 16px 0; }
.siterow { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) 180px 140px; gap: 16px; align-items: baseline; padding: 14px 8px; color: var(--fg); text-decoration: none; border-radius: 6px; }
.siterow:hover { background: var(--surface); }
.siterow .name { font-weight: 500; }
.siterow .addr { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.siterow .when { font-size: 13px; text-align: right; }
.state, .pubstate { font-size: 13px; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; }
.state::before, .pubstate::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); flex: none; }
.state[data-s="live"]::before, .pubstate[data-s="live"]::before { background: var(--ok); }
.state[data-s="dirty"]::before, .pubstate[data-s="dirty"]::before { background: var(--amber); }
.pubstate a { color: var(--fg); }

/* workspace */
.ws { height: 100%; display: flex; flex-direction: column; }
.ws-head { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-bottom: 1px solid var(--line); background: var(--surface); min-height: 44px; }
.ws-head .crumb { font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 14px; color: var(--muted); }
.ws-head .brand:hover .crumb { color: var(--fg); }
.ws-head .sep { color: var(--line-strong); }
.ws-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panelmenu { flex-wrap: nowrap; }
.panelmenu button { padding: 4px 9px; }
.ws-body { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--chat-w) minmax(0, 1fr); position: relative; }
.ws.has-panel .ws-body { grid-template-columns: var(--chat-w) minmax(0, 1fr) var(--panel-w); }
.ws.has-panel .ws-body:has(.sidepanel.wide) { grid-template-columns: var(--chat-w) minmax(0, 1fr) min(560px, 42vw); }

/* chat */
.chat { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--surface); }
.chat-head { padding: 12px 16px 6px; }
.chatlist { flex: 1; overflow-y: auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 16px; }
.chat-empty { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.starters { display: flex; flex-direction: column; gap: 6px; }
.starter { text-align: left; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; cursor: pointer; color: var(--fg); font-size: 14px; }
.starter:hover { border-color: var(--line-strong); background: var(--surface-2); }
.msg { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.msg-head { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.msg-head .who { font-weight: 600; color: var(--fg); }
.msg.assistant .who { color: var(--amber); font-weight: 500; }
.msg-head time { font-size: 12px; }
.msg-body { overflow-wrap: anywhere; }
.msg-body p { margin: 0 0 8px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body ul { margin: 0 0 8px; padding-left: 20px; }
.msg-body code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.msg.user .msg-body { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.msg.error p { color: var(--crimson-fg); font-size: 14px; }
.steps { list-style: none; margin: 2px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.steps.live li.now { color: var(--fg); }
.steps-done summary { font-size: 13px; color: var(--muted); cursor: pointer; width: fit-content; }
.steps-done .steps { margin-top: 6px; }
.msg-actions { display: flex; gap: 12px; }
.msg-actions .linkbtn { font-size: 13px; }
.working { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.working .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; }
@media (prefers-reduced-motion: no-preference) { .working .dot { animation: pulse 1.6s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: .35; } }
.composer { padding: 10px 12px 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.composer .row-end { margin-top: 0; }
.composer-input { width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; resize: none; min-height: 72px; max-height: 40vh; }
.composer-input:hover { border-color: var(--line-strong); }
.composer-off { padding: 12px 16px; border-top: 1px solid var(--line); }
.chipline { display: flex; }

/* stage */
.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--stage); }
.pagebar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 6px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.pagepick { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; font-size: 14px; max-width: 180px; }
.seg { display: inline-flex; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 2px; }
.seg button { border: 0; background: none; padding: 3px 9px; border-radius: 5px; cursor: pointer; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.seg button:hover:not([disabled]) { color: var(--fg); }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg button[disabled] { opacity: .4; cursor: default; }
.presence { display: inline-flex; gap: 3px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--tint); border: 1px solid var(--amber); color: var(--fg); font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.noticeline { padding: 6px 14px; font-size: 13.5px; color: var(--amber); background: var(--tint); border-bottom: 1px solid var(--line); }
.framearea { flex: 1; min-height: 0; overflow: auto; position: relative; display: flex; }
.framewrap { height: 100%; width: 100%; flex: none; margin: 0 auto; }
.framewrap[data-size="tablet"] { width: 768px; padding: 12px 0; }
.framewrap[data-size="phone"] { width: 390px; padding: 12px 0; }
.frame { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.framewrap[data-size="tablet"] .frame, .framewrap[data-size="phone"] .frame { border: 1px solid var(--line-strong); border-radius: 6px; }
.popover { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: min(360px, calc(100% - 24px)); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); z-index: 5; }
.popover form { display: flex; flex-direction: column; gap: 8px; }
.popover .row-end { margin-top: 0; }

/* the right panel */
.sidepanel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--surface); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-body { flex: 1; overflow-y: auto; padding: 12px 16px 24px; display: flex; flex-direction: column; gap: 8px; }
.panel-body > h3:first-child { margin-top: 4px; }
.panel-body > .linkbtn, .block > .linkbtn, .block > .btn { align-self: flex-start; }
.panel-body .block { margin-top: 14px; }
.rowbtn { background: none; border: 0; padding: 4px 0; color: var(--fg); cursor: pointer; text-align: left; font-size: 14px; }
.rowbtn:hover { color: var(--amber); }

.versions { list-style: none; margin: 0; padding: 0; }
.version { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.version .linkbtn { align-self: flex-start; font-size: 13px; margin-top: 2px; }
.v-msg { overflow-wrap: anywhere; }

.dropzone { border: 1px dashed var(--line-strong); border-radius: 8px; padding: 12px; font-size: 14px; color: var(--muted); text-align: center; }
.dropzone.over { border-color: var(--amber); background: var(--tint); color: var(--fg); }
.pickbar { display: flex; gap: 10px; align-items: center; border: 1px solid var(--amber); background: var(--tint); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 6px; }
.tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; background: none; border: 0; padding: 0; text-align: left; color: var(--fg); }
.tile.pickable { cursor: pointer; }
.tile.pickable:hover .thumb { border-color: var(--amber); }
.thumb { aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: grid; place-items: center; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ext { font-size: 12px; color: var(--muted); }
.tname { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tacts { display: flex; gap: 10px; }
.tacts .linkbtn { font-size: 12.5px; }

.tablewrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; max-height: 55vh; }
table.grid { border-collapse: collapse; width: 100%; font-size: 14px; }
table.grid th { position: sticky; top: 0; background: var(--surface-2); text-align: left; font-weight: 500; padding: 4px 4px 4px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.grid th span { margin-right: 2px; }
table.grid td { border-bottom: 1px solid var(--line); padding: 0; min-width: 120px; }
table.grid td:last-child, table.grid th:last-child { min-width: 0; width: 28px; }
table.grid input { width: 100%; border: 0; background: transparent; padding: 6px 8px; }
table.grid input:focus { outline: 2px solid var(--amber); outline-offset: -2px; }

.group { display: flex; flex-direction: column; gap: 4px; }
.sub { border-bottom: 1px solid var(--line); padding: 6px 0; }
.sub summary { display: flex; gap: 8px; align-items: baseline; cursor: pointer; list-style: none; }
.sub summary::-webkit-details-marker { display: none; }
.sub dl { margin: 8px 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 14px; }
.sub dt { color: var(--muted); }
.sub dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }

.thread { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.thread.focus { border-color: var(--amber); background: var(--tint); }
.thread.resolved { opacity: .75; }
.thread-main { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--fg); }
.ctext { overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14px; }
.creply { border-left: 2px solid var(--line); padding-left: 10px; display: flex; flex-direction: column; gap: 2px; }
.reply { display: flex; flex-direction: column; gap: 6px; }
.reply .row-end { margin-top: 0; }
.thread .line { gap: 14px; }
.thread .linkbtn { font-size: 13px; }
.pagecap { margin-top: 8px; }
.resolved-list { margin-top: 16px; }
.resolved-list summary { cursor: pointer; color: var(--muted); font-size: 14px; }

.brandfields { display: flex; flex-direction: column; gap: 6px; }
.brandrow { display: grid; grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1.1fr); gap: 8px; align-items: center; font-size: 14px; }
.brandrow input[type=color] { width: 34px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.brandrow .field { padding: 5px 8px; font-size: 13px; }
.bname { overflow: hidden; text-overflow: ellipsis; }

.tree { list-style: none; margin: 0; padding: 0 0 0 12px; font-size: 14px; }
.panel-body > .tree { padding-left: 0; }
.tree summary { cursor: pointer; padding: 3px 0; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.tree .file { display: flex; align-items: center; gap: 8px; min-height: 28px; }
.tree .file > :first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.tree .facts { display: flex; gap: 10px; opacity: 0; }
.tree .file:hover .facts, .tree .file:focus-within .facts { opacity: 1; }
.tree .facts .linkbtn { font-size: 12.5px; }
textarea.code { flex: 1; min-height: 360px; width: 100%; font-family: var(--mono); font-size: 13px; line-height: 1.5; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; resize: none; tab-size: 2; white-space: pre; overflow: auto; }
textarea.code[readonly] { opacity: .75; }

.people { display: flex; flex-direction: column; gap: 6px; }
.person { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; font-size: 14px; }
.person .field { padding: 5px 8px; font-size: 13.5px; }
.stats .bars { width: 100%; height: 56px; display: block; margin: 6px 0; }
.bars .bar { fill: var(--amber); }
.bars .bar.zero { fill: var(--track); }
.toppages { margin: 4px 0 0; padding: 0; list-style: none; }
.toppages li { display: flex; gap: 10px; padding: 2px 0; }
.danger-zone { border-top-color: var(--line); }

/* narrower windows: the panel lies over the page instead of squeezing it */
@media (max-width: 1023px) {
  .ws.has-panel .ws-body, .ws.has-panel .ws-body:has(.sidepanel.wide) { grid-template-columns: var(--chat-w) minmax(0, 1fr); }
  .sidepanel { position: absolute; top: 0; right: 0; bottom: 0; width: min(400px, 90vw); z-index: 10; box-shadow: -10px 0 30px rgba(0,0,0,.25); }
  .sidepanel.wide { width: min(560px, 94vw); }
  .panelmenu { flex-wrap: wrap; }
  .siterow { grid-template-columns: minmax(0, 1fr) 170px; }
  .siterow .addr, .siterow .when { display: none; }
}
@media (max-width: 1180px) {
  .ws-head .brand .crumb { display: none; }
}
