/* Myrlin Apaki. Tokens are Myrlin x Fly edition 2
   (~/myrlin-labs/design-system/tokens): ink tiers, periwinkle as a MARK
   colour only (--brand), text and fills in --brand-strong / --brand-deep,
   Archivo with Spline Sans Mono for data, the app ground at its .12 pigment
   budget, ease-out entrances and faster exits. No pill with a status dot. */

:root {
  --ink: #171717; --soft: #55566B; --faint: #63647D; --ink-deep: #1E1B33;
  --ground: #FDFDFF; --card: #FFFFFF; --hairline: #E3E5F6; --hairline-strong: #D5D8EF;
  --tint: #F1F2FB; --tint-deep: #E6E8F9;
  --brand: #6572D4; --brand-strong: #5361C9; --brand-deep: #2C3578; --brand-soft: #8E96DC; --brand-wash: #EDEEFB;
  --action: #D2643F; --action-strong: #B8502B; --action-tint: #FCF2EC;
  --good: #2E6B47; --good-tint: #E2F4EA;
  --font-display: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Spline Sans Mono', ui-monospace, Consolas, monospace;
  --ease-out: cubic-bezier(.22, 1, .36, 1); --ease-hover: cubic-bezier(.4, 0, .2, 1); --ease-sheet: cubic-bezier(.2, .8, .25, 1);
  --dur-fast: 150ms; --dur-exit: 120ms; --dur-sheet: 240ms;
  --radius: 10px; --radius-sm: 7px;
  --rail: 312px;
  --w: 0, 0%, 100%; --shadow-rgb: 44, 53, 120;
  --fill: var(--brand-strong); --fill-hover: var(--brand-deep); --fill-stop: var(--ink);
  color-scheme: light;
}

/* The type scale (2026-10-12). Impeccable flagged a flat hierarchy: the window
   used 26 font sizes, 9 to 46 px, most of them half a pixel apart (11, 11.5,
   12, 12.5, 13, 13.5, 14), so nothing read as a step. Now six sizes, each a
   clear step up from the one below (1.15 to 1.27), and every font size in this
   file is one of these tokens. Roles, not values; weight, width, case and ink
   do the rest of the work inside a step.
   - micro 11: wide caps labels and kickers, tags, mono metadata (times, paths,
     counts), footers, the working line. 11 is the floor: nothing smaller, so
     dense UI stays legible.
   - small 13: the working text of the chrome: rows, menus, chips, tabs,
     buttons, notes, sheet details, code and tool lines.
   - body 15: the conversation and the sheets' main text; titles of rows and
     cards that must lead their row.
   - title 18: pane titles, reply headings (h2), panel steps.
   - display 22: the wordmark, sheet and card headings, a reply's h1.
   - hero 28: the empty conversation and a document's title.
   - numeral 46: only the pairing code both screens show.
   The phone (apaki/web/src/web.css) keeps its own touch sizes (16 px fields so
   iOS does not zoom, a 34 px large title) on top of these. */
:root {
  --fs-micro: 11px;
  --fs-small: 13px;
  --fs-body: 15px;
  --fs-title: 18px;
  --fs-display: 22px;
  --fs-hero: 28px;
  --fs-numeral: 46px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  display: grid; grid-template-columns: var(--rail) 1fr; height: 100vh; overflow: hidden;
  background: var(--ground); color: var(--ink);
  /* Longhands for the root size (2026-10-12): the same as the font shorthand here, and the type scale's
     body step stays readable to tools that cannot resolve var() inside a shorthand. */
  font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.55; font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
code, pre, .mono { font-family: var(--font-mono); font-size: .86em; }
::selection { background: var(--brand-wash); }

/* ---------- rail ---------- */
.rail {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--card); border-right: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; }
.brand .mark { width: 44px; height: 24px; object-fit: contain; }
.wordmark { font-family: var(--font-display); font-weight: 760; font-stretch: 112%; letter-spacing: -.01em; font-size: var(--fs-body); }
.new {
  margin: 0 14px 12px; padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--fill); color: #fff; border: 0; font-weight: 600; text-align: left;
  transition: background var(--dur-fast) var(--ease-hover);
}
.new:hover { background: var(--fill-hover); }
.new:active { transform: scale(.985); }
.search {
  display: flex; align-items: center; gap: 8px; margin: 0 14px; padding: 0 10px;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); background: var(--ground);
  transition: border-color var(--dur-fast) var(--ease-hover);
}
.search:focus-within { border-color: var(--brand); }
.search svg { width: 15px; height: 15px; fill: none; stroke: var(--faint); stroke-width: 1.5; flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; padding: 8px 0; }
.views { display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 12px 18px 6px; font-size: var(--fs-small); }
.views button {
  border: 0; background: none; padding: 2px 0; cursor: pointer; color: var(--faint);
  border-bottom: 1.5px solid transparent; transition: color var(--dur-fast) var(--ease-hover);
}
.views button:hover { color: var(--ink); }
.views button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand); }
.views .count { font-family: var(--font-mono); font-size: var(--fs-micro); margin-left: 4px; color: var(--faint); }
.search-state { padding: 0 18px 6px; font-size: var(--fs-small); color: var(--faint); min-height: 18px; }
.sessions { list-style: none; margin: 0; padding: 0 8px 12px; overflow-y: auto; flex: 1; min-height: 0; }
.sessions li {
  padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease-hover);
}
.sessions li:hover { background: var(--tint); }
.sessions li.on { background: var(--brand-wash); border-color: var(--hairline-strong); }
/* Open in another pane: a periwinkle mark down the left, outside any capsule. */
.sessions li.shown { border-color: var(--hairline-strong); } /* open in a pane */
.sessions li[draggable=true] { cursor: grab; }
.sessions li[draggable=true]:active { cursor: grabbing; }
.sessions .t { font-weight: 560; font-size: var(--fs-small); line-height: 1.35; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sessions .m { margin-top: 3px; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sessions .live { color: var(--good); font-weight: 600; }
.sessions .codex { color: var(--action-strong); font-weight: 600; }
.sessions .snip { margin-top: 4px; font-size: var(--fs-small); color: var(--soft); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sessions .snip b { font-weight: 600; color: var(--brand-deep); }
.rail-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px 18px; border-top: 1px solid var(--hairline); font-size: var(--fs-micro); color: var(--faint); }
.rail-foot #indexState { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sound { flex: none; border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); background: var(--ground); padding: 3px 9px; font-size: var(--fs-micro); cursor: pointer; color: var(--brand-deep); font-weight: 600; }
.sound.off { color: var(--faint); font-weight: 400; }

/* ---------- main: tabs over a stage of split panes ---------- */
.main { display: grid; grid-template-rows: auto 1fr; min-width: 0; min-height: 0; }

.tabs {
  display: flex; align-items: flex-end; gap: 2px; padding: 7px 10px 0; min-height: 44px;
  background: var(--card); border-bottom: 1px solid var(--hairline); overflow-x: auto; scrollbar-width: none;
}
.tab {
  position: relative; display: flex; align-items: center; gap: 8px; max-width: 240px; min-width: 96px; height: 36px;
  padding: 0 6px 0 13px; border: 1px solid transparent; border-bottom: 0; border-radius: 9px 9px 0 0;
  cursor: pointer; color: var(--faint); font-size: var(--fs-small); white-space: nowrap; flex: none;
  transition: color var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover);
}
.tab:hover { color: var(--ink); background: var(--tint); }
.tab.on { background: var(--ground); border-color: var(--hairline); color: var(--ink); margin-bottom: -1px; height: 37px; font-weight: 560; }
.tab.drop { background: var(--brand-wash); color: var(--brand-deep); }
.tab-t { overflow: hidden; text-overflow: ellipsis; }
.tab-n { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--faint); }
.tab-x { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; cursor: pointer; opacity: 0; flex: none; }
.tab:hover .tab-x, .tab.on .tab-x { opacity: 1; }
.tab-x:hover { background: var(--tint-deep); }
.tab-x svg, .tab-plus svg, .tab-tool svg { width: 13px; height: 13px; fill: none; stroke: var(--soft); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* A tab whose pane finished while you were elsewhere: a green bar along its top and green type. */
.tab.unread::before { content: none; }
.tab.unread .tab-t { color: var(--good); font-weight: 650; }
/* Working: a slow periwinkle sweep along the tab's bottom edge. */
.tab.busy::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent) 0 0 / 50% 100% no-repeat;
  animation: sweep 1.4s var(--ease-hover) infinite;
}
@keyframes sweep { from { background-position: -60% 0; } to { background-position: 160% 0; } }
.tab-plus { display: grid; place-items: center; width: 32px; height: 32px; margin: 0 4px 3px; border: 0; border-radius: 8px; background: none; cursor: pointer; flex: none; }
.tab-plus:hover, .tab-plus.drop { background: var(--brand-wash); }
.tabs-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; padding: 0 4px 6px 12px; flex: none; }
.tab-count { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--faint); }
.tab-tool { display: flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); background: var(--ground); font-size: var(--fs-small); cursor: pointer; }
.tab-tool:hover:not(:disabled) { border-color: var(--brand); }
.tab-tool:disabled { opacity: .45; cursor: default; }

.stages { position: relative; min-height: 0; min-width: 0; }
.stage { position: absolute; inset: 0; display: none; }
.stage.on { display: flex; }
.stage-empty { margin: auto; text-align: center; color: var(--soft); }
.stage-empty .new { margin: 4px auto; }
.split { display: flex; min-width: 0; min-height: 0; }
.split.row { flex-direction: row; }
.split.col { flex-direction: column; }
.gutter { flex: none; position: relative; z-index: 3; background: var(--hairline); transition: background var(--dur-fast) var(--ease-hover); touch-action: none; }
.gutter.row { width: 6px; cursor: col-resize; }
.gutter.col { height: 6px; cursor: row-resize; }
.gutter:hover, .gutter.active { background: var(--brand-soft); }
body.resizing-x, body.resizing-x * { cursor: col-resize !important; user-select: none; }
body.resizing-y, body.resizing-y * { cursor: row-resize !important; user-select: none; }

.pane { display: grid; grid-template-rows: auto 1fr auto; min-width: 0; min-height: 0; position: relative; container: pane / inline-size; background: var(--ground); }
.pane-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 9px 12px 9px 6px; min-height: 54px;
  background: var(--card); border-bottom: 1px solid var(--hairline);
}
/* With more than one pane, the focused one carries a periwinkle line along its top;
   one that finished unseen carries green until you look at it. */


.pane.unread .title { color: var(--good); }
.grip { display: grid; place-items: center; width: 18px; height: 30px; border-radius: 5px; cursor: grab; flex: none; }
.grip:hover { background: var(--tint); }
.grip:active { cursor: grabbing; }
.grip svg { width: 8px; height: 14px; fill: var(--faint); }
.title-block { flex: 1; min-width: 120px; }
.pane-bar .title { margin: 0; font: 680 var(--fs-body)/1.25 var(--font-display); font-stretch: 104%; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cwd { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.controls select, .billing {
  border: 1px solid var(--hairline-strong); background: var(--ground); border-radius: var(--radius-sm);
  padding: 5px 7px; font-size: var(--fs-small); cursor: pointer; max-width: 220px;
}
.billing { font-weight: 600; color: var(--brand-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.billing .src { font-weight: 400; color: var(--faint); margin-left: 6px; font-family: var(--font-mono); font-size: var(--fs-micro); }
.pane-bar .gear { display: none; }
.pane-bar .close svg { width: 14px; height: 14px; }

/* Where a dragged session or pane would land. */
.drop-hint {
  position: absolute; z-index: 6; pointer-events: none; display: grid; place-items: center; padding: 12px; text-align: center;
  border: 1.5px dashed var(--brand); border-radius: var(--radius); background: rgba(101, 114, 212, .12);
  color: var(--brand-deep); font-weight: 650; font-size: var(--fs-small);
  /* Only the fade animates (2026-10-10): app.js moves the hint with inline
     left/top/width/height, and it snaps to the new zone instead of
     animating layout on every drag move. */
  opacity: 0; transition: opacity var(--dur-exit) var(--ease-hover);
}
.drop-hint.on { opacity: 1; }
.drop-hint.full { border-color: var(--action); background: var(--action-tint); color: var(--action-strong); }
body.dragging .pane .ground { pointer-events: none; }

/* Narrow panes (splits of three or more): settings fold behind the sliders
   button, padding tightens, the folder line goes. */
@container pane (max-width: 760px) {
  .transcript { padding: 16px 16px 26px; }
  .composer-wrap { padding: 0 10px 10px; }
  .composer { padding: 8px 10px 6px; }
}
@container pane (max-width: 470px) {
  /* Reading text keeps the body step in a narrow pane (2026-10-12): 13 px prose was too small to read; only the padding tightens. */
  .transcript { padding: 12px 12px 20px; font-size: var(--fs-body); }
  .send { padding: 6px 12px; }
  .composer-row .status { font-size: var(--fs-micro); }
}

/* The app ground: a periwinkle-to-teal linear wash and the 8px halftone
   lattice, held to the app budget (peak .12). */
.ground {
  overflow-y: auto; min-height: 0;
  background:
    radial-gradient(circle at 1px 1px, rgba(142, 150, 220, .12) 1px, transparent 1.2px) 0 0 / 8px 8px,
    linear-gradient(160deg, rgba(101, 114, 212, .07), rgba(64, 200, 190, .04) 55%, rgba(253, 253, 255, 0) 80%),
    var(--ground);
}
.transcript { max-width: 880px; margin: 0 auto; padding: 24px 26px 36px; }
.empty .hint { font-size: var(--fs-small); color: var(--faint); }
.empty { margin-top: 12vh; text-align: center; color: var(--soft); }
.empty-mark { width: 54px; opacity: .85; }
.empty p { max-width: 520px; margin: 14px auto; }

.turn-user {
  margin: 22px 0 10px; padding: 12px 16px; background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); white-space: pre-wrap; word-wrap: break-word;
  animation: rise var(--dur-fast) var(--ease-out);
}
.turn-user .imgs { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.turn-user .imgs img { max-height: 120px; border-radius: var(--radius-sm); border: 1px solid var(--hairline); }
.img-marker { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--faint); }
.turn-assistant { margin: 10px 0; padding-left: 18px; position: relative; }
.turn-assistant::before { content: ''; position: absolute; left: 1px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; color: var(--ink); }
/* The turn mark is drawn, not typed (2026-10-10): the character it replaces (U+23FA) is an emoji on iOS and shows as a white box in the Apaki app.
   A circle in CSS is the same plain dot everywhere. */
.turn-assistant.streaming { white-space: pre-wrap; }
.turn-assistant > :first-child { margin-top: 0; }
.turn-assistant > :last-child { margin-bottom: 0; }
.turn-assistant h1, .turn-assistant h2, .turn-assistant h3 { font-family: var(--font-display); font-size: var(--fs-body); font-weight: 700; margin: 16px 0 6px; }
.turn-assistant p { margin: 8px 0; }
.turn-assistant ul, .turn-assistant ol { margin: 6px 0; padding-left: 22px; }
.turn-assistant li { margin: 2px 0; }
.turn-assistant a { color: var(--brand-strong); }
.turn-assistant code { background: var(--tint); padding: 1px 5px; border-radius: 4px; }
.turn-assistant pre { background: var(--ink-deep); color: #EDEEFB; padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; }
.turn-assistant pre code { background: none; padding: 0; color: inherit; }
.turn-assistant table { border-collapse: collapse; margin: 10px 0; font-size: var(--fs-small); }
.turn-assistant th, .turn-assistant td { border-bottom: 1px solid var(--hairline); padding: 5px 10px; text-align: left; vertical-align: top; }
.turn-assistant th { border-bottom-color: var(--hairline-strong); font-weight: 600; }
.turn-assistant blockquote { margin: 10px 0; padding: 8px 14px; border: 1px solid var(--hairline); border-radius: 10px; background: hsla(232, 60%, 60%, .05); color: var(--soft); }

.tool { margin: 6px 0 6px 18px; font-family: var(--font-mono); font-size: var(--fs-small); }
.tool > summary { list-style: none; cursor: pointer; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool > summary::-webkit-details-marker { display: none; }
.tool .dot { color: var(--faint); margin: 0 8px 0 2px; }
/* The tool line's dot is the same character in the markup (pane.js, tasks.js): hide the text (it stays in the DOM) and draw the circle, for the same reason as .turn-assistant::before. Margins keep the 18px the result line indents by. */
.tool .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; font-size: 0; vertical-align: middle; }
.tool.ok .dot { color: var(--good); }
.tool.err .dot { color: var(--action); }
.tool .name { font-weight: 600; }
.tool .args { color: var(--soft); }
.tool .sum { color: var(--faint); padding-left: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool .sum::before { content: '⎿  '; }
.tool.err .sum { color: var(--action-strong); }
.tool pre { margin: 6px 0 4px 18px; max-height: 360px; overflow: auto; background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 8px 10px; white-space: pre-wrap; }
.diff .del { background: #FBEDEA; color: #8A3A22; display: block; }
.diff .add { background: var(--good-tint); color: var(--good); display: block; }

.note { margin: 10px 0; font-size: var(--fs-small); color: var(--faint); }
.note.warn { color: var(--action-strong); }
.note.error { color: var(--action-strong); font-weight: 600; }
.foot { margin: 6px 0 4px 18px; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--faint); }

@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- composer ---------- */
.composer-wrap { position: relative; padding: 0 22px 18px; background: linear-gradient(transparent, var(--ground) 30%); }
.composer {
  max-width: 880px; margin: 0 auto; background: var(--card); border: 1px solid var(--hairline-strong);
  border-radius: 14px; padding: 10px 12px 8px; box-shadow: 0 6px 24px -14px rgba(var(--shadow-rgb), .35);
  transition: border-color var(--dur-fast) var(--ease-hover);
}
.composer:focus-within { border-color: var(--brand); }
.composer.drop { border-style: dashed; border-color: var(--brand); background: var(--brand-wash); }
textarea {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent; max-height: 40vh;
  padding: 4px 2px; line-height: 1.5;
}
.composer-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); border: 0; background: none; cursor: pointer; }
.icon-btn:hover:not(:disabled) { background: var(--tint); }
.icon-btn:disabled { opacity: .45; cursor: default; }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: var(--soft); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.status { flex: 1; font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.send {
  border: 0; border-radius: var(--radius-sm); padding: 7px 16px; cursor: pointer; font-weight: 600;
  background: var(--fill); color: #fff; transition: background var(--dur-fast) var(--ease-hover);
}
.send:hover { background: var(--fill-hover); }
.send.stop { background: var(--fill-stop); }
.attachments { display: flex; gap: 8px; flex-wrap: wrap; }
.attachments:not(:empty) { margin-bottom: 8px; }
.chip { position: relative; }
.chip img { height: 64px; border-radius: var(--radius-sm); border: 1px solid var(--hairline); display: block; }
.chip button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--hairline-strong); background: var(--card); cursor: pointer; font-size: var(--fs-small); line-height: 1; }
.chip .dim { position: absolute; bottom: 2px; left: 4px; font: var(--fs-micro) var(--font-mono); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.slash {
  position: absolute; bottom: calc(100% - 6px); left: 50%; transform: translateX(-50%); width: min(880px, calc(100% - 20px)); z-index: 4;
  list-style: none; margin: 0; padding: 6px; max-height: 300px; overflow-y: auto; background: var(--card);
  border: 1px solid var(--hairline-strong); border-radius: var(--radius); box-shadow: 0 10px 30px -18px rgba(var(--shadow-rgb), .45);
}
.slash li { padding: 6px 10px; border-radius: var(--radius-sm); cursor: pointer; display: flex; gap: 12px; }
.slash li.on { background: var(--brand-wash); }
.slash .n { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--brand-deep); white-space: nowrap; }
.slash .d { font-size: var(--fs-small); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- sheets (questions, plan approval, billing) ---------- */
.sheet-scrim { position: fixed; inset: 0; background: rgba(30, 27, 51, .28); display: grid; place-items: center; z-index: 10; }
.sheet-scrim[hidden] { display: none; }
.sheet {
  width: min(620px, calc(100vw - 48px)); max-height: 80vh; overflow-y: auto; background: var(--card);
  border-radius: 14px; border: 1px solid var(--hairline-strong); padding: 20px 22px;
  animation: sheet var(--dur-sheet) var(--ease-sheet);
}
@keyframes sheet { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.sheet h2 { margin: 0 0 4px; font: 700 var(--fs-body)/1.3 var(--font-display); }
.sheet .from { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--brand-strong); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .q { margin: 14px 0 6px; font-weight: 600; }
.sheet .opt {
  display: block; width: 100%; text-align: left; margin: 6px 0; padding: 9px 12px; cursor: pointer;
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); background: var(--ground);
}
.sheet .opt.on { border-color: var(--brand-strong); background: var(--brand-wash); }
.sheet .opt small { display: block; color: var(--faint); }
.sheet input[type=text] { width: 100%; padding: 8px 10px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); margin-top: 6px; }
.sheet .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.sheet .row button { padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--hairline-strong); background: var(--ground); cursor: pointer; font-weight: 600; }
.sheet .row button.primary { background: var(--fill); border-color: var(--fill); color: #fff; }
.sheet .plan { max-height: 46vh; overflow-y: auto; border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 4px 14px; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Recording: the mic carries the action colour, the one hot control. */
.icon-btn.rec { background: var(--action-tint); }
.icon-btn.rec svg { stroke: var(--action-strong); }

/* ==========================================================================
   2026-10-09 refresh (Arthur: Archivo and Archivo Wide, big bold heavy
   headers, very simple and clean, subtle light animations, an animated grid
   like Claude's top effort level, clean folders, settings in the message box).
   Archivo Wide is the bundled variable Archivo at font-stretch 125%.
   ========================================================================== */

:root { --wide: 125%; --heavy: 820; --dur-grid: 1.6s; }

/* Heavy, wide headers. */
.wordmark { font-weight: 860; font-stretch: var(--wide); font-size: var(--fs-title); letter-spacing: -.012em; }
.pane-bar .title { font-weight: var(--heavy); font-stretch: var(--wide); font-size: var(--fs-title); letter-spacing: -.014em; line-height: 1.2; }
.stage.multi .pane-bar .title { font-size: var(--fs-body); }
.tab-t { font-stretch: 112%; }
.tab.on .tab-t { font-weight: 720; }
.sheet h2 { font-weight: var(--heavy); font-stretch: var(--wide); font-size: var(--fs-title); letter-spacing: -.012em; }
.turn-assistant h1, .turn-assistant h2, .turn-assistant h3 { font-weight: 800; font-stretch: 115%; }
.new { font-weight: 760; font-stretch: 112%; letter-spacing: .005em; }
.sessions .t { font-weight: 620; }

/* Header: grip, title, a quiet meta line, close. Nothing else. */
.pane-bar { min-height: 58px; padding: 10px 10px 10px 6px; }
.meta-line { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 2px; }
.meta-line .cwd { flex: 1; min-width: 0; }
.folder-chip {
  flex: none; border: 0; background: none; padding: 0; cursor: pointer; font: 600 var(--fs-micro)/1.4 var(--font-body);
  color: var(--faint); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-hover);
}
.folder-chip::before { content: '▸ '; color: var(--hairline-strong); }
.folder-chip.set { color: var(--brand-strong); }
.folder-chip.set::before { color: var(--brand-soft); }
.folder-chip:hover { color: var(--brand-deep); }
.folder-chip[hidden] { display: none; }

/* Settings live in the message box, like Claude Code and Codex. */
.composer-row { flex-wrap: wrap; row-gap: 4px; }
.chips { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; flex-wrap: wrap; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border: 0; border-radius: var(--radius-sm);
  background: none; cursor: pointer; font: 560 var(--fs-small)/1 var(--font-body); color: var(--soft); white-space: nowrap;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis;
  transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.chip-btn:hover { background: var(--tint); color: var(--ink); }
.chip-btn .src { font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); }
.chip-btn.mode .mm { font-size: var(--fs-micro); letter-spacing: -.12em; margin-right: 1px; }
.chip-btn.mode[data-mode=bypassPermissions] { color: var(--action-strong); }
.chip-btn.mode[data-mode=acceptEdits] { color: var(--brand-strong); }
.chip-btn.mode[data-mode=plan] { color: var(--good); }
.chip-btn.billing { color: var(--brand-deep); font-weight: 650; }
.send { flex: none; }

/* The working line above the message box. */
.status-line {
  display: flex; align-items: center; gap: 9px; height: 0; overflow: hidden; max-width: 880px; margin: 0 auto;
  /* Shows with opacity and a small lift only (2026-10-10); height is never
     animated. The line floats over the conversation (.composer-wrap >
     .status-line, below), so it reserves no space either way. */
  padding: 0 4px; opacity: 0; transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.status-line.on { height: 26px; opacity: 1; }
.status-line .status { flex: 1; font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-row .status { display: none; }

/* The effort grid: 5 columns x 3 rows of dots, one column lit per level.
   At max the lit grid ripples (a diagonal wave of light), and while a pane
   works its status line carries a live one. Transform and opacity only. */
.egrid { display: inline-grid; grid-template-columns: repeat(5, 3px); grid-template-rows: repeat(3, 3px); gap: 2px; flex: none; }
.egrid i { width: 3px; height: 3px; border-radius: 1px; background: var(--hairline-strong); }
.egrid i.lit { background: var(--brand-strong); }
.egrid.max i.lit, .egrid.live i { animation: ripple var(--dur-grid) var(--ease-hover) infinite; animation-delay: calc((var(--c) + var(--r)) * 90ms); }
.egrid.live i { background: var(--brand); }
@keyframes ripple {
  0%, 100% { opacity: .45; transform: scale(.8); }
  35% { opacity: 1; transform: scale(1.15); background: var(--brand); }
  60% { opacity: .8; transform: scale(1); }
}

/* Empty conversation: a faint dot field breathing behind a heavy title. */
.empty h3 { margin: 14px 0 4px; font: var(--heavy) var(--fs-hero)/1.15 var(--font-display); font-stretch: var(--wide); letter-spacing: -.02em; color: var(--ink); }
.empty p { margin: 6px auto; }
.empty-grid { display: inline-grid; grid-template-columns: repeat(10, 5px); gap: 7px; opacity: .9; }
.empty-grid i { width: 5px; height: 5px; border-radius: 1.5px; background: var(--brand-soft); opacity: .25; animation: breathe 3.2s var(--ease-hover) infinite; }
.empty-grid i:nth-child(10n+1) { animation-delay: 0ms; } .empty-grid i:nth-child(10n+2) { animation-delay: 120ms; }
.empty-grid i:nth-child(10n+3) { animation-delay: 240ms; } .empty-grid i:nth-child(10n+4) { animation-delay: 360ms; }
.empty-grid i:nth-child(10n+5) { animation-delay: 480ms; } .empty-grid i:nth-child(10n+6) { animation-delay: 600ms; }
.empty-grid i:nth-child(10n+7) { animation-delay: 720ms; } .empty-grid i:nth-child(10n+8) { animation-delay: 840ms; }
.empty-grid i:nth-child(10n+9) { animation-delay: 960ms; } .empty-grid i:nth-child(10n) { animation-delay: 1080ms; }
.empty-grid i:nth-child(n+11):nth-child(-n+20) { margin-top: 0; filter: brightness(.95); }
@keyframes breathe { 0%, 100% { opacity: .18; } 45% { opacity: .7; } }
.empty { margin-top: 9vh; }

/* Rail: All / In terminals, then folders, then sessions. */
.views { padding: 14px 18px 4px; }
.folders { padding: 6px 10px 6px; }
.folders-head {
  display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 4px;
  font: var(--heavy) var(--fs-micro)/1 var(--font-display); font-stretch: var(--wide); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.folder-add { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.folder-add:hover, .folder-add.drop { background: var(--brand-wash); }
.folder-add svg, .folder-x svg { width: 12px; height: 12px; fill: none; stroke: var(--soft); stroke-width: 1.6; stroke-linecap: round; }
.folder-list { list-style: none; margin: 0; padding: 0; max-height: 34vh; overflow-y: auto; }
.folder-row {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 8px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: var(--fs-small); border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease-hover), border-color var(--dur-fast) var(--ease-hover);
}
.folder-row:hover { background: var(--tint); }
.folder-row.on { background: var(--brand-wash); font-weight: 650; }
.folder-row.drop, .views button.drop { border-color: var(--brand); background: var(--brand-wash); }
.folder-row .fi { width: 15px; height: 15px; fill: none; stroke: var(--brand-soft); stroke-width: 1.3; flex: none; }
.folder-row.on .fi { stroke: var(--brand-strong); }
.folder-row .fn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-row .count { font: var(--fs-micro) var(--font-mono); color: var(--faint); }
.folder-x { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 5px; background: none; cursor: pointer; opacity: 0; }
.folder-row:hover .folder-x { opacity: 1; }
.folder-x:hover { background: var(--tint-deep); }
.folder-row.editing { padding: 0 4px; cursor: default; }
.folder-row input { width: 100%; height: 26px; border: 1px solid var(--brand); border-radius: 6px; padding: 0 8px; outline: 0; background: var(--card); font-size: var(--fs-small); }
.folder-empty { padding: 4px 8px 6px; font-size: var(--fs-small); color: var(--faint); }
.views button { border-bottom-width: 2px; }
.views button.drop { border-radius: 6px; padding: 2px 6px; }

/* The popover menu (model, effort, mode, folders, right-click). */
.menu {
  position: fixed; z-index: 20; min-width: 170px; max-width: 360px; padding: 5px; background: var(--card);
  border: 1px solid var(--hairline-strong); border-radius: var(--radius); box-shadow: 0 14px 36px -18px rgba(var(--shadow-rgb), .5);
  animation: menu-in var(--dur-fast) var(--ease-out); transform-origin: top left;
}
.menu.out { animation: menu-out var(--dur-exit) var(--ease-hover) forwards; }
@keyframes menu-in { from { opacity: 0; transform: translateY(3px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes menu-out { to { opacity: 0; transform: translateY(2px); } }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--radius-sm);
  background: none; cursor: pointer; text-align: left; font-size: var(--fs-small); color: var(--ink);
}
.menu-item:hover, .menu-item.kb { background: var(--tint); }
.menu-item.on { font-weight: 650; }
.menu-item.on::after { content: '✓'; margin-left: auto; color: var(--brand-strong); font-weight: 700; }
.menu-item .ml { white-space: nowrap; }
.menu-item .mh { margin-left: auto; padding-left: 14px; font-size: var(--fs-micro); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item.on .mh { display: none; }
.menu-item .mm { width: 18px; font-size: var(--fs-micro); letter-spacing: -.12em; color: var(--soft); }
.menu-item .mm.bypassPermissions { color: var(--action-strong); }
.menu-item .mm.acceptEdits { color: var(--brand-strong); }
.menu-item .mm.plan { color: var(--good); }
.menu-div { height: 1px; margin: 5px 6px; background: var(--hairline); }
.menu-head { padding: 7px 10px 3px; font: var(--heavy) var(--fs-micro)/1 var(--font-display); font-stretch: var(--wide); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }

/* The effort popup holds settings beside the levels (2026-10-13, tune.js): a quiet line of explanation, and a row of choices
   side by side (workflow size, reasoning summary, speed). The chosen one is raised on a tinted track; no capsule, no dot. */
.menu-note { padding: 1px 10px 7px; max-width: 340px; font-size: var(--fs-micro); line-height: 1.45; color: var(--faint); white-space: normal; }
.menu-seg-label { padding: 6px 10px 3px; font: var(--heavy) var(--fs-micro)/1 var(--font-display); font-stretch: var(--wide); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.menu-seg { display: flex; gap: 2px; margin: 0 6px 5px; padding: 2px; border-radius: var(--radius-sm); background: var(--tint); }
.menu-seg-item {
  flex: 1 1 0; min-width: 0; height: 26px; padding: 0 4px; border: 0; border-radius: calc(var(--radius-sm) - 2px); background: none; cursor: pointer;
  font: 560 var(--fs-small)/1 var(--font-body); color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.menu-seg-item:hover:not(.on), .menu-seg-item.kb:not(.on) { color: var(--ink); }
.menu-seg-item.on { background: var(--card); color: var(--ink); font-weight: 650; box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .2); }
.menu-seg-item:active { transform: scale(.97); }

/* Ultracode (or a faster Codex speed) on the effort chip: two more lowercase words after the effort, in the brand ink. */
.chip-btn.effort .uc { margin-left: .45em; color: var(--brand-strong); font-weight: 650; }
.chip-btn.effort .uc-short { display: none; }
@container composer (max-width: 480px) {
  .chip-btn.effort .uc-full { display: none; }
  .chip-btn.effort .uc-short { display: inline; }
}

/* Narrow panes: chips stay, smaller; the folder chip and path fold away first. */
@container pane (max-width: 560px) {
  .chip-btn { padding: 0 6px; font-size: var(--fs-small); max-width: 150px; }
  .chip-btn.billing .src { display: none; }
}
@container pane (max-width: 420px) {
  .meta-line { display: none; }
  .chip-btn.billing { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .egrid i, .empty-grid i { animation: none !important; }
}

/* ==========================================================================
   Pearl ground (Arthur, 2026-10-09: "we want that kind of pearlescent
   background"). The edition 2 pearl gesture from
   ~/myrlin-labs/design-system (Fly.io's): the same three stops, blue
   hsl(217 91% 60%), purple hsl(277 87% 63%), cyan hsl(189 94% 43%), at .35,
   always washed under a white overlay (.875 at the top half, .25 at the
   bottom), with the white halftone lattice (8px, offset 4px, .6) over it.
   One shared layer behind every pane instead of one per pane, so six panes
   cost the same as one. It drifts sideways over 48 s on a transformed layer
   (compositor only, no repaint), and holds still under reduced motion.
   ========================================================================== */

:root {
  --pearl-stop-blue: 217, 91%, 60%;
  --pearl-stop-purple: 277, 87%, 63%;
  --pearl-stop-cyan: 189, 94%, 43%;
  --pearl-gradient: linear-gradient(90deg, hsla(var(--pearl-stop-blue), .35), hsla(var(--pearl-stop-purple), .35), hsla(var(--pearl-stop-cyan), .35), hsla(var(--pearl-stop-blue), .35));
  --pearl-overlay: linear-gradient(180deg, hsla(var(--w), .875) 50%, hsla(var(--w), .25));
  --pearl-overlay-rail: linear-gradient(180deg, hsla(var(--w), .94) 40%, hsla(var(--w), .62));
  --halftone: radial-gradient(circle, hsl(var(--w)) 1.4px, transparent 1.5px) 0 0 / 8px 8px, radial-gradient(circle, hsl(var(--w)) 1.4px, transparent 1.5px) 4px 4px / 8px 8px;
}

.stages { isolation: isolate; overflow: hidden; background: hsl(var(--w)); }
.stages::before {
  content: ""; position: absolute; inset: 0 -40% 0 -40%; z-index: -2; pointer-events: none;
  background: var(--pearl-gradient);
  animation: pearl-drift 48s var(--ease-hover) infinite alternate; will-change: transform;
}
.stages::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--halftone), var(--pearl-overlay);
}
.stages > .stage { z-index: 0; }
@keyframes pearl-drift { from { transform: translate3d(-12%, 0, 0); } to { transform: translate3d(12%, 0, 0); } }

/* Panes are see-through onto the pearl; their header stays a clean white strip. */
.pane, .ground { background: transparent; }
.ground { background: none; }
.composer-wrap { background: none; }
.pane-bar { background: hsla(var(--w), .86); }
.gutter { background: hsla(230, 45%, 88%, .9); }
.stage-empty, .empty { position: relative; }

/* The rail: the same pearl, held paler so the list reads first. */
.rail { position: relative; isolation: isolate; overflow: hidden; background: hsl(var(--w)); }
.rail::before {
  content: ""; position: absolute; inset: 0 -60% 0 -60%; z-index: -2; pointer-events: none;
  background: var(--pearl-gradient);
  animation: pearl-drift 60s var(--ease-hover) infinite alternate-reverse; will-change: transform;
}
.rail::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--halftone), var(--pearl-overlay-rail); }
.rail-foot { background: hsla(var(--w), .6); }
.sessions li:hover { background: hsla(var(--w), .7); }
.search { background: hsla(var(--w), .9); }

@media (prefers-reduced-motion: reduce) {
  .stages::before, .rail::before { animation: none !important; transform: none; }
}

/* What Myrlin Glass has Claude on: one quiet line over the rail footer, flashing once on a swap. */
.glass-line { display: flex; align-items: baseline; gap: 8px; padding: 8px 18px 0; font-size: var(--fs-small); color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glass-line:empty { display: none; }
.glass-line .gl { font: var(--heavy) var(--fs-micro)/1 var(--font-display); font-stretch: var(--wide); letter-spacing: .1em; text-transform: uppercase; color: var(--brand-strong); }
.glass-line .gh { margin-left: auto; font: var(--fs-micro) var(--font-mono); color: var(--faint); }
.glass-line.flash { animation: glass-flash 1.2s var(--ease-out); }
@keyframes glass-flash { 0% { background: var(--brand-wash); } 100% { background: transparent; } }

/* ==========================================================================
   2026-10-09 evening (Arthur: no separate title bar, a more opaque frosted
   sidebar with clear sections, a cleaner scrollbar, bolder type, and an
   advanced search in the sidebar).
   - The OS title bar is off; the brand row and the tab row are the top of
     the window (drag regions), with the window buttons at the right.
   - The pearl is ONE layer behind the whole window now, so the top strip,
     the sidebar and the panes sit on the same ground with no seams. The
     sidebar is a frosted pane over it (blur + white). The window is opaque,
     so the see-through problem Glass had with backdrop-filter (transparent
     window) does not apply here.
   ========================================================================== */

:root { --top: 46px; --heavy: 880; --rail-frost: hsla(var(--w), .72); --sec-line: hsla(232, 40%, 82%, .85); }

/* One pearl behind everything. */
body { background: hsl(var(--w)); isolation: isolate; font-weight: 460; }
body::before {
  content: ""; position: fixed; inset: 0 -40% 0 -40%; z-index: -2; pointer-events: none;
  background: var(--pearl-gradient);
  /* Stepped, about 6 moves a second (2026-10-12, input lag): every frosted surface (the sidebar, pane headers, the
     composers, the cards) blurs what is behind it, so each time the pearl moves the GPU blurs all of them again. The
     drift is 14 px a second and the pearl is a few percent of tint under the white overlay, so 6 moves a second look the
     same as 60 and cost a tenth. */
  animation: pearl-drift 48s steps(288, end) infinite alternate; will-change: transform;
}
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--halftone), var(--pearl-overlay); }
.stages { background: none; }
.stages::before, .stages::after, .rail::before, .rail::after { display: none; }
@media (prefers-reduced-motion: reduce) { body::before { animation: none !important; transform: none; } }

/* ---------- sidebar: a frosted pane in clear sections ---------- */
.rail {
  /* The frost is baked (2026-10-12, input lag). It was var(--rail-frost) over a live backdrop-filter: blur(28px)
     saturate(1.6); but the pearl behind it shows through at about one percent, and the blur only softened the halftone
     dots, so a plain white with a faint purple cast at the foot is the same picture (measured: at most 8 of 255 in one
     channel, in light and dark). A live blur meant the GPU blurred this whole column again each frame that anything in it
     moved: a working row's spinner, a keep-warm ring. Those now cost nothing extra. */
  background: linear-gradient(180deg, transparent 45%, hsla(var(--pearl-stop-purple), .03)), hsl(var(--w));
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-right: 1px solid var(--sec-line);
  box-shadow: inset -1px 0 0 hsla(var(--w), .75), 6px 0 28px -22px rgba(var(--shadow-rgb), .35);
  overflow: hidden;
}
.brand { height: var(--top); padding: 0 16px; flex: none; user-select: none; -webkit-user-select: none; }
.brand .mark { width: 38px; height: 22px; }
/* The wordmark is the display step (2026-10-12): the rail's one large word, so the sidebar's type spans the scale. */
.wordmark { font-weight: 900; font-stretch: 125%; font-size: var(--fs-display); letter-spacing: -.015em; }

.rail-sec { border-top: 1px solid var(--sec-line); flex: none; }
.rail-find { padding: 12px 0; border-top: 0; }
.rail-find .new { display: block; width: calc(100% - 28px); margin: 0 14px 10px; }
.rail-folders { padding: 0 0 8px; }
.rail-sessions { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Section header: heavy wide caps label, a count, and its controls. A white
   band under it marks where each section starts. */
.sec-head {
  /* Room above and below its text, not flush against its band (2026-10-12, Impeccable cramped-padding). */
  display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 12px 8px 18px;
  background: hsla(var(--w), .55); border-bottom: 1px solid hsla(232, 40%, 88%, .7);
}
.sec-t { font: 900 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sec-n { font: 600 var(--fs-micro)/1 var(--font-mono); color: var(--faint); }
.sec-n:empty { display: none; }
.folders-head { padding: 0 8px 0 18px; justify-content: flex-start; }
.folders-head .folder-add { margin-left: auto; }
.rail-folders .folder-list { padding: 6px 8px 0; }
.rail-folders .folder-empty { padding: 8px 10px 4px; }
.sec-clear { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.sec-clear:hover { background: var(--tint-deep); }
.sec-clear svg { width: 11px; height: 11px; fill: none; stroke: var(--soft); stroke-width: 1.7; stroke-linecap: round; }
.sec-clear[hidden] { display: none; }

/* All / In terminals: a small segmented switch at the right of the header. */
.rail-sessions .views { margin-left: auto; padding: 2px; gap: 0; flex-wrap: nowrap; background: hsla(232, 45%, 92%, .8); border-radius: 8px; font-size: var(--fs-small); }
.rail-sessions .views button { padding: 4px 8px; border: 0; border-radius: 6px; color: var(--soft); font-weight: 650; white-space: nowrap; }
.rail-sessions .views button.on { background: hsl(var(--w)); color: var(--ink); font-weight: 800; box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .14); border: 0; }
.rail-sessions .views button.drop { background: var(--brand-wash); border-radius: 6px; padding: 4px 8px; }
.rail-sessions .views .count { font-size: var(--fs-micro); margin-left: 5px; }
.rail-sessions .views:empty { display: none; }
.rail-sessions .search-state { padding: 8px 18px 2px; min-height: 0; line-height: 1.4; font-weight: 540; }
.rail-sessions .search-state[hidden] { display: none; }
.rail-sessions .sessions { padding: 8px 8px 12px; }

/* Rows: heavier titles, clearer separation between rows. */
.sessions li { padding: 10px 11px; margin-bottom: 2px; }
.sessions li:hover { background: hsla(var(--w), .78); }
.sessions li.on { background: hsl(var(--w)); border-color: var(--hairline-strong); box-shadow: 0 1px 3px rgba(var(--shadow-rgb), .1); }
.sessions .t { font-weight: 700; font-size: var(--fs-small); letter-spacing: -.003em; }
.sessions .m { font-weight: 500; }
.sessions .snip { font-weight: 480; }
.sessions .why { margin-top: 5px; font-size: var(--fs-small); color: var(--brand-deep); font-weight: 580; line-height: 1.4; }
.sessions .why::before { content: '\2726  '; color: var(--brand); }
.sessions .by-meaning { font: 800 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .09em; text-transform: uppercase; color: var(--brand-strong); margin-right: 2px; }
.sess-link { font-family: var(--font-mono); font-size: .9em; color: var(--brand-strong); text-decoration: underline; text-decoration-color: var(--brand-soft); text-underline-offset: 2px; cursor: pointer; }
.sess-link:hover { color: var(--brand-deep); }

.rail-foot { display: block; padding: 0; border-top: 1px solid var(--sec-line); background: hsla(var(--w), .5); flex: none; }
.rail-foot .glass-line { padding: 10px 18px 0; }
.foot-row { display: flex; align-items: center; gap: 10px; padding: 8px 14px 11px 18px; font-size: var(--fs-micro); color: var(--faint); font-weight: 520; }
.foot-row #indexState { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Scrollbars: invisible until you are over the list, then a thin quiet thumb. */
.sessions, .folder-list, .ground, .slash, .sheet, .sheet .plan, .tool pre, textarea {
  scrollbar-width: thin; scrollbar-color: transparent transparent;
}
.sessions:hover, .folder-list:hover, .ground:hover, .slash:hover, .sheet:hover, .sheet .plan:hover, .tool pre:hover, textarea:hover {
  scrollbar-color: hsla(232, 18%, 55%, .38) transparent;
}

/* ---------- the top strip: tabs and the window buttons, on the pearl ---------- */
.main { grid-template-rows: var(--top) 1fr; }
.topbar { display: flex; align-items: stretch; min-width: 0; height: var(--top); user-select: none; -webkit-user-select: none; }
.tabs {
  flex: 1; min-width: 0; align-items: center; gap: 4px; padding: 0 8px 0 10px; min-height: 0; height: var(--top);
  background: none; border-bottom: 0;
}
.tab { height: 32px; border: 1px solid transparent; border-radius: 9px; padding: 0 6px 0 12px; color: var(--soft); font-weight: 640; font-size: var(--fs-small); }
.tab:hover { background: hsla(var(--w), .55); color: var(--ink); }
.tab.on {
  height: 32px; margin-bottom: 0; background: hsla(var(--w), .92); border-color: var(--hairline-strong); color: var(--ink);
  box-shadow: 0 1px 3px rgba(var(--shadow-rgb), .12); font-weight: 800;
}
.tab.on .tab-t { font-weight: 820; }

.tab.busy::after { bottom: 2px; }
.tab-plus { margin: 0 2px; }
.tabs-tools { padding: 0 2px 0 10px; }
.tab-count { font-weight: 600; }
.tab-tool { background: hsla(var(--w), .7); font-weight: 650; }

.winctl { display: flex; flex: none; height: var(--top); }
.winctl button { display: grid; place-items: center; width: 46px; height: 100%; border: 0; background: none; cursor: pointer; transition: background var(--dur-fast) var(--ease-hover); }
.winctl button:hover { background: hsla(232, 40%, 50%, .1); }
.winctl button:active { background: hsla(232, 40%, 50%, .18); }
.winctl svg { width: 12px; height: 12px; fill: none; stroke: var(--ink); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }
.winctl .close-w:hover { background: #C42B1C; }
.winctl .close-w:hover svg { stroke: #fff; }
.winctl .i-restore { display: none; }
body.maximized .winctl .i-max { display: none; }
body.maximized .winctl .i-restore { display: block; }

/* The stage is one framed surface below the tab row, on the same pearl. */
.pane-bar { background: hsla(var(--w), .74); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border-bottom-color: hsla(232, 40%, 86%, .9); }
.stage { inset: 0 8px 8px 8px; border-radius: 12px; overflow: hidden; border: 1px solid var(--sec-line); box-shadow: 0 10px 34px -26px rgba(var(--shadow-rgb), .5); }
body.maximized .stage { inset: 0; border-radius: 0; border-width: 1px 0 0 1px; }

/* ---------- bolder type everywhere ---------- */
.pane-bar .title { font-weight: 900; font-stretch: 125%; font-size: var(--fs-title); letter-spacing: -.018em; }
.stage.multi .pane-bar .title { font-size: var(--fs-body); }
.empty h3 { font-weight: 900; font-size: var(--fs-hero); }
.sheet h2 { font-weight: 900; font-size: var(--fs-display); }
.turn-assistant h1, .turn-assistant h2, .turn-assistant h3 { font-weight: 860; font-stretch: 118%; }
.turn-assistant strong, .turn-assistant b { font-weight: 760; }
.turn-assistant th { font-weight: 780; }
.new { font-weight: 820; font-stretch: 115%; }
.send { font-weight: 780; }
.chip-btn { font-weight: 640; }
.chip-btn.billing { font-weight: 760; }
.folder-row { font-weight: 600; }
.folder-row.on { font-weight: 800; }
.menu-item { font-weight: 560; }
.menu-item.on { font-weight: 800; }
.tool .name { font-weight: 700; }
.note { font-weight: 520; }
.cwd, .folder-chip { font-weight: 600; }

/* ---------- search lens: what kind of search ran, and Ask Claude ---------- */
.search { background: hsla(var(--w), .92); height: 38px; }
.search input { font-weight: 520; }
.lens { display: flex; align-items: center; gap: 8px; margin: 8px 14px 0; min-height: 30px; }
.lens[hidden] { display: none; }
.lens-info { flex: 1; min-width: 0; font: 560 var(--fs-micro)/1.3 var(--font-body); color: var(--faint); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lens-info b { color: var(--soft); font-weight: 750; }
.ask {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px 0 9px; flex: none;
  border: 1px solid hsla(232, 60%, 70%, .6); border-radius: 8px; cursor: pointer;
  background: linear-gradient(135deg, hsla(var(--pearl-stop-blue), .16), hsla(var(--pearl-stop-purple), .16)), hsl(var(--w));
  color: var(--brand-deep); font: 800 var(--fs-small)/1 var(--font-body); font-stretch: 108%;
  transition: border-color var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-out);
}
.ask:hover { border-color: var(--brand); }
.ask:active { transform: scale(.97); }
.ask svg { width: 14px; height: 14px; fill: var(--brand-strong); }
.ask.busy { pointer-events: none; color: var(--faint); }
.ask.busy svg { animation: ask-spin 1.6s linear infinite; }
@keyframes ask-spin { to { transform: rotate(360deg); } }
.dig { display: block; width: calc(100% - 4px); margin: 8px 2px 4px; padding: 10px 12px; border: 1px dashed hsla(232, 50%, 70%, .8); border-radius: var(--radius-sm); background: hsla(var(--w), .6); cursor: pointer; text-align: left; font-size: var(--fs-small); color: var(--soft); font-weight: 560; }
.dig b { display: block; color: var(--brand-deep); font-weight: 800; font-size: var(--fs-small); margin-bottom: 2px; }
.dig:hover { border-color: var(--brand); background: hsl(var(--w)); }

/* ---------- a session held by another window ---------- */
.takeover {
  max-width: 560px; margin: 12vh auto 0; padding: 22px 24px 20px; border-radius: 14px;
  background: hsla(var(--w), .9); border: 1px solid var(--hairline-strong); box-shadow: 0 18px 50px -30px rgba(var(--shadow-rgb), .55);
  animation: rise var(--dur-sheet) var(--ease-out);
}
.tk-kicker { font: 900 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .14em; text-transform: uppercase; color: var(--action-strong); }
.takeover h3 { margin: 8px 0 6px; font: 900 var(--fs-display)/1.2 var(--font-display); font-stretch: 125%; letter-spacing: -.015em; }
.takeover p { margin: 6px 0; color: var(--soft); }
.takeover .tk-fine { font-size: var(--fs-small); color: var(--faint); }
.tk-row { display: flex; gap: 8px; margin-top: 16px; }
.tk-row button { padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--hairline-strong); background: var(--ground); cursor: pointer; font-weight: 760; }
.tk-row .tk-go { background: var(--fill); border-color: var(--fill); color: #fff; }
.tk-row .tk-go:hover { background: var(--fill-hover); }

/* ==========================================================================
   Peach and dark mode (Arthur, 2026-10-10: "a dark mode here while
   maintaining our theme - also a splash of peach").

   Peach is the system's apricot (--pg-apricot, #F6C8AE, the warm pair's
   22-degree hue). Periwinkle stays the mark; peach is the light that moves:
   a warm stop in the pearl, the tail of every live sweep, the crest of the
   effort ripple, the search sparkle, selection, and a diagonal in the empty
   state. It never carries text on light, where its contrast is too low.

   Dark mode keeps the same structure: the drifting pearl under a deep
   ink-violet overlay (the --ink-deep family, the system's one dark surface),
   the same halftone in the ground colour, frosted sidebar, periwinkle marks,
   wide heavy Archivo. theme.js sets <html data-theme> before first paint from
   the choice in the rail footer (Auto follows Windows).
   ========================================================================== */

:root {
  --peach: 246, 200, 174;          /* #F6C8AE, washes */
  --peach-glow: #F2A57E;           /* marks and gradient tails */
  --peach-wash: rgba(246, 200, 174, .55);
  --pearl-stop-peach: 22, 92%, 72%;
  --pearl-gradient: linear-gradient(90deg, hsla(var(--pearl-stop-blue), .35), hsla(var(--pearl-stop-purple), .35), hsla(var(--pearl-stop-peach), .42), hsla(var(--pearl-stop-cyan), .35), hsla(var(--pearl-stop-blue), .35));
}

/* ---------- the peach splash ---------- */
::selection { background: var(--peach-wash); }
.stage.multi .pane.focused .pane-bar {
  box-shadow: none;
}
.tab.busy::after { background: linear-gradient(90deg, transparent, var(--brand), var(--peach-glow), transparent) 0 0 / 50% 100% no-repeat; }
@keyframes ripple {
  0%, 100% { opacity: .45; transform: scale(.8); }
  35% { opacity: 1; transform: scale(1.15); background: var(--peach-glow); }
  60% { opacity: .8; transform: scale(1); }
}
.sessions .why::before { color: var(--peach-glow); }
.ask { background: linear-gradient(135deg, hsla(var(--pearl-stop-blue), .16), rgba(var(--peach), .42)), hsl(var(--w)); }
.empty-grid i:nth-child(11n+1), .empty-grid i:nth-child(11n+6) { background: var(--peach-glow); }
/* The session you are in carries a peach mark down its left; one open in another pane keeps the periwinkle one. */
.sessions li.on { box-shadow: 0 1px 3px rgba(var(--shadow-rgb), .1); }
.sheet input[type=text] { background: var(--ground); }

/* Theme switch in the rail footer, styled like the ding switch beside it. */
.theme-btn {
  flex: none; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  background: var(--ground); padding: 3px 9px 3px 7px; font-size: var(--fs-micro); cursor: pointer; color: var(--brand-deep); font-weight: 650;
  transition: border-color var(--dur-fast) var(--ease-hover);
}
.theme-btn:hover, .sound:hover { border-color: var(--brand); }
.theme-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.theme-btn .i-fill { fill: currentColor; stroke: none; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; animation-timing-function: var(--ease-hover); }

/* ---------- dark ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #ECEDF8; --soft: #B7B9D3; --faint: #8D8FAD; --ink-deep: #F2F3FB;
  --ground: #121120; --card: #1A1928; --hairline: #2A2940; --hairline-strong: #3A3956;
  --tint: #232236; --tint-deep: #2D2C45;
  --brand: #8E96DC; --brand-strong: #A3ABF2; --brand-deep: #C9CDF2; --brand-soft: #6F78C8; --brand-wash: #262849;
  --action: #EE8A63; --action-strong: #F4A383; --action-tint: #3B241B;
  --good: #74D3A0; --good-tint: #17322A;
  --fill: #5361C9; --fill-hover: #6572D4; --fill-stop: #3A3956;
  --w: 246, 20%, 12%; --shadow-rgb: 0, 0, 0;
  --sec-line: hsla(244, 22%, 30%, .85);
  --peach-glow: #F6B895; --peach-wash: rgba(246, 184, 149, .3);
  --pearl-overlay: linear-gradient(180deg, hsla(248, 32%, 7%, .84) 45%, hsla(248, 32%, 7%, .46));
  --pearl-overlay-rail: linear-gradient(180deg, hsla(248, 32%, 7%, .9) 40%, hsla(248, 32%, 7%, .64));
}
:root[data-theme="dark"] .brand .mark, :root[data-theme="dark"] .empty-mark { filter: invert(1) brightness(.94); }
:root[data-theme="dark"] .rail { box-shadow: inset -1px 0 0 hsla(244, 30%, 40%, .25), 6px 0 28px -22px rgba(0, 0, 0, .7); }
:root[data-theme="dark"] .sec-head { background: hsla(var(--w), .5); border-bottom-color: var(--hairline); }
:root[data-theme="dark"] .rail-sessions .views { background: hsla(244, 22%, 20%, .85); }
:root[data-theme="dark"] .rail-sessions .views button.on { background: var(--tint-deep); box-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
:root[data-theme="dark"] .sessions li:hover { background: hsla(244, 20%, 22%, .7); }
:root[data-theme="dark"] .sessions li.on { background: var(--tint-deep); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
:root[data-theme="dark"] .tab:hover { background: hsla(244, 20%, 24%, .6); }
:root[data-theme="dark"] .tab.on { background: var(--tint-deep); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
:root[data-theme="dark"] .pane-bar { border-bottom-color: var(--hairline); }
:root[data-theme="dark"] .gutter { background: var(--hairline); }
:root[data-theme="dark"] .gutter:hover, :root[data-theme="dark"] .gutter.active { background: var(--brand-soft); }
:root[data-theme="dark"] .winctl button:hover { background: hsla(244, 30%, 70%, .12); }
:root[data-theme="dark"] .turn-assistant pre { background: #0C0B16; color: #DADCF4; border: 1px solid var(--hairline); }
:root[data-theme="dark"] .diff .del { background: #3A1E1A; color: #F4A99A; }
:root[data-theme="dark"] .sheet-scrim { background: rgba(4, 4, 10, .6); }
:root[data-theme="dark"] .ask { border-color: hsla(232, 50%, 62%, .55); }
:root[data-theme="dark"] .dig { border-color: hsla(232, 40%, 55%, .7); }
:root[data-theme="dark"] .sessions:hover, :root[data-theme="dark"] .folder-list:hover, :root[data-theme="dark"] .ground:hover,
:root[data-theme="dark"] .slash:hover, :root[data-theme="dark"] .sheet:hover, :root[data-theme="dark"] .tool pre:hover { scrollbar-color: hsla(240, 20%, 70%, .3) transparent; }

/* The Myrlin M (2026-10-09, Arthur: the Jobs M with its flare in Apaki's
   accent). Strokes in ink, folds periwinkle, flare teal-to-blue (pearl cyan
   189 94% 43% to blue 217 91% 60%), coloured here so it follows the theme. */
.m-mark { display: block; overflow: visible; }
.m-mark .m-stroke { fill: var(--ink); }
.m-mark .m-fold { fill: var(--brand); }
.brand .brand-mark { width: 40px; height: 19px; flex: none; }
.stage-empty .empty-mark { width: 64px; height: 30px; margin: 0 auto 6px; opacity: .9; }
:root[data-theme="dark"] .m-mark .m-fold { fill: var(--brand-strong); }

/* ---------- frosted composer (2026-10-09) ----------
   Arthur: the prompt box should be "a tinted frosted glassy object/card so
   you can see a slight hint of a blur of color behind". The composer now
   floats over the bottom of the conversation (same grid cell as .ground),
   so messages scroll under it and show through as a soft blur, over the
   pearl. --composer-h (set by pane.js) keeps the last message clear of it. */
.pane { grid-template-rows: auto 1fr; }
.pane > .ground, .pane > .composer-wrap { grid-row: 2; grid-column: 1; }
.composer-wrap { align-self: end; z-index: 3; pointer-events: none; padding-bottom: 16px; }
/* The queued messages too (2026-10-19, Arthur: "when queing a message/prompt the steer and edit and x button do not
   work"): the wrap lets clicks through to the conversation behind it, and the queue inherited that, so its Steer, Edit
   and x never got a click (a click from script still worked, which is why it looked fixed on 10-10). */
.composer-wrap > .composer, .composer-wrap > .slash, .composer-wrap > .queue { pointer-events: auto; }
.transcript { padding-bottom: calc(var(--composer-h, 150px) + 18px); }
/* Messages fade out in the strip under the card instead of showing sharp below it. */
.pane > .ground { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 30px), transparent); }
.composer {
  --frost: hsla(var(--w), .5);
  --frost-edge: hsla(var(--w), .78);
  background:
    linear-gradient(120deg, hsla(var(--pearl-stop-blue), .13), hsla(var(--pearl-stop-purple), .09) 48%, hsla(var(--pearl-stop-cyan), .11)),
    var(--frost);
  -webkit-backdrop-filter: blur(14px) saturate(1.8); backdrop-filter: blur(14px) saturate(1.8);
  border: 1px solid var(--frost-edge);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px hsla(232, 40%, 78%, .32),
    0 14px 36px -18px rgba(var(--shadow-rgb), .5);
  transition: border-color var(--dur-fast) var(--ease-hover), box-shadow var(--dur-fast) var(--ease-hover);
}
.composer:focus-within {
  border-color: hsla(var(--pearl-stop-blue), .55);
  box-shadow:
    0 0 0 3px hsla(var(--pearl-stop-blue), .14),
    0 16px 40px -18px rgba(var(--shadow-rgb), .55);
}
.composer.drop { background: var(--brand-wash); }
.status-line { pointer-events: none; }
:root[data-theme="dark"] .composer {
  --frost: hsla(var(--w), .5);
  --frost-edge: hsla(0, 0%, 100%, .09);
  box-shadow: 0 0 0 1px hsla(0, 0%, 0%, .3), 0 16px 40px -18px rgba(0, 0, 0, .7);
}
/* Without backdrop-filter the frost would be too thin to read through. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .composer { --frost: hsla(var(--w), .94); } }

/* ---------- where a new conversation starts (2026-10-09) ---------- */
.start-in {
  display: inline-flex; align-items: center; gap: 8px; margin: 14px auto 2px; padding: 8px 12px 8px 10px;
  border: 1px solid var(--hairline-strong); border-radius: 12px; cursor: pointer; color: var(--ink);
  background: hsla(var(--w), .62); -webkit-backdrop-filter: blur(14px) saturate(1.5); backdrop-filter: blur(14px) saturate(1.5);
  transition: border-color var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-hover);
}
.start-in:hover { border-color: var(--brand); }
.start-in:active { transform: scale(.98); }
.start-in svg { width: 15px; height: 15px; fill: none; stroke: var(--brand-strong); stroke-width: 1.4; stroke-linejoin: round; }
.start-in .start-label { font-size: var(--fs-small); color: var(--faint); }
.start-in .start-path { font-family: var(--font-mono); font-size: var(--fs-small); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.start-in .start-change { font-size: var(--fs-small); font-weight: 650; color: var(--brand-strong); }
.cwd.pickable { cursor: pointer; text-decoration: underline dotted hsla(var(--pearl-stop-blue), .55); text-underline-offset: 3px; }
.cwd.pickable:hover { color: var(--brand-strong); }

.sheet:has(.places) { width: min(780px, calc(100vw - 48px)); }
.sheet .path-go { display: flex; gap: 6px; margin-top: 12px; }
.sheet .path-go input { margin-top: 0; font-family: var(--font-mono); font-size: var(--fs-small); }
.sheet .path-go button, .sheet .br-new button {
  flex: none; padding: 7px 14px; border-radius: var(--radius-sm); border: 1px solid var(--hairline-strong); background: var(--ground); cursor: pointer; font-weight: 600;
}
.places { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
@container (max-width: 560px) { .places { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .places { grid-template-columns: 1fr; } }
.pl-h { font-size: var(--fs-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.pl-wait { font-size: var(--fs-small); color: var(--faint); padding: 6px 2px; }
.sheet .opt.pl { display: grid; grid-template-columns: 1fr auto; column-gap: 10px; padding: 7px 10px; margin: 0 0 4px; text-align: left; width: 100%; }
.sheet .opt.pl b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet .opt.pl small { grid-column: 1; font-family: var(--font-mono); font-size: var(--fs-micro); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-meta { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; gap: 6px; font: var(--fs-micro) var(--font-mono); color: var(--faint); white-space: nowrap; }
.browse { margin-top: 16px; border: 1px solid var(--hairline); border-radius: 12px; padding: 10px; background: hsla(var(--w), .5); }
.br-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; min-width: 0; font-family: var(--font-mono); font-size: var(--fs-small); }
.crumbs button, .drives button { border: 0; background: none; padding: 3px 5px; border-radius: 6px; cursor: pointer; color: var(--brand-deep); font: inherit; }
.crumbs button:hover, .drives button:hover { background: var(--tint); }
.crumbs .sep { color: var(--faint); }
.drives { display: flex; gap: 2px; flex: none; font-family: var(--font-mono); font-size: var(--fs-small); }
.br-list { margin-top: 8px; max-height: 220px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px; }
.br-d { text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: var(--fs-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.br-d:hover { background: var(--brand-wash); }
.br-d.hid { color: var(--faint); }
.br-up { font-family: var(--font-mono); color: var(--brand-strong); }
.br-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.br-hidden { font-size: var(--fs-small); color: var(--faint); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.br-new { display: flex; gap: 6px; flex: 1; max-width: 360px; }
.sheet .br-new input { margin-top: 0; padding: 6px 10px; }
.br-err { margin-top: 8px; font-size: var(--fs-small); color: var(--action-strong); }
.sheet .row button:disabled { opacity: .5; cursor: default; }
@media (prefers-reduced-motion: reduce) { .start-in, .start-in:active { transition: none; transform: none; } }
/* The folder sheet is tall: keep its buttons in reach while the lists scroll. */
.sheet:has(.places) { padding-bottom: 0; }
.sheet:has(.places) .row { position: sticky; bottom: 0; margin: 14px -22px 0; padding: 12px 22px 16px; background: linear-gradient(hsla(var(--w), 0), var(--card) 14px); }
/* Places as single compact lines, so the browser below stays in view. */
.sheet .opt.pl { display: flex; align-items: baseline; gap: 8px; padding: 6px 10px; margin: 0 0 3px; }
.sheet .opt.pl b { flex: none; max-width: 46%; }
.sheet .opt.pl small { flex: 1; min-width: 0; }
.sheet .opt.pl .pl-meta { flex: none; align-self: baseline; }
/* Long paths must not widen a column past half the sheet. */
.places { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pl-col { min-width: 0; }
.br-list .pl-wait { grid-column: 1 / -1; }
@media (max-width: 640px) { .places { grid-template-columns: minmax(0, 1fr); } }

/* ---------- working line, queue, steer, send (2026-10-09) ---------- */
/* The working line floats over the conversation too, so it is a small
   frosted pill with the grid and the words centred on one line, lifted
   clear of the prompt box. */
.status-line { justify-content: flex-start; padding: 0 6px; gap: 0; transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.status-line.on { height: 30px; margin-bottom: 10px; }
.status-line .egrid-slot:empty { display: none; }
.status-line .egrid-slot, .status-line .status {
  display: inline-flex; align-items: center; height: 28px; line-height: 1;
  background: hsla(var(--w), .62); -webkit-backdrop-filter: blur(14px) saturate(1.6); backdrop-filter: blur(14px) saturate(1.6);
  border: 1px solid hsla(var(--w), .8); box-shadow: 0 4px 16px -10px rgba(var(--shadow-rgb), .45);
}
.status-line .egrid-slot { padding: 0 6px 0 11px; border-right: 0; border-radius: 999px 0 0 999px; }
.status-line .status { flex: none; max-width: calc(100% - 60px); padding: 0 12px 0 4px; border-left: 0; border-radius: 0 999px 999px 0; }
.status-line .egrid-slot:empty + .status { padding-left: 12px; border-left: 1px solid hsla(var(--w), .8); border-radius: 999px; }
.status-line .egrid { transform: translateY(.5px); }
:root[data-theme="dark"] .status-line .egrid-slot, :root[data-theme="dark"] .status-line .status { border-color: hsla(0, 0%, 100%, .08); }

/* Messages typed while Claude works wait here, above the prompt box. */
.queue {
  max-width: 856px; margin: 0 auto 8px; padding: 6px; border-radius: 14px;
  background: hsla(var(--w), .58); -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid hsla(var(--w), .8); box-shadow: 0 10px 28px -18px rgba(var(--shadow-rgb), .5);
  animation: rise var(--dur-fast) var(--ease-out);
}
.queue[hidden] { display: none; }
.q-head { display: flex; align-items: baseline; gap: 10px; padding: 2px 8px 6px; font: 600 var(--fs-micro) var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--brand-deep); }
.q-hint { font-weight: 450; text-transform: none; letter-spacing: 0; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 10px; border-radius: 10px; background: hsla(var(--w), .7); border: 1px solid var(--hairline); }
.q-item + .q-item { margin-top: 4px; }
.q-text { flex: 1; min-width: 0; font-size: var(--fs-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text; }
.q-text:hover { color: var(--brand-deep); }
.q-img { flex: none; font: var(--fs-micro) var(--font-mono); color: var(--faint); }
.q-act {
  flex: none; padding: 4px 12px; border-radius: 8px; cursor: pointer; border: 1px solid hsla(var(--pearl-stop-blue), .45);
  background: hsla(var(--pearl-stop-blue), .08); color: var(--brand-deep);
  font: 800 var(--fs-small) var(--font-display); font-stretch: 125%; letter-spacing: .01em;
  transition: background var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-hover);
}
.q-act:hover { background: hsla(var(--pearl-stop-blue), .16); }
.q-act:active { transform: scale(.97); }
/* Edit (2026-10-10): puts the queued message back in the box; quieter than Steer. */
.q-edit {
  flex: none; padding: 4px 10px; border-radius: 8px; cursor: pointer; border: 1px solid var(--hairline-strong);
  background: none; color: var(--soft); font: 750 var(--fs-small) var(--font-body);
  transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.q-edit:hover { background: var(--tint); color: var(--ink); }
.q-x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 7px; background: none; cursor: pointer; color: var(--faint); font-size: var(--fs-body); line-height: 1; }
.q-x:hover { background: var(--tint); color: var(--ink); }
:root[data-theme="dark"] .queue { border-color: hsla(0, 0%, 100%, .08); }
:root[data-theme="dark"] .q-item { background: hsla(var(--w), .6); }
:root[data-theme="dark"] .q-head, :root[data-theme="dark"] .q-act { color: var(--brand-strong); }

/* A message steered into a running turn. */
.turn-user .steer-tag { display: block; margin-bottom: 4px; font: 600 var(--fs-micro) var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--brand-strong); }

/* Send: Archivo at full stretch, deep indigo to violet, a lit top edge. */
:root { --send-a: #2C3578; --send-b: #5A3FB0; --send-ink: #fff; }
:root[data-theme="dark"] { --send-a: #6572D4; --send-b: #8D6BE0; }
.send {
  font-family: var(--font-display); font-weight: 820; font-stretch: 125%; letter-spacing: .015em; font-size: var(--fs-small);
  padding: 7px 18px; border-radius: 10px; color: var(--send-ink);
  background: linear-gradient(135deg, var(--send-a), var(--send-b));
  box-shadow: 0 6px 16px -8px rgba(90, 63, 176, .6);
  transition: filter var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-hover), box-shadow var(--dur-fast) var(--ease-hover);
}
.send:hover { background: linear-gradient(135deg, var(--send-a), var(--send-b)); filter: brightness(1.12) saturate(1.05); }
.send:active { transform: scale(.97); }
.send.queue {
  background: hsla(var(--w), .6); color: var(--brand-deep); box-shadow: inset 0 0 0 1px hsla(var(--pearl-stop-blue), .5);
}
.send.queue:hover { background: hsla(var(--pearl-stop-blue), .12); filter: none; }
.send.stop { background: var(--ink); box-shadow: none; }
.send.stop:hover { background: var(--ink); filter: brightness(1.25); }
:root[data-theme="dark"] .send.queue { color: var(--brand-strong); }
:root[data-theme="dark"] .send.stop { background: #3A3956; }
@media (prefers-reduced-motion: reduce) { .send, .q-act, .queue { transition: none; animation: none; } .send:active, .q-act:active { transform: none; } }

/* ---------- reply formatting and colour (2026-10-09) ----------
   Arthur: "really make sure we cover all formatting AND text color". Type
   scale in Archivo for headings, ink-deep for emphasis, periwinkle for links
   and inline code, a deep indigo code panel with coloured tokens, tables with
   a tinted head, tinted quote boxes (no side stripe), coloured list markers. */
.turn-assistant { line-height: 1.62; color: var(--ink); }
.turn-assistant.streaming { white-space: normal; }
.turn-assistant h1, .turn-assistant h2, .turn-assistant h3, .turn-assistant h4, .turn-assistant h5, .turn-assistant h6 {
  font-family: var(--font-display); color: var(--ink-deep); line-height: 1.25; margin: 20px 0 8px;
}
.turn-assistant h1 { font-size: var(--fs-display); font-weight: 880; font-stretch: 122%; letter-spacing: -.015em; }
.turn-assistant h2 { font-size: var(--fs-title); font-weight: 840; font-stretch: 118%; letter-spacing: -.01em; }
.turn-assistant h3 { font-size: var(--fs-body); font-weight: 800; font-stretch: 112%; }
.turn-assistant h4 { font-size: var(--fs-body); font-weight: 760; font-stretch: 106%; color: var(--brand-deep); }
.turn-assistant h5, .turn-assistant h6 { font-size: var(--fs-micro); font-weight: 760; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.turn-assistant strong, .turn-assistant b { font-weight: 720; color: var(--ink-deep); }
.turn-assistant em { font-style: italic; }
.turn-assistant del { color: var(--faint); text-decoration-thickness: 1px; }
.turn-assistant a { color: var(--brand-strong); text-decoration: underline; text-decoration-color: hsla(232, 55%, 62%, .45); text-underline-offset: 2.5px; text-decoration-thickness: 1px; }
.turn-assistant a:hover { color: var(--brand-deep); text-decoration-color: currentColor; }
.turn-assistant :not(pre) > code {
  font-family: var(--font-mono); font-size: .875em; color: var(--brand-deep);
  background: hsla(232, 60%, 62%, .10); border: 1px solid hsla(232, 60%, 62%, .16); border-radius: 5px; padding: .5px 5px;
}
.turn-assistant p { margin: 9px 0; }
.turn-assistant ul, .turn-assistant ol { margin: 7px 0; padding-left: 24px; }
.turn-assistant li { margin: 3px 0; padding-left: 2px; }
.turn-assistant li > ul, .turn-assistant li > ol { margin: 3px 0; }
.turn-assistant ul > li::marker { color: var(--brand-soft); }
.turn-assistant ol > li::marker { color: var(--brand-strong); font-weight: 700; font-variant-numeric: tabular-nums; }
.turn-assistant li.task { list-style: none; position: relative; }
.turn-assistant li.task .tick {
  position: absolute; left: -20px; top: .32em; width: 13px; height: 13px; border-radius: 4px;
  border: 1.5px solid var(--brand-soft); background: hsla(var(--w), .8);
}
.turn-assistant li.task.done .tick { background: linear-gradient(135deg, var(--send-a, #2C3578), var(--send-b, #5A3FB0)); border-color: transparent; }
.turn-assistant li.task.done .tick::after { content: ''; position: absolute; left: 3.5px; top: 1px; width: 3px; height: 6.5px; border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(42deg); }
.turn-assistant li.task.done { color: var(--soft); }
.turn-assistant hr { border: 0; height: 1px; margin: 18px 0; background: linear-gradient(90deg, transparent, var(--hairline-strong) 15%, var(--hairline-strong) 85%, transparent); }
.turn-assistant blockquote > :first-child { margin-top: 0; }
.turn-assistant blockquote > :last-child { margin-bottom: 0; }
.turn-assistant .table-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--hairline); border-radius: 10px; background: hsla(var(--w), .55); }
.turn-assistant .table-wrap table { margin: 0; width: 100%; font-size: var(--fs-small); }
.turn-assistant .table-wrap th { background: hsla(232, 60%, 62%, .08); color: var(--ink-deep); font-family: var(--font-display); font-weight: 760; font-stretch: 106%; white-space: nowrap; }
.turn-assistant .table-wrap th, .turn-assistant .table-wrap td { padding: 7px 12px; border-bottom: 1px solid var(--hairline); }
.turn-assistant .table-wrap tr:last-child td { border-bottom: 0; }
.turn-assistant .table-wrap tbody tr:nth-child(even) td { background: hsla(232, 60%, 62%, .03); }

/* Code panel: deep indigo, a language label, coloured tokens. */
.turn-assistant pre.code, .turn-assistant pre {
  position: relative; background: #1B1934; color: #E4E6FA; border: 1px solid hsla(240, 30%, 30%, .6);
  padding: 13px 15px; border-radius: 10px; overflow-x: auto; font-size: var(--fs-small); line-height: 1.55;
  box-shadow: none;
}
.turn-assistant pre .code-lang { position: absolute; top: 6px; right: 10px; font: 600 var(--fs-micro) var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: #8C8FB8; user-select: none; }
.turn-assistant pre code { font-family: var(--font-mono); }
.tok-key { color: #B9A6FF; }
.tok-str { color: #7FDBC6; }
.tok-num { color: #F6B895; }
.tok-com { color: #7E81A3; font-style: italic; }
.tok-fn { color: #8FC2FF; }
.tok-var { color: #FFD38A; }
:root[data-theme="dark"] .turn-assistant pre { background: #0D0C1A; border-color: var(--hairline); }
:root[data-theme="dark"] .turn-assistant :not(pre) > code { color: var(--brand-deep); background: hsla(232, 60%, 70%, .12); border-color: hsla(232, 60%, 70%, .18); }
:root[data-theme="dark"] .turn-assistant .table-wrap { background: hsla(var(--w), .4); }
:root[data-theme="dark"] .turn-assistant li.task .tick { background: transparent; }

/* ==========================================================================
   2026-10-09 late: the rail's bottom-left corner (Myrlin Glass, Settings,
   Phone), the API key tag, and the prompt pin over the conversation. Same
   frosted pearl as the composer; no left stripes, no dot in a pill.
   ========================================================================== */

/* "API key" beside a name, wherever an account shows: peach, because a key bills per token. */
.key-tag {
  display: inline-block; margin-left: 6px; padding: 2px 5px 1.5px; border-radius: 4px; vertical-align: 1px;
  font: 820 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase;
  color: var(--action-strong); background: var(--action-tint); border: 1px solid hsla(16, 62%, 54%, .22); white-space: nowrap;
}
.chip-btn .key-tag { margin-left: 5px; flex: none; }
/* A long account name gives way first; the API key tag always shows. */
.chip-btn.billing .bn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* The Glass card. */
.glass-card {
  margin: 10px 10px 0; padding: 7px 4px 4px; border-radius: 12px;
  background: linear-gradient(120deg, hsla(var(--pearl-stop-blue), .08), hsla(var(--pearl-stop-purple), .06) 50%, hsla(var(--pearl-stop-cyan), .07)), hsla(var(--w), .58);
  -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid hsla(var(--w), .8);
  /* A defined edge with a tight lift, not a hairline plus a wide halo (2026-10-12, Impeccable thin-border-wide-shadow). */
  box-shadow: 0 0 0 1px hsla(232, 40%, 78%, .28), 0 4px 10px -6px rgba(var(--shadow-rgb), .4);
}
.glass-card[hidden] { display: none; }
.gc-head { display: flex; align-items: baseline; gap: 8px; padding: 0 10px 3px; }
.gc-head .gl { font: var(--heavy) var(--fs-micro)/1 var(--font-display); font-stretch: var(--wide); letter-spacing: .12em; text-transform: uppercase; color: var(--brand-strong); }
.gc-sub { margin-left: auto; font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); }
.gc-off { padding: 2px 10px 6px; font-size: var(--fs-micro); color: var(--soft); }
.gc-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-rows: auto 3px; column-gap: 8px; row-gap: 5px; align-items: center;
  width: 100%; padding: 6px 10px 7px; border: 0; border-radius: 9px; background: none; cursor: pointer; text-align: left; color: var(--ink);
  transition: background var(--dur-fast) var(--ease-hover);
}
.gc-row:hover { background: hsla(232, 60%, 62%, .08); }
.gc-row:active { transform: scale(.995); }
.gc-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.gc-prov { font: 800 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.gc-name { min-width: 0; display: flex; align-items: baseline; overflow: hidden; white-space: nowrap; }
.gc-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 720; font-size: var(--fs-small); color: var(--ink-deep); }
.gc-none { color: var(--faint); font-weight: 520; }
.gc-plan { flex: none; margin-left: 6px; font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); }
.gc-left { font: 600 var(--fs-micro) var(--font-mono); color: var(--brand-deep); white-space: nowrap; }
.gc-meter { grid-column: 2 / 4; height: 3px; border-radius: 2px; background: hsla(232, 40%, 60%, .14); overflow: hidden; }
/* The fill is a scaleX of the full bar (--v, 0 to 1), so a usage change moves on the compositor, not through layout. */
.gc-meter i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--send-a), var(--send-b)); transform: scaleX(var(--v, 0)); transform-origin: left center; transition: transform 400ms var(--ease-out); }
.gc-row.low .gc-meter i { background: linear-gradient(90deg, var(--action), var(--action-strong)); }
.gc-row.low .gc-left, .gc-row.warn .gc-left { color: var(--action-strong); }
.gc-row.busy .gc-left { color: var(--faint); font-weight: 500; }
.gc-row.busy .gc-meter i { animation: gc-busy 1s var(--ease-hover) infinite alternate; }
@keyframes gc-busy { from { transform: translateX(-35%) scaleX(.35); } to { transform: translateX(100%) scaleX(.35); } }
.gc-row.flash { animation: glass-flash 1.2s var(--ease-out); }

/* The foot row: the index line, then the Phone and Settings icons. */
.foot-row { gap: 6px; padding: 8px 10px 10px 18px; }
.foot-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 28px; min-width: 28px; padding: 0 6px;
  border: 1px solid transparent; border-radius: 8px; background: none; color: var(--soft); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover), border-color var(--dur-fast) var(--ease-hover);
}
.foot-icon:hover { background: hsla(232, 60%, 62%, .1); color: var(--brand-deep); }
.foot-icon:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.foot-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.foot-icon svg.i24 { stroke-width: 1.9; }
/* Phone: an outline when off; brand ink when phone access is on; filled, ringed and saying so when a phone is connected. */
.foot-icon.phone-btn { border: 1px solid transparent; font: 800 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .08em; text-transform: uppercase; }
.foot-icon.phone-btn > span:not(.ph-n) { display: none; }
.foot-icon.phone-btn .ph-glyph .ph-body { fill: none; }
.foot-icon.phone-btn .ph-glyph .ph-screen { fill: none; stroke-width: 1.1; opacity: .7; }
.foot-icon.phone-btn.on { color: var(--brand-strong); }
.foot-icon.phone-btn.on .ph-glyph .ph-screen { fill: hsla(232, 60%, 62%, .22); opacity: 1; }
.foot-icon.phone-btn.live { color: #fff; background: linear-gradient(135deg, var(--send-a), var(--send-b)); box-shadow: 0 0 0 3px hsla(256, 60%, 62%, .18), 0 6px 14px -8px rgba(90, 63, 176, .7); padding: 0 9px 0 7px; }
.foot-icon.phone-btn.live .ph-glyph .ph-body { fill: hsla(0, 0%, 100%, .16); }
.foot-icon.phone-btn.live .ph-glyph .ph-screen { fill: var(--peach-glow, #F6B895); stroke: none; opacity: 1; }
.foot-icon.phone-btn.live::after { content: 'Connected'; }
.foot-icon.phone-btn.live .ph-n { color: #fff; }

/* Menus: an account Glass cannot use is listed, dimmed, with why on hover. */
.menu { max-height: calc(100vh - 16px); overflow-y: auto; scrollbar-width: thin; }
.menu-item.disabled { opacity: .48; cursor: default; }
.menu-item.disabled:hover { background: none; }
.menu-item .key-tag { flex: none; }

/* The prompt pin: your message for what you are reading, over the top of the conversation. */
.pane > .prompt-pin { grid-row: 2; grid-column: 1; align-self: start; z-index: 3; pointer-events: none; padding: 10px 26px 0; }
.prompt-pin[hidden] { display: none; }
.pin-card {
  pointer-events: auto; display: block; width: 100%; max-width: 828px; margin: 0 auto; padding: 8px 14px 9px; text-align: left; cursor: pointer; color: var(--ink);
  border-radius: 12px; border: 1px solid hsla(var(--w), .8);
  background: linear-gradient(120deg, hsla(var(--pearl-stop-blue), .1), hsla(var(--pearl-stop-purple), .07) 50%, hsla(var(--pearl-stop-cyan), .08)), hsla(var(--w), .66);
  -webkit-backdrop-filter: blur(16px) saturate(1.7); backdrop-filter: blur(16px) saturate(1.7);
  box-shadow: 0 0 0 1px hsla(232, 40%, 78%, .3), 0 12px 30px -18px rgba(var(--shadow-rgb), .55);
  animation: pin-in var(--dur-fast) var(--ease-out);
  transition: box-shadow var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-hover);
}
.pin-card:hover { box-shadow: 0 0 0 1px hsla(var(--pearl-stop-blue), .38), 0 14px 32px -18px rgba(var(--shadow-rgb), .6); }
.pin-card:active { transform: scale(.996); }
.pin-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@keyframes pin-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pin-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.pin-who { font: 820 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-strong); }
.pin-n { font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); }
/* "N of M" opens the list of all your prompts (2026-10-12). */
button.pin-n { margin: -2px -5px; padding: 2px 5px; border: 0; border-radius: 6px; background: none; cursor: pointer; transition: background-color var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover); }
button.pin-n:hover { background: hsla(var(--pearl-stop-blue), .14); color: var(--brand-deep); }
button.pin-n:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.pin-go { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font: 650 var(--fs-micro) var(--font-body); color: var(--soft); opacity: .8; transition: opacity var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover); }
.pin-card:hover .pin-go { opacity: 1; color: var(--brand-deep); }
.pin-go svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pin-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-small); line-height: 1.45; font-weight: 520; color: var(--ink-deep); white-space: pre-wrap; word-break: break-word; }
.turn-user.pin-arrive { animation: pin-arrive 1.3s var(--ease-out); }
@keyframes pin-arrive { 0% { box-shadow: 0 0 0 0 hsla(var(--pearl-stop-blue), 0); } 20% { box-shadow: 0 0 0 4px hsla(var(--pearl-stop-blue), .22); } 100% { box-shadow: 0 0 0 0 hsla(var(--pearl-stop-blue), 0); } }
@container pane (max-width: 470px) { .pane > .prompt-pin { padding: 8px 12px 0; } .pin-go { font-size: 0; gap: 0; } }

/* Settings. */
.sheet:has(.settings) { width: min(560px, calc(100vw - 48px)); }
.settings h2 { margin-bottom: 10px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 13px 0; border-top: 1px solid var(--hairline); }
.set-row:first-of-type { border-top: 0; }
.set-row.set-info { grid-template-columns: 1fr; }
/* A row whose choice has long labels (Auto-compact at): the control sits under the text instead of squeezing it. */
.set-row.set-stack { grid-template-columns: 1fr; gap: 10px; align-items: start; }
.set-row.set-stack .seg { justify-self: start; }
.set-t b { display: block; font: 760 var(--fs-small)/1.3 var(--font-display); font-stretch: 110%; color: var(--ink-deep); }
.set-t small { display: block; margin-top: 3px; font-size: var(--fs-small); line-height: 1.45; color: var(--soft); }
.set-index { font-family: var(--font-mono); font-size: var(--fs-micro) !important; }
.set-warn { margin-top: 6px; font-size: var(--fs-small); color: var(--action-strong); }
.set-sub { margin-top: 5px; font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); }
.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 9px; background: hsla(232, 40%, 60%, .1); border: 1px solid var(--hairline); white-space: nowrap; }
.seg button {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border: 0; border-radius: 7px; background: none; cursor: pointer;
  font: 650 var(--fs-small)/1 var(--font-body); color: var(--soft); transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.seg button:hover { color: var(--brand-deep); }
.seg button.on { background: hsl(var(--w)); color: var(--brand-deep); font-weight: 780; box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .14), 0 0 0 1px var(--hairline-strong); }
.seg button svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.seg button .i-fill { fill: currentColor; stroke: none; }

:root[data-theme="dark"] .glass-card, :root[data-theme="dark"] .pin-card {
  border-color: hsla(0, 0%, 100%, .08);
  box-shadow: 0 0 0 1px hsla(0, 0%, 0%, .3), 0 14px 32px -18px rgba(0, 0, 0, .7);
}
:root[data-theme="dark"] .key-tag { border-color: hsla(16, 70%, 60%, .3); }
:root[data-theme="dark"] .seg button.on { background: var(--tint-deep); box-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
@media (prefers-reduced-motion: reduce) {
  .pin-card, .turn-user.pin-arrive, .gc-row.flash, .gc-row.busy .gc-meter i { animation: none; }
  .gc-meter i { transition: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .glass-card, .pin-card { background: hsla(var(--w), .95); } }
/* ==========================================================================
   Phone access (Track B, 2026-10-09; Arthur: "scan this QR code" connects a
   phone to the Apaki on your PC). The Phone button joins the theme and ding
   switches in the footer; the index line moved to its own row above them.
   Connected shows as the phone glyph's screen lighting up and the words
   "Connected now": no dot, no pill. Peach is only the light running round
   the QR while it waits to be scanned.
   ========================================================================== */

/* A long unbroken word, path or session id no longer widens a pane past its
   frame (the pane's one grid column grew to fit it, pushing the close button
   and the text off the edge in narrow splits and on phones). */
.pane { grid-template-columns: minmax(0, 1fr); }
.transcript { overflow-wrap: break-word; }

.index-line { padding: 8px 18px 0; font-size: var(--fs-micro); line-height: 1.35; color: var(--faint); font-weight: 520; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.foot-row { gap: 6px; }
.phone-btn {
  flex: none; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  background: var(--ground); padding: 3px 9px 3px 6px; font-size: var(--fs-micro); cursor: pointer; color: var(--soft); font-weight: 650;
  transition: border-color var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.phone-btn:hover { border-color: var(--brand); color: var(--brand-deep); }
.phone-btn.on { color: var(--brand-deep); }
.phone-btn.live { color: var(--brand-deep); font-weight: 860; border-color: var(--brand-soft); }
.phone-btn .ph-n { font: 700 var(--fs-micro) var(--font-mono); color: var(--brand-strong); }
.ph-glyph { width: 13px; height: 13px; flex: none; overflow: visible; }
.ph-glyph .ph-body { fill: none; stroke: currentColor; stroke-width: 1.3; }
.ph-glyph .ph-screen { fill: hsla(var(--w), 0); transition: fill var(--dur-fast) var(--ease-hover); }
.ph-glyph .ph-home { stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; }
.ph-glyph.lit .ph-screen { fill: var(--brand); }
.ph-glyph.lit .ph-body { stroke: var(--brand-strong); }

/* The sheet, wider than a question sheet while it shows the QR beside its text. */
.sheet.phone-mode { width: min(660px, calc(100vw - 48px)); padding: 0; overflow: hidden auto; }
.phone-sheet { padding: 22px 24px 18px; }
.ph-kicker { font: 900 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-strong); }
.ph-head h2 { margin: 8px 0 6px; font: 900 var(--fs-display)/1.15 var(--font-display); font-stretch: 125%; letter-spacing: -.016em; }
.ph-head p { margin: 0; color: var(--soft); font-size: var(--fs-small); line-height: 1.5; }

.ph-status {
  display: flex; align-items: center; gap: 14px; margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius);
  background: hsla(var(--w), .62); border: 1px solid var(--hairline);
}
.ph-status-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ph-state { font: 900 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .13em; text-transform: uppercase; color: var(--faint); }
.ph-status[data-state="online"] .ph-state { color: var(--good); }
.ph-status[data-state="connecting"] .ph-state { color: var(--brand-strong); }
.ph-status[data-state="offline"] .ph-state, .ph-status[data-state="error"] .ph-state, .ph-status[data-state="replaced"] .ph-state, .ph-status[data-state="unconfigured"] .ph-state { color: var(--action-strong); }
.ph-line { font-size: var(--fs-small); color: var(--soft); line-height: 1.45; }
.phone-sheet button { padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--hairline-strong); background: var(--ground); cursor: pointer; font-weight: 760; color: var(--ink); white-space: nowrap; transition: border-color var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover); }
.phone-sheet button:hover { border-color: var(--brand); }
.phone-sheet button:active { transform: scale(.98); }
.phone-sheet button.primary { background: var(--fill); border-color: var(--fill); color: #fff; }
.phone-sheet button.primary:hover { background: var(--fill-hover); border-color: var(--fill-hover); }
.ph-err { margin-top: 10px; font-size: var(--fs-small); font-weight: 650; color: var(--action-strong); }

.ph-start { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.ph-start span { font-size: var(--fs-small); color: var(--faint); line-height: 1.4; }
.ph-done { margin-top: 14px; font-size: var(--fs-small); color: var(--good); font-weight: 600; animation: rise var(--dur-sheet) var(--ease-out); }
.ph-done b { font-weight: 850; }

/* The QR: a white tile (scanners want dark on light, in both themes) inside a
   frame where one soft light of periwinkle and peach runs round the edge. */
.ph-qr-wrap { display: flex; gap: 22px; align-items: center; margin-top: 18px; animation: rise var(--dur-sheet) var(--ease-out); }
.ph-qr { position: relative; flex: none; width: 236px; height: 236px; padding: 3px; border-radius: 16px; overflow: hidden; isolation: isolate; background: var(--hairline); box-shadow: 0 14px 40px -24px rgba(var(--shadow-rgb), .6); }
.ph-qr::before {
  content: ""; position: absolute; inset: -40%; z-index: -1;
  background: conic-gradient(from 0deg, transparent 0 62%, var(--brand) 76%, var(--peach-glow) 86%, transparent 96%);
  animation: ph-spin 3.6s linear infinite;
}
.ph-qr svg { display: block; width: 100%; height: 100%; border-radius: 13px; background: #fff; }
@keyframes ph-spin { to { transform: rotate(360deg); } }
.ph-qr-side { min-width: 0; }
.ph-step { font: 860 var(--fs-title)/1.25 var(--font-display); font-stretch: 112%; letter-spacing: -.01em; color: var(--ink); }
.ph-step b { font-weight: 900; }
.ph-qr-side p, .ph-sas p { margin: 8px 0 0; font-size: var(--fs-small); color: var(--soft); line-height: 1.5; }
.ph-count { margin-top: 12px; font-size: var(--fs-small); color: var(--faint); font-weight: 600; }
.ph-count .mono { font-size: var(--fs-body); font-weight: 700; color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.ph-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

/* The approval: the phone's name, and the code both screens show, big. */
.ph-sas { margin-top: 18px; padding: 18px 18px 16px; border-radius: 14px; background: hsla(var(--w), .7); border: 1px solid var(--hairline-strong); box-shadow: 0 16px 44px -30px rgba(var(--shadow-rgb), .6); animation: rise var(--dur-sheet) var(--ease-out); }
.ph-code { display: flex; gap: 14px; margin: 12px 0 2px; font: 900 var(--fs-numeral)/1 var(--font-display); font-stretch: 125%; letter-spacing: .06em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ph-code span:last-child { color: var(--brand-deep); }

/* Paired phones. */
.ph-devices { margin-top: 20px; }
.ph-sec { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--hairline); font: 900 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-deep); }
.ph-sec-n { font: 600 var(--fs-micro)/1 var(--font-mono); letter-spacing: 0; color: var(--faint); }
.ph-devices ul { list-style: none; margin: 0; padding: 0; }
.ph-dev { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--hairline); }
.ph-dev .ph-glyph { width: 22px; height: 22px; color: var(--faint); }
.ph-dev.live .ph-glyph { color: var(--brand-strong); }
.ph-dev-t { flex: 1; min-width: 0; }
.ph-dev-n { font-weight: 780; font-size: var(--fs-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-dev-m { margin-top: 2px; font-size: var(--fs-small); color: var(--faint); font-weight: 540; }
.ph-live { font: 900 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .12em; text-transform: uppercase; color: var(--good); }
.phone-sheet .ph-remove { padding: 6px 11px; font-size: var(--fs-small); font-weight: 700; color: var(--soft); background: none; }
.phone-sheet .ph-remove.sure { color: var(--action-strong); border-color: var(--action); background: var(--action-tint); }
.ph-empty { margin: 10px 2px 0; font-size: var(--fs-small); color: var(--faint); }
.ph-foot { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.ph-keys { flex: 1; font-size: var(--fs-micro); color: var(--faint); line-height: 1.4; }

:root[data-theme="dark"] .ph-status { background: hsla(var(--w), .55); border-color: var(--hairline-strong); }
:root[data-theme="dark"] .ph-sas { background: hsla(var(--w), .6); }
:root[data-theme="dark"] .ph-qr { background: var(--hairline-strong); }

@media (prefers-reduced-motion: reduce) {
  .ph-qr::before { animation: none !important; }
}

/* The Phone button is an icon in the rail's corner (merge of the phone track
   with the corner, 2026-10-09): the track's bordered-button look gives way to
   .foot-icon; on, live and the count keep their meaning. */
.foot-icon.phone-btn { background: none; padding: 0 6px; border-radius: 8px; color: var(--soft); font-size: var(--fs-micro); }
.foot-icon.phone-btn:hover { background: hsla(232, 60%, 62%, .1); border-color: transparent; color: var(--brand-deep); }
.foot-icon.phone-btn.on { color: var(--brand-strong); }
.foot-icon.phone-btn.live { color: #fff; background: linear-gradient(135deg, var(--send-a), var(--send-b)); border-color: transparent; padding: 0 9px 0 7px; font-weight: 800; }
.foot-icon.phone-btn .ph-glyph { width: 16px; height: 16px; }
.foot-icon.phone-btn .ph-glyph.lit .ph-body { stroke: currentColor; }
.gc-row:disabled { cursor: default; }
.gc-row:disabled:hover { background: none; }
/* ==========================================================================
   Artifacts (2026-10-09, Arthur: like Codex's built-in artifacts, out of the
   box). Claude's show tool and caught "open this" commands land in a VIEWER
   pane beside the conversation (a pane like the others: grip, split,
   resize, close), and a compact CARD in the transcript where the call was.
   Surfaces are frosted on the pearl (hsla(var(--w), a)), periwinkle marks
   the kind, peach is only the light that moves while something is on its
   way (a pending card, a loading viewer). Works in both themes through the
   shared tokens. Motion: transform and opacity, off under reduced motion.
   ========================================================================== */

/* ---------- cards in the conversation ---------- */
.art-card {
  display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 10px 0 12px 18px; padding: 10px;
  background: hsla(var(--w), .82); border: 1px solid var(--hairline-strong); border-radius: 12px; cursor: pointer;
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 10px 28px -24px rgba(var(--shadow-rgb), .6);
  animation: rise var(--dur-fast) var(--ease-out);
  transition: border-color var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-out);
}
.art-card:hover { border-color: var(--brand); }
.art-card:active { transform: scale(.995); }
.art-card[data-state=pending], .art-card.err { cursor: default; }
.art-card[data-state=pending]:hover, .art-card.err:hover { border-color: var(--hairline-strong); }
.art-glyph {
  position: relative; overflow: hidden; display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 10px; background: var(--brand-wash); box-shadow: inset 0 0 0 1px hsla(232, 60%, 70%, .28);
}
.art-glyph svg { width: 19px; height: 19px; fill: none; stroke: var(--brand-strong); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.art-main { flex: 1; min-width: 0; }
.art-kicker { font: 900 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-title { margin-top: 5px; font: 820 var(--fs-body)/1.25 var(--font-display); font-stretch: 112%; letter-spacing: -.006em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-sub { margin-top: 3px; font-size: var(--fs-small); font-weight: 540; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-sub.mono { font-size: var(--fs-micro); }
.art-sub[hidden] { display: none; }
.art-open {
  flex: none; height: 30px; padding: 0 13px; border: 0; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--fill); color: #fff; font: 780 var(--fs-small)/1 var(--font-body); font-stretch: 106%;
  transition: background var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-out);
}
.art-open:hover { background: var(--fill-hover); }
.art-open:active { transform: scale(.97); }
.art-open[hidden] { display: none; }
.art-card.link .art-open { background: hsla(var(--w), .9); color: var(--brand-deep); box-shadow: inset 0 0 0 1px var(--hairline-strong); }
.art-card.link .art-open:hover { box-shadow: inset 0 0 0 1px var(--brand); }
.art-card.err .art-kicker { color: var(--action-strong); }
.art-card.err .art-glyph { background: var(--action-tint); box-shadow: inset 0 0 0 1px rgba(210, 100, 63, .25); }
.art-card.err .art-glyph svg { stroke: var(--action-strong); }
.art-card.err .art-sub { white-space: normal; }
/* On its way: peach light passes over the glyph. */
.art-card[data-state=pending] .art-glyph::after, .art-loading::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 25%, rgba(var(--peach), .55) 50%, transparent 75%);
  transform: translateX(-100%); animation: art-shine 1.25s var(--ease-hover) infinite;
}
@keyframes art-shine { to { transform: translateX(100%); } }
/* A shell command Apaki caught: it worked, it just opened here. */
.tool.caught .dot { color: var(--brand-strong); }
.tool.caught .sum { color: var(--soft); }

/* ---------- the viewer pane ---------- */
/* One column that may shrink below its content, so a wide image never pushes the header buttons out. */
.pane.viewer { grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); }
.pane.viewer .pane-bar { gap: 6px; }
.pane.viewer .icon-btn { width: 30px; height: 30px; flex: none; }
.pane.viewer .icon-btn svg { width: 15px; height: 15px; }
.art-badge { display: inline-flex; align-items: center; gap: 5px; flex: none; font: 900 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-strong); }
.art-badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.art-meta { flex: 1; min-width: 0; }
.art-revs { display: flex; align-items: center; flex: none; }
.art-revs[hidden] { display: none; }
.art-revs .rev-n { min-width: 72px; text-align: center; font-size: var(--fs-micro); font-weight: 650; color: var(--soft); }
.art-revs.old .rev-n { color: var(--action-strong); }
.art-revs .icon-btn:disabled { opacity: .3; }

.art-ground { display: flex; flex-direction: column; overflow: hidden; }
.art-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: auto; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.art-body:hover { scrollbar-color: hsla(232, 18%, 55%, .38) transparent; }
/* Pages and PDFs sit on the pearl as a sheet of paper. */
.art-body.k-html, .art-body.k-pdf { overflow: hidden; padding: 10px; }
.art-frame {
  flex: 1; width: 100%; min-height: 0; border: 0; display: block; border-radius: 10px;
  background: #fff; color-scheme: light;
  box-shadow: 0 0 0 1px var(--hairline-strong), 0 14px 34px -26px rgba(var(--shadow-rgb), .65);
}
/* Images and SVG: fit to the pane; click for actual pixels. */
.art-figure {
  flex: 1; min-height: 0; min-width: 0; margin: 10px; padding: 14px; display: flex; align-items: center; justify-content: center;
  overflow: auto; border-radius: 10px; cursor: zoom-in;
  background: repeating-conic-gradient(hsla(var(--w), .92) 0 25%, hsla(var(--w), .62) 0 50%) 0 0 / 18px 18px;
  box-shadow: 0 0 0 1px var(--hairline);
}
.art-figure img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 12px 32px -24px rgba(var(--shadow-rgb), .7); }
.art-figure.actual { cursor: zoom-out; display: block; }
.art-figure.actual img { max-width: none; max-height: none; }
/* Markdown: the app's own renderer, as a frosted page. */
.art-body.k-markdown { padding: 12px; }
.art-doc.turn-assistant {
  width: 100%; max-width: 860px; margin: 0 auto; padding: 30px 36px 44px;
  background: hsla(var(--w), .86); border: 1px solid var(--hairline); border-radius: 12px;
  box-shadow: 0 14px 34px -28px rgba(var(--shadow-rgb), .6);
}
.art-doc.turn-assistant::before { display: none; }
.art-doc h1 { font-size: var(--fs-hero); font-weight: 900; font-stretch: 125%; letter-spacing: -.02em; line-height: 1.15; margin: 4px 0 14px; }
.art-doc h2 { font-size: var(--fs-title); font-weight: 880; font-stretch: 120%; letter-spacing: -.012em; margin: 26px 0 8px; }
.art-doc h3 { font-size: var(--fs-body); margin: 20px 0 6px; }
.art-doc p, .art-doc li { line-height: 1.6; }
/* Code and other text files. */
.art-code {
  margin: 12px; padding: 16px 18px; flex: none; min-height: calc(100% - 24px); white-space: pre; overflow: auto; tab-size: 4;
  font: 500 var(--fs-small)/1.6 var(--font-mono); color: var(--ink);
  background: hsla(var(--w), .88); border: 1px solid var(--hairline); border-radius: 12px;
}
/* Loading: a skeleton sheet with the peach light passing over it. */
.art-loading { position: relative; overflow: hidden; flex: 1; margin: 10px; border-radius: 10px; background: hsla(var(--w), .55); box-shadow: 0 0 0 1px var(--hairline); }
.art-loading i { display: none; }
.art-missing { max-width: 440px; margin: 14vh auto 0; padding: 0 20px; text-align: center; color: var(--soft); }
.art-missing p { margin: 10px 0 0; }

@container pane (max-width: 520px) {
  .art-revs .rev-n { min-width: 0; padding: 0 2px; }
  .pane.viewer .outside { display: none; }
  .art-body.k-html, .art-body.k-pdf { padding: 6px; }
  .art-doc.turn-assistant { padding: 20px 18px 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .art-card[data-state=pending] .art-glyph::after, .art-loading::after { animation: none !important; opacity: 0; }
}

:root[data-theme="dark"] .art-glyph { box-shadow: inset 0 0 0 1px hsla(232, 50%, 62%, .3); }
:root[data-theme="dark"] .art-card { box-shadow: 0 10px 28px -22px rgba(0, 0, 0, .8); }
:root[data-theme="dark"] .art-card.err .art-glyph { box-shadow: inset 0 0 0 1px rgba(238, 138, 99, .3); }
:root[data-theme="dark"] .art-frame { box-shadow: 0 0 0 1px var(--hairline-strong), 0 14px 34px -22px rgba(0, 0, 0, .8); }

/* The conversation's artifacts, beside the grip (2026-10-09): quiet while
   every one is open, in brand ink when one is closed and waits to reopen. */
.pane-bar .art-reopen { display: inline-flex; align-items: center; gap: 3px; width: auto; min-width: 30px; height: 30px; padding: 0 6px; flex: none; transition: background var(--dur-fast) var(--ease-hover); }
.pane-bar .art-reopen[hidden] { display: none; }
.pane-bar .art-reopen svg { width: 15px; height: 15px; }
.pane-bar .art-reopen .ar-n { font: 700 var(--fs-micro) var(--font-mono); color: var(--faint); }
.pane-bar .art-reopen.lit { background: hsla(232, 60%, 62%, .1); }
.pane-bar .art-reopen.lit svg { stroke: var(--brand-strong); }
.pane-bar .art-reopen.lit .ar-n { color: var(--brand-strong); }
.pane-bar .art-reopen.lit:hover { background: hsla(232, 60%, 62%, .17); }
.pane-bar .art-reopen:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.menu-item .ar-g { display: inline-grid; place-items: center; width: 18px; margin-right: 6px; flex: none; }
.menu-item .ar-g svg { width: 14px; height: 14px; fill: none; stroke: var(--brand-strong); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* The working line takes no room in the composer's layout (2026-10-09 night;
   Impeccable flagged its height and margin transitions). Showing it used to
   grow the floating composer frame by frame, and through --composer-h every
   frame re-laid out the whole transcript. Now it floats 10px above the box
   (or the queue tray) and comes in with opacity and a small lift only; the
   transcript makes room for it in one step while it shows. */
.composer-wrap > .status-line {
  position: absolute; left: 22px; right: 22px; bottom: calc(100% + 10px); margin: 0 auto; height: 30px;
  transform: translateY(4px); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.composer-wrap > .status-line.on { margin: 0 auto; transform: none; }
.pane:has(.status-line.on) .transcript { padding-bottom: calc(var(--composer-h, 150px) + 58px); }
@container pane (max-width: 760px) { .composer-wrap > .status-line { left: 10px; right: 10px; } }
@media (prefers-reduced-motion: reduce) { .composer-wrap > .status-line { transform: none; transition: opacity var(--dur-fast) linear; } }

/* ==========================================================================
   2026-10-09 night: keep-warm border, the tab sweep, renaming, the live list,
   the empty grid, the working line's dots, and message times on hover.
   ========================================================================== */

/* A working tab's sweep runs left to right and back, instead of jumping back to the start. */
.tab.busy::after { animation: sweep 1.6s var(--ease-hover) infinite alternate; }

/* Keep-warm is holding this session's prompt cache: a slow ring of light runs
   round its row and its tab, periwinkle with a peach tail. Painted only
   (a custom angle on a conic gradient, masked to the edge). */
@property --warm-a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.sessions li.warm { position: relative; }
.warm-ring {
  position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--warm-a), transparent 0deg, hsla(var(--pearl-stop-blue), .55) 60deg, var(--brand) 120deg, var(--peach-glow) 165deg, transparent 220deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: warm-spin 7s linear infinite;
}
.tab .warm-ring { inset: 0; padding: 1.25px; }
@keyframes warm-spin { to { --warm-a: 360deg; } }

/* The same ring, turned on the compositor (2026-10-12, input lag). Animating the conic gradient's angle repainted
   every ring on the main thread at 60 fps, and Arthur keeps about 19 sessions warm: the main thread was busy nearly
   all the time, so a key press waited for a paint. The ring is now a static mask with a larger conic layer inside it
   that only rotates (a transform: no main-thread work). The picture is the same ring; the old rules above stay as the fallback. */
.warm-ring { background: none; animation: none; overflow: hidden; }
.warm-ring::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: calc(100% + 40px); aspect-ratio: 1; pointer-events: none;
  background: conic-gradient(transparent 0deg, hsla(var(--pearl-stop-blue), .55) 60deg, var(--brand) 120deg, var(--peach-glow) 165deg, transparent 220deg, transparent 360deg);
  transform: translate(-50%, -50%) rotate(0deg); animation: warm-turn 7s linear infinite; will-change: transform;
}
@keyframes warm-turn { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .warm-ring::before { display: none; } }
/* 30 moves a second is as smooth as the eye needs for a slow ring, and half the frames to produce. */
.warm-ring::before { animation-timing-function: steps(210, end); }

/* The effort grid's ripple, as one moving band (2026-10-12, input lag). Fifteen dots each animated on their own, and
   every pane at max effort carries a grid that never stops (plus one per working pane), so a window with six panes
   moved a couple of hundred layers every frame, and the dots' background colour kept it on the main thread as well.
   Now the dots hold still, a peach band sweeps across them diagonally and the grid is masked to its own dots, so the
   band shows only on them: two layers per grid, a transform only, 20 moves a second. The dots rest at the middle of
   the old pulse (the old keyframes swung between .45 and 1). */
.egrid { position: relative; }
.egrid.max i.lit, .egrid.live i { opacity: .66; animation: none; }
.egrid.max, .egrid.live {
  -webkit-mask: linear-gradient(90deg, #000 3px, transparent 3px) 0 0 / 5px 100% repeat-x, linear-gradient(180deg, #000 3px, transparent 3px) 0 0 / 100% 5px repeat-y;
  -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, #000 3px, transparent 3px) 0 0 / 5px 100% repeat-x, linear-gradient(180deg, #000 3px, transparent 3px) 0 0 / 100% 5px repeat-y;
  mask-composite: intersect;
}
.egrid.max::after, .egrid.live::after {
  content: ""; position: absolute; top: -2px; bottom: -2px; left: 0; width: 14px; pointer-events: none;
  background: linear-gradient(100deg, transparent, var(--peach-glow) 50%, transparent);
  transform: translateX(-14px); animation: egrid-wave var(--dur-grid) steps(14, end) infinite; will-change: transform;
}
@keyframes egrid-wave { 0% { transform: translateX(-14px); } 45%, 100% { transform: translateX(24px); } }

/* A working tab's sweep, compositor only: the bar was a background-position animation (main thread, every frame).
   A moving child inside a clipping track does the same sweep with a transform (tab-sweep, app.js renderTabs). */
.tab.busy::after { content: none; animation: none; }
.tab-sweep { display: none; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; overflow: hidden; pointer-events: none; }
.tab.busy .tab-sweep { display: block; }
.tab-sweep i {
  position: absolute; top: 0; bottom: 0; left: 0; width: 50%;
  background: linear-gradient(90deg, transparent, var(--brand), var(--peach-glow), transparent);
  transform: translateX(-60%); animation: tab-sweep 1.6s var(--ease-hover) infinite alternate; will-change: transform;
}
@keyframes tab-sweep { from { transform: translateX(-60%); } to { transform: translateX(160%); } }
@media (prefers-reduced-motion: reduce) { .tab-sweep { display: none !important; } }

/* Rest (rest.js, 2026-10-12): while the window is hidden or not focused, every decorative loop is paused. */
html.rest *, html.rest *::before, html.rest *::after { animation-play-state: paused !important; }

/* The live list. */
.sessions .headless { color: var(--soft); font-weight: 600; letter-spacing: .02em; }
.sec-refresh { display: grid; place-items: center; width: 22px; height: 22px; margin-left: -2px; border: 0; border-radius: 6px; background: none; cursor: pointer; flex: none; }
.sec-refresh:hover { background: var(--tint-deep); }
.sec-refresh svg { width: 12px; height: 12px; fill: none; stroke: var(--soft); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sec-refresh.spin svg { animation: refresh-spin 600ms var(--ease-out); }
@keyframes refresh-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Renaming in place: a tab's name, a pane's title or a rail row. */
input.rename {
  width: 100%; min-width: 120px; margin: 0; padding: 1px 6px; border: 1px solid var(--brand); border-radius: 6px; outline: none;
  font: inherit; font-stretch: inherit; letter-spacing: inherit; color: var(--ink-deep); background: hsl(var(--w));
  box-shadow: 0 0 0 3px hsla(var(--pearl-stop-blue), .14);
}
.pane-bar .title { cursor: text; }
.tab-t { cursor: default; }

/* The empty conversation's grid: periwinkle, slow and out of step, with two cells (about 5%) in peach. */
.empty-grid.rand i { background: var(--brand-soft); filter: none; animation: grid-breathe 9s ease-in-out infinite; animation-delay: var(--d, 0s); }
.empty-grid.rand i.pk { background: var(--peach-glow); }
@keyframes grid-breathe { 0%, 100% { opacity: .16; } 50% { opacity: .62; } }

/* The working line: the phase, then three dots that rise and fade in turn. */
.status .ph { color: var(--brand-deep); font-weight: 650; }
.status .dots { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 1em; margin: 0 4px 0 4px; vertical-align: -1px; }
.status .dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--brand-strong); opacity: .25; }
/* The waving dots are gone (2026-10-12: Arthur bans dot indicators in any form, and Impeccable flags pulsing dots):
   the changing thinking word and the running seconds already say Claude is working. */
.status .dots { display: none; }
.status .dots i:nth-child(2) { animation-delay: .16s; }
.status .dots i:nth-child(3) { animation-delay: .32s; }
@keyframes dot-wave { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2.5px); } }

/* When a message was written, faint, on hover: above-right of your message,
   below-right of Claude's, in the space between messages. */
.turn-user { position: relative; }
/* Chunks of older messages (pane.js sealOld, 2026-10-12, input lag). The pane measures a chunk before it turns
   skipping on, and gives it that height, so the page is the same height whether a chunk is drawn or skipped. A chunk
   keeps its children's margins inside it (they no longer collapse into the next block), so its foot gets room for the
   hover time of the last message and a negative margin that takes the doubled gap back. */
.chunk { contain: layout style; padding-bottom: 8px; margin-bottom: -18px; }
.chunk.cv { content-visibility: auto; }
.turn-user[data-ts]::after, .turn-assistant[data-ts]::after {
  content: attr(data-ts); position: absolute; right: 4px; pointer-events: none; white-space: nowrap;
  font: 500 var(--fs-micro)/1 var(--font-mono); letter-spacing: .01em; color: var(--faint);
  opacity: 0; transform: translateY(2px); transition: opacity var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-hover);
}
.turn-user[data-ts]::after { bottom: calc(100% + 6px); }
.turn-assistant[data-ts]::after { top: calc(100% + 4px); }
.turn-user:hover::after, .turn-assistant:hover::after { opacity: .85; transform: none; }
.turn-assistant.streaming::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  .warm-ring { animation: none; --warm-a: 200deg; }
  .tab.busy::after, .empty-grid.rand i, .status .dots i, .sec-refresh.spin svg { animation: none; }
  .status .dots i { opacity: .6; }
}

/* ==========================================================================
   2026-10-10: subagents, shells, monitors (tasks.js). The Tasks button and
   popover, the task viewer, Open on tool lines, and the rail's subagent lists.
   ========================================================================== */

/* The Tasks button in a conversation's bar: quiet with the session's subagent count, brand ink while some run. */
.tasks-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 8px; flex: none; border: 1px solid transparent; border-radius: 8px;
  background: none; color: var(--soft); cursor: pointer; font: 700 var(--fs-micro)/1 var(--font-mono);
  transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.tasks-btn[hidden] { display: none; }
.tasks-btn:hover { background: var(--tint); color: var(--brand-deep); }
.tasks-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.tasks-btn.lit { color: var(--brand-strong); background: hsla(232, 60%, 62%, .1); border-color: hsla(232, 60%, 62%, .22); }
.tasks-btn.lit .tb-n::after { content: ' running'; font-weight: 600; }

/* Open on a tool line that started a subagent or a background shell. */
.tool summary .tool-open {
  margin-left: 8px; padding: 1px 8px; border: 1px solid var(--hairline-strong); border-radius: 6px; background: hsl(var(--w)); cursor: pointer;
  font: 650 var(--fs-micro)/1.5 var(--font-body); color: var(--brand-deep); vertical-align: 1px;
  transition: border-color var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover);
}
.tool summary .tool-open:hover { border-color: var(--brand); background: var(--brand-wash); }
.tool summary .tool-open.running { border-color: hsla(var(--pearl-stop-blue), .45); }

/* The Tasks popover. */
.task-panel {
  position: fixed; z-index: 22; display: flex; flex-direction: column; overflow: hidden; border-radius: 14px;
  background: linear-gradient(120deg, hsla(var(--pearl-stop-blue), .07), hsla(var(--pearl-stop-purple), .05) 50%, hsla(var(--pearl-stop-cyan), .06)), hsla(var(--w), .92);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid hsla(var(--w), .85); box-shadow: 0 0 0 1px hsla(232, 40%, 78%, .3), 0 18px 44px -20px rgba(var(--shadow-rgb), .55);
  animation: menu-in var(--dur-fast) var(--ease-out); transform-origin: top right;
}
.task-panel.out { animation: menu-out var(--dur-exit) var(--ease-hover) forwards; }
.tp-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 14px 8px; border-bottom: 1px solid var(--hairline); }
.tp-h { font: var(--heavy) var(--fs-micro)/1 var(--font-display); font-stretch: var(--wide); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-deep); }
.tp-n { margin-left: auto; font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); }
.tp-body { overflow-y: auto; padding: 4px 6px 8px; scrollbar-width: thin; }
.tp-sec { padding: 10px 8px 4px; font: 820 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.tp-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 8px 8px; border-radius: 10px; cursor: pointer; transition: background var(--dur-fast) var(--ease-hover); }
.tp-row:hover { background: hsla(232, 60%, 62%, .08); }
.tp-g { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: hsla(232, 60%, 62%, .1); }
.tp-g svg, .sub-g svg, .subs-n svg { width: 13px; height: 13px; fill: none; stroke: var(--brand-strong); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.tp-row.running .tp-g { background: linear-gradient(135deg, var(--send-a), var(--send-b)); }
.tp-row.running .tp-g svg { stroke: #fff; }
.tp-t { font-weight: 700; font-size: var(--fs-small); color: var(--ink-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-m { margin-top: 2px; font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-row.running .tp-m { color: var(--brand-strong); }
.tp-s { margin-top: 3px; font-size: var(--fs-small); font-style: italic; color: var(--soft); }
.tp-act { display: flex; gap: 4px; align-items: center; opacity: .55; transition: opacity var(--dur-fast) var(--ease-hover); }
.tp-row:hover .tp-act { opacity: 1; }
.tp-act button { height: 24px; padding: 0 8px; border: 1px solid var(--hairline-strong); border-radius: 6px; background: hsl(var(--w)); cursor: pointer; font: 650 var(--fs-micro)/1 var(--font-body); color: var(--brand-deep); }
.tp-act button:hover { border-color: var(--brand); }
.tp-act button.danger { color: var(--action-strong); }
.tp-act button.danger:hover { border-color: var(--action); background: var(--action-tint); }
.tp-act button.icon { display: grid; place-items: center; width: 24px; padding: 0; }
.tp-act button.icon svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.tp-act button:disabled { opacity: .5; cursor: default; }
.tp-empty, .tp-wait { margin: 10px 10px 6px; font-size: var(--fs-small); color: var(--faint); }

/* The task viewer. */
.task-viewer .tk-stop { flex: none; height: 28px; padding: 0 12px; border: 1px solid var(--action); border-radius: 8px; background: var(--action-tint); color: var(--action-strong); cursor: pointer; font: 700 var(--fs-small)/1 var(--font-body); }
.task-viewer .tk-stop[hidden] { display: none; }
.task-viewer .tk-stop:disabled { opacity: .6; cursor: default; }
.task-viewer.running .tk-badge { color: var(--brand-strong); }
.task-viewer .tk-body { padding-bottom: 28px; }
.tk-prompt { margin: 6px 0 14px; padding: 10px 14px 12px; border-radius: var(--radius); border: 1px solid var(--hairline); background: hsla(var(--w), .7); }
.tk-prompt-h { margin-bottom: 4px; font: 820 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-strong); }
.tk-prompt-t { white-space: pre-wrap; word-break: break-word; font-size: var(--fs-small); color: var(--ink); }
.tk-prompt.long .tk-prompt-t { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 65%, transparent); mask-image: linear-gradient(#000 65%, transparent); }
.tk-prompt.long.open .tk-prompt-t { max-height: none; -webkit-mask-image: none; mask-image: none; }
.tk-more { margin-top: 6px; padding: 0; border: 0; background: none; cursor: pointer; font: 650 var(--fs-small) var(--font-body); color: var(--brand-strong); }
.tk-out { margin: 0; padding: 14px 16px; border-radius: 10px; background: #1B1934; color: #E4E6FA; font: var(--fs-small)/1.5 var(--font-mono); white-space: pre-wrap; word-break: break-word; min-height: 60px; }
:root[data-theme="dark"] .tk-out { background: #0D0C1A; border: 1px solid var(--hairline); }
.tk-cut, .tk-empty { font-size: var(--fs-small); color: var(--faint); margin: 4px 2px 10px; }

/* The rail: a session's subagent count, and the list under it. */
.subs-n {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 2px 8px 2px 6px; border: 1px solid var(--hairline); border-radius: 7px;
  background: hsla(var(--w), .6); cursor: pointer; font: 650 var(--fs-micro)/1.5 var(--font-body); color: var(--brand-deep);
  transition: border-color var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover);
}
.subs-n:hover { border-color: var(--brand-soft); background: var(--brand-wash); }
.subs-n .chev { width: 10px; height: 10px; stroke: var(--soft); transition: transform var(--dur-fast) var(--ease-out); }
.subs-n.open .chev { transform: rotate(90deg); }
.sessions li.sub-row { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; margin: 0 0 2px 14px; padding: 6px 9px; border-radius: 8px; }
.sessions li.sub-row.note { display: block; font-size: var(--fs-small); color: var(--faint); cursor: default; }
.sub-g { display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; }
.sub-t { font-weight: 650; font-size: var(--fs-small); color: var(--ink-deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub-m { font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sessions li.sub-row.running .sub-m { color: var(--brand-strong); }
.sessions li.sub-row.running .sub-g svg { stroke: var(--brand); }

:root[data-theme="dark"] .task-panel { background: linear-gradient(120deg, hsla(var(--pearl-stop-blue), .06), hsla(var(--pearl-stop-purple), .05) 50%, hsla(var(--pearl-stop-cyan), .05)), hsla(var(--w), .94); border-color: hsla(0, 0%, 100%, .08); box-shadow: 0 18px 44px -18px rgba(0, 0, 0, .75); }
:root[data-theme="dark"] .tool summary .tool-open, :root[data-theme="dark"] .tp-act button { background: var(--tint); }

/* ---------- Ctrl+F in a pane (find.js, 2026-10-10) ---------- */
.pane > .find-bar {
  grid-row: 2; grid-column: 1; align-self: start; justify-self: end; z-index: 6; margin: 10px 16px 0 0;
  display: grid; grid-template-columns: auto minmax(120px, 220px) auto auto auto auto auto; align-items: center; gap: 4px; padding: 5px 6px 5px 10px;
  border-radius: 12px; border: 1px solid hsla(var(--w), .85);
  background: linear-gradient(120deg, hsla(var(--pearl-stop-blue), .09), hsla(var(--pearl-stop-purple), .06) 50%, hsla(var(--pearl-stop-cyan), .07)), hsla(var(--w), .86);
  -webkit-backdrop-filter: blur(16px) saturate(1.6); backdrop-filter: blur(16px) saturate(1.6);
  box-shadow: 0 0 0 1px hsla(232, 40%, 78%, .32), 0 12px 30px -16px rgba(var(--shadow-rgb), .55);
  animation: pin-in var(--dur-fast) var(--ease-out);
}
.find-bar .fb-i svg, .find-bar button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.find-bar .fb-i { display: grid; place-items: center; color: var(--brand-strong); }
.find-bar input { min-width: 0; height: 26px; padding: 0 4px; border: 0; outline: none; background: none; font: 520 var(--fs-small) var(--font-body); color: var(--ink-deep); }
.find-bar .fb-n { min-width: 58px; text-align: right; font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); white-space: nowrap; padding-right: 2px; }
.find-bar.none .fb-n { color: var(--action-strong); }
.find-bar button { display: grid; place-items: center; height: 26px; min-width: 26px; padding: 0 5px; border: 0; border-radius: 7px; background: none; cursor: pointer; color: var(--soft); font: 750 var(--fs-micro)/1 var(--font-body); }
.find-bar button:hover { background: hsla(232, 60%, 62%, .1); color: var(--brand-deep); }
.find-bar .fb-case.on { background: hsla(232, 60%, 62%, .16); color: var(--brand-deep); }
.find-bar .fb-note { grid-column: 1 / -1; padding: 2px 4px 2px; font-size: var(--fs-micro); color: var(--faint); }
.find-bar .fb-note[hidden] { display: none; }
.pane.finding > .prompt-pin { padding-top: 62px; }
.pane.finding.find-cut > .prompt-pin { padding-top: 86px; }
mark.find-hit { background: hsla(var(--pearl-stop-blue), .2); color: inherit; border-radius: 3px; box-shadow: 0 0 0 1px hsla(var(--pearl-stop-blue), .28); }
mark.find-hit.cur { background: var(--peach-glow); color: #1E1B33; box-shadow: 0 0 0 2px hsla(22, 85%, 70%, .45); }
:root[data-theme="dark"] .pane > .find-bar { border-color: hsla(0, 0%, 100%, .08); box-shadow: 0 14px 32px -16px rgba(0, 0, 0, .75); }
:root[data-theme="dark"] mark.find-hit { background: hsla(var(--pearl-stop-blue), .28); }
/* ==========================================================================
   Browser (2026-10-09, Arthur: "a built-in browser like Codex's, driven by
   Claude, light and fast"). The page is a native WebView2 the shell lays
   over .web-body, edge to edge (a native window cannot take rounded
   corners, so the body has none). This is its frame: the address strip in
   the pane bar (back, forward, reload, the page title in the heavy wide
   face with the address under it), peach light running along the strip's
   bottom edge while a page loads, and a periwinkle line saying what Claude
   just did there. Frosted surfaces through the shared tokens, both themes.
   ========================================================================== */
.pane.web { grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); }
.pane.web .pane-bar { position: relative; flex-wrap: nowrap; gap: 4px; }
.web-nav { display: flex; align-items: center; gap: 1px; flex: none; }
.pane.web .icon-btn { width: 30px; height: 30px; flex: none; }
.pane.web .icon-btn svg { width: 15px; height: 15px; }
.web-nav .icon-btn:disabled { opacity: .3; }
.reload .i-stop, .pane.web.loading .reload .i-reload { display: none; }
.pane.web.loading .reload .i-stop { display: block; }
.web-title { min-width: 0; margin-left: 6px; }
.web-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.web-head .title { flex: 0 1 auto; min-width: 0; }
.web-act {
  flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font: 780 var(--fs-micro)/1.2 var(--font-display); font-stretch: 112%; letter-spacing: .02em; color: var(--brand-strong);
  opacity: 0; transform: translateY(2px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.web-act.on { opacity: 1; transform: none; }
.web-addr { margin: 2px 0 0 -8px; }
.web-addr .addr {
  display: block; width: 100%; height: 24px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px;
  background: transparent; outline: 0; font: 500 var(--fs-micro)/1 var(--font-mono); color: var(--faint); text-overflow: ellipsis;
  transition: background var(--dur-fast) var(--ease-hover), border-color var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.web-addr .addr:hover { background: hsla(var(--w), .55); }
.web-addr .addr:focus { background: hsla(var(--w), .94); border-color: var(--brand); color: var(--ink); box-shadow: 0 6px 18px -14px rgba(var(--shadow-rgb), .55); }
.web-addr .addr::placeholder { color: var(--faint); opacity: .8; }
.pane.web.failed .web-addr .addr:not(:focus) { color: var(--action-strong); }

/* Loading: peach light running along the bottom edge of the strip. */
.web-sweep { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity var(--dur-fast) var(--ease-hover); }
.web-sweep::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  background: linear-gradient(90deg, transparent, var(--brand-soft) 35%, var(--peach-glow) 70%, transparent);
  transform: translateX(-100%);
}
.pane.web.loading .web-sweep { opacity: 1; }
.pane.web.loading .web-sweep::after { animation: web-sweep 1.15s var(--ease-hover) infinite; }
@keyframes web-sweep { to { transform: translateX(250%); } }

/* Where the page sits. Under it: what shows before there is one, and the
   picture that stands in while a menu or a sheet needs the space. */
.web-ground { position: relative; display: flex; overflow: hidden; }
.web-body { position: relative; flex: 1; min-width: 0; min-height: 0; overflow: hidden; background: hsla(var(--w), .5); }
.web-snap { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; user-select: none; pointer-events: none; }
.web-snap[hidden] { display: none; }
.web-empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; padding: 24px; text-align: center; color: var(--soft); }
.web-empty[hidden] { display: none; }
.web-empty .tk-kicker { color: var(--brand-strong); }
.web-empty p { margin: 0; max-width: 360px; font-size: var(--fs-small); overflow-wrap: anywhere; }

/* A screenshot Claude took, small inside its tool line. */
.tool .tool-shot { display: block; max-width: min(100%, 440px); margin: 8px 0 4px; border-radius: 8px; box-shadow: 0 0 0 1px var(--hairline-strong), 0 10px 26px -20px rgba(var(--shadow-rgb), .6); }

@container pane (max-width: 460px) {
  .pane.web .fwd, .pane.web .outside { display: none; }
  .web-act { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pane.web.loading .web-sweep::after { animation: none; transform: none; width: 100%; opacity: .7; }
  .web-act { transition: none; transform: none; }
}
:root[data-theme="dark"] .web-addr .addr:focus { box-shadow: 0 6px 18px -12px rgba(0, 0, 0, .8); }

/* The phone page check in the Phone sheet (engine remote-page.js, 2026-10-10): green when the site serves exactly what this Apaki builds, peach when it does not. */
.phone-sheet .ph-page { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; font-size: var(--fs-small); line-height: 1.45; color: var(--soft); background: hsla(232, 60%, 62%, .07); border: 1px solid var(--hairline); }
.phone-sheet .ph-page[data-state="ok"] { color: var(--good); background: var(--good-tint); border-color: hsla(145, 40%, 45%, .25); }
.phone-sheet .ph-page[data-state="differs"], .phone-sheet .ph-page[data-state="missing"] { color: var(--action-strong); background: var(--action-tint); border-color: hsla(16, 62%, 54%, .3); }

/* ==========================================================================
   2026-10-10: one look for every button, and nothing lit on one side.
   Arthur: "make sure we make the buttons gradients everywhere - also the
   dark mode buttons should be slightly darker gradient", and no highlight
   along one side of a card (left, top, anywhere). Shapes keep an even ring
   all the way round; the focused pane shows by a ring round the whole pane.
   ========================================================================== */
:root {
  --btn-a: #2C3578; --btn-b: #5A3FB0;
  --btn2-a: hsl(var(--w)); --btn2-b: hsl(232, 45%, 95%); --btn2-line: var(--hairline-strong);
  --btn-danger-a: #F6B49A; --btn-danger-b: #E8875F;
}
:root[data-theme="dark"] {
  --btn-a: #4651AE; --btn-b: #6548B8;
  --send-a: #4651AE; --send-b: #6548B8;
  --btn2-a: hsl(246, 20%, 21%); --btn2-b: hsl(246, 22%, 16%); --btn2-line: hsla(244, 30%, 70%, .16);
  --btn-danger-a: #8A4A33; --btn-danger-b: #6E3524;
}

/* Primary: the Send gradient. */
.new, .send:not(.queue):not(.stop), .sheet .row button.primary, .tk-row .tk-go, .phone-sheet button.primary, .art-open, .pair-btn:not(.quiet) {
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b));
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px -9px rgba(70, 52, 160, .55);
  transition: filter var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-hover);
}
.new:hover, .send:not(.queue):not(.stop):hover, .sheet .row button.primary:hover, .tk-row .tk-go:hover, .phone-sheet button.primary:hover, .art-open:hover, .pair-btn:not(.quiet):hover {
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); filter: brightness(1.1) saturate(1.05);
}
.new:active, .sheet .row button.primary:active, .tk-row .tk-go:active, .phone-sheet button.primary:active, .art-open:active { transform: scale(.98); }

/* Secondary: a quiet pearl gradient with an even edge. */
.sheet .row button:not(.primary), .tk-row button:not(.tk-go), .phone-sheet button:not(.primary), .sheet .path-go button, .sheet .br-new button,
.tab-tool, .tp-act button:not(.danger), .tool summary .tool-open, .pair-btn.quiet, .send.queue, .subs-n, .start-in {
  background: linear-gradient(180deg, var(--btn2-a), var(--btn2-b));
  border: 1px solid var(--btn2-line); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .06);
}
.sheet .row button:not(.primary):hover, .tk-row button:not(.tk-go):hover, .phone-sheet button:not(.primary):hover, .sheet .path-go button:hover, .sheet .br-new button:hover,
.tab-tool:hover:not(:disabled), .tp-act button:not(.danger):hover, .tool summary .tool-open:hover, .pair-btn.quiet:hover, .send.queue:hover, .subs-n:hover, .start-in:hover {
  background: linear-gradient(180deg, var(--btn2-a), var(--btn2-b)); border-color: var(--brand); filter: brightness(1.03);
}

/* Stop and other "careful" actions: a warm gradient. */
.send.stop { background: linear-gradient(135deg, #2A2840, #171717); box-shadow: 0 6px 16px -9px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] .send.stop { background: linear-gradient(135deg, #3E3C5C, #2C2A45); }
.task-viewer .tk-stop, .tp-act button.danger, .phone-sheet .ph-remove.sure {
  background: linear-gradient(135deg, var(--btn-danger-a), var(--btn-danger-b)); border-color: transparent; color: #fff;
}

/* The focused pane in a split: a ring round the whole pane, not a line along one side. */
.stage.multi .pane.focused { box-shadow: inset 0 0 0 1.5px hsla(var(--pearl-stop-blue), .38); border-radius: 10px; }
.stage.multi .pane.unread { box-shadow: inset 0 0 0 1.5px hsla(145, 45%, 42%, .4); border-radius: 10px; }
.pane.unread .pane-bar .title { color: var(--good); }

/* ---------- the Glass panel (glasspanel.js, 2026-10-10) ----------
   Fixed columns (name, usage, actions) so a long name is cut, never the
   usage; section heads in wide caps; names in Archivo, numbers in mono. */
.glass-panel {
  position: fixed; z-index: 23; display: flex; flex-direction: column; overflow: hidden; border-radius: 14px;
  background: linear-gradient(160deg, hsla(var(--pearl-stop-blue), .06), hsla(var(--pearl-stop-purple), .04) 55%, hsla(var(--pearl-stop-cyan), .05)), hsla(var(--w), .96);
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--hairline-strong); box-shadow: 0 22px 50px -22px rgba(var(--shadow-rgb), .55);
  animation: menu-in var(--dur-fast) var(--ease-out); transform-origin: bottom left; font-family: var(--font-body);
}
.glass-panel.out { animation: menu-out var(--dur-exit) var(--ease-hover) forwards; }
.gp-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 10px 16px; border-bottom: 1px solid var(--hairline); }
.gp-h { font: var(--heavy) var(--fs-body)/1 var(--font-display); font-stretch: var(--wide); letter-spacing: -.01em; color: var(--ink-deep); }
.gp-brand { font: 800 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-strong); }
.gp-head .gp-icon { margin-left: auto; }
.gp-body { overflow-y: auto; padding: 4px 8px 10px; scrollbar-width: thin; }
.gp-sec { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 14px 8px 6px; border: 0; background: none; text-align: left;
  font: 820 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .11em; text-transform: uppercase; color: var(--soft); }
.gp-sec-n { font: 600 var(--fs-micro) var(--font-mono); letter-spacing: 0; text-transform: none; color: var(--faint); }
.gp-toggle { cursor: pointer; }
.gp-toggle .gp-chev { margin-left: auto; font: 650 var(--fs-micro) var(--font-body); letter-spacing: 0; text-transform: none; color: var(--brand-strong); }
.gp-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 88px auto; align-items: center; gap: 12px;
  padding: 9px 8px 9px 10px; border-radius: 10px; cursor: pointer; transition: background var(--dur-fast) var(--ease-hover);
}
.gp-row.menu-open { z-index: 2; background: hsla(232, 60%, 62%, .07); }
.gp-more.on { background: hsla(232, 60%, 62%, .12); color: var(--brand-deep); }
.gp-more svg { fill: currentColor; stroke: none; }
/* The row's "more" menu, under its button (or above it near the bottom). */
.gp-menu {
  position: absolute; right: 6px; top: calc(100% - 4px); z-index: 3; display: grid; min-width: 230px; padding: 5px; border-radius: 11px;
  background: hsl(var(--w)); border: 1px solid var(--hairline-strong); box-shadow: 0 16px 34px -14px rgba(var(--shadow-rgb), .5);
  animation: menu-in var(--dur-fast) var(--ease-out); transform-origin: top right;
}
.gp-menu.up { top: auto; bottom: calc(100% - 4px); transform-origin: bottom right; }
.gp-menu button { display: grid; grid-template-columns: 16px 1fr; align-items: start; gap: 9px; padding: 7px 9px; border: 0; border-radius: 7px; background: none; text-align: left; cursor: pointer; color: var(--ink); font: 650 var(--fs-small)/1.3 var(--font-body); }
.gp-menu button:hover, .gp-menu button:focus-visible { background: hsla(232, 60%, 62%, .09); outline: none; }
.gp-menu button span { display: grid; gap: 1px; }
.gp-menu small { font: 500 var(--fs-micro)/1.3 var(--font-body); color: var(--faint); }
.gp-menu svg { width: 15px; height: 15px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; color: var(--soft); }
.gp-menu .danger { color: var(--action-strong); }
.gp-menu .danger svg { color: var(--action-strong); }
.gp-menu .sure { color: #fff; background: linear-gradient(135deg, var(--btn-danger-a), var(--btn-danger-b)); }
.gp-menu .sure svg, .gp-menu .sure small { color: #fff; }
:root[data-theme="dark"] .gp-menu { background: hsl(246, 20%, 15%); border-color: hsla(244, 30%, 70%, .16); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .85); }
.gp-row:hover { background: hsla(232, 60%, 62%, .07); }
.gp-row.live { cursor: default; background: hsla(var(--pearl-stop-blue), .08); box-shadow: inset 0 0 0 1px hsla(var(--pearl-stop-blue), .22); }
.gp-row.needs { cursor: default; }
.gp-row.needs .gp-n, .gp-row.hidden-acct .gp-n { color: var(--soft); }
.gp-main { min-width: 0; }
.gp-name { display: flex; align-items: baseline; min-width: 0; gap: 6px; }
.gp-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 var(--fs-small)/1.35 var(--font-body); font-stretch: 104%; color: var(--ink-deep); }
.gp-name .key-tag { flex: none; margin-left: 0; }
.gp-sub { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 var(--fs-micro)/1.35 var(--font-mono); color: var(--faint); }
.gp-rename { width: 100%; min-width: 0; padding: 2px 6px; border: 1px solid var(--brand); border-radius: 6px; outline: none; font: 700 var(--fs-small) var(--font-body); color: var(--ink-deep); background: hsl(var(--w)); box-shadow: 0 0 0 3px hsla(var(--pearl-stop-blue), .14); }
.gp-use { display: grid; gap: 5px; justify-items: end; }
.gp-left { font: 650 var(--fs-micro)/1 var(--font-mono); color: var(--brand-deep); white-space: nowrap; }
.gp-use.low .gp-left { color: var(--action-strong); }
.gp-meter { display: block; width: 100%; height: 4px; border-radius: 2px; background: hsla(232, 40%, 60%, .14); overflow: hidden; }
.gp-meter i { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--btn-a, #2C3578), var(--btn-b, #5A3FB0)); transform: scaleX(var(--v, 0)); transform-origin: left center; }
.gp-use.low .gp-meter i { background: linear-gradient(90deg, var(--action), var(--action-strong)); }
.gp-row.needs { grid-template-columns: minmax(0, 1fr) auto; }
.gp-act { display: flex; align-items: center; gap: 4px; }
.gp-row:not(.live) .gp-act .gp-icon { opacity: .55; transition: opacity var(--dur-fast) var(--ease-hover); }
.gp-row:hover .gp-act .gp-icon, .gp-row:focus-within .gp-act .gp-icon { opacity: 1; }
.gp-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; cursor: pointer; white-space: nowrap;
  font: 700 var(--fs-micro)/1 var(--font-body); color: var(--brand-deep);
  background: linear-gradient(180deg, var(--btn2-a), var(--btn2-b)); border: 1px solid var(--btn2-line);
}
.gp-btn:hover { border-color: var(--brand); }
.gp-btn.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); box-shadow: 0 5px 12px -8px rgba(70, 52, 160, .6); }
.gp-btn.primary:hover { filter: brightness(1.1); }
.gp-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.gp-icon { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border: 0; border-radius: 7px; background: none; cursor: pointer; color: var(--soft); font: 700 var(--fs-micro) var(--font-body); }
.gp-icon:hover { background: hsla(232, 60%, 62%, .1); color: var(--brand-deep); }
.gp-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.gp-icon.sure { color: #fff; background: linear-gradient(135deg, var(--btn-danger-a), var(--btn-danger-b)); }
.gp-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--hairline); }
.gp-msg { padding: 8px 14px 10px; font-size: var(--fs-small); color: var(--soft); border-top: 1px solid var(--hairline); }
.gp-msg.err { color: var(--action-strong); }
.gp-empty { margin: 12px 10px; font-size: var(--fs-small); color: var(--faint); }
.gp-form { display: grid; gap: 9px; margin: 10px 4px 2px; padding: 12px; border-radius: 12px; border: 1px solid var(--hairline-strong); background: hsla(var(--w), .7); }
.gp-form-h { font: 760 var(--fs-small)/1.3 var(--font-display); font-stretch: 110%; color: var(--ink-deep); }
.gp-form label { display: grid; gap: 4px; font: 650 var(--fs-micro) var(--font-body); color: var(--soft); }
.gp-form label small { font-weight: 500; color: var(--faint); }
.gp-form input { height: 30px; padding: 0 9px; border: 1px solid var(--hairline-strong); border-radius: 7px; background: hsl(var(--w)); font: 500 var(--fs-small) var(--font-mono); color: var(--ink); outline: none; }
.gp-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px hsla(var(--pearl-stop-blue), .14); }
.gp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gp-note { margin: 0; font-size: var(--fs-micro); color: var(--faint); }
.gp-form-act { display: flex; justify-content: flex-end; gap: 6px; }
:root[data-theme="dark"] .glass-panel { background: linear-gradient(160deg, hsla(var(--pearl-stop-blue), .05), hsla(var(--pearl-stop-purple), .04) 55%, hsla(var(--pearl-stop-cyan), .04)), hsla(var(--w), .97); border-color: hsla(0, 0%, 100%, .08); box-shadow: 0 22px 50px -20px rgba(0, 0, 0, .8); }
:root[data-theme="dark"] .gp-form, :root[data-theme="dark"] .gp-form input, :root[data-theme="dark"] .gp-rename { background: var(--tint); }

/* ---------- the context meter (pane.js renderContext, 2026-10-10) ----------
   A chip at the end of the settings line: a thin bar filling with the
   context window and the percentage; warm past 70%, the action color past
   88% (Claude Code compacts on its own near the top). The fill is a scaleX
   transform, so it moves without layout work. */
.chip-btn.ctx { display: inline-flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.chip-btn.ctx[hidden] { display: none; }
.ctx-bar { position: relative; display: block; width: 34px; height: 4px; border-radius: 2px; overflow: hidden; background: hsla(232, 40%, 60%, .18); }
.ctx-bar i { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--btn-a, #2C3578), var(--btn-b, #5A3FB0)); transform: scaleX(var(--ctx, 0)); transform-origin: left center; transition: transform 300ms var(--ease-out); }
.ctx-n { font: 650 var(--fs-micro) var(--font-mono); color: var(--soft); }
.chip-btn.ctx.warm .ctx-bar i { background: linear-gradient(90deg, #E9A23B, #E0803A); }
.chip-btn.ctx.warm .ctx-n { color: #B5651D; }
.chip-btn.ctx.full .ctx-bar i { background: linear-gradient(90deg, var(--action), var(--action-strong)); }
/* An estimate from the transcript (context-estimate.js), before Claude runs in the pane: quieter until the live number arrives. */
.chip-btn.ctx.estimate .ctx-n { opacity: .62; }
.chip-btn.ctx.estimate .ctx-bar i { opacity: .55; }
.chip-btn.ctx.full .ctx-n { color: var(--action-strong); font-weight: 750; }
:root[data-theme="dark"] .chip-btn.ctx.warm .ctx-n { color: #F0B062; }
@media (prefers-reduced-motion: reduce) { .ctx-bar i { transition: none; } }

/* ==========================================================================
   Button system (2026-10-10; Arthur: "make sure the buttons throughout the
   app are formatted/colored nicely", gradients everywhere, a touch darker
   in dark mode, nothing lit along one side). One set of rules for every
   button and button-like control, replacing the per-component looks with
   the same intent:
   - primary: the brand gradient with a white label (WCAG AA on both stops
     in both themes: 7.6:1 and up), an even soft shadow, a little brighter
     on hover and pressed in on press;
   - secondary: a quiet pearl gradient with an even hairline that turns
     periwinkle on hover;
   - ghost: no fill until hover (composer chips, text actions, Not now);
   - icon: square, no fill until hover, one hover tint and one press tint;
   - danger: quiet (secondary with action ink, filled on hover) for actions
     that stop or remove; the solid warm gradient only for the "click
     again" confirmations (white on it: 4.8:1 and 6.8:1);
   - segmented: a tinted track with a raised, ringed selected item;
   - every button: the same focus ring (2px brand, 2px off the edge), a
     pressed state, a disabled state (half opacity, no hover).
   Heights: xs 24, sm 28, md 32 to 34, lg 36 to 38, the rail's New
   conversation 40. Radii: 7 (xs and small icons), 8 (sm), 9 (md, lg),
   10 (send, rail CTA). No dot pills, no edge stripes, no shadcn look.
   ========================================================================== */
:root {
  --btn-shadow: 0 6px 16px -9px rgba(70, 52, 160, .55);
  --btn-shadow-hover: 0 9px 20px -10px rgba(70, 52, 160, .62);
  --btn2-hover-a: hsl(var(--w)); --btn2-hover-b: hsl(232, 55%, 92%);
  --ghost-hover: hsla(232, 60%, 62%, .1); --ghost-press: hsla(232, 60%, 62%, .19);
  --focus-ring: var(--brand);
  /* Danger had a pale peach that failed contrast with its white label (1.8:1). */
  --btn-danger-a: #BF4E29; --btn-danger-b: #9E3B1C;
}
:root[data-theme="dark"] {
  /* A touch darker than the earlier dark gradient (#4651AE to #6548B8), with
     an even inner ring so it still reads on the dark ground. */
  --btn-a: #3E48A0; --btn-b: #5B40AA;
  --send-a: #3E48A0; --send-b: #5B40AA;
  --btn-shadow: inset 0 0 0 1px hsla(245, 85%, 85%, .11), 0 6px 16px -9px rgba(0, 0, 0, .65);
  --btn-shadow-hover: inset 0 0 0 1px hsla(245, 85%, 85%, .18), 0 9px 20px -10px rgba(0, 0, 0, .72);
  --btn2-hover-a: hsl(246, 22%, 25%); --btn2-hover-b: hsl(246, 22%, 19%);
  --ghost-hover: hsla(232, 60%, 75%, .12); --ghost-press: hsla(232, 60%, 75%, .2);
  --btn-danger-a: #8A4A33; --btn-danger-b: #6E3524;
}

/* ---------- focus, press, disabled: every button ---------- */
:where(button, summary, [role="button"]):focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
button:disabled { cursor: default; }

/* ---------- primary ---------- */
.new, .send:not(.queue):not(.stop), .sheet .row button.primary, .tk-row .tk-go, .phone-sheet button.primary, .art-open,
.pair-btn:not(.quiet), .gp-btn.primary, .q-act, .install-hint .ih-go, .pair-card .pp-row button[data-k="create-go"] {
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); color: #fff;
  border: 1px solid transparent; box-shadow: var(--btn-shadow); cursor: pointer;
  transition: filter var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-hover), box-shadow var(--dur-fast) var(--ease-hover);
}
.new:hover:not(:disabled), .send:not(.queue):not(.stop):hover:not(:disabled), .sheet .row button.primary:hover:not(:disabled), .tk-row .tk-go:hover:not(:disabled),
.phone-sheet button.primary:hover:not(:disabled), .art-open:hover:not(:disabled), .pair-btn:not(.quiet):hover:not(:disabled), .gp-btn.primary:hover:not(:disabled),
.q-act:hover:not(:disabled), .install-hint .ih-go:hover:not(:disabled), .pair-card .pp-row button[data-k="create-go"]:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); filter: brightness(1.1) saturate(1.05); box-shadow: var(--btn-shadow-hover);
}
.new:active:not(:disabled), .send:not(.queue):not(.stop):active:not(:disabled), .sheet .row button.primary:active:not(:disabled), .tk-row .tk-go:active:not(:disabled),
.phone-sheet button.primary:active:not(:disabled), .art-open:active:not(:disabled), .pair-btn:not(.quiet):active:not(:disabled), .gp-btn.primary:active:not(:disabled),
.q-act:active:not(:disabled), .install-hint .ih-go:active:not(:disabled), .pair-card .pp-row button[data-k="create-go"]:active:not(:disabled) {
  transform: scale(.97); filter: brightness(.95);
}
:root[data-theme="dark"] .queue .q-act { color: #fff; }

/* ---------- secondary ---------- */
.sheet .row button:not(.primary), .tk-row button:not(.tk-go), .phone-sheet button:not(.primary):where(:not(.ph-life-btn):not(.seg button)), .sheet .path-go button, .sheet .br-new button,
.tab-tool, .tp-act button, .tool summary .tool-open, .pair-btn.quiet, .send.queue, .subs-n, .start-in, .gp-btn:not(.primary), .q-edit,
.art-card.link .art-open, .task-viewer .tk-stop {
  background: linear-gradient(180deg, var(--btn2-a), var(--btn2-b));
  border: 1px solid var(--btn2-line); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .06); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-hover);
}
:root[data-theme="dark"] .tool summary .tool-open, :root[data-theme="dark"] .tp-act button { background: linear-gradient(180deg, var(--btn2-a), var(--btn2-b)); }
.sheet .row button:not(.primary):hover:not(:disabled), .tk-row button:not(.tk-go):hover:not(:disabled), .phone-sheet button:not(.primary):where(:not(.ph-life-btn):not(.seg button)):hover:not(:disabled),
.sheet .path-go button:hover:not(:disabled), .sheet .br-new button:hover:not(:disabled), .tab-tool:hover:not(:disabled), .tp-act button:hover:not(:disabled),
.tool summary .tool-open:hover, .pair-btn.quiet:hover:not(:disabled), .send.queue:hover:not(:disabled), .subs-n:hover, .start-in:hover,
.gp-btn:not(.primary):hover:not(:disabled), .q-edit:hover:not(:disabled), .art-card.link .art-open:hover {
  background: linear-gradient(180deg, var(--btn2-hover-a), var(--btn2-hover-b)); border-color: var(--brand); filter: none;
}
.sheet .row button:not(.primary):active:not(:disabled), .tk-row button:not(.tk-go):active:not(:disabled), .phone-sheet button:not(.primary):where(:not(.ph-life-btn):not(.seg button)):active:not(:disabled),
.sheet .path-go button:active, .sheet .br-new button:active, .tab-tool:active:not(:disabled), .tp-act button:active:not(:disabled),
.tool summary .tool-open:active, .pair-btn.quiet:active, .send.queue:active, .subs-n:active, .start-in:active,
.gp-btn:not(.primary):active, .q-edit:active, .art-card.link .art-open:active {
  background: linear-gradient(180deg, var(--btn2-b), var(--btn2-b)); transform: scale(.97);
}
.q-edit { color: var(--soft); }
.q-edit:hover:not(:disabled) { color: var(--ink-deep); }

/* ---------- danger ---------- */
/* Quiet: Stop on a task, Stop in a task viewer. Filled warm on hover. */
.tp-act button.danger, .task-viewer .tk-stop { color: var(--action-strong); background: linear-gradient(180deg, var(--btn2-a), var(--btn2-b)); border-color: var(--btn2-line); }
.tp-act button.danger:hover:not(:disabled), .task-viewer .tk-stop:hover:not(:disabled) { background: var(--action-tint); border-color: var(--action); color: var(--action-strong); }
/* Solid: the "click again" confirmations. */
.phone-sheet .ph-remove.sure, .gp-menu .sure, .gp-icon.sure {
  background: linear-gradient(135deg, var(--btn-danger-a), var(--btn-danger-b)); border-color: transparent; color: #fff;
  box-shadow: 0 6px 14px -9px rgba(150, 55, 25, .6);
}
.phone-sheet .ph-remove.sure:hover, .gp-menu .sure:hover, .gp-icon.sure:hover { background: linear-gradient(135deg, var(--btn-danger-a), var(--btn-danger-b)); filter: brightness(1.08); color: #fff; }
/* The Phone corner button while a phone is connected wears the primary
   gradient; its coloured halo (a zero-offset glow) gives way to the
   primary's even shadow. */
.foot-icon.phone-btn.live { box-shadow: var(--btn-shadow); }
/* Stop in the composer: ink, not warm (it is safe, it only interrupts). */
.send.stop { border: 1px solid transparent; color: #fff; }
.send.stop:active { transform: scale(.97); }

/* ---------- sizes and shapes ---------- */
.new { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.rail-find .new { display: flex; justify-content: flex-start; }
.send { height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.sheet .row button, .tk-row button, .phone-sheet button:not(.ph-remove):where(:not(.ph-life-btn):not(.seg button)) {
  min-height: 36px; padding: 0 16px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; line-height: 1.2;
}
.sheet .path-go button, .sheet .br-new button { border-radius: 9px; }
.art-open { height: 32px; border-radius: 9px; }
.q-act, .q-edit { height: 28px; padding: 0 12px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; }
.q-head > span:first-child { flex: none; white-space: nowrap; }
.tab-tool, .gp-btn, .task-viewer .tk-stop { height: 28px; border-radius: 8px; }
.phone-sheet .ph-remove { min-height: 28px; border-radius: 8px; }
.tp-act button { border-radius: 7px; }
.tool summary .tool-open { border-radius: 7px; }
/* The tool line clips overflow (its ellipsis), so this ring sits inside the button. */
.tool summary .tool-open:focus-visible { outline-offset: -2px; }

/* ---------- icon buttons: one hover, one press ---------- */
.q-x { width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center; }
.tab-x, .folder-x, .folder-add, .sec-clear, .sec-refresh { border-radius: 7px; }
.icon-btn:hover:not(:disabled):not(.rec):not(.lit), .tab-x:hover, .tab-plus:hover, .folder-add:hover, .folder-x:hover, .sec-clear:hover, .sec-refresh:hover,
.q-x:hover, .gp-icon:not(.sure):not(.on):hover, .find-bar button:not(.on):hover, .foot-icon:not(.live):hover, .tasks-btn:not(.lit):hover {
  background: var(--ghost-hover);
}
.icon-btn:active:not(:disabled):not(.rec), .tab-x:active, .tab-plus:active, .folder-add:active, .folder-x:active, .sec-clear:active, .sec-refresh:active,
.q-x:active, .gp-icon:not(.sure):active, .find-bar button:active, .foot-icon:not(.live):active, .tasks-btn:active, .chip-btn:active, .menu-item:active:not(.disabled) {
  background: var(--ghost-press);
}
.icon-btn:hover:not(:disabled):not(.rec):not(.lit) svg, .tab-x:hover svg, .tab-plus:hover svg, .folder-add:hover svg, .folder-x:hover svg, .sec-clear:hover svg, .sec-refresh:hover svg { stroke: var(--brand-deep); }
.q-x:hover { color: var(--ink-deep); }
/* The remove mark on an attached image. */
.chip button:hover { border-color: var(--brand); color: var(--brand-deep); }

/* ---------- options in sheets: a hover, a press ---------- */
.sheet .opt { transition: border-color var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover); }
.sheet .opt:hover:not(.on) { border-color: var(--brand-soft); background: hsla(232, 60%, 62%, .05); }
.sheet .opt:active { transform: scale(.995); }

/* ---------- segmented controls: Settings and the sessions switch ---------- */
.seg, .rail-sessions .views { border-radius: 9px; }
.seg button, .rail-sessions .views button { border-radius: 7px; transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover); }
.rail-sessions .views button:hover:not(.on) { color: var(--brand-deep); }
.rail-sessions .views button.on { box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .14), 0 0 0 1px var(--hairline-strong); }
:root[data-theme="dark"] .rail-sessions .views button.on { box-shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 0 0 1px var(--hairline-strong); }
:root[data-theme="dark"] .seg button.on { box-shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 0 0 1px var(--hairline-strong); }

/* Keep-warm's ring of light, held still under reduced motion: an even ring
   all the way round instead of an arc frozen on one side. */
@media (prefers-reduced-motion: reduce) {
  .warm-ring { background: hsla(var(--pearl-stop-blue), .5); }
  .new, .send, .q-act, .q-edit, .sheet .opt { transition: none; }
  .new:active, .send:active, .q-act:active, .q-edit:active, .sheet .opt:active { transform: none; }
}

/* ---------- Phone sheet: pairing lifetimes (2026-10-10, phone pairing
   durability; phone.js lifeSeg and lifeText). Apaki's .seg switch inside the
   sheet, where the sheet's own button rules would restyle its segments, and
   the quiet "never expires" link on each paired phone. ---------- */
.ph-life-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; font-size: var(--fs-small); font-weight: 650; color: var(--soft); }
.ph-dev .ph-life { margin-top: 8px; }
.phone-sheet .seg button { padding: 5px 11px; border: 0; border-radius: 7px; background: none; box-shadow: none; font: 650 var(--fs-small)/1 var(--font-body); color: var(--soft); filter: none; }
.phone-sheet .seg button:hover { border: 0; background: none; color: var(--brand-deep); }
.phone-sheet .seg button.on { background: hsl(var(--w)); color: var(--brand-deep); font-weight: 780; box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .14), 0 0 0 1px var(--hairline-strong); }
:root[data-theme="dark"] .phone-sheet .seg button.on { background: var(--tint-deep); box-shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 0 0 1px var(--hairline-strong); }
.phone-sheet button.ph-life-btn { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font: inherit; color: inherit; white-space: normal; text-decoration: underline dotted; text-underline-offset: 2px; filter: none; }
.phone-sheet button.ph-life-btn:hover { border: 0; background: none; color: var(--brand-deep); }

/* ---------- narrow panes and reduced motion (2026-10-10) ----------
   In a narrow pane (a split) the context chip shows its bar only, its number
   stays in the title, so the settings line does not wrap to a third row. */
.composer { container: composer / inline-size; }
@container composer (max-width: 560px) {
  .chip-btn.ctx .ctx-n { display: none; }
  .chip-btn.ctx { gap: 0; padding-left: 8px; padding-right: 8px; }
}
/* With reduced motion the tab's working sweep would freeze as a line along one
   edge (no one-sided highlights): the tab's title carries "working" instead. */
@media (prefers-reduced-motion: reduce) {
  .tab.busy::after { display: none; }
  .tab.busy .tab-t { color: var(--brand-strong); }
}

/* ---------- the session menu and the archived link (2026-10-10) ---------- */
/* Long menus (the session menu with folders) scroll inside the window instead of running off it. */
.menu { max-height: calc(100vh - 16px); overflow-y: auto; scrollbar-width: thin; }
/* "N archived" under the session list: a quiet text button that opens the Archived view. */
.sessions li.archived-link { padding: 8px 12px 14px; text-align: center; background: none; cursor: default; }
.link-btn { padding: 4px 8px; border: 0; border-radius: 7px; background: none; cursor: pointer; font: 650 var(--fs-small) var(--font-body); color: var(--faint); }
.link-btn:hover { color: var(--brand-deep); background: hsla(232, 60%, 62%, .08); }
.link-btn:focus-visible { outline: 2px solid hsla(var(--pearl-stop-blue), .5); outline-offset: 1px; }

/* ---------- the sidebar: resize and collapse (app.js wireRail, 2026-10-10) ----------
   The handle sits over the sidebar's right edge; hovering shows a soft band
   centred on the edge (not a one-sided line). Collapsed, the grid has one
   column and a button at the left of the tab row brings the sidebar back. */
.rail-resize { position: fixed; z-index: 30; top: 0; bottom: 0; left: calc(var(--rail) - 4px); width: 8px; cursor: col-resize; touch-action: none; }
.rail-resize::after { content: ''; position: absolute; inset: 0; opacity: 0; background: linear-gradient(90deg, transparent, hsla(var(--pearl-stop-blue), .38), transparent); transition: opacity 140ms var(--ease-hover); }
.rail-resize:hover::after, body.rail-dragging .rail-resize::after { opacity: 1; }
body.rail-dragging, body.rail-dragging * { cursor: col-resize !important; user-select: none !important; }
body.rail-collapsed { grid-template-columns: minmax(0, 1fr); }
body.rail-collapsed .rail, body.rail-collapsed .rail-resize { display: none; }
.rail-toggle { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; cursor: pointer; color: var(--soft); transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover); }
.rail-toggle:hover { background: hsla(232, 60%, 62%, .1); color: var(--ink); }
.rail-toggle:active { background: hsla(232, 60%, 62%, .16); }
.rail-toggle:focus-visible { outline: 2px solid hsla(var(--pearl-stop-blue), .55); outline-offset: 1px; }
.rail-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.brand .rail-toggle { margin-left: auto; }
.rail-show { align-self: center; margin: 0 2px 0 10px; }
.rail-show[hidden] { display: none; }
/* The phone has its own layout (web.css): no handle, no toggles. */
body.web .rail-resize, body.web .rail-toggle { display: none !important; }

/* ---------- the whole history (pane.js, engine history.js; 2026-10-10) ----------
   Load earlier messages at the top of a long conversation, compaction
   markers (a divider with the summary folded in), Thinking folded under its
   word, Show all on cut tool output, and image placeholders that load one
   picture on request. Tokens only, so light and dark both follow. */
.hist-more { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 18px; padding: 10px 12px; border: 1px dashed var(--hairline-strong); border-radius: var(--radius); background: hsla(232, 60%, 62%, .035); }
.hist-more .hm-load { padding: 5px 12px; border: 1px solid var(--btn2-line, var(--hairline-strong)); border-radius: 8px; background: linear-gradient(180deg, var(--btn2-a, var(--card)), var(--btn2-b, var(--card))); cursor: pointer; font: 650 var(--fs-small) var(--font-body); color: var(--brand-deep); transition: border-color var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover); }
.hist-more .hm-load:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-wash); }
.hist-more .hm-n { font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); }
.hist-more.loading { animation: hist-breathe 1.4s var(--ease-hover) infinite alternate; }
@keyframes hist-breathe { from { background: hsla(232, 60%, 62%, .03); } to { background: hsla(232, 60%, 62%, .09); } }
@media (prefers-reduced-motion: reduce) { .hist-more.loading { animation: none; } }

.compact-mark { margin: 22px 0; }
.compact-mark > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; font: 600 var(--fs-micro) var(--font-mono); letter-spacing: .03em; color: var(--soft); }
.compact-mark > summary::-webkit-details-marker { display: none; }
.compact-mark .cm-rule { flex: 1; height: 1px; background: var(--hairline-strong); }
.compact-mark .cm-meta { font-weight: 500; color: var(--faint); }
.compact-mark .cm-open { padding: 1px 7px; border: 1px solid var(--hairline-strong); border-radius: 6px; font: 650 var(--fs-micro) var(--font-body); color: var(--brand-deep); }
.compact-mark > summary:hover .cm-open { border-color: var(--brand); background: var(--brand-wash); }
.compact-mark[open] .cm-open { background: var(--tint); }
.compact-mark .cm-body { margin: 12px 0 6px; padding: 12px 16px; max-height: 420px; overflow: auto; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--card); font-size: var(--fs-small); color: var(--soft); }
.compact-mark .cm-body > :first-child { margin-top: 0; }

.thinking { margin: 6px 0 6px 18px; font-size: var(--fs-small); }
.thinking > summary { list-style: none; display: flex; gap: 8px; align-items: baseline; cursor: pointer; color: var(--faint); white-space: nowrap; overflow: hidden; }
.thinking > summary::-webkit-details-marker { display: none; }
.thinking .th-mark { flex: none; font: italic 600 var(--fs-small) var(--font-body); color: var(--soft); }
.thinking .th-mark::before { content: '∴ '; font-style: normal; color: var(--faint); }
.thinking .th-peek { overflow: hidden; text-overflow: ellipsis; font-style: italic; }
.thinking[open] .th-peek { display: none; }
.thinking .th-body { margin: 6px 0 2px 14px; padding: 8px 12px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--tint); white-space: pre-wrap; font-style: italic; color: var(--soft); max-height: 360px; overflow: auto; }

.show-all { display: inline-block; margin: 2px 0 6px 18px; padding: 3px 9px; border: 1px solid var(--hairline-strong); border-radius: 7px; background: hsl(var(--w)); cursor: pointer; font: 650 var(--fs-micro) var(--font-body); color: var(--brand-deep); transition: border-color var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover); }
.show-all:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-wash); }
.thinking .show-all { margin-left: 14px; }
.compact-mark .show-all { margin-left: 0; }

.img-ph { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px; border: 1px dashed var(--hairline-strong); border-radius: var(--radius-sm); background: var(--tint); cursor: pointer; font: 500 var(--fs-micro) var(--font-mono); color: var(--faint); white-space: nowrap; }
.img-ph svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.img-ph .ip-go { font: 650 var(--fs-micro) var(--font-body); color: var(--brand-deep); }
.img-ph:hover:not(:disabled) { border-color: var(--brand); background: var(--brand-wash); }
.tool > .img-ph { margin: 4px 0 6px 18px; }
.hist-img { max-width: min(100%, 520px); border-radius: var(--radius-sm); border: 1px solid var(--hairline); }
.find-bar .fb-note .fb-all { display: inline-grid; vertical-align: middle; margin-left: 4px; padding: 1px 7px; border: 1px solid var(--hairline-strong); border-radius: 6px; background: hsl(var(--w)); cursor: pointer; font: 650 var(--fs-micro) var(--font-body); color: var(--brand-deep); }
.find-bar .fb-note .fb-all:hover { border-color: var(--brand); background: var(--brand-wash); }

/* ---------- Phone sheet: Connected or Private, each phone's access, the
   account card, the unchecked-pairing choice and the page alarm (2026-10-10,
   phone.js modeBlock, capSeg, linkBlock; apaki/SECURITY.md 4.4). Reuses the
   sheet's .seg, .ph-sas and .ph-page; only spacing and quiet text here. ---------- */
.ph-mode { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.ph-mode-t { flex: 1; min-width: 220px; margin: 2px 0 0; font-size: var(--fs-small); line-height: 1.45; color: var(--soft); }
.ph-dev .ph-cap { margin-top: 8px; }
.ph-hint { margin: 10px 2px 0; font-size: var(--fs-small); color: var(--soft); }
.ph-warn { margin: 8px 0 0; font-size: var(--fs-small); font-weight: 650; color: var(--action-strong); }
.ph-paused { font-weight: 700; color: var(--action-strong); }
.ph-skip { display: flex; align-items: flex-start; gap: 12px; margin-top: 10px; }
.ph-skip span { flex: 1; font-size: var(--fs-small); line-height: 1.45; color: var(--faint); }
.phone-sheet .ph-alarm { margin-top: 12px; font-weight: 650; }

/* Phone sheet: the phone keys behind an account, the Private card and the
   "New phone connected" lines (2026-10-11, phone.js phonesList, phoneAskBlock, noticesBlock;
   apaki/remote/ENROLL.md). Spacing only, on the sheet's own parts; a design pass restyles it. */
.ph-devices .ph-phones { margin: 8px 0 0; }
.ph-phone { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--hairline); }
.ph-phone-t { flex: 1; min-width: 0; }
.ph-phone-n { font-weight: 700; font-size: var(--fs-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-phone[data-state="blocked"] .ph-phone-n { color: var(--action-strong); }
.ph-phone-a { display: flex; gap: 6px; flex: none; }
.phone-sheet .ph-phone-a button { padding: 4px 9px; font-size: var(--fs-small); font-weight: 700; }
.ph-notices { margin-top: 12px; }
.ph-notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--hairline-strong); font-size: var(--fs-small); }
.ph-notice-t { flex: 1; min-width: 200px; }
.ph-notice-t span { color: var(--faint); }
.ph-notice .ph-actions { margin-top: 0; }
/* A phone whose Apaki app is older than this PC wants (phone.js appNote, apaki/remote/compat.js). */
.ph-app-old { color: var(--action-strong); font-weight: 600; margin-top: 4px; }

/* ---------- the sign-in card (app.js renderSignIn, 2026-10-10) ----------
   On a PC where Claude Code has no login yet: a card floating over the top of
   the stage until the engine reports a login. Full border, no edge accent. */
.signin-card {
  position: fixed; z-index: 24; top: calc(var(--top) + 14px); left: calc(var(--rail) + 22px); right: 22px; max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 18px; border-radius: 14px;
  background: hsla(var(--w), .94); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--hairline-strong); box-shadow: 0 18px 44px -24px rgba(var(--shadow-rgb), .55);
  animation: rise var(--dur-fast) var(--ease-out);
}
body.rail-collapsed .signin-card { left: 22px; }
.signin-card .sc-t { flex: 1; min-width: 0; display: grid; gap: 3px; font-size: var(--fs-small); line-height: 1.45; color: var(--soft); }
.signin-card .sc-t b { font-size: var(--fs-body); color: var(--ink); }
.signin-card .sc-note { color: var(--brand-deep); font-weight: 600; }
.signin-card .sc-note.bad { color: var(--action-strong); }
.signin-card .sc-act { display: flex; gap: 8px; flex: none; }
.signin-card .sc-act button { height: 36px; padding: 0 14px; border-radius: 10px; font-weight: 750; font-size: var(--fs-small); cursor: pointer; border: 1px solid var(--btn2-line, var(--hairline-strong)); background: linear-gradient(180deg, var(--btn2-a, hsl(var(--w))), var(--btn2-b, hsl(232, 45%, 95%))); color: var(--ink); }
.signin-card .sc-act button.primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); }
.signin-card .sc-act button:focus-visible { outline: 2px solid hsla(var(--pearl-stop-blue), .55); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .signin-card { animation: none; } }

/* System lines (pane.js sysline, notices.js; Arthur, 2026-10-11): what Claude Code itself says, such as a prompt a
   hook blocked, a hook error, an API retry or a usage warning. Monospace and colored like Claude Code's own yellow,
   gray and red lines, with a small label, so they never read as Claude's reply. No capsule, no stripe. */
.sysline { --sys: var(--soft); display: flex; gap: 9px; align-items: baseline; margin: 8px 0; padding: 7px 0 7px 2px;
  font: 500 var(--fs-small)/1.55 var(--font-mono); color: var(--sys); white-space: pre-wrap; overflow-wrap: anywhere; }
.sysline .sys-label { flex: none; font: 700 var(--fs-micro)/1.9 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--sys); opacity: .85; }
.sysline .sys-text { min-width: 0; }
.sysline.warn { --sys: #93600A; }
.sysline.error { --sys: var(--action-strong); }
.sysline.info { --sys: var(--soft); }
.sysline.dim { --sys: var(--faint); }
.sysline.mono .sys-text { font-size: var(--fs-small); }
:root[data-theme="dark"] .sysline.warn { --sys: #E7B85C; }

/* Tab reordering (app.js moveTab, 2026-10-11): the tab being dragged fades, and the bar opens a gap where it
   would land, the way a browser's tab strip makes room. No line or stripe. */
.tab.dragging-tab { opacity: .45; }
/* The gap appears at once: animating margin would lay out the whole bar every frame (Impeccable layout-transition). */
.tab.tab-before { margin-left: 44px; }
.tab.tab-after { margin-right: 44px; }

/* Working glow (Arthur, 2026-10-11: "when a session is thinking and doing stuff lets add a subtle glow at the bottom
   of the screen ... in the background of the pane thats actively thinking - should not be overwhelming, should be
   subtle, shimmering a bit, and very slow ... similar to the aesthetic/color of the background its shimmering over").
   A soft wash of the background's own peach and periwinkle rises behind a busy pane's content (pane.js setBusy puts
   .busy on the pane), drifts over 11 s, and fades away when the turn ends. Transform and opacity only; reduced
   motion keeps a still, fainter glow. The phone uses the same panes, so it glows there too. */
.pane { isolation: isolate; }
.pane::before {
  content: ''; position: absolute; z-index: -1; left: -12%; right: -12%; bottom: -48px; height: 42%;
  pointer-events: none; opacity: 0;
  background:
    radial-gradient(52% 70% at 28% 100%, rgba(var(--peach), .34), transparent 72%),
    radial-gradient(48% 64% at 74% 100%, hsla(232, 62%, 74%, .24), transparent 74%);
  filter: blur(22px);
  transform: translate3d(0, 18px, 0);
  transition: opacity 1400ms var(--ease-out), transform 1400ms var(--ease-out);
}
/* Stepped, about 16 moves a second (2026-10-12): the glow sits behind the composer's frosted strip, which is blurred again each time the glow moves. */
.pane.busy::before { opacity: .8; transform: translate3d(0, 6px, 0); animation: pane-glow 11s steps(88, end) infinite alternate; }
@keyframes pane-glow {
  0% { transform: translate3d(-3%, 10px, 0) scale(1); opacity: .5; }
  50% { transform: translate3d(1.5%, 2px, 0) scale(1.05); opacity: .85; }
  100% { transform: translate3d(3.5%, 7px, 0) scale(1.02); opacity: .6; }
}
:root[data-theme="dark"] .pane::before {
  background:
    radial-gradient(52% 70% at 28% 100%, rgba(242, 165, 126, .16), transparent 72%),
    radial-gradient(48% 64% at 74% 100%, hsla(232, 70%, 70%, .2), transparent 74%);
}
@media (prefers-reduced-motion: reduce) {
  .pane::before { transition: opacity 400ms linear; transform: none; }
  .pane.busy::before { animation: none; transform: none; opacity: .45; }
}

/* ---------- the Phone sheet, simpler (2026-10-11 polish; phone.js fold, choiceLine) ----------
   Arthur: make the pairing view simpler. What needs an answer comes first,
   then the QR; the options fold into one line that says what is chosen
   (.ph-fold: a details row with "Change"), as do the access and lifetime in
   a phone's Allow card. Under an Apaki account its phones sit in their own
   inset list; Allow leads where a phone waits, Block is the quiet red one,
   Forget and Dismiss are plain text. Desktop only (phone.js is not in the
   phone build). */
.phone-sheet .ph-fold { margin-top: 12px; border: 1px solid var(--hairline); border-radius: 12px; background: hsla(var(--w), .55); }
.phone-sheet .ph-fold > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; list-style: none; cursor: pointer; font-size: var(--fs-small); line-height: 1.4; color: var(--soft); border-radius: 12px; transition: background-color var(--dur-fast) var(--ease-hover); }
.phone-sheet .ph-fold > summary::-webkit-details-marker { display: none; }
.phone-sheet .ph-fold > summary:hover { background: var(--ghost-hover); }
.phone-sheet .ph-fold > summary:focus-visible { outline: 2px solid hsla(var(--pearl-stop-blue), .5); outline-offset: 1px; }
.ph-fold-t { flex: 1; min-width: 0; }
.ph-fold-go { flex: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 750; color: var(--brand-deep); }
.ph-fold-go::after { content: ''; width: 6px; height: 6px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform 160ms var(--ease-hover); }
.phone-sheet .ph-fold[open] > summary { border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--hairline); }
.phone-sheet .ph-fold[open] .ph-fold-go::after { transform: translateY(1px) rotate(-135deg); }
.ph-fold-b { padding: 2px 12px 12px; }
.ph-fold-b .ph-status { margin-top: 10px; }
.ph-fold-b .ph-mode { margin-top: 12px; }
.ph-sas .ph-fold { margin-top: 14px; background: hsla(var(--w), .65); }
.ph-sas .ph-fold-b .ph-life-row:first-child { margin-top: 10px; }
.ph-opts-note { margin: 10px 0 0; font-size: var(--fs-small); line-height: 1.45; color: var(--faint); }
.phone-sheet .ph-opts { margin-top: 14px; }

/* Paired phones and accounts: the glyph and Remove sit at the top of a tall account row, not in its middle. */
.phone-sheet .ph-dev { align-items: flex-start; }
.phone-sheet .ph-dev > .ph-glyph { margin-top: 1px; }
.ph-phones-h { margin: 12px 0 0; font: 800 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.phone-sheet .ph-devices .ph-phones { margin: 6px 0 2px; overflow: hidden; border: 1px solid var(--hairline); border-radius: 10px; background: hsla(var(--w), .5); }
.phone-sheet .ph-phone { gap: 10px; padding: 8px 8px 8px 10px; border-top: 1px solid var(--hairline); }
.phone-sheet .ph-phone:first-child { border-top: 0; }
.ph-phone-g { width: 15px; height: 15px; color: var(--faint); }
.ph-phone-g.lit { color: var(--brand-strong); }
.ph-phone[data-state="pending"] .ph-pstate { color: var(--brand-strong); font-weight: 700; }
.ph-phone[data-state="blocked"] .ph-pstate { color: var(--action-strong); font-weight: 700; }
.phone-sheet .ph-phone-a { gap: 4px; }
.phone-sheet .ph-phone-a button { min-height: 26px; padding: 3px 10px; font-size: var(--fs-small); }
.phone-sheet button.ph-ghost { border-color: transparent !important; background: none !important; box-shadow: none !important; color: var(--soft); }
.phone-sheet button.ph-ghost:hover { background: var(--ghost-hover) !important; color: var(--ink-deep); }
.phone-sheet button.ph-block { color: var(--action-strong); }
.phone-sheet button.ph-lead { border-color: transparent !important; background: linear-gradient(135deg, var(--btn-a), var(--btn-b)) !important; color: #fff !important; }

/* Private: a phone behind an account waits for an OK here. */
.ph-ask-h { display: flex; align-items: center; gap: 12px; }
.ph-ask-g { flex: none; width: 30px; height: 30px; color: var(--brand-strong); }
.ph-ask-k { margin-bottom: 5px; font: 900 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .13em; text-transform: uppercase; color: var(--brand-strong); }
.phone-sheet .ph-phone-ask { border-color: hsla(var(--pearl-stop-blue), .45); }

/* Connected: "New phone connected" lines. */
.phone-sheet .ph-notice { gap: 12px; padding: 10px 10px 10px 12px; border-radius: 12px; background: hsla(var(--w), .6); }
.ph-notice-g { flex: none; width: 20px; height: 20px; color: var(--good); }
.phone-sheet .ph-notice-t { display: flex; flex-direction: column; gap: 3px; }
.ph-notice-k { font: 900 var(--fs-micro)/1 var(--font-display); font-stretch: 125%; letter-spacing: .12em; text-transform: uppercase; color: var(--good); }
.ph-notice-t b { font-size: var(--fs-small); font-weight: 800; color: var(--ink); }
.phone-sheet .ph-notice-t .ph-notice-m { font-size: var(--fs-small); color: var(--faint); }
@media (prefers-reduced-motion: reduce) { .ph-fold-go::after, .phone-sheet .ph-fold > summary { transition: none; } }

/* Reconnecting banner (app.js engineBanner, 2026-10-11): one quiet line over the window while it has no engine, in
   place of notes piling up in the conversation. No dot, no stripe; fades in. */
.engine-banner { position: fixed; z-index: 60; top: 10px; left: 50%; transform: translateX(-50%); max-width: min(560px, calc(100vw - 32px));
  padding: 8px 14px; border-radius: 10px; background: var(--card); color: var(--soft); border: 1px solid var(--hairline-strong);
  font: 550 var(--fs-small)/1.4 var(--font-body); box-shadow: 0 8px 24px -14px rgba(var(--shadow-rgb, 0, 0, 0), .45); animation: banner-in 180ms var(--ease-out); }
.engine-banner[hidden] { display: none; }
@keyframes banner-in { from { opacity: 0; transform: translate(-50%, -4px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .engine-banner { animation: none; } }

/* The permission sheet (permission.js, 2026-10-12): a tool Claude Code asks about. The tool and a readable summary of
   its input, a note for Claude, then Deny, Always allow and Allow once. Same sheet on the phone page (apaki/ui is shared).
   No dot, no stripe: notes are tinted fields. */
.sheet:focus { outline: none; }
:is(.sheet, .ask-card) .perm-sub { margin-top: 2px; font-size: var(--fs-small); color: var(--soft); }
:is(.sheet, .ask-card) .perm-tool { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 6px; font-family: var(--font-mono); font-size: var(--fs-small); }
:is(.sheet, .ask-card) .perm-name { font-weight: 700; color: var(--ink); }
:is(.sheet, .ask-card) .perm-srv { color: var(--faint); overflow-wrap: anywhere; }
:is(.sheet, .ask-card) .perm-body { display: grid; gap: 8px; }
:is(.sheet, .ask-card) .perm-code, :is(.sheet, .ask-card) .perm-diff {
  margin: 0; max-height: 36vh; overflow: auto; padding: 9px 11px; background: var(--ground); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: var(--fs-small); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
}
:is(.sheet, .ask-card) .perm-diff .more { display: block; color: var(--faint); }
:is(.sheet, .ask-card) .perm-file { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-mono); font-size: var(--fs-small); color: var(--soft); overflow-wrap: anywhere; }
:is(.sheet, .ask-card) .perm-meta, :is(.sheet, .ask-card) .perm-fine { font-size: var(--fs-micro); color: var(--faint); white-space: nowrap; }
:is(.sheet, .ask-card) .perm-fine { white-space: normal; }
:is(.sheet, .ask-card) .perm-rows { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 14px; font-size: var(--fs-small); }
:is(.sheet, .ask-card) .perm-rows dt { color: var(--faint); }
:is(.sheet, .ask-card) .perm-rows dd { margin: 0; font-family: var(--font-mono); font-size: var(--fs-small); overflow-wrap: anywhere; }
:is(.sheet, .ask-card) .perm-text { font-size: var(--fs-small); color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
:is(.sheet, .ask-card) .perm-note { margin-top: 10px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--tint); color: var(--soft); font-size: var(--fs-small); }
:is(.sheet, .ask-card) .perm-note.warn { background: var(--action-tint); color: var(--action-strong); }
:is(.sheet, .ask-card) .perm-say { margin-top: 12px; }
:is(.sheet, .ask-card) .perm-always { margin-top: 10px; display: grid; gap: 2px; font-size: var(--fs-small); color: var(--soft); }
:is(.sheet, .ask-card) .perm-always-h { font-size: var(--fs-small); font-weight: 650; color: var(--ink); }
:is(.sheet, .ask-card) .perm-always-l { font-family: var(--font-mono); font-size: var(--fs-small); overflow-wrap: anywhere; }
.sheet .perm-row { flex-wrap: wrap; }
.sheet .perm-keys { margin-top: 8px; text-align: right; font-size: var(--fs-micro); color: var(--faint); }
@media (hover: none) { .sheet .perm-keys { display: none; } }
@media (max-width: 560px) {
  .sheet .perm-row { flex-direction: column-reverse; }
  .sheet .perm-row button { width: 100%; }
}

/* ---------- questions and approvals in the pane (askcard.js, 2026-10-12) ----------
   Arthur: "when askuserquestion type things come up, it should be shown in the pane and not lock the user from using
   the app". A card docked above the pane's message box, in the spirit of Myrlin Glass: one strong line, quiet
   secondary text, a soft filled row for what is chosen, colour only for meaning (the attention colour says a pane
   waits for you). Numbered rows, as Claude Code's terminal draws them. No dot, no stripe down a side, type tokens only. */
.ask-dock { pointer-events: auto; max-width: 856px; margin: 0 auto 8px; display: grid; gap: 6px; }
.ask-dock:empty { display: none; }
.ask-card {
  display: flex; flex-direction: column; min-height: 0; max-height: var(--ask-max, 56vh);
  padding: 10px 10px 8px; border-radius: 14px; outline: none;
  background: hsla(var(--w), .88); -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid var(--hairline-strong); box-shadow: 0 12px 32px -18px rgba(var(--shadow-rgb), .5);
  animation: rise var(--dur-fast) var(--ease-out);
  transition: border-color var(--dur-fast) var(--ease-hover), box-shadow var(--dur-fast) var(--ease-hover);
}
.ask-card:focus-within { border-color: hsla(var(--pearl-stop-blue), .55); box-shadow: 0 0 0 3px hsla(var(--pearl-stop-blue), .14), 0 14px 36px -18px rgba(var(--shadow-rgb), .55); }
.ask-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 0 6px 4px; flex: none; }
.ask-kick { font: 650 var(--fs-micro)/1.3 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.ask-more { font: 500 var(--fs-micro)/1.3 var(--font-mono); color: var(--soft); white-space: nowrap; }
.ask-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 6px; overscroll-behavior: contain; }
.ask-h { margin: 2px 0; font: 650 var(--fs-body)/1.35 var(--font-display); letter-spacing: -.005em; color: var(--ink); overflow-wrap: anywhere; }
.ask-msg { margin: 2px 0 6px; font-size: var(--fs-small); color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-q + .ask-q { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hairline); }
.ask-qh { margin-bottom: 1px; font: 600 var(--fs-micro)/1.3 var(--font-mono); color: var(--faint); }
.ask-qm { font-size: var(--fs-small); color: var(--faint); }
.ask-choices { display: grid; gap: 2px; margin-top: 6px; flex: none; }
.ask-card > .ask-choices { margin-top: 8px; }
.ask-choice {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 34px; padding: 6px 8px; text-align: left;
  border: 0; border-radius: 9px; background: none; color: var(--ink); cursor: pointer; font-size: var(--fs-small);
  transition: background var(--dur-fast) var(--ease-hover);
}
.ask-choice:hover { background: var(--tint); }
.ask-choice:focus-visible, button.ask-choice:focus { outline: none; background: var(--tint); box-shadow: 0 0 0 1.5px hsla(var(--pearl-stop-blue), .5); }
.ask-choice.on { background: var(--brand-wash); }
.ask-choice.on .ask-w { font-weight: 650; }
.ask-n {
  flex: none; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-top: 1px;
  border: 1px solid var(--hairline-strong); border-radius: 6px; background: var(--ground);
  font: 600 var(--fs-micro)/1 var(--font-mono); color: var(--soft);
  transition: background var(--dur-fast) var(--ease-hover), border-color var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.ask-choice:hover .ask-n, button.ask-choice:focus .ask-n { border-color: var(--brand-soft); color: var(--brand-deep); }
.ask-choice.on .ask-n { background: var(--fill); border-color: var(--fill); color: #fff; }
/* Numbers belong to the question in play; the other questions keep their rows, quieter. */
.ask-q:not(.cur) .ask-n { opacity: .4; }
.ask-l { flex: 1; min-width: 0; display: grid; gap: 1px; line-height: 1.4; }
.ask-w { font-weight: 560; overflow-wrap: anywhere; }
.ask-l small { font-size: var(--fs-small); color: var(--soft); overflow-wrap: anywhere; }
.ask-tick { flex: none; width: 15px; height: 15px; margin-top: 3px; fill: none; stroke: var(--brand-strong); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity var(--dur-fast) var(--ease-hover); }
.ask-choice.on .ask-tick { opacity: 1; }
.ask-other { align-items: center; cursor: text; }
.ask-other input { flex: 1; min-width: 0; padding: 3px 2px; border: 0; border-bottom: 1px solid var(--hairline-strong); border-radius: 0; background: transparent; color: var(--ink); font-size: var(--fs-small); outline: none; }
.ask-other input:focus { border-bottom-color: var(--brand); }
.ask-other.on { background: var(--brand-wash); }
.ask-card .ask-say { flex: none; width: 100%; margin-top: 8px; padding: 7px 10px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); background: var(--ground); color: var(--ink); font-size: var(--fs-small); outline: none; }
.ask-card .ask-say:focus { border-color: var(--brand); }
.ask-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding: 0 6px; flex: none; }
.ask-keys { min-width: 0; font-size: var(--fs-micro); color: var(--faint); }
.ask-acts { display: flex; gap: 6px; margin-left: auto; flex: none; }
.ask-btn { height: 30px; padding: 0 14px; border: 1px solid var(--hairline-strong); border-radius: 8px; background: var(--ground); color: var(--ink); font-size: var(--fs-small); font-weight: 600; cursor: pointer; transition: border-color var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover); }
.ask-btn:hover { border-color: var(--brand); }
.ask-btn.primary { background: var(--fill); border-color: var(--fill); color: #fff; }
.ask-btn.primary:hover { background: var(--fill-hover); border-color: var(--fill-hover); }
.ask-plan { margin: 6px 0 2px; padding: 2px 12px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--ground); }
/* The plan is read, not a reply: no reply mark in front, and its headings stay under the card's own line. */
.ask-plan.turn-assistant::before { content: none; }
.ask-plan.turn-assistant :is(h1, h2, h3, h4) { margin: 10px 0 4px; font-size: var(--fs-body); }
.ask-plan.turn-assistant > :first-child { margin-top: 8px; }
.ask-card .perm-tool { margin-top: 8px; }
/* What the second choice saves, under its words: one quiet line, not a heading of its own. */
.ask-choice .perm-always { display: block; margin: 1px 0 0; }
.ask-choice .perm-always-h { font-weight: 500; color: var(--soft); }
.ask-choice .perm-always-h::after { content: ': '; }
.ask-choice .perm-always-l { color: var(--soft); font-family: var(--font-body); }
.ask-choice .perm-always-l + .perm-always-l::before { content: ' · '; }
/* A phone that only watches the PC pane: the question shows, its choices are off, one line says where to answer. */
.ask-ro { flex: none; margin-top: 8px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--tint); color: var(--soft); font-size: var(--fs-small); }
.ask-card.ro .ask-choice, .ask-card.ro .ask-btn, .ask-card.ro .ask-say { opacity: .55; cursor: default; }
.ask-card.ro .ask-choice:hover { background: none; }
.ask-card.ro .ask-keys { display: none; }
/* The line a settled card leaves (answered on a phone, the turn ended): quiet, and gone a few seconds after you saw it. */
.ask-gone {
  justify-self: center; max-width: 100%; padding: 6px 12px; border: 1px solid var(--hairline); border-radius: 10px;
  background: hsla(var(--w), .82); color: var(--soft); font-size: var(--fs-small);
  animation: rise var(--dur-fast) var(--ease-out); transition: opacity var(--dur-exit) var(--ease-hover);
}
.ask-gone.out { opacity: 0; }
/* The pane that waits: words in its header, its title in the attention colour, its tab the same way (as unread is green). */
.ask-wait { flex: none; height: 28px; padding: 0 9px; border: 0; border-radius: 8px; background: none; color: var(--action-strong); font: 650 var(--fs-small)/1 var(--font-body); white-space: nowrap; cursor: pointer; transition: background var(--dur-fast) var(--ease-hover); }
.ask-wait:hover { background: var(--action-tint); }
.ask-wait[hidden] { display: none; }
.pane.waiting .pane-bar .title { color: var(--action-strong); }
.stage.multi .pane.waiting { box-shadow: inset 0 0 0 1.5px hsla(16, 62%, 54%, .42); border-radius: 10px; }
.tab.waiting .tab-t { color: var(--action-strong); font-weight: 650; }
@container pane (max-width: 470px) { .ask-keys { display: none; } .ask-card { padding: 8px 6px 6px; } }
@media (hover: none) { .ask-keys { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .ask-card, .ask-gone { animation: none; transition: none; }
  .ask-choice, .ask-n, .ask-tick, .ask-btn, .ask-wait { transition: none; }
}

/* The todo checklist (todos.js, 2026-10-12): TodoWrite as Claude Code draws it. Done items struck through, the item being
   worked on in bold on a tinted row, a calm count in the header; a later call in the same turn redraws it in place
   (a short glow when live). Marks are boxes, not dots; no stripe. */
.todos {
  margin: 8px 0 8px 18px; max-width: 640px; padding: 9px 10px 7px; border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--card); font-size: var(--fs-small); line-height: 1.45;
}
.todos.fresh { animation: todos-fresh 900ms var(--ease-out); }
@keyframes todos-fresh { from { background: var(--brand-wash); border-color: var(--brand-soft); } to { background: var(--card); border-color: var(--hairline); } }
.todos-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px 6px; }
.todos-name { font: 750 var(--fs-micro)/1 var(--font-display); font-stretch: 112%; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.todos-count { font: var(--fs-small)/1 var(--font-mono); color: var(--faint); }
.todos.all-done .todos-count { color: var(--good); }
.todos-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.td { display: flex; align-items: flex-start; gap: 9px; padding: 4px 6px; border-radius: 7px; }
.td-mark { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--faint); }
.td-mark svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.td-body { min-width: 0; display: flex; flex-direction: column; }
.td-text { overflow-wrap: anywhere; }
.td-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.td.todo .td-text { color: var(--ink); }
.td.done .td-mark { color: var(--good); }
.td.done .td-mark .tb { fill: currentColor; }
.td.done .td-mark .tc { stroke: var(--card); stroke-width: 1.8; }
.td.done .td-text { color: var(--faint); text-decoration: line-through; text-decoration-color: hsla(240, 10%, 50%, .45); }
.td.doing { background: var(--brand-wash); }
.td.doing .td-mark { color: var(--brand-strong); }
.td.doing .td-mark .tn { fill: currentColor; stroke: none; }
.td.doing .td-text { font-weight: 700; color: var(--brand-deep); }
.td-now { font-size: var(--fs-small); color: var(--soft); }
.todos-err { margin: 6px 4px 2px; font-size: var(--fs-small); color: var(--action-strong); }
@media (max-width: 640px) { .todos { margin-left: 0; max-width: none; } }

/* ==========================================================================
   2026-10-12 polish pass (with the type scale at the top of this file).
   The sidebar's section heading, the Glass card's columns, the session
   rows' titles, the wordmark at narrow widths, the prompt pin, the mode chip
   in a narrow message box, and archived copies. No dot, no stripe.
   ========================================================================== */

/* At the default sidebar width (312 px) the Sessions heading, or a folder's
   name in its place, was cut to "SESSIO..." by the All / In terminals switch.
   The header wraps instead: when the heading, its count and the switch do not
   fit on one line, the switch moves to a line of its own under the heading.
   The auto margin sits after the heading's own controls (refresh, or clear
   when it shows), so on one line the switch keeps to the right and on its own
   line it starts at the left, under the heading. */
.rail-sessions .sec-head { flex-wrap: wrap; row-gap: 8px; }
.rail-sessions .views { margin-left: 0; }
.rail-sessions .sec-head > .sec-refresh, .rail-sessions .sec-head > .sec-clear { margin-right: auto; }
.rail-sessions .sec-head > .sec-refresh:has(+ .sec-clear:not([hidden])) { margin-right: 0; }

/* The Glass card: the provider labels are on the micro step now (11 px, from
   9.5), so their column makes room for CLAUDE and CODEX. */
.gc-row { grid-template-columns: 64px minmax(0, 1fr) auto; }
/* In a narrow sidebar the plan gives way before the account's name, and the
   card's heading and its "live on this PC" stay on one line. */
.gc-plan { flex: 0 100 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-head .gl { flex: none; white-space: nowrap; }
.gc-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A session's title leads its row: the body step, over the small snippet and
   the micro mono line (15, 13, 11). */
.sessions .t { font-size: var(--fs-body); }
/* The same for a Settings row's name over its description (15 over 13). */
.set-t b { font-size: var(--fs-body); }
/* The todo checklist's count sits with its TODOS label on the micro step, as the
   sidebar's section counts do. */
.todos-count { font-size: var(--fs-micro); }

/* The wordmark on the display step never pushes the hide button out of a
   narrow sidebar: it steps down to the title size under 300 px
   (app.js applyRail) and is cut, not wrapped, past that. */
.wordmark { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
body.rail-narrow .wordmark { font-size: var(--fs-title); font-stretch: 100%; }

/* The prompt pin floats over the top of the conversation. Text used to show
   in the gap above the card and beside it, a half line cut by the pane's bar,
   which read as the card overlapping the conversation. While the pin shows,
   the conversation fades out under it instead (the composer's own treatment
   at the bottom): clear from the top to the card's lower edge (--pin-h,
   pane.js), back to full over 20 px, so a line half under the card shows
   only as a soft fade. */
.pane:has(> .prompt-pin:not([hidden])) > .ground {
  -webkit-mask-image: linear-gradient(to bottom, transparent var(--pin-h, 0px), #000 calc(var(--pin-h, 0px) + 20px), #000 calc(100% - 30px), transparent);
  mask-image: linear-gradient(to bottom, transparent var(--pin-h, 0px), #000 calc(var(--pin-h, 0px) + 20px), #000 calc(100% - 30px), transparent);
}

/* The mode chip in a narrow message box (a phone, a split of three or more):
   its short word (Bypass, Accept edits, Plan, Ask; pane.js MODES), so the
   settings line shows every chip whole instead of cutting the last one. */
.chip-btn.mode .ml-short { display: none; }
@container composer (max-width: 480px) {
  .chip-btn.mode .ml-full { display: none; }
  .chip-btn.mode .ml-short { display: inline; }
}

/* Archived copies (engine archivedCopy): Claude Code deleted the transcript
   after 30 days and Apaki's archive kept a slim copy. In the list, two quiet
   words in the row's meta line; open, one quiet line at the top of the
   conversation, ruled off from it by a full-width hairline. */
.sessions .arch-copy { color: var(--soft); font-weight: 650; }
.arch-line {
  margin: 0 0 18px; padding: 2px 2px 12px; border-bottom: 1px solid var(--hairline);
  font-size: var(--fs-small); line-height: 1.5; color: var(--soft); overflow-wrap: anywhere;
}
.arch-line .arch-k { font-weight: 700; color: var(--ink-deep); }

/* Diffs (a tool line's Edit, the permission sheet's): the red and green lines
   run edge to edge in their box instead of floating inside a frame of the
   box's own ground, so each line reads as one band. */
.tool pre.diff, .sheet .perm-diff { padding-left: 0; padding-right: 0; }
.tool pre.diff .del, .tool pre.diff .add, .sheet .perm-diff .del, .sheet .perm-diff .add, .sheet .perm-diff .more { padding: 0 11px; }

/* Text fields in sheets (the permission sheet's note, a question's own
   answer, the folder path): the app's focus ring, the periwinkle edge with a
   soft halo that .gp-form fields use, in place of the browser's black one. */
.sheet input[type=text]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px hsla(var(--pearl-stop-blue), .14); }

/* A very narrow message box (a split of three beside the sidebar, about 230
   px): the settings squeezed between the buttons stood one per line, each
   cut ("Sonne", "A"). There the settings take a line of their own under the
   text, and the attach, dictate and Send buttons the line under that, Send
   in the corner. */
@container composer (max-width: 360px) {
  .composer-row > .chips { order: -1; flex: 1 0 100%; }
  .composer-row > .send { margin-left: auto; }
}

/* ---------- Codex panes (2026-10-12) ----------
   A Codex pane is the same pane with the Codex app's pickers, so it differs by one small word: CODEX in the action ink
   in the header's meta line, set like the rail's "codex" word. No capsule, no dot, no stripe. */
.kind-mark { flex: none; font: 700 var(--fs-micro)/1.4 var(--font-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--action-strong); }
.kind-mark[hidden] { display: none; }
/* Claude Code or Codex for a new conversation: two words under the empty pane's line, the chosen one underlined like the rail's views. */
.kind-pick { display: flex; justify-content: center; gap: 18px; margin: 14px 0 0; font-size: var(--fs-small); }
.kind-pick button { border: 0; background: none; padding: 2px 0; cursor: pointer; color: var(--faint); border-bottom: 1.5px solid transparent; transition: color var(--dur-fast) var(--ease-hover), border-color var(--dur-fast) var(--ease-hover); }
.kind-pick button:hover { color: var(--ink); }
.kind-pick button[aria-pressed=true] { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand); }
.pane.codex .kind-pick button[aria-pressed=true] { border-bottom-color: var(--action); }
/* The Codex app's three presets in the mode chip and its menu, coloured like Claude's modes of the same power. */
.chip-btn.mode[data-mode=full-access] { color: var(--action-strong); }
.chip-btn.mode[data-mode=auto] { color: var(--brand-strong); }
.chip-btn.mode[data-mode=read-only] { color: var(--good); }
.menu-item .mm.full-access { color: var(--action-strong); }
.menu-item .mm.auto { color: var(--brand-strong); }
.menu-item .mm.read-only { color: var(--good); }
/* A patch (Codex's file changes): a header per file, hunk lines quiet, context dimmer than the changes. */
.diff .hunk { display: block; color: var(--faint); background: var(--tint); }
.diff .hunk.file { color: var(--ink); font-weight: 600; background: var(--tint-deep); }
.diff .hunk.file i { font-style: normal; font-weight: 500; color: var(--faint); }
.diff .ctx { display: block; color: var(--soft); }
/* A changed file's name in a patch header opens it in the viewer: still the name, underlined softly, the action ink on hover. */
.diff .hunk.file .file-open { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--hairline-strong); text-underline-offset: 3px; text-align: left; }
.diff .hunk.file .file-open:hover { color: var(--action-strong); text-decoration-color: currentColor; }
.diff .hunk.file .file-open:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
.diff .more { display: block; color: var(--faint); }
.tool pre.diff .hunk, .tool pre.diff .ctx, .tool pre.diff .more { padding: 0 11px; }
:root[data-theme="dark"] .diff .hunk { background: var(--tint); }
:root[data-theme="dark"] .diff .hunk.file { background: var(--tint-deep); }
/* A command's output while it runs: the newest part, in the block the final result takes over. */
.tool pre.live { max-height: 220px; }
/* A file attached to a Codex message: its name and size in a quiet chip (a picture shows itself). */
.chip.doc { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 10px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); background: var(--tint); max-width: 240px; }
.chip.doc .doc-name { font-size: var(--fs-small); font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.doc .dim { position: static; color: var(--faint); text-shadow: none; flex: none; }
/* Text fields of a sheet that hold a secret (a Codex question marked secret) look like the others. */
.sheet input[type=password] { width: 100%; padding: 8px 10px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); margin-top: 6px; background: var(--ground); }
.sheet input[type=password]:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px hsla(var(--pearl-stop-blue), .14); }
/* ---------- git worktrees (2026-10-12; worktree.js, diff.js, apaki/remote/WORKTREES.md) ----------
   Arthur: "The best approach to AI development is using git worktrees to tackle multiple features simultaneously."
   A worktree row shows the branch name and the change count and nothing else. Colour is only for trouble
   (conflicts, behind the base, a folder that is gone): everything else is ink, soft ink or faint ink. No status
   pill with a dot, and no stripe down the left of a row (a nested conversation is indented, nothing more). */

/* The glyphs: two kinds of branch, drawn in the text's own colour. */
.wt-g, .wt-chev { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* The header's branch label, and the same label in the phone's nav row (web.css .cn-wtb). */
.meta-line .wt-btn, .cn-wtb {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 62%; padding: 0 6px; margin-left: -6px; border: 0; border-radius: 6px; background: none; cursor: pointer;
  font: 620 var(--fs-micro)/1.6 var(--font-body); color: var(--faint); transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.meta-line .wt-btn[hidden] { display: none; }
.meta-line .wt-btn:hover { background: var(--tint); color: var(--brand-deep); }
.meta-line .wt-btn:focus-visible, .cn-wtb:focus-visible { outline: 2px solid hsla(var(--pearl-stop-blue), .5); outline-offset: 1px; }
.wt-btn .wt-b, .cn-wtb .wt-b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--soft); font-weight: 680; }
.wt-btn .wt-n, .cn-wtb .wt-n { flex: none; font-family: var(--font-mono); font-weight: 560; white-space: nowrap; }
.wt-btn .wt-t, .cn-wtb .wt-t { flex: none; font-weight: 720; white-space: nowrap; color: var(--action-strong); }

/* The Worktrees view: a repository, its worktrees (branch, change count), and the conversations in each. */
.sessions li.wt-repo { display: flex; align-items: center; gap: 6px; margin: 8px 0 2px; padding: 6px 10px 4px; border-color: transparent; background: none; cursor: pointer; }
.sessions li.wt-repo:hover { background: none; }
.sessions li.wt-repo:first-child { margin-top: 0; }
.wt-repo .wt-chev { width: 11px; height: 11px; stroke: var(--faint); stroke-width: 1.8; transform: rotate(90deg); transition: transform var(--dur-fast) var(--ease-hover); }
.wt-repo.folded .wt-chev { transform: none; }
.wt-repo .wt-rn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 var(--fs-micro)/1.3 var(--font-display); font-stretch: 112%; letter-spacing: .09em; text-transform: uppercase; color: var(--soft); }
.wt-repo .wt-rc { margin-left: auto; flex: none; font: 560 var(--fs-micro)/1 var(--font-mono); color: var(--faint); }
.sessions li.wt-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 10px; }
.wt-row > .wt-g { color: var(--faint); }
.wt-row.is-main > .wt-g { color: var(--soft); }
.wt-row .wt-bn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-small); font-weight: 650; color: var(--ink); }
.wt-row .wt-nn { flex: none; font: 560 var(--fs-micro)/1 var(--font-mono); color: var(--faint); white-space: nowrap; }
.wt-row .wt-tr { flex: none; font-size: var(--fs-micro); font-weight: 720; color: var(--action-strong); white-space: nowrap; }
/* The two actions appear on hover over the count, as in Linear's rows; the phone shows them always. */
.wt-acts { position: absolute; right: 4px; top: 50%; display: flex; gap: 1px; padding-left: 14px; transform: translateY(-50%); opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease-hover); }
.wt-row:hover .wt-acts, .wt-row:focus-within .wt-acts { opacity: 1; pointer-events: auto; }
.wt-row:hover .wt-nn, .wt-row:focus-within .wt-nn, .wt-row:hover .wt-tr, .wt-row:focus-within .wt-tr { opacity: 0; }
.wt-act { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: var(--card); color: var(--soft); cursor: pointer; transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover); }
.wt-act:hover { background: var(--tint-deep); color: var(--brand-deep); }
.wt-act:focus-visible { outline: 2px solid hsla(var(--pearl-stop-blue), .5); outline-offset: 1px; }
.wt-act svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.wt-act svg circle { fill: currentColor; stroke: none; }
/* A conversation under its worktree is indented and nothing else. */
.sessions li.wt-kid { margin-left: 18px; }
.sessions li.wt-showmore { margin: 0 0 4px 22px; padding: 0; border-color: transparent; background: none; cursor: default; }
.sessions li.wt-showmore:hover { background: none; }
.sessions li.wt-clean { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; padding: 8px 10px; background: var(--tint); font-size: var(--fs-small); color: var(--soft); }
.sessions li.wt-clean:hover { background: var(--tint-deep); }
.sessions li.wt-newrow { margin-top: 6px; padding: 2px 4px; border-color: transparent; background: none; cursor: default; }
.sessions li.wt-newrow:hover { background: none; }
/* A conversation's branch beside its time, in the All view. */
.sessions .wt-tag { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; color: var(--soft); vertical-align: top; }
.sessions .wt-tag .wt-g { width: 11px; height: 11px; }

/* Under the narrowest sidebars the view switch takes its own line instead of crowding the title out. */
.rail-sessions .sec-head { flex-wrap: wrap; row-gap: 6px; }
.rail-sessions .sec-head .sec-t { flex: none; }
/* Its own width, pushed right, so its track never stretches into an empty-looking slot on the left (2026-10-12). */
.rail-sessions .views { flex: 0 0 auto; margin-left: auto; min-width: max-content; }

/* The action sheets: fields, then the commands that will run, then what to watch for. */
.sheet .wt-note { margin: 4px 0 6px; font-size: var(--fs-small); line-height: 1.5; color: var(--soft); }
.sheet .wt-f { display: grid; gap: 5px; margin-top: 12px; font-size: var(--fs-small); }
.sheet .wt-f > span { font-weight: 650; color: var(--soft); }
.sheet .wt-f input[type=text], .sheet .wt-f select, .sheet .wt-f textarea {
  width: 100%; margin: 0; padding: 8px 10px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); background: var(--ground); color: var(--ink); font: 520 var(--fs-small)/1.4 var(--font-body);
}
.sheet .wt-f textarea { resize: vertical; min-height: 4.4em; }
.sheet .wt-f select:focus, .sheet .wt-f textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px hsla(var(--pearl-stop-blue), .14); }
.sheet .wt-f select:disabled { opacity: .55; }
.sheet .wt-c { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: var(--fs-small); color: var(--ink); cursor: pointer; }
.sheet .wt-c input { margin: 2px 0 0; accent-color: var(--brand-strong); }
.sheet .wt-c small { display: block; margin-top: 2px; color: var(--faint); }
.sheet .wt-k { margin: 16px 0 6px; font: 800 var(--fs-micro)/1.2 var(--font-display); font-stretch: 112%; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
.sheet .wt-cmds { margin: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--tint); color: var(--ink-deep); font: 520 var(--fs-small)/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 22vh; overflow-y: auto; }
.sheet .wt-sum { margin: 12px 0 0; font-size: var(--fs-small); line-height: 1.5; color: var(--soft); }
.sheet .wt-sum + .wt-k { margin-top: 12px; }
.sheet ul.wt-warn, .sheet ul.wt-block, .sheet ul.wt-ok { margin: 10px 0 0; padding: 0; list-style: none; font-size: var(--fs-small); line-height: 1.5; }
.sheet ul.wt-warn li { color: var(--soft); }
.sheet ul.wt-block li { color: var(--action-strong); font-weight: 600; }
.sheet ul.wt-ok li { color: var(--ink); font-weight: 600; }
.sheet ul.wt-warn li + li, .sheet ul.wt-block li + li, .sheet ul.wt-ok li + li { margin-top: 4px; }
.sheet .wt-files { max-height: 26vh; overflow-y: auto; border: 1px solid var(--hairline); border-radius: var(--radius-sm); }
.sheet .wt-file { display: flex; align-items: center; gap: 10px; padding: 5px 10px; font-size: var(--fs-small); cursor: pointer; }
.sheet .wt-file:hover { background: var(--tint); }
.sheet .wt-file input { margin: 0; accent-color: var(--brand-strong); }
.sheet .wt-fs { flex: none; width: 62px; font-size: var(--fs-micro); font-weight: 650; color: var(--faint); }
.sheet .wt-fp { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 520 var(--fs-micro)/1.4 var(--font-mono); color: var(--ink); }
.sheet .wt-none, .sheet .wt-wait { padding: 8px 2px; font-size: var(--fs-small); color: var(--faint); }
.sheet .wt-link { padding: 6px 0 0; border: 0; background: none; cursor: pointer; text-align: left; font: 650 var(--fs-small) var(--font-body); color: var(--brand-strong); }
.sheet .wt-link:hover { color: var(--brand-deep); }
.sheet .wt-url { color: var(--brand-strong); overflow-wrap: anywhere; }
.sheet details.wt-log { margin-top: 10px; }
.sheet details.wt-log summary { cursor: pointer; font-size: var(--fs-small); color: var(--faint); }
.sheet details.wt-log pre { margin: 6px 0 0; padding: 10px 12px; max-height: 24vh; overflow: auto; border-radius: var(--radius-sm); background: var(--tint); font: 520 var(--fs-micro)/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet .wt-mode { margin: 10px 0 2px; }
.sheet .row button[hidden] { display: none; }
.sheet .sf-worktree[hidden], .sheet .sf-folder[hidden] { display: none; }

/* The diff viewer. Same colours as the diffs inside a conversation (.diff .add, .diff .del). */
.diff-viewer .df-ground { overflow: auto; }
.df-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: hsla(var(--w), .88); border-bottom: 1px solid var(--hairline); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.df-gap { flex: 1; }
.df-btn { padding: 5px 11px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); background: var(--ground); color: var(--ink); cursor: pointer; font: 650 var(--fs-small)/1.2 var(--font-body); transition: border-color var(--dur-fast) var(--ease-hover); }
.df-btn:hover:not(:disabled) { border-color: var(--brand); }
.df-btn:disabled { opacity: .45; cursor: default; }
.df-refresh svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.df-files { padding: 4px 12px 0; }
.df-file { margin-top: 8px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--card); overflow: hidden; }
.df-file > summary { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; list-style: none; font-size: var(--fs-small); }
.df-file > summary::-webkit-details-marker { display: none; }
.df-file > summary:hover { background: var(--tint); }
.df-s { flex: none; width: 58px; font-size: var(--fs-micro); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.df-p { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 650 var(--fs-small)/1.4 var(--font-mono); color: var(--ink); }
.df-d { font-weight: 480; color: var(--faint); }
.df-n { flex: none; font: 560 var(--fs-micro)/1 var(--font-mono); color: var(--faint); white-space: nowrap; }
.df-n i { font-style: normal; }
.df-pre { margin: 0; padding: 4px 0 6px; overflow-x: auto; border-top: 1px solid var(--hairline); font: 500 var(--fs-small)/1.55 var(--font-mono); }
.df-pre span { display: block; padding: 0 12px 0 0; white-space: pre; }
.df-pre span[data-n]::before { content: attr(data-n); display: inline-block; min-width: 4.4ch; margin-right: 12px; text-align: right; color: var(--faint); opacity: .75; user-select: none; }
.df-pre .ctx { color: var(--soft); }
.df-pre .note { color: var(--faint); font-style: italic; }
.df-pre .df-h { padding: 2px 12px; background: var(--tint); color: var(--brand-strong); font-size: var(--fs-micro); }
.df-note { padding: 10px 14px; font-size: var(--fs-small); color: var(--faint); }
.df-empty { display: grid; gap: 4px; justify-items: center; padding: 64px 24px; text-align: center; font-size: var(--fs-small); color: var(--faint); }
.df-empty b { font-size: var(--fs-body); color: var(--ink); }
.df-meta { overflow: hidden; text-overflow: ellipsis; }
:root[data-theme="dark"] .df-bar { background: hsla(var(--w), .8); }
@media (prefers-reduced-motion: reduce) {
  .wt-acts, .wt-act, .wt-repo .wt-chev, .meta-line .wt-btn, .df-btn { transition: none; }
}

/* ---------- tooltips (tooltip.js, 2026-10-12) ----------
   Arthur: hover popups "are not formatted properly". They were the browser's own title tooltips (Windows' plain box,
   light in dark mode, no structure). Now one quiet card in the menus' style: a heading when there are several lines,
   quieter secondary parts, keys drawn as keys, what a click does set apart at the end. Never takes the pointer. */
.tt {
  position: fixed; z-index: 1000; left: 0; top: 0; max-width: 340px; padding: 8px 11px 9px; pointer-events: none;
  background: var(--card); color: var(--ink); border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px -14px rgba(var(--shadow-rgb), .45); font: 460 var(--fs-small)/1.45 var(--font-body);
  overflow-wrap: anywhere; text-wrap: pretty;
}
.tt[hidden] { display: none; }
.tt.in { animation: tt-in var(--dur-fast) var(--ease-out); }
.tt.in.above { animation-name: tt-in-above; }
@keyframes tt-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
@keyframes tt-in-above { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
.tt-head { font-weight: 680; color: var(--ink); margin-bottom: 2px; }
.tt-line { color: var(--soft); }
.tt-line.tt-only { color: var(--ink); }
.tt-q { color: var(--faint); }
.tt-hint { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--hairline); color: var(--faint); font-size: var(--fs-micro); letter-spacing: .01em; }
.tt-head + .tt-hint, .tt-only + .tt-hint { margin-top: 5px; }
.tt kbd {
  display: inline-block; min-width: 1.5em; padding: 0 4px; border: 1px solid var(--hairline-strong); border-bottom-width: 2px;
  border-radius: 4px; background: var(--ground); color: var(--ink); font: 600 var(--fs-micro)/1.45 var(--font-mono); text-align: center;
}
.tt-plus { margin: 0 2px; color: var(--faint); font-size: var(--fs-micro); }
.tt-rows { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; margin-top: 4px; }
.tt-k { color: var(--faint); }
.tt-v { color: var(--ink); font-variant-numeric: tabular-nums; }
.tt-meter { position: relative; height: 4px; margin: 6px 0 4px; border-radius: 2px; overflow: hidden; background: hsla(232, 40%, 60%, .18); }
.tt-meter i { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--btn-a, #2C3578), var(--btn-b, #5A3FB0)); transform: scaleX(var(--tt-v, 0)); transform-origin: left center; }
.tt-meter.warm i { background: linear-gradient(90deg, #E9A23B, #E0803A); }
.tt-meter.full i { background: linear-gradient(90deg, var(--action), var(--action-strong)); }
.tt-meter.estimate i { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .tt.in { animation: none; } }
.tt-keys { white-space: nowrap; }

/* ---------- usage rings (usage-rings.js, 2026-10-12) ----------
   Arthur: rings for the 5-hour and weekly limits "with the timings as well", without overcrowding; details on a
   click. A ring is what is left of a window (the arc), a short label inside, the time to its reset under it on the
   card. Flat line ends, so an empty ring never leaves a dot. */
.u-ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.u-ring.sm { width: 26px; height: 26px; }
.u-ring.md { width: 34px; height: 34px; }
.u-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.u-ring circle { fill: none; stroke-width: 3.2; }
.u-ring .u-t { stroke: hsla(232, 40%, 60%, .16); }
.u-ring .u-a { stroke: var(--brand-strong); stroke-linecap: butt; stroke-dasharray: var(--left, 0) 100; transition: stroke-dasharray 500ms var(--ease-out); }
.u-ring.low .u-a { stroke: var(--action); }
.u-ring b { position: relative; font: 700 var(--fs-micro)/1 var(--font-mono); letter-spacing: -.03em; color: var(--soft); }
.u-ring.low b { color: var(--action-strong); }
/* The card: the provider and the name centred beside the pair; the words "% left" give way to the rings. */
.gc-row.rings { grid-template-rows: auto; row-gap: 0; padding-top: 5px; padding-bottom: 5px; }
.gc-row.rings .gc-left { display: none; }
.u-pair { display: flex; gap: 6px; align-items: flex-start; }
.u-unit { display: grid; justify-items: center; gap: 3px; min-width: 38px; }
.u-until { font: 600 var(--fs-micro)/1 var(--font-mono); color: var(--faint); white-space: nowrap; letter-spacing: -.03em; }
/* The panel: the live account's every window, under its row. */
.gp-row .u-detail { grid-column: 1 / -1; display: grid; gap: 9px; margin-top: 2px; padding: 9px 2px 1px; border-top: 1px solid var(--hairline); }
.u-win { display: flex; align-items: center; gap: 11px; min-width: 0; }
.u-txt { display: grid; gap: 2px; min-width: 0; }
.u-l { font-size: var(--fs-small); font-weight: 650; color: var(--ink); }
.u-v { font: 500 var(--fs-micro)/1.35 var(--font-mono); color: var(--soft); }
.u-in { color: var(--faint); }
@media (prefers-reduced-motion: reduce) { .u-ring .u-a { transition: none; } }
/* The shared view (2026-10-11): a phone is watching this conversation. Plain text in the meta line, no dot, no badge, no motion. */
.meta-line .also-on { flex: none; font-family: var(--font-mono); font-size: var(--fs-micro); font-weight: 600; line-height: 1.4; color: var(--faint); white-space: nowrap; }
/* ---------- the session list, compact, and folders that open in place (2026-10-12, sessionlist.js) ----------
   Arthur: rows like the ChatGPT app's, one line each (the name, cut, and the last message's time), more on the row in
   the focused pane, on hover and in Details; folders open and close in place. Then (2026-10-12, Arthur: "myrlin glass
   ui/ux is much clearer, we want to borrow from it as much as possible"): Glass's list. One quiet line per row with a
   small leading glyph that carries the provider and the state, the name in a strong weight, the time right-aligned in a
   muted mono; even rows; hover and selection a soft fill, no borders; hairlines only between groups; colour only for
   meaning (Claude orange, Codex green, amber when it waits for you). Apaki's own palette and type tokens otherwise;
   nothing down a left edge, no pills. */

:root {
  --sl-raise-1: hsla(232, 45%, 42%, .055);
  --sl-raise-2: hsla(232, 45%, 42%, .1);
  --sl-claude: #d97757;
  --sl-codex: #10a37f;
  --sl-warn: #b7791f;
}
:root[data-theme="dark"] {
  --sl-raise-1: rgba(255, 255, 255, .04);
  --sl-raise-2: rgba(255, 255, 255, .075);
  --sl-warn: #e5a50a;
}

:is(.sessions, .folder-sess) li.srow {
  position: relative; padding: 0 2px 0 6px; margin: 0 0 1px; border: 0; border-radius: 8px; box-shadow: none; background: transparent;
  transition: background var(--dur-fast) var(--ease-hover), box-shadow var(--dur-fast) var(--ease-hover);
}
:root :is(.sessions, .folder-sess) li.srow:hover { background: var(--sl-raise-1); box-shadow: none; }
:root :is(.sessions, .folder-sess) li.srow.shown { background: var(--sl-raise-1); box-shadow: none; border: 0; }
:root :is(.sessions, .folder-sess) li.srow.on,
:root :is(.sessions, .folder-sess) li.srow.menu-open { background: var(--sl-raise-2); box-shadow: inset 0 0 0 1px var(--sl-raise-2); border: 0; }
:is(.sessions, .folder-sess) li.srow:focus-visible, .folder-row:focus-visible { outline: 1.5px solid var(--brand); outline-offset: -1.5px; }
.srow .sr-line { display: flex; align-items: center; gap: 8px; min-height: 34px; }
:is(.sessions, .folder-sess) .srow .t {
  flex: 1; min-width: 0; display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font: 600 var(--fs-small)/1.35 var(--font-body); letter-spacing: -.003em; color: var(--ink);
}
:is(.sessions, .folder-sess) .srow.on .t { color: var(--ink-deep, var(--ink)); }
.srow .t input.rename { width: 100%; }

/* The leading glyph: the provider's mark, or what the session is doing (sessionlist.js leadOf). */
.srow .sr-lead { flex: none; display: grid; place-items: center; width: 22px; height: 22px; color: var(--faint); }
.srow .sr-lead svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.srow .sr-lead.is-claude { color: var(--sl-claude); }
.srow .sr-lead.is-codex { color: var(--sl-codex); }
.srow .sr-lead.sr-mark { opacity: .78; }
.srow .sr-lead.sr-waiting { color: var(--sl-warn); }
.srow .sr-lead.sr-archived-copy { color: var(--faint); }
.srow .sr-lead .trk { stroke-opacity: .22; }
/* Twelve ticks a turn (2026-10-12, input lag): a spinner this size reads the same as a smooth one, and it is 12 frames a second to produce, not 60. */
/* The whole icon turns, not the arc inside it (2026-10-17, window lag): a transform on an SVG shape relaid the SVG on
   every tick (102 layouts in 5 s in Arthur's window), a transform on the <svg> box does not. The track is a full circle,
   so turning it with the arc looks the same. */
.srow .sr-lead .arc { stroke-width: 1.8; }
.srow .sr-lead svg:has(.arc) { animation: sr-spin 1s steps(12, end) infinite; }
@keyframes sr-spin { to { transform: rotate(360deg); } }

/* Quiet marks after the name: pinned (outside Pinned), a linked worktree. */
.srow .sr-s { flex: none; display: grid; place-items: center; width: 14px; height: 14px; color: var(--faint); }
.srow .sr-s svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* The time at the right, in a muted mono; the ... button takes its place under the pointer, the keyboard or a menu. */
.srow .sr-end { flex: none; display: grid; align-items: center; justify-items: end; min-width: 26px; height: 24px; }
.srow .sr-time, .srow .sr-more { grid-area: 1 / 1; }
.srow .sr-time { padding-right: 6px; font: 500 var(--fs-micro)/1 var(--font-mono); color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; transition: opacity var(--dur-fast) var(--ease-hover); }
.srow.on .sr-time { color: var(--soft); }
.srow .sr-more {
  display: grid; place-items: center; width: 26px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none;
  color: var(--soft); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover);
}
.srow .sr-more svg { width: 14px; height: 14px; fill: currentColor; }
.srow .sr-more:hover { background: var(--sl-raise-2); color: var(--ink); }
.srow:hover .sr-more, .srow:focus-visible .sr-more, .srow.menu-open .sr-more { opacity: 1; pointer-events: auto; }
.srow:hover .sr-time, .srow:focus-visible .sr-time, .srow.menu-open .sr-time { opacity: 0; }

/* The one more line under the name: folder, branch, model, size, and the subagents button. It eases open (grid rows). */
.srow .sr-detail { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 180ms var(--ease-out); }
.srow .sr-detail-in { min-height: 0; overflow: hidden; display: flex; align-items: center; gap: 8px; padding-left: 30px; }
.srow.on .sr-detail, .srow:focus-visible .sr-detail, .srow.subs-open .sr-detail, .srow.menu-open .sr-detail { grid-template-rows: 1fr; }
:is(.sessions, .folder-sess) .srow .m { flex: 1; min-width: 0; margin: 0; padding: 0 0 8px; font: 500 var(--fs-micro)/1.35 var(--font-mono); color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(.sessions, .folder-sess) .srow .m:empty { display: none; }
.srow .sr-detail-in .subs-n { flex: none; margin: 0 4px 8px 0; padding: 1px 7px 1px 5px; }
:is(.sessions, .folder-sess) .srow .snip, :is(.sessions, .folder-sess) .srow .why { margin: -2px 6px 8px 30px; }

/* Recency headings: small and muted, sentence case; a hairline only between groups. */
.sessions li.sr-group {
  padding: 12px 8px 5px; margin: 6px 0 0; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; background: none; cursor: default;
  font: 600 var(--fs-micro)/1.2 var(--font-body); letter-spacing: .02em; color: var(--faint);
}
.sessions li.sr-group:first-child { margin-top: 0; padding-top: 2px; border-top: 0; }
.sessions li.sr-group:hover { background: none; }

/* Folders: the same quiet rows. The chevron turns, the sessions ease open under the row, several can be open. */
/* Open folders scroll inside their section past this, so the session list below keeps its room. */
.rail-folders .folder-list { max-height: 38vh; }
.folder-list > li.folder { margin: 0; padding: 0; }
.folder-row { height: 34px; padding: 0 8px 0 6px; gap: 8px; border: 0; border-radius: 8px; font-weight: 600; transition: background var(--dur-fast) var(--ease-hover); }
:root .folder-row:hover { background: var(--sl-raise-1); }
:root .folder-row.on { background: var(--sl-raise-2); font-weight: 600; }
.folder-row .chev { width: 10px; height: 10px; margin: 0 -4px 0 2px; flex: none; fill: none; stroke: var(--faint); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-fast) var(--ease-out); }
.folder.open > .folder-row .chev { transform: rotate(90deg); stroke: var(--soft); }
.folder-row .count { font: 500 var(--fs-micro)/1 var(--font-mono); color: var(--faint); }
:root .folder-row .fi { stroke: var(--soft); }
:root .folder.drop > .folder-row { background: var(--sl-raise-2); box-shadow: inset 0 0 0 1.5px var(--brand); }
.folder-kids { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 200ms var(--ease-out); }
.folder.open > .folder-kids { grid-template-rows: 1fr; }
.folder-sess { min-height: 0; overflow: hidden; list-style: none; margin: 0; padding: 0 0 0 14px; }
.folder.open > .folder-kids > .folder-sess { padding-bottom: 4px; }
.folder-sess li.sub-row { list-style: none; }
.folder-note { list-style: none; padding: 3px 10px 6px 36px; font-size: var(--fs-small); color: var(--faint); }
.folder-note .link-btn { padding: 2px 4px; font-size: var(--fs-small); }

/* A menu opened from a row reaches across the sidebar's edge: the resize handle (z-index 30, over the menu's 20) does
   not take the clicks meant for its items while a menu is open. */
body:has(> .menu:not(.out)) .rail-resize { pointer-events: none; }

/* Details: a sheet of label and value rows in sections, copy buttons beside ids and paths. */
.sheet .sd-title { margin: 0 0 2px; overflow-wrap: anywhere; }
.sheet .sd-note { margin: 10px 0 0; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--action-tint); color: var(--action-strong); font-size: var(--fs-small); }
.sheet .sd-sec { margin-top: 14px; }
.sheet .sd-h { margin: 0 0 6px; font: 800 var(--fs-micro)/1.2 var(--font-display); font-stretch: 112%; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }
/* One label column width for every section, so the values line up down the whole sheet. */
.sheet .sd-rows { margin: 0; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 5px 16px; font-size: var(--fs-small); }
.sheet .sd-rows dt { color: var(--faint); }
.sheet .sd-rows dd { margin: 0; display: flex; align-items: baseline; gap: 8px; min-width: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.sheet .sd-rows dd .sd-v { min-width: 0; overflow-wrap: anywhere; }
.sheet .sd-rows dd.mono .sd-v { font: 500 var(--fs-small)/1.45 var(--font-mono); }
.sheet .sd-rows dd.long .sd-v { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--soft); }
.sheet .sd-rows dd.pending .sd-v { color: var(--faint); }
.sheet .sd-acts { flex: none; display: flex; gap: 4px; margin-left: auto; }
.sheet .sd-btn { padding: 1px 7px; border: 1px solid var(--hairline-strong); border-radius: 6px; background: var(--ground); cursor: pointer; font: 600 var(--fs-micro)/1.5 var(--font-body); color: var(--soft); }
.sheet .sd-btn:hover { color: var(--brand-deep); border-color: var(--brand-soft); }
.sheet .sd-row { flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .srow .sr-lead .arc { animation: none; }
  .srow .sr-detail, .folder-kids, .folder-row .chev, .srow .sr-time, .srow .sr-more { transition: none; }
}

/* ==========================================================================
   Tabs, layouts and viewers (2026-10-12, apaki/docs/layout.md).
   Arthur: "its all incredibly messy right now ... make it so that its not
   confusing". A tab is named after its workspace, with a quiet second name
   only to tell two apart; the Layout button names the arrangement; every
   viewer carries a link chip in its conversation's accent and the
   conversation a matching mark, and hovering either rings the other (a ring
   all the way round, never one lit side); a pane can fill the window.
   The accents mean "these belong together" and nothing else: none is the
   focus periwinkle, the waiting orange or the finished green.
   ========================================================================== */
.acc-0 { --acc-hsl: 174, 79%, 27%; }
.acc-1 { --acc-hsl: 263, 48%, 54%; }
.acc-2 { --acc-hsl: 339, 45%, 48%; }
.acc-3 { --acc-hsl: 208, 67%, 43%; }
.acc-4 { --acc-hsl: 39, 82%, 33%; }
.acc-5 { --acc-hsl: 76, 68%, 28%; }
:root[data-theme="dark"] .acc-0 { --acc-hsl: 172, 57%, 60%; }
:root[data-theme="dark"] .acc-1 { --acc-hsl: 259, 76%, 79%; }
:root[data-theme="dark"] .acc-2 { --acc-hsl: 340, 78%, 78%; }
:root[data-theme="dark"] .acc-3 { --acc-hsl: 210, 80%, 73%; }
:root[data-theme="dark"] .acc-4 { --acc-hsl: 42, 73%, 63%; }
:root[data-theme="dark"] .acc-5 { --acc-hsl: 76, 54%, 62%; }
.pane { --acc: hsl(var(--acc-hsl, 232, 12%, 50%)); }

/* A viewer's link chip: whose it is, in that conversation's accent. A soft rounded rectangle, no capsule, no dot. */
.link-chip {
  display: inline-flex; align-items: center; gap: 5px; flex: 0 1 auto; min-width: 0; max-width: 34%; height: 26px; padding: 0 8px 0 6px;
  border: 0; border-radius: 7px; background: hsla(var(--acc-hsl, 232, 12%, 50%), .1); cursor: pointer;
  font: 700 var(--fs-micro)/1 var(--font-display); font-stretch: 108%; letter-spacing: .01em; color: var(--acc);
  transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.link-chip[hidden] { display: none; }
.link-chip svg, .link-mark svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.link-chip .lc-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-chip:hover, .link-chip:focus-visible, .pane.link-from .link-chip { background: hsla(var(--acc-hsl, 232, 12%, 50%), .18); }
.link-chip:focus-visible, .link-mark:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
/* Its conversation is closed: the name stays, quiet, and a click opens it again. */
.link-chip.gone { background: var(--tint); color: var(--faint); font-weight: 600; }
.link-chip.gone:hover { color: var(--soft); }

/* A conversation's mark: it has viewers (how many, from two), in its accent. */
.link-mark {
  display: inline-flex; align-items: center; gap: 3px; flex: none; height: 28px; min-width: 28px; padding: 0 6px; justify-content: center;
  border: 0; border-radius: 7px; background: hsla(var(--acc-hsl, 232, 12%, 50%), .1); color: var(--acc); cursor: pointer;
  transition: background var(--dur-fast) var(--ease-hover);
}
.link-mark[hidden] { display: none; }
.link-mark .lm-n { font: 700 var(--fs-micro)/1 var(--font-mono); }
.link-mark:hover, .pane.link-from .link-mark { background: hsla(var(--acc-hsl, 232, 12%, 50%), .18); }

/* Hovering a link rings the other end, all the way round. */
.pane.link-hi, .stage.multi .pane.link-hi, .stage.multi .pane.focused.link-hi {
  box-shadow: inset 0 0 0 2px hsla(var(--acc-hsl, 232, 12%, 50%), .75); border-radius: 10px;
}
.pane { transition: box-shadow var(--dur-fast) var(--ease-hover); }

/* Gone to from the sidebar: a short ring that fades (still and brief with reduced motion). */
.pane.flash { animation: pane-flash 900ms var(--ease-out); }
@keyframes pane-flash {
  0% { box-shadow: inset 0 0 0 2px hsla(var(--pearl-stop-blue), .85); }
  100% { box-shadow: inset 0 0 0 2px hsla(var(--pearl-stop-blue), 0); }
}

/* Maximize: the pane fills the window under the top strip (the window buttons and the tabs stay). */
.icon-btn.max-btn { flex: none; }
.max-btn svg { width: 14px; height: 14px; fill: none; stroke: var(--soft); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.max-btn .i-shrink, .max-btn.on .i-grow { display: none; }
.max-btn.on .i-shrink { display: block; }
.max-btn.on { background: var(--tint); }
.max-btn.on svg { stroke: var(--ink); }
.pane-slot { min-width: 0; min-height: 0; background: transparent; }
.pane-max-layer { position: fixed; z-index: 9; left: 0; right: 0; top: var(--top); bottom: 0; display: none; padding: 0 8px 8px; background: hsl(var(--w)); }
body.pane-max .pane-max-layer { display: flex; animation: max-in 180ms var(--ease-out); }
@keyframes max-in { from { opacity: 0; } to { opacity: 1; } }
.pane-max-layer > .pane { flex: 1; min-width: 0; min-height: 0; border: 1px solid var(--sec-line); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 34px -26px rgba(var(--shadow-rgb), .5); }
body.maximized .pane-max-layer { padding: 0; }
body.maximized .pane-max-layer > .pane { border-radius: 0; border-width: 1px 0 0; }
body.pane-max .rail-resize { display: none; }
body.pane-max .tabs-tools { opacity: .45; pointer-events: none; }

/* Tab names: the workspace's name strong, a quiet second name only to tell two tabs apart, the conversations counted. */
.tab-s { flex: 0 1 auto; min-width: 0; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-micro); font-weight: 520; color: var(--faint); }
.tab.on .tab-s { color: var(--soft); }
.tab.named .tab-t { font-style: normal; }
.tab-rename {
  width: 150px; min-width: 0; height: 24px; padding: 0 7px; border: 1px solid var(--brand); border-radius: 6px;
  background: var(--ground); color: var(--ink); font: 700 var(--fs-small)/1 var(--font-display); outline: 0;
  box-shadow: 0 0 0 3px hsla(var(--pearl-stop-blue), .16);
}
.layout-btn .chev { width: 10px; height: 10px; margin-left: -2px; stroke: var(--faint); }

/* A browser pane's pages as tabs (browser.js, "like codex/gpt"): one row under the address strip, from two pages. */
.pane.web.tabbed .pane-bar { flex-wrap: wrap; row-gap: 4px; padding-bottom: 6px; }
.web-tabs { order: 20; flex: 1 0 100%; display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 0 0 0 20px; }
.web-tabs[hidden] { display: none; }
.web-tabs::-webkit-scrollbar { display: none; }
.web-tab {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 1 190px; min-width: 76px; height: 26px; padding: 0 3px 0 5px;
  border: 0; border-radius: 7px; background: none; cursor: pointer; color: var(--soft);
  font: 600 var(--fs-micro)/1 var(--font-body); text-align: left;
  transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.web-tab:hover { background: var(--ghost-hover); color: var(--ink); }
.web-tab.on { background: var(--tint-deep); color: var(--ink); font-weight: 720; }
.web-tab:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.wt-i {
  display: grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 4px;
  background: var(--tint); color: var(--soft); font: 760 var(--fs-micro)/1 var(--font-display);
}
.web-tab.on .wt-i { background: hsla(var(--w), .9); color: var(--ink); box-shadow: 0 0 0 1px var(--hairline-strong); }
.web-tab.loading .wt-i { animation: wt-load 1.1s var(--ease-hover) infinite alternate; }
@keyframes wt-load { from { opacity: 1; } to { opacity: .45; } }
.web-tab.failed .wt-t { color: var(--action-strong); }
.wt-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-x { display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 5px; opacity: 0; transition: opacity var(--dur-fast) var(--ease-hover); }
.wt-x svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.web-tab:hover .wt-x, .web-tab.on .wt-x { opacity: .75; }
.wt-x:hover { opacity: 1; background: var(--ghost-press); }
.pane.web .new-tab svg { stroke-width: 1.6; }

@container pane (max-width: 520px) {
  .link-chip { max-width: 30%; }
  .link-chip .lc-t { display: none; }
  .web-tab { flex-basis: 120px; }
}
/* Maximize stays in reach down to 300 px (2026-10-13: with the side panel beside them, three conversations in a row are
   narrow, and maximize is how you focus on one); it was hidden from 380 px. */
@container pane (max-width: 300px) {
  .pane-bar .max-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pane.flash { animation: none; box-shadow: inset 0 0 0 2px hsla(var(--pearl-stop-blue), .7); }
  body.pane-max .pane-max-layer { animation: none; }
  .web-tab.loading .wt-i { animation: none; opacity: .6; }
  .pane, .link-chip, .link-mark, .web-tab, .wt-x { transition: none; }
}
/* The count and the Layout button stay in view however many tabs there are; tabs give up width before the row scrolls. */
.tab-tools-slot { display: flex; align-items: center; flex: none; min-width: 0; }
.tabs .tab { flex: 0 1 auto; }
/* With the strip showing, the active tab names the page, so the address takes the title's line. */
.pane.web.tabbed .web-head .title { display: none; }
.pane.web.tabbed .web-addr { margin-top: 0; }
.tabs .tab.on { flex-shrink: 0; }
.tab-tools-slot .tab-count { white-space: nowrap; }
@media (max-width: 1280px) { .tab-tools-slot .tab-count { display: none; } }
/* A narrow pane keeps its header on one line: the title gives way first (the mark and close stay in reach). */
@container pane (max-width: 340px) { .pane-bar .title-block { min-width: 64px; } }
/* The other end of a hovered link also tints its header: a browser's page is a native window over its body, so a ring
   alone would hide under it. */
.pane.link-hi > .pane-bar { background: hsla(var(--acc-hsl, 232, 12%, 50%), .13); transition: background var(--dur-fast) var(--ease-hover); }
@media (prefers-reduced-motion: reduce) { .pane.link-hi > .pane-bar { transition: none; } }
/* ---------- the console (2026-10-12, console.js) ----------
   Arthur: "a toggle console that transitions a pane to console for either claude or codex SEAMLESSLY like super
   cleanly, as if our ui was right on top of it". The terminal sits in the pane's own frame, under the same header,
   on a frosted layer of the same ground; the conversation lifts off it (up and out, about 200 ms) and settles back
   over it. The terminal itself stays still: it was underneath all along. No motion under reduced motion. */
.pane-bar .console-btn[hidden], .pane-bar .term-btn[hidden] { display: none; }
/* Beside the maximize and close buttons, drawn like them (2026-10-13, the redesigned header). */
.pane-bar .console-btn, .pane-bar .term-btn { flex: none; transition: background var(--dur-fast) var(--ease-hover); }
.pane-bar .console-btn svg, .pane-bar .term-btn svg { width: 15px; height: 15px; stroke-width: 1.5; }
.pane-bar .console-btn[aria-pressed="true"] { background: var(--brand-wash); }
.pane-bar .console-btn[aria-pressed="true"] svg { stroke: var(--brand-strong); }
/* A narrow pane keeps the toggle; Open in a terminal window stays in the title's right-click menu. */
@container pane (max-width: 460px) { .pane-bar .term-btn { display: none; } }
.pane > .console {
  grid-row: 2; grid-column: 1; z-index: 6; position: relative; min-width: 0; min-height: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  background: hsla(var(--w), .9); -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  opacity: 0; transform: scale(.992); visibility: hidden; pointer-events: none;
  transition: opacity 200ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s linear 220ms;
}
.pane.console-on > .console {
  opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity 200ms var(--ease-out), transform 220ms var(--ease-out), visibility 0s;
}
.pane > .ground, .pane > .composer-wrap, .pane > .prompt-pin { transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out); }
.pane.console-on > .ground, .pane.console-on > .composer-wrap, .pane.console-on > .prompt-pin { opacity: 0; transform: translate3d(0, -10px, 0); pointer-events: none; }
/* A reload or a restore: the console is simply there. */
.pane.console-instant > .console, .pane.console-instant > .ground, .pane.console-instant > .composer-wrap, .pane.console-instant > .prompt-pin { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .pane > .console, .pane.console-on > .console { transform: none; transition: opacity 120ms linear, visibility 0s linear 120ms; }
  .pane.console-on > .console { transition: opacity 120ms linear, visibility 0s; }
  .pane > .ground, .pane > .composer-wrap, .pane > .prompt-pin, .pane.console-on > .ground, .pane.console-on > .composer-wrap, .pane.console-on > .prompt-pin { transform: none; transition: opacity 120ms linear; }
}
/* The padding is the terminal element's own, so the fit addon (which subtracts it) never sizes a row past the bottom. */
.console-term { min-width: 0; min-height: 0; overflow: hidden; }
.console-term .xterm { height: 100%; padding: 10px 6px 8px 14px; }
.console-term .xterm-viewport { background: transparent !important; }
.console-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 8px 14px;
  border-bottom: 1px solid var(--hairline); font-size: var(--fs-small); color: var(--soft); background: hsla(var(--w), .7);
}
.console-bar[hidden] { display: none; }
.console-bar.warn { color: var(--action-strong); background: var(--action-tint); }
.console-bar .cb-text { flex: 1 1 220px; min-width: 0; }
.console-bar .cb-act {
  flex: none; border: 1px solid var(--hairline-strong); background: var(--card); color: var(--ink); border-radius: var(--radius-sm);
  padding: 4px 10px; font-size: var(--fs-small); cursor: pointer; transition: background var(--dur-fast) var(--ease-hover);
}
.console-bar .cb-act:hover { background: var(--tint); }
.console-bar .cb-act.primary { background: var(--fill); border-color: var(--fill); color: #fff; }
.console-bar .cb-act.primary:hover { background: var(--fill-hover); }
/* The phone's read-only look at the PC's console, inside the "in use" card. */
.takeover .tk-console {
  margin: 12px 0 0; max-height: 260px; overflow: auto; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); background: var(--tint); color: var(--ink);
  font-family: var(--font-mono); font-size: var(--fs-micro); line-height: 1.45; white-space: pre; overflow-wrap: normal;
}
.takeover .tk-console:empty { display: none; }

/* ==========================================================================
   The side panel (2026-10-13, apaki/docs/layout.md, sidepanel.js). Arthur:
   "the current way we display the browser is incredibly hectic ... have a
   dedicated pane that comes out from the right side of the app (that can be
   minimized and opened, that has all the browsers that are opened". Each tab's
   viewers (browser pages, artifacts, changes, tasks) live in a panel docked to
   the right of the main area, a framed surface like the stage beside it. Its
   switcher names the conversations in their accents (the same accents as their
   headers' link marks); the active one is bold with a line under it, never a
   pill or a dot. Collapsed, it is a slim rail of counts. The stage, and a
   maximized pane, stop at it (--spw its width, --spg the gap, set by app.js
   for the tab in front). Motion is a 170 ms fade when it opens, none with
   reduced motion; no layout property animates.
   ========================================================================== */
.stages > .stage { right: calc(8px + var(--spw, 0px) + var(--spg, 0px)); }
body.maximized .stages > .stage { right: var(--spw, 0px); }
.pane-max-layer { right: calc(var(--spw, 0px) + var(--spg, 0px)); }
body.maximized .pane-max-layer { right: var(--spw, 0px); }

.side-panel { position: absolute; z-index: 1; top: 0; right: 8px; bottom: 8px; display: none; min-width: 0; }
.side-panel.on:not([data-state="none"]) { display: flex; }
.side-panel[data-state="rail"] { width: 44px; }
body.maximized .side-panel { top: 0; right: 0; bottom: 0; }
.sp-card {
  position: relative; flex: 1; min-width: 0; display: flex; overflow: hidden;
  border: 1px solid var(--sec-line); border-radius: 12px; background: hsla(var(--w), .42);
  box-shadow: 0 10px 34px -26px rgba(var(--shadow-rgb), .5);
  transition: box-shadow var(--dur-fast) var(--ease-hover);
}
body.maximized .sp-card { border-radius: 0; border-width: 1px 0 0 1px; }
.side-panel.focused .sp-card { box-shadow: inset 0 0 0 1.5px hsla(var(--pearl-stop-blue), .38), 0 10px 34px -26px rgba(var(--shadow-rgb), .5); }

/* Its left edge drags, in the gap beside it (a gutter, like the sidebar's edge). */
.sp-resize { position: absolute; z-index: 2; top: 0; bottom: 0; left: -8px; width: 8px; cursor: col-resize; touch-action: none; }
.sp-resize::after { content: ''; position: absolute; inset: 0; opacity: 0; background: linear-gradient(90deg, transparent, hsla(var(--pearl-stop-blue), .38), transparent); transition: opacity 140ms var(--ease-hover); }
.sp-resize:hover::after, body.sp-dragging .sp-resize::after { opacity: 1; }
.side-panel[data-state="rail"] .sp-resize { display: none; }
body.maximized .sp-resize { left: -4px; }
body.sp-dragging, body.sp-dragging * { cursor: col-resize !important; user-select: none; }

/* Open: the switcher, a quiet note, the entries, the viewer. */
.sp-main { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; }
.side-panel[data-state="rail"] .sp-main { display: none; }
.side-panel.sp-opening .sp-main { animation: sp-in 170ms var(--ease-out); }
@keyframes sp-in { from { opacity: 0; } to { opacity: 1; } }
.sp-head {
  display: flex; align-items: stretch; gap: 2px; flex: none; min-height: 44px; padding: 0 6px 0 4px;
  background: hsla(var(--w), .86); border-bottom: 1px solid var(--hairline);
}
.sp-head > .icon-btn { align-self: center; width: 30px; height: 30px; flex: none; }
.sp-head > .icon-btn svg, .sp-rail .sp-open-btn svg { width: 15px; height: 15px; }
.sp-more svg circle { fill: var(--soft); stroke: none; }
.sp-sessions { display: flex; align-items: stretch; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sp-sessions::-webkit-scrollbar { display: none; }
.sp-sess, .sp-rail-g { --acc: hsl(var(--acc-hsl, 232, 12%, 50%)); }
.sp-sess {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: 0 1 auto; min-width: 64px; max-width: 230px;
  padding: 0 9px; border: 0; background: none; cursor: pointer; color: var(--acc);
  font: 620 var(--fs-small)/1.2 var(--font-display); font-stretch: 104%; letter-spacing: -.003em;
  transition: background var(--dur-fast) var(--ease-hover);
}
.sp-sess::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0;
  background: var(--acc); transform: scaleX(0); transition: transform var(--dur-fast) var(--ease-out);
}
.sp-sess.on { font-weight: 820; }
.sp-sess.on::after { transform: none; }
.sp-sess:hover, .sp-sess.link-hi { background: hsla(var(--acc-hsl, 232, 12%, 50%), .09); }
.sp-sess:focus-visible { outline: 2px solid var(--acc); outline-offset: -2px; border-radius: 6px; }
.sp-sess-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-sess-n { flex: none; font: 600 var(--fs-micro)/1 var(--font-mono); color: var(--faint); }
/* Something new arrived there that you have not looked at: its count in its accent, on a tint. */
.sp-sess.fresh { background: hsla(var(--acc-hsl, 232, 12%, 50%), .1); }
.sp-sess.fresh .sp-sess-n { color: var(--acc); font-weight: 800; }
.sp-note {
  flex: none; padding: 6px 12px; border-bottom: 1px solid var(--hairline); background: hsla(var(--w), .7);
  font-size: var(--fs-micro); line-height: 1.4; color: var(--faint); overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.sp-note[hidden] { display: none; }
.sp-items {
  display: flex; align-items: center; gap: 2px; flex: none; min-height: 40px; padding: 5px 8px;
  overflow-x: auto; scrollbar-width: none; background: hsla(var(--w), .74); border-bottom: 1px solid var(--hairline);
}
.sp-items::-webkit-scrollbar { display: none; }
.sp-items:empty { display: none; }
.sp-item {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 1 210px; min-width: 112px; height: 28px; padding: 0 3px 0 6px;
  border: 0; border-radius: 7px; background: none; cursor: pointer; color: var(--soft);
  font: 600 var(--fs-small)/1 var(--font-body); text-align: left;
  transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.sp-item:hover { background: var(--ghost-hover); color: var(--ink); }
.sp-item.on { background: var(--tint-deep); color: var(--ink); font-weight: 720; }
.sp-item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.sp-ic { display: grid; place-items: center; flex: none; width: 18px; height: 18px; }
.sp-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sp-init { display: grid; place-items: center; width: 17px; height: 17px; border-radius: 4px; background: var(--tint); color: var(--soft); font: 760 var(--fs-micro)/1 var(--font-display); }
.sp-item.on .sp-init { background: hsla(var(--w), .92); color: var(--ink); box-shadow: 0 0 0 1px var(--hairline-strong); }
.sp-item.loading .sp-init { animation: wt-load 1.1s var(--ease-hover) infinite alternate; }
.sp-item.failed .sp-it { color: var(--action-strong); }
.sp-it { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-x { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 5px; opacity: 0; transition: opacity var(--dur-fast) var(--ease-hover); }
.sp-x svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.sp-item:hover .sp-x, .sp-item.on .sp-x, .sp-item:focus-visible .sp-x { opacity: .75; }
.sp-x:hover { opacity: 1; background: var(--ghost-press); }
.sp-closeall {
  flex: none; margin-left: auto; padding: 5px 8px; border: 0; border-radius: 6px; background: none; cursor: pointer; white-space: nowrap;
  color: var(--faint); font: 600 var(--fs-micro)/1 var(--font-body); transition: color var(--dur-fast) var(--ease-hover), background var(--dur-fast) var(--ease-hover);
}
.sp-closeall:hover { color: var(--ink); background: var(--ghost-hover); }

/* The viewers in it: only the one on screen is displayed, the others stay alive. They have no grip, close or maximize of
   their own there (the panel's tabs close them), and no link chip unless their conversation is closed or in another tab. */
.sp-body { position: relative; flex: 1; min-width: 0; min-height: 0; display: flex; }
.sp-body > .pane { display: none; flex: 1; min-width: 0; min-height: 0; }
.sp-body > .pane.sp-on { display: grid; }
.sp-body > .pane > .pane-bar { min-height: 44px; padding: 6px 8px 6px 10px; }
.sp-body .pane-bar > .grip, .sp-body .pane-bar > .close, .sp-body .pane-bar > .max-btn, .sp-body .web-tabs { display: none; }
.sp-body .link-chip:not(.gone):not(.away) { display: none; }
.sp-body .pane-bar .title { font-size: var(--fs-body); }
/* An artifact viewer with its own toolbar (revisions, the view's controls, Reload, Open outside, Copy, Download, Edit:
   artifacts.js art-tools) needs no header in the panel: the panel's tab names it. The header comes back only to carry
   the chip of a conversation that is closed or in another tab. */
.sp-body > .pane.viewer.art-tooled { grid-template-rows: auto minmax(0, 1fr); }
.sp-body > .pane.viewer.art-tooled > .art-ground { grid-row: 2; }
.sp-body > .pane.viewer.art-tooled > .pane-bar { display: none; }
.sp-body > .pane.viewer.art-tooled:has(> .pane-bar .link-chip.gone:not([hidden]), > .pane-bar .link-chip.away:not([hidden])) > .pane-bar { display: flex; min-height: 40px; }
.sp-body > .pane.viewer.art-tooled > .find-bar { margin-top: 48px; }
.sp-body .pane.web.tabbed .pane-bar { flex-wrap: nowrap; padding-bottom: 6px; }
/* A browser there: the panel's tab names the page, so its title line carries what Claude just did ("Claude · type [3]"),
   whatever the panel's width. */
.sp-body .pane.web .web-head .title { display: none; }
.sp-body .pane.web .web-act { display: block; }
.sp-body .pane.web .web-head { min-height: 14px; }

/* Collapsed: the open button, then each conversation's count in its accent (new ones tinted until you look). */
.sp-rail { display: none; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 6px 0; background: hsla(var(--w), .8); }
.side-panel[data-state="rail"] .sp-rail { display: flex; }
.sp-rail-list { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 0; overflow-y: auto; scrollbar-width: none; padding-top: 6px; border-top: 1px solid var(--hairline); }
.sp-rail-g {
  display: grid; justify-items: center; gap: 3px; width: 32px; padding: 6px 0 5px; border: 0; border-radius: 8px; cursor: pointer;
  background: hsla(var(--acc-hsl, 232, 12%, 50%), .1); color: var(--acc);
  transition: background var(--dur-fast) var(--ease-hover), box-shadow var(--dur-fast) var(--ease-hover);
}
.sp-rail-g:hover, .sp-rail-g.link-hi { background: hsla(var(--acc-hsl, 232, 12%, 50%), .2); }
.sp-rail-g.fresh { background: hsla(var(--acc-hsl, 232, 12%, 50%), .24); box-shadow: inset 0 0 0 1.5px hsla(var(--acc-hsl, 232, 12%, 50%), .55); }
.sp-rail-g:focus-visible { outline: 2px solid var(--acc); outline-offset: 1px; }
.sp-rail-i { font: 820 var(--fs-micro)/1 var(--font-display); letter-spacing: .02em; }
.sp-rail-n { font: 600 var(--fs-micro)/1 var(--font-mono); color: var(--soft); }

/* Maximized: the conversation's header steps to the tab's other conversations without restoring. */
.max-nav { display: inline-flex; align-items: center; flex: none; }
.max-nav[hidden] { display: none; }
.max-nav .icon-btn { width: 28px; height: 28px; }
.max-nav .icon-btn svg { width: 14px; height: 14px; stroke-width: 1.6; }
.max-nav .mx-n { min-width: 44px; text-align: center; font: 600 var(--fs-micro)/1 var(--font-mono); color: var(--faint); white-space: nowrap; }
@container pane (max-width: 520px) { .max-nav .mx-n { display: none; } }

:root[data-theme="dark"] .sp-card { background: hsla(var(--w), .5); box-shadow: 0 10px 34px -22px rgba(0, 0, 0, .8); }

@media (prefers-reduced-motion: reduce) {
  .side-panel.sp-opening .sp-main { animation: none; }
  .sp-sess, .sp-sess::after, .sp-item, .sp-x, .sp-closeall, .sp-rail-g, .sp-card, .sp-resize::after { transition: none; }
  .sp-item.loading .sp-init { animation: none; opacity: .6; }
}

/* ==========================================================================
   Viewers like ChatGPT's side window (2026-10-13; artifacts.js, codeview.js,
   tableview.js, jsontree.js, chart.js, docview.js). Arthur: "literally exactly
   everything chatgpt's window could display and allow the session to do".
   One toolbar per viewer, first in the viewer's own content (never the pane
   header, so the viewer can be mounted anywhere), a quiet frosted strip:
   revisions, the view's controls, then actions. The content area is its own
   size container, so the toolbar folds by the viewer's width wherever it sits.
   ========================================================================== */
.art-ground { container: viewer / inline-size; position: relative; }
/* The header's revision arrows, Reload and Open outside live in the toolbar now; the header keeps the title, the link chip and Close. */
.pane.viewer.art-tooled > .pane-bar .art-revs, .pane.viewer.art-tooled > .pane-bar .reload, .pane.viewer.art-tooled > .pane-bar .outside { display: none; }
.pane.viewer.art-tooled > .find-bar { margin-top: 52px; }

.art-tools {
  flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; min-height: 42px; padding: 5px 8px 5px 10px;
  border-bottom: 1px solid var(--hairline); background: hsla(var(--w), .74);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
}
.art-tools .icon-btn { width: 28px; height: 28px; flex: none; }
.art-tools .icon-btn svg { width: 15px; height: 15px; }
.art-tools .icon-btn.on, .art-tools .icon-btn[aria-pressed="true"] { background: var(--brand-wash); }
.art-tools .icon-btn.on svg, .art-tools .icon-btn[aria-pressed="true"] svg { stroke: var(--brand-strong); }
.art-tools [hidden] { display: none !important; }
.at-revs { display: flex; align-items: center; gap: 1px; flex: none; padding-right: 6px; margin-right: 2px; border-right: 1px solid var(--hairline); }
.at-revn { min-width: 76px; padding: 0 4px; text-align: center; font: 650 var(--fs-micro)/1 var(--font-mono); color: var(--soft); white-space: nowrap; }
.at-revs.old .at-revn { color: var(--action-strong); }
.at-revs .icon-btn:disabled { opacity: .3; }
.at-main { flex: 1 1 200px; min-width: 0; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.at-info { min-width: 0; font: 600 var(--fs-micro)/1.3 var(--font-body); letter-spacing: .01em; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.at-ctl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.at-acts { display: flex; align-items: center; gap: 2px; flex: none; margin-left: auto; }
.at-seg button { padding: 4px 9px; font-size: var(--fs-micro); }
.art-tools .chip-btn { height: 28px; padding: 0 9px; font-size: var(--fs-small); }
.art-tools .chip-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.art-tools .chip-btn.at-small { height: 26px; font-size: var(--fs-micro); font-weight: 650; }
.art-tools .at-commit { background: var(--fill); color: #fff; font-weight: 700; padding: 0 14px; }
.art-tools .at-commit:hover { background: var(--fill-hover); color: #fff; }
.art-tools .at-commit:disabled { opacity: .6; cursor: default; }
.at-ro { font: 600 var(--fs-micro)/1 var(--font-body); color: var(--faint); padding: 0 6px; white-space: nowrap; }
.at-note { display: inline-flex; align-items: center; gap: 6px; max-width: 360px; font: 560 var(--fs-micro)/1.3 var(--font-body); color: var(--action-strong); padding-right: 6px; }
.at-zoom { display: flex; align-items: center; gap: 1px; }
.at-zoom .at-pct { min-width: 50px; justify-content: center; font: 650 var(--fs-micro)/1 var(--font-mono); }
.at-filter {
  display: flex; align-items: center; gap: 6px; height: 28px; width: 210px; max-width: 100%; padding: 0 8px; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-strong); background: var(--card); transition: border-color var(--dur-fast) var(--ease-hover), box-shadow var(--dur-fast) var(--ease-hover);
}
.at-filter:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px hsla(232, 60%, 62%, .14); }
.at-filter svg { width: 13px; height: 13px; flex: none; fill: none; stroke: var(--faint); stroke-width: 1.6; stroke-linecap: round; }
.at-filter input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: 520 var(--fs-small) var(--font-body); color: var(--ink); }
.at-filter input::-webkit-search-cancel-button { display: none; }
@container viewer (max-width: 560px) {
  .at-revn { min-width: 0; }
  .at-info { display: none; }
  .at-filter { width: 150px; }
  .art-tools .at-edit span { display: none; }
}
@container viewer (max-width: 400px) {
  .art-tools .at-outside, .art-tools .at-reload { display: none; }
}

/* A short message at the bottom of the viewer (Copied, Saved). */
.art-toast {
  position: absolute; left: 50%; bottom: 16px; z-index: 5; transform: translateX(-50%); max-width: calc(100% - 32px);
  padding: 8px 14px; border-radius: 10px; background: var(--ink-deep); color: #F4F5FD; font: 560 var(--fs-small)/1.35 var(--font-body);
  box-shadow: 0 12px 30px -14px rgba(var(--shadow-rgb), .7); pointer-events: none;
}
.art-toast[hidden] { display: none; }
.art-toast.bad { background: var(--action-strong); }

/* Code and text: a gutter of line numbers drawn by CSS (never copied, never found), blocks skipped while off screen. */
.art-body.v-code, .art-body.v-table, .art-body.v-sheet, .art-body.v-edit { overflow: hidden; padding: 0; }
.cv {
  flex: 1; min-height: 0; overflow: auto; padding: 10px 0 24px; tab-size: 4;
  font: 500 var(--fs-small) var(--font-mono); line-height: 21px; color: var(--ink); background: hsla(var(--w), .9);
  scrollbar-width: thin;
}
.cv-b { content-visibility: auto; }
.cv-l { position: relative; padding: 0 18px 0 calc(var(--cv-gutter, 4ch) + 26px); white-space: pre; min-height: 21px; }
.cv-l::before {
  content: attr(data-n); position: absolute; left: 0; width: calc(var(--cv-gutter, 4ch) + 8px); text-align: right;
  color: var(--faint); opacity: .7; user-select: none; -webkit-user-select: none; font-variant-numeric: tabular-nums;
}
.cv-l:hover { background: hsla(232, 60%, 62%, .05); }
.cv-l:hover::before { opacity: 1; }
.cv.wrap .cv-l { white-space: pre-wrap; overflow-wrap: anywhere; }
.cv-empty { padding: 30px; color: var(--faint); font-family: var(--font-body); }
/* Syntax colours (highlight.js class names), made for Apaki's own surfaces in each theme. */
.cv .hljs-keyword, .cv .hljs-selector-tag, .cv .hljs-literal, .cv .hljs-doctag, .cv .hljs-type { color: #6A3DBD; }
.cv .hljs-string, .cv .hljs-regexp, .cv .hljs-selector-attr, .cv .hljs-template-variable { color: #1B7A5A; }
.cv .hljs-number, .cv .hljs-symbol, .cv .hljs-bullet { color: #B04E17; }
.cv .hljs-comment, .cv .hljs-quote { color: #7A7D98; font-style: italic; }
.cv .hljs-title, .cv .hljs-title.function_, .cv .hljs-section { color: #2557B0; }
.cv .hljs-title.class_, .cv .hljs-built_in, .cv .hljs-selector-class, .cv .hljs-selector-id { color: #0C6F87; }
.cv .hljs-attr, .cv .hljs-attribute, .cv .hljs-property, .cv .hljs-variable, .cv .hljs-params { color: #8C4A0B; }
.cv .hljs-tag, .cv .hljs-name { color: #2557B0; }
.cv .hljs-meta, .cv .hljs-meta .hljs-keyword { color: #9B3A78; }
.cv .hljs-addition { color: var(--good); background: var(--good-tint); }
.cv .hljs-deletion { color: #8A3A22; background: #FBEDEA; }
.cv .hljs-emphasis { font-style: italic; }
.cv .hljs-strong { font-weight: 700; }
.cv .hljs-link { text-decoration: underline; }

/* Tables: a sticky header, a row number column that stays put, rows drawn a screenful at a time. */
.tv { flex: 1; min-height: 0; display: flex; flex-direction: column; background: hsla(var(--w), .92); outline: none; }
.tv-scroll { flex: 1; min-height: 0; overflow: auto; position: relative; scrollbar-width: thin; }
.tv-head, .tv-r { display: grid; grid-template-columns: var(--tv-cols); width: var(--tv-width); min-width: 100%; }
.tv-head { position: sticky; top: 0; z-index: 3; background: var(--card); border-bottom: 1px solid var(--hairline-strong); box-shadow: 0 6px 12px -12px rgba(var(--shadow-rgb), .4); }
.tv-body { position: relative; width: var(--tv-width); min-width: 100%; }
.tv-rows { position: absolute; inset: 0 auto auto 0; width: 100%; }
.tv-r { position: absolute; left: 0; top: 0; height: 28px; }
.tv-r.odd { background: hsla(232, 45%, 60%, .035); }
.tv-r:hover { background: hsla(232, 60%, 62%, .07); }
.tv-c {
  display: block; min-width: 0; height: 28px; padding: 0 10px; border-right: 1px solid var(--hairline);
  font: 500 var(--fs-small) var(--font-body); line-height: 28px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tv-c.num { text-align: right; font-variant-numeric: tabular-nums; }
.tv-n { position: sticky; left: 0; z-index: 1; text-align: right; color: var(--faint); font: 500 var(--fs-micro) var(--font-mono); line-height: 28px; background: var(--card); border-right: 1px solid var(--hairline-strong); }
.tv-r.odd .tv-n { background: hsl(232, 40%, 98.6%); }
.tv-h { position: relative; padding: 0; height: 32px; display: flex; align-items: center; overflow: visible; }
.tv-corner { height: 32px; line-height: 32px; z-index: 4; }
.tv-sort {
  flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; gap: 4px; padding: 0 6px 0 10px; border: 0; background: none; cursor: pointer;
  font: 750 var(--fs-micro)/1 var(--font-body); letter-spacing: .02em; color: var(--soft); text-align: left;
}
.tv-h.num .tv-sort { flex-direction: row-reverse; text-align: right; padding: 0 10px 0 6px; }
.tv-sort .tv-hn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-sort svg { width: 11px; height: 11px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .35; }
.tv-sort:hover { color: var(--ink); background: hsla(232, 60%, 62%, .06); }
.tv-sort:hover svg { opacity: .7; }
.tv-sort.on { color: var(--brand-deep); }
.tv-sort.on svg { opacity: 1; stroke: var(--brand-strong); }
.tv-grip { position: absolute; right: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 2; }
.tv-grip:hover { background: linear-gradient(90deg, transparent 3px, var(--brand-soft) 3px, var(--brand-soft) 5px, transparent 5px); }
.tv-c.hit { background: hsla(var(--pearl-stop-blue), .08); }
.tv-c.cur { box-shadow: inset 0 0 0 2px var(--peach-glow); }

/* Workbook sheets: tabs under the table, as in a spreadsheet. */
.art-sheets {
  flex: none; display: flex; gap: 2px; padding: 4px 8px 6px; overflow-x: auto; scrollbar-width: thin;
  border-top: 1px solid var(--hairline); background: hsla(var(--w), .8);
}
.art-sheets[hidden] { display: none; }
.art-sheets button {
  flex: none; max-width: 200px; height: 28px; padding: 0 12px; border: 0; border-radius: 0 0 7px 7px; background: none; cursor: pointer;
  font: 620 var(--fs-small)/1 var(--font-body); color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.art-sheets button:hover { background: var(--tint); color: var(--ink); }
.art-sheets button.on { background: var(--card); color: var(--brand-deep); font-weight: 780; box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .14), 0 0 0 1px var(--hairline-strong); }

/* JSON as a tree. */
.art-body.v-json { padding: 12px; }
.jt { padding: 14px 16px 30px; border-radius: 12px; background: hsla(var(--w), .9); border: 1px solid var(--hairline); font: 500 var(--fs-small)/1.65 var(--font-mono); color: var(--ink); }
.jt details > summary { list-style: none; cursor: pointer; border-radius: 5px; padding: 0 4px; margin-left: -4px; }
.jt details > summary::-webkit-details-marker { display: none; }
.jt details > summary::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 9px 2px 1px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(-45deg); transition: transform var(--dur-fast) var(--ease-out); }
.jt details[open] > summary::before { transform: rotate(45deg); }
.jt details > summary:hover { background: hsla(232, 60%, 62%, .07); }
.jt details.empty > summary::before { opacity: 0; }
.jt-kids { padding-left: 20px; }
.jt-leaf { padding-left: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.jt-k { color: #8C4A0B; }
.jt-k.jt-i { color: var(--faint); }
.jt-p { color: var(--faint); }
.jt-sum { margin: 0 6px; font: 600 var(--fs-micro) var(--font-body); color: var(--faint); }
.jt details[open] > summary .jt-sum, .jt details[open] > summary .jt-close { display: none; }
.jt-str { color: #1B7A5A; }
.jt-num { color: #B04E17; }
.jt-bool, .jt-null { color: #6A3DBD; }
.jt-more { margin: 4px 0 4px 12px; height: 26px; padding: 0 10px; border: 1px solid var(--hairline-strong); border-radius: 7px; background: var(--card); cursor: pointer; font: 650 var(--fs-micro) var(--font-body); color: var(--brand-deep); }
.jt-more:hover { border-color: var(--brand); }

/* Charts: the SVG on a card; the tooltip is a small frosted card that follows the pointer. */
.art-body.v-chart { padding: 10px; overflow: hidden; }
.ch { position: relative; flex: 1; min-height: 0; display: flex; border-radius: 12px; background: var(--card); border: 1px solid var(--hairline); overflow: hidden; }
.ch-box { flex: 1; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; }
.ch-box.zoomed { display: block; overflow: auto; }
.ch-svg { display: block; flex: none; }
.ch-svg text { font-variant-numeric: tabular-nums; }
.ch-tip {
  position: absolute; left: 0; top: 0; z-index: 4; min-width: 140px; max-width: 280px; padding: 8px 10px; pointer-events: none;
  border-radius: 10px; background: hsla(var(--w), .94); border: 1px solid var(--hairline-strong);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 14px 30px -16px rgba(var(--shadow-rgb), .55); font: 520 var(--fs-small)/1.35 var(--font-body); color: var(--ink);
}
.ch-tip[hidden] { display: none; }
.ch-tip-h { margin-bottom: 5px; font-weight: 760; color: var(--ink-deep); }
.ch-tip-r { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 8px; color: var(--soft); }
.ch-tip-r i { width: 10px; height: 10px; border-radius: 2.5px; }
.ch-tip-r span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-tip-r b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* Word documents: the same page as Markdown. */
.art-body.k-docx { padding: 12px; }
.art-doc.docx table { border-collapse: collapse; margin: 12px 0; font-size: var(--fs-small); }
.art-doc.docx td, .art-doc.docx th { border: 1px solid var(--hairline-strong); padding: 6px 9px; vertical-align: top; }
.art-doc.docx td > p, .art-doc.docx th > p { margin: 0; }
.art-doc.docx img { max-width: 100%; height: auto; border-radius: 4px; }
.art-doc.docx .docx-empty { color: var(--faint); }

/* Changes between revisions (the worktree diff's look) and the editor. */
.art-body.v-changes { padding: 12px; }
.art-diff { border-radius: 12px; border: 1px solid var(--hairline); background: hsla(var(--w), .92); overflow: hidden; }
.art-diff .df-pre { border-top: 0; }
.art-diff .df-note { padding: 18px; color: var(--faint); font-size: var(--fs-small); }
.art-editor {
  flex: 1; min-height: 0; width: 100%; margin: 0; padding: 16px 20px 40px; border: 0; outline: none; resize: none; tab-size: 4;
  font: 500 var(--fs-small) var(--font-mono); line-height: 21px; color: var(--ink); background: var(--card);
  box-shadow: inset 0 0 0 2px hsla(232, 60%, 62%, .22);
}
.art-figure.zoomed { display: block; cursor: default; }
.art-figure.zoomed img { max-width: none; max-height: none; }

:root[data-theme="dark"] .art-tools { background: hsla(246, 20%, 12%, .78); }
:root[data-theme="dark"] .cv { background: hsla(246, 22%, 9%, .7); }
:root[data-theme="dark"] .cv .hljs-keyword, :root[data-theme="dark"] .cv .hljs-selector-tag, :root[data-theme="dark"] .cv .hljs-literal, :root[data-theme="dark"] .cv .hljs-doctag, :root[data-theme="dark"] .cv .hljs-type { color: #B9A6FF; }
:root[data-theme="dark"] .cv .hljs-string, :root[data-theme="dark"] .cv .hljs-regexp, :root[data-theme="dark"] .cv .hljs-selector-attr, :root[data-theme="dark"] .cv .hljs-template-variable { color: #7FDBC6; }
:root[data-theme="dark"] .cv .hljs-number, :root[data-theme="dark"] .cv .hljs-symbol, :root[data-theme="dark"] .cv .hljs-bullet { color: #F6B895; }
:root[data-theme="dark"] .cv .hljs-comment, :root[data-theme="dark"] .cv .hljs-quote { color: #7E81A3; }
:root[data-theme="dark"] .cv .hljs-title, :root[data-theme="dark"] .cv .hljs-title.function_, :root[data-theme="dark"] .cv .hljs-section, :root[data-theme="dark"] .cv .hljs-tag, :root[data-theme="dark"] .cv .hljs-name { color: #8FC2FF; }
:root[data-theme="dark"] .cv .hljs-title.class_, :root[data-theme="dark"] .cv .hljs-built_in, :root[data-theme="dark"] .cv .hljs-selector-class, :root[data-theme="dark"] .cv .hljs-selector-id { color: #6FD3E8; }
:root[data-theme="dark"] .cv .hljs-attr, :root[data-theme="dark"] .cv .hljs-attribute, :root[data-theme="dark"] .cv .hljs-property, :root[data-theme="dark"] .cv .hljs-variable, :root[data-theme="dark"] .cv .hljs-params { color: #FFD38A; }
:root[data-theme="dark"] .cv .hljs-meta, :root[data-theme="dark"] .cv .hljs-meta .hljs-keyword { color: #F2A0D0; }
:root[data-theme="dark"] .cv .hljs-deletion { color: #F4A99A; background: #3A1E1A; }
:root[data-theme="dark"] .tv { background: hsla(246, 22%, 9%, .6); }
:root[data-theme="dark"] .tv-r.odd { background: hsla(0, 0%, 100%, .025); }
:root[data-theme="dark"] .tv-r.odd .tv-n { background: hsl(246, 18%, 13%); }
:root[data-theme="dark"] .jt { background: hsla(246, 22%, 9%, .6); }
:root[data-theme="dark"] .jt-k { color: #FFD38A; }
:root[data-theme="dark"] .jt-str { color: #7FDBC6; }
:root[data-theme="dark"] .jt-num { color: #F6B895; }
:root[data-theme="dark"] .jt-bool, :root[data-theme="dark"] .jt-null { color: #B9A6FF; }
:root[data-theme="dark"] .art-diff { background: hsla(246, 22%, 9%, .6); }
:root[data-theme="dark"] .ch-tip { border-color: hsla(0, 0%, 100%, .09); box-shadow: 0 14px 32px -16px rgba(0, 0, 0, .8); }
:root[data-theme="dark"] .art-toast { background: #ECEDF8; color: #1A1928; }
@media (prefers-reduced-motion: reduce) {
  .jt details > summary::before { transition: none; }
}

/* ==========================================================================
   Glass style (2026-10-13, apaki/docs/style.md). Arthur: "myrlin glass ui/ux
   is much clearer, we want to borrow from it as much as possible with our
   theming/colors / the organization, the style, the layout". One pass over the
   whole window in Myrlin Glass's manner, on Apaki's own tokens, fonts and
   pearl:
   - hierarchy by weight and ink (ink, soft, faint), not by boxes: one strong
     line, a quiet second one, numbers in mono with tabular figures;
   - selection and hover are soft fills (raise 1, 2, 3), never a border or a
     lifted shadow; a hairline only between groups;
   - colour only for meaning: the providers (Claude clay, Codex green),
     severity amber from 75% and red from 90%, waiting in amber, periwinkle for
     focus and the one primary action; no status pill, no dot;
   - quiet small caps (700, 108%, .075em) for labels; the wordmark, pane titles
     and sheet headings keep Apaki's heavy wide Archivo;
   - rings for usage: the Glass card's hero ring per provider, a mini ring for
     the context meter;
   - few live blurs: popovers, cards, bars and toolbars are near opaque fills
     (a live backdrop blur on every pane header and card re-blurred on each
     step of the pearl); the composer keeps its frost while it is the only
     one, a split's composers are opaque;
   - primary buttons keep a gradient within the brand's own indigo (no turn to
     violet); secondary ones are flat with a hairline.
   This section only restyles: every rule above stays as written and these win
   by coming last. No new pixel font sizes (the type scale's tokens), no stripe
   down a side, motion 150 to 200 ms and none under reduced motion.
   ========================================================================== */
:root {
  --g-raise-1: hsla(232, 45%, 42%, .055);
  --g-raise-2: hsla(232, 45%, 42%, .1);
  --g-raise-3: hsla(232, 45%, 42%, .15);
  --g-track: hsla(232, 40%, 55%, .16);
  --g-claude: #d97757; --g-claude-text: #b4532f;
  --g-codex: #10a37f; --g-codex-text: #0a7a5f;
  --g-warn: #d9970a; --g-warn-text: #8f5b00; --g-warn-wash: hsla(40, 90%, 45%, .12);
  --g-crit: #e5484d; --g-crit-text: #c22d33;
  /* Floating surfaces are opaque: without a live blur, any see-through fill shows the text under it as a ghost. */
  --g-surface: hsl(var(--w));
  --g-pop-shadow: 0 16px 40px -20px rgba(var(--shadow-rgb), .42);
  /* Primary: the brand's indigo, lit from the top left (it ran from indigo to violet). */
  --btn-a: #4653BA; --btn-b: #2F3A8E; --send-a: #4653BA; --send-b: #2F3A8E;
  --btn-shadow: 0 1px 2px rgba(var(--shadow-rgb), .2); --btn-shadow-hover: var(--btn-shadow);
  /* Secondary: flat, with a hairline. */
  --btn2-a: hsl(var(--w)); --btn2-b: hsl(var(--w)); --btn2-line: var(--hairline-strong);
  --btn2-hover-a: hsl(232, 50%, 97%); --btn2-hover-b: hsl(232, 50%, 97%);
  --ghost-hover: var(--g-raise-2); --ghost-press: var(--g-raise-3);
}
:root[data-theme="dark"] {
  --g-raise-1: rgba(255, 255, 255, .04);
  --g-raise-2: rgba(255, 255, 255, .075);
  --g-raise-3: rgba(255, 255, 255, .11);
  --g-track: rgba(255, 255, 255, .09);
  --g-claude-text: #e08a6d; --g-codex-text: #19b58e;
  --g-warn: #e5a50a; --g-warn-text: #f0bd4a; --g-warn-wash: rgba(229, 165, 10, .14);
  --g-crit: #e5484d; --g-crit-text: #f47d81;
  --g-surface: hsl(var(--w));
  --g-pop-shadow: 0 18px 44px -18px rgba(0, 0, 0, .75);
  --btn-a: #4C58BC; --btn-b: #36409A; --send-a: #4C58BC; --send-b: #36409A;
  --btn-shadow: inset 0 0 0 1px hsla(232, 80%, 85%, .1); --btn-shadow-hover: var(--btn-shadow);
  --btn2-a: hsl(246, 20%, 17%); --btn2-b: hsl(246, 20%, 17%); --btn2-line: hsla(244, 30%, 70%, .16);
  --btn2-hover-a: hsl(246, 22%, 21%); --btn2-hover-b: hsl(246, 22%, 21%);
  --ghost-hover: var(--g-raise-2); --ghost-press: var(--g-raise-3);
}

/* Quiet small caps: every chrome label. */
.sec-t, .folders-head, .menu-head, .menu-seg-label, .tk-kicker, .ph-kicker, .ph-sec, .ph-state, .ph-live, .ph-ask-k, .ph-notice-k,
.ph-phones-h, .gp-sec, .gp-brand, .tp-h, .tp-sec, .art-kicker, .art-badge, .tk-prompt-h, .pin-who, .sheet .sd-h, .sheet .wt-k,
.todos-name, .wt-repo .wt-rn, .pl-h, .glass-line .gl {
  font-weight: 700; font-stretch: 108%; letter-spacing: .075em;
}

/* The top strip: tabs as soft-filled rows. */
.tab {
  height: 30px; gap: 7px; padding: 0 5px 0 11px; border: 0; border-radius: 8px; color: var(--soft); font-weight: 600;
  transition: background-color var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.tab-t { font-weight: 620; }
.tab:hover { background: var(--g-raise-1); color: var(--ink); }
.tab.on { height: 30px; background: var(--g-raise-2); border: 0; box-shadow: none; color: var(--ink); font-weight: 700; }
.tab.on .tab-t { font-weight: 740; }
:root[data-theme="dark"] .tab:hover { background: var(--g-raise-1); }
:root[data-theme="dark"] .tab.on { background: var(--g-raise-2); box-shadow: none; }
.tab.drop { background: var(--brand-wash); }
.tab-n { font-weight: 500; }
.tab-x { width: 20px; height: 20px; border-radius: 6px; }
.tab-plus { width: 28px; height: 28px; border-radius: 8px; }
.tab-plus:hover, .tab-plus.drop { background: var(--g-raise-2); }
/* Waiting for you is amber everywhere (the session list's waiting mark, the tab, the pane's title and its words). */
.tab.waiting .tab-t { color: var(--g-warn-text); }
/* The Layout button: a quiet bordered control, like Glass's count chip. */
.tab-tool {
  height: 28px; padding: 0 9px; border: 1px solid var(--hairline); border-radius: 8px; background: none; box-shadow: none;
  color: var(--soft); font-weight: 600; transition: background-color var(--dur-fast) var(--ease-hover), border-color var(--dur-fast) var(--ease-hover), color var(--dur-fast) var(--ease-hover);
}
.tab-tool:hover:not(:disabled) { background: var(--g-raise-1); border-color: var(--hairline-strong); color: var(--ink); filter: none; }
.tab-tool:active:not(:disabled) { background: var(--g-raise-2); transform: none; }
.tab-count { font-weight: 500; }

/* Pane headers. */
/* An opaque strip (no live blur: one per pane, each re-blurred on every step of the pearl), a hairline under it. */
.pane-bar { column-gap: 4px; background: hsla(var(--w), .92); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom-color: var(--hairline); }
:root[data-theme="dark"] .pane-bar { background: hsla(var(--w), .94); border-bottom-color: var(--hairline); }
.pane-bar > .grip { margin-right: 4px; }
.pane-bar > .title-block { margin-right: 8px; }
.cwd { font-weight: 500; }
/* The header's controls, one size: quiet until hovered, a soft fill under the pointer. */
.pane-bar .icon-btn { width: 28px; height: 28px; border-radius: 8px; }
.pane-bar .icon-btn svg { width: 15px; height: 15px; }
/* The artifacts button carries a count beside its glyph: its own width. */
.pane-bar .art-reopen { width: auto; min-width: 28px; }
.pane-bar .tasks-btn { height: 28px; border: 0; border-radius: 8px; color: var(--soft); }
.pane-bar .tasks-btn.lit { background: var(--brand-wash); color: var(--brand-strong); border-color: transparent; }
.pane-bar .link-mark { height: 28px; border-radius: 8px; }
/* Two groups: the conversation's tools, then the pane's own controls (maximize and its steps, close) after a gap. */
.pane-bar > .max-btn, .pane-bar > .max-nav:not([hidden]) { margin-left: 6px; }
.pane-bar > .max-nav:not([hidden]) + .max-btn { margin-left: 0; }
.max-btn.on { background: var(--g-raise-2); }
.pane-bar .console-btn[aria-pressed="true"] { background: var(--brand-wash); }
/* Codex is green wherever it is named (it was the action orange, Claude's own colour in Glass). */
.kind-mark { color: var(--g-codex-text); }
.pane.codex .kind-pick button[aria-pressed=true] { border-bottom-color: var(--g-codex); }
/* A pane that waits for you: its title and the words in its header in amber, a ring round it in a split. */
.pane.waiting .pane-bar .title { color: var(--g-warn-text); }
.ask-wait { color: var(--g-warn-text); }
.ask-wait:hover { background: var(--g-warn-wash); }
.stage.multi .pane.waiting { box-shadow: inset 0 0 0 1.5px hsla(40, 85%, 45%, .5); }
/* The ring that says where a link goes, and the focused pane's ring, change at once (no animated shadow). */
.pane { transition: none; }

/* The composer and its settings line. */
.composer {
  border-radius: 14px; border: 1px solid var(--hairline-strong);
  box-shadow: 0 8px 26px -18px rgba(var(--shadow-rgb), .45);
  transition: border-color var(--dur-fast) var(--ease-hover);
}
.composer:focus-within { border-color: hsla(var(--pearl-stop-blue), .55); box-shadow: 0 0 0 3px hsla(var(--pearl-stop-blue), .12), 0 8px 26px -18px rgba(var(--shadow-rgb), .45); }
:root[data-theme="dark"] .composer { border-color: hsla(0, 0%, 100%, .09); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .7); }
:root[data-theme="dark"] .composer:focus-within { border-color: hsla(var(--pearl-stop-blue), .5); box-shadow: 0 0 0 3px hsla(var(--pearl-stop-blue), .12), 0 10px 30px -18px rgba(0, 0, 0, .7); }
/* With several panes the composers are many: no live blur there, an opaque card under the same tint instead. */
.stage.multi .composer { --frost: hsl(var(--w)); -webkit-backdrop-filter: none; backdrop-filter: none; }
.composer-row .icon-btn { width: 30px; height: 30px; border-radius: 8px; }
.chip-btn { height: 28px; padding: 0 8px; border-radius: 8px; font-weight: 560; color: var(--soft); }
.chip-btn:hover { background: var(--g-raise-2); color: var(--ink); }
.chip-btn.billing { font-weight: 640; color: var(--ink); }
.chip-btn .src { font-weight: 500; }
.send { height: 32px; border-radius: 9px; }
/* The context meter is a mini ring, Glass's ring chip: what is used, then the share in mono; amber from 70%, red from 88%. */
.chip-btn.ctx { gap: 6px; }
/* Its whole track shows (a stronger one than the Glass card's), so a ring without its number never reads as a spinner. */
.ctx-bar {
  width: 14px; height: 14px; flex: none; border-radius: 999px;
  background: conic-gradient(var(--ctx-c, var(--brand-strong)) calc(var(--ctx, 0) * 1turn), var(--ctx-track, hsla(232, 30%, 50%, .28)) 0);
  -webkit-mask: radial-gradient(circle, transparent 4.6px, #000 5px); mask: radial-gradient(circle, transparent 4.6px, #000 5px);
}
.ctx-bar i { display: none; }
:root[data-theme="dark"] .ctx-bar { --ctx-track: rgba(255, 255, 255, .2); }
.ctx-n { font-weight: 600; color: var(--soft); }
.chip-btn.ctx.warm { --ctx-c: var(--g-warn); }
.chip-btn.ctx.full { --ctx-c: var(--g-crit); }
.chip-btn.ctx.warm .ctx-n { color: var(--g-warn-text); }
.chip-btn.ctx.full .ctx-n { color: var(--g-crit-text); }
:root[data-theme="dark"] .chip-btn.ctx.warm .ctx-n { color: var(--g-warn-text); }
.chip-btn.ctx.estimate .ctx-bar { opacity: .55; }
@container composer (max-width: 560px) { .chip-btn.ctx { padding-left: 7px; padding-right: 7px; } }
.tt-meter.warm i { background: var(--g-warn); }
.tt-meter.full i { background: var(--g-crit); }

/* The working line: a quiet card with the grid and the words (a rounded rectangle, no capsule, no live blur). */
.status-line .egrid-slot, .status-line .status {
  background: var(--g-surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--hairline);
  box-shadow: 0 4px 14px -10px rgba(var(--shadow-rgb), .4);
}
.status-line .egrid-slot { border-radius: 8px 0 0 8px; }
.status-line .status { border-radius: 0 8px 8px 0; }
.status-line .egrid-slot:empty + .status { border-color: var(--hairline); border-radius: 8px; }
:root[data-theme="dark"] .status-line .egrid-slot, :root[data-theme="dark"] .status-line .status { border-color: hsla(0, 0%, 100%, .08); }

/* Queued messages: rows on a soft fill, no boxes inside the box. */
.queue { background: var(--g-surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--hairline); box-shadow: 0 10px 28px -20px rgba(var(--shadow-rgb), .45); }
.q-item { background: var(--g-raise-1); border: 0; border-radius: 9px; }
:root[data-theme="dark"] .queue { border-color: hsla(0, 0%, 100%, .08); }
:root[data-theme="dark"] .q-item { background: var(--g-raise-1); }

/* The prompt pin: the conversation is masked out under it, so a plain card reads the same as the blurred one did. */
.pin-card {
  background: var(--g-surface); -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--hairline);
  box-shadow: 0 8px 22px -16px rgba(var(--shadow-rgb), .45); transition: border-color var(--dur-fast) var(--ease-hover), transform var(--dur-fast) var(--ease-hover);
}
.pin-card:hover { border-color: var(--hairline-strong); box-shadow: 0 8px 22px -16px rgba(var(--shadow-rgb), .45); }
:root[data-theme="dark"] .pin-card { border-color: hsla(0, 0%, 100%, .08); box-shadow: 0 12px 28px -18px rgba(0, 0, 0, .7); }

/* Menus and popups. */
.menu { padding: 5px; border-radius: 12px; border-color: var(--hairline-strong); box-shadow: var(--g-pop-shadow); }
.menu-item { min-height: 32px; padding: 6px 10px; border-radius: 8px; font-weight: 520; }
.menu-item:hover, .menu-item.kb { background: var(--g-raise-2); }
/* The chosen one is a soft fill and a check, never a heavier box. */
.menu-item.on { font-weight: 650; background: var(--g-raise-1); }
.menu-item.on:hover, .menu-item.on.kb { background: var(--g-raise-2); }
.menu-item .mh { font-weight: 450; }
.menu-head { padding: 9px 10px 4px; font-size: var(--fs-micro); line-height: 1.2; }
.menu-div { margin: 5px 8px; }
.menu-seg { background: var(--g-raise-1); }
.menu-seg-item.on { background: var(--card); box-shadow: 0 0 0 1px var(--hairline-strong); font-weight: 650; }
:root[data-theme="dark"] .menu-seg-item.on { background: var(--g-raise-3); box-shadow: none; }
.menu-note { line-height: 1.5; }

/* Segmented switches (Settings, the sessions views, a viewer's modes). */
.seg { background: var(--g-raise-1); border-color: transparent; }
.seg button.on { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 0 0 1px var(--hairline-strong); }
:root[data-theme="dark"] .seg button.on { background: var(--g-raise-3); box-shadow: none; }
.phone-sheet .seg button.on { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 0 0 1px var(--hairline-strong); }
:root[data-theme="dark"] .phone-sheet .seg button.on { background: var(--g-raise-3); box-shadow: none; }
.rail-sessions .views { background: var(--g-raise-1); }
.rail-sessions .views button { font-weight: 600; }
.rail-sessions .views button.on { background: var(--card); color: var(--ink); font-weight: 700; box-shadow: 0 0 0 1px var(--hairline-strong); }
:root[data-theme="dark"] .rail-sessions .views { background: var(--g-raise-1); }
:root[data-theme="dark"] .rail-sessions .views button.on { background: var(--g-raise-3); box-shadow: none; }

/* The sidebar's frame. */
/* Section heads sit on their section (no white band, no rule under them); a hairline only between sections. */
.sec-head { background: none; border-bottom: 0; }
:root[data-theme="dark"] .sec-head { background: none; border-bottom: 0; }
.new { min-height: 38px; border-radius: 9px; }
.search { height: 36px; border-radius: 9px; border-color: var(--hairline-strong); background: var(--card); }
:root[data-theme="dark"] .search { background: var(--g-raise-1); }

/* The Glass card: Glass's hero ring per provider. */
.glass-card {
  margin: 10px 10px 0; padding: 7px 4px 4px; border-radius: 12px; background: var(--card);
  -webkit-backdrop-filter: none; backdrop-filter: none; border: 1px solid var(--hairline); box-shadow: 0 1px 2px rgba(var(--shadow-rgb), .06);
}
:root[data-theme="dark"] .glass-card { background: var(--g-raise-1); border-color: hsla(0, 0%, 100%, .08); box-shadow: none; }
.gc-head { align-items: center; gap: 7px; padding: 0 10px 4px; }
.gc-head .gl {
  display: inline-flex; align-items: center; gap: 6px; font: 450 var(--fs-small)/1.2 var(--font-body);
  letter-spacing: 0; text-transform: none; color: var(--soft);
}
.gc-head .gl b { font-weight: 680; color: var(--ink); }
.gc-mark { width: 13px; height: 13px; flex: none; fill: none; stroke-width: 1.8; transform: rotate(-90deg); }
.gc-mark .t { stroke: var(--g-track); }
.gc-mark .c { stroke: var(--g-claude); stroke-dasharray: 72 100; }
.gc-mark .x { stroke: var(--g-codex); stroke-dasharray: 58 100; }
.gc-sub { font: 500 var(--fs-micro)/1.2 var(--font-body); }
.gc-row.hero {
  display: grid; grid-template-columns: 46px minmax(0, 1fr); grid-template-rows: auto; column-gap: 11px; row-gap: 0; align-items: center;
  padding: 6px 8px; border-radius: 10px; transition: background-color var(--dur-fast) var(--ease-hover);
}
.gc-row.hero + .gc-row.hero { margin-top: 2px; }
.gc-row.hero:hover { background: var(--g-raise-1); }
.gc-row.hero:disabled:hover { background: none; }
/* "Switch ›" (2026-10-18): the row opens the account chooser; it said so only in a tooltip. Quiet until hover; none on
   the phone, whose rows are read only (glasscard.js readOnly disables them). */
.gc-row.hero { grid-template-columns: 46px minmax(0, 1fr) auto; }
.gc-row.hero .g-go { display: inline-flex; align-items: center; gap: 2px; font: 600 var(--fs-micro)/1 var(--font-body); color: var(--faint); transition: color var(--dur-fast) var(--ease-hover); }
.gc-row.hero .g-go svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.gc-row.hero:hover .g-go, .gc-row.hero:focus-visible .g-go { color: var(--g-acc-text, var(--ink)); }
.gc-row.hero:disabled .g-go { display: none; }
.gc-row[data-p="claude"] { --g-acc: var(--g-claude); --g-acc-text: var(--g-claude-text); }
.gc-row[data-p="codex"] { --g-acc: var(--g-codex); --g-acc-text: var(--g-codex-text); }
.gc-row.is-key { --g-acc: var(--brand); --g-acc-text: var(--brand-strong); }
.g-ring { position: relative; display: grid; place-items: center; width: 46px; height: 46px; }
.g-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.g-ring circle { fill: none; }
.g-ring .g-t { stroke: var(--g-track); stroke-width: 3.5; }
.g-ring .g-t.in { stroke-width: 2.5; }
/* Flat ends, so a nearly empty ring never shows a dot; the fill moves on stroke-dasharray only. */
.g-ring .g-a { stroke: var(--g-acc, var(--brand)); stroke-width: 3.5; stroke-linecap: butt; stroke-dasharray: var(--p, 0) 100; transition: stroke-dasharray 500ms var(--ease-out); }
.g-ring .g-a.in { stroke-width: 2.5; }
.g-ring .g-a.sev-warn { stroke: var(--g-warn); }
.g-ring .g-a.sev-crit { stroke: var(--g-crit); }
.g-ring .g-a.is-zero { stroke-opacity: 0; }
.g-ring.dim .g-a { stroke-opacity: .45; }
.g-pct { position: relative; display: inline-flex; align-items: baseline; color: var(--ink); font: 700 var(--fs-small)/1 var(--font-mono); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.g-pct i { margin-left: 1px; font: 500 var(--fs-micro)/1 var(--font-mono); font-style: normal; letter-spacing: 0; color: var(--faint); }
.g-pct.is-full b { font-size: var(--fs-micro); }
.g-txt { display: grid; gap: 1px; min-width: 0; }
.gc-row.hero .gc-prov { font: 650 var(--fs-micro)/1.3 var(--font-body); font-stretch: 100%; letter-spacing: .01em; text-transform: none; color: var(--g-acc-text, var(--soft)); }
.gc-row.hero .gc-name { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.gc-row.hero .gc-n { font: 680 var(--fs-small)/1.3 var(--font-body); color: var(--ink); }
.gc-row.hero .gc-plan { margin-left: 0; font: 500 var(--fs-micro)/1.3 var(--font-body); color: var(--faint); }
.gc-row.hero .gc-none { color: var(--faint); font-weight: 520; }
.g-line { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 var(--fs-micro)/1.35 var(--font-body); color: var(--soft); }
.g-line .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.g-line .sep, .g-line .g-faint { color: var(--faint); }
.g-line.sev-warn .lbl, .g-line.is-warn { color: var(--g-warn-text); }
.g-line.sev-crit .lbl, .g-line.is-bad { color: var(--g-crit-text); }
/* The panel a click opens names its provider in that provider's colour, and its window rings fill with the share used,
   like the card's hero (they showed what was left, beside text that says what is used). */
.glass-panel[data-p="claude"] { --g-acc: var(--g-claude); --g-acc-text: var(--g-claude-text); }
.glass-panel[data-p="codex"] { --g-acc: var(--g-codex); --g-acc-text: var(--g-codex-text); }
.glass-panel .gp-h { color: var(--g-acc-text, var(--ink-deep)); }
.u-ring .u-t { stroke: var(--g-track); }
.u-ring .u-a { stroke: var(--g-acc, var(--brand-strong)); stroke-dasharray: calc(100 - var(--left, 100)) 100; }
.u-ring .u-a.sev-warn { stroke: var(--g-warn); }
.u-ring .u-a.sev-crit { stroke: var(--g-crit); }
.u-ring.low b { color: var(--g-crit-text); }
/* Switching: the ring turns (a transform on the compositor) until Glass answers. */
.gc-row.hero.busy .g-a { stroke-opacity: .35; }
.gc-row.hero.busy .g-ring svg { animation: g-turn 1.1s linear infinite; }
@keyframes g-turn { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }

/* The side panel: soft-filled tabs. */
.sp-head { background: hsla(var(--w), .92); }
.sp-sessions { align-items: center; padding: 0 2px; }
.sp-sess { height: 30px; padding: 0 9px; border-radius: 8px; font-weight: 600; }
/* The chosen conversation is a soft fill in its accent (it was a line under it). */
.sp-sess::after { display: none; }
.sp-sess.on { background: hsla(var(--acc-hsl, 232, 12%, 50%), .13); font-weight: 760; }
.sp-sess:hover:not(.on), .sp-sess.link-hi:not(.on), .sp-sess.fresh:not(.on) { background: hsla(var(--acc-hsl, 232, 12%, 50%), .07); }
.sp-items { background: hsla(var(--w), .92); }
.sp-item { border-radius: 8px; }
.sp-item:hover { background: var(--g-raise-1); }
.sp-item.on { background: var(--g-raise-2); }
.sp-note { background: hsla(var(--w), .92); }
.sp-card { transition: none; }
.sp-rail { background: hsla(var(--w), .9); }
.sp-rail-g { transition: background-color var(--dur-fast) var(--ease-hover); }

/* Viewer toolbars. */
.art-tools { background: hsla(var(--w), .92); -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-theme="dark"] .art-tools { background: hsla(246, 20%, 12%, .94); }
.art-tools .icon-btn.on, .art-tools .icon-btn[aria-pressed="true"] { background: var(--g-raise-2); }
.at-filter { transition: border-color var(--dur-fast) var(--ease-hover); }

/* Sheets and dialogs. */
/* One separation per theme, not both: a soft elevation in light, where a shadow reads; a defined hairline edge in
   dark, where a shadow on a dark ground does not. */
.sheet { border-color: transparent; box-shadow: 0 30px 70px -36px rgba(var(--shadow-rgb), .55); }
:root[data-theme="dark"] .sheet { border-color: var(--hairline-strong); box-shadow: none; }
.sheet .opt { border-color: var(--hairline); border-radius: 9px; background: none; }
.sheet .opt:hover:not(.on) { background: var(--g-raise-1); border-color: var(--hairline-strong); }
.sheet .opt.on { background: var(--brand-wash); border-color: var(--brand-soft); }
.set-t small { color: var(--soft); }
.ph-status, .ph-sas, .phone-sheet .ph-fold { border-color: var(--hairline); }
/* The question and approval cards in a pane: a plain card, the chosen row a soft fill. */
.ask-card {
  background: var(--g-surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--hairline-strong);
  transition: border-color var(--dur-fast) var(--ease-hover);
}
.ask-choice:hover { background: var(--g-raise-1); }
.ask-choice:focus-visible, button.ask-choice:focus { background: var(--g-raise-1); }
.ask-choice.on, .ask-choice.on:hover, .ask-other.on:hover { background: var(--brand-wash); }
.ask-btn { border-radius: 8px; }
.ask-btn.primary { background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); border-color: transparent; }
.ask-btn.primary:hover { background: linear-gradient(135deg, var(--btn-a), var(--btn-b)); border-color: transparent; filter: brightness(1.1); }

/* Popovers, cards and bars: near opaque, no live blur. */
.glass-panel, .task-panel { background: var(--g-surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--hairline-strong); box-shadow: var(--g-pop-shadow); }
:root[data-theme="dark"] .glass-panel, :root[data-theme="dark"] .task-panel { background: var(--g-surface); border-color: hsla(0, 0%, 100%, .08); box-shadow: var(--g-pop-shadow); }
.art-card { background: hsla(var(--w), .92); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--hairline); }
.start-in { -webkit-backdrop-filter: none; backdrop-filter: none; }
.pane > .find-bar { background: var(--g-surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--hairline); box-shadow: var(--g-pop-shadow); }
.signin-card { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: var(--g-pop-shadow); }
.pane > .console { background: hsl(var(--w)); -webkit-backdrop-filter: none; backdrop-filter: none; }
.df-bar { background: hsl(var(--w)); -webkit-backdrop-filter: none; backdrop-filter: none; }
:root[data-theme="dark"] .df-bar { background: hsl(var(--w)); }
.ch-tip { background: var(--g-surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
.engine-banner { border-radius: 12px; border-color: var(--hairline-strong); box-shadow: var(--g-pop-shadow); }
.tt { border-radius: 9px; box-shadow: var(--g-pop-shadow); }

/* Empty states. */
.web-empty, .art-missing, .df-empty { color: var(--soft); }
.tp-empty, .gp-empty, .folder-empty { color: var(--faint); }

@media (prefers-reduced-motion: reduce) {
  .tab, .tab-tool, .composer, .chip-btn, .pin-card, .gc-row.hero, .g-ring .g-a, .ask-card, .sp-rail-g, .at-filter { transition: none; }
  .gc-row.hero.busy .g-ring svg { animation: none; }
}
