/* =========================================================================
   SWARMIO SW-1 — the instrument layer

   Season 2's room, rail and tokens stay; SW-1 refines them into one
   instrument set into walnut:

     rail     a narrow walnut cheek; a recessed plate carries the sections,
              icon over label, everything on one centre line
     display  every "screen" is a deep phosphor display, Day and Night alike
              (live = mint, done = brass, fault = terra)
     strip    the input that drives a page sits on a walnut strip at the TOP,
              with the page's one ochre action; results stream down below
     sheet    what you read is a Swiss sheet: flush left, a heavy ink rule on
              top, hairlines instead of boxes, a short type scale

   Flat surfaces: no drop shadows, no raised keys, no dot grids. Loaded after
   styles.css and chrome.css on every page, so it wins without !important
   except where a Season 2 rule already used it.
   ========================================================================= */

:root {
  /* the phosphor display — the same in Day and Night */
  --scr: #112a24;
  --scr-2: #16332b;
  --scr-line: rgba(160, 220, 196, 0.14);
  --scr-ink: #9ed6bf;
  --scr-ink-2: #7cb39d;
  --scr-ink-3: #5f9180;
  --scr-hi: #c6ebdb;
  --scr-live: #86cdb0;
  --scr-brass: #cdb07a;
  --scr-terra: #e8957e;
  --bezel: #b4d2c3;

  /* the SW-1 type */
  --f-sw-mono: var(--f-code);
  --sw-label: 500 10px/1.3 var(--f-code);
  --sw-key-r: 6px;
  /* one corner family: the outer frames (display bezel, walnut strip, sheet)
     share --sw-r; what sits 4px inside a frame takes --sw-r-in */
  --sw-r: 14px;
  --sw-r-in: 10px;
  --sw-sheet-rule: 3px solid var(--ink);

}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --scr: #0c211b;
    --scr-2: #112a23;
    --bezel: #24433a;
  }
}
:root[data-theme="dark"] {
  --scr: #0c211b;
  --scr-2: #112a23;
  --bezel: #24433a;
}

/* small caps labels everywhere (eyebrows, chips, column heads) */
.eyebrow,
.sw-label {
  font: var(--sw-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* =============================================================== keys */
.btn {
  border-radius: var(--sw-key-r);
  box-shadow: none !important;
  font-family: var(--f-code);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.btn:hover { filter: none; }
.btn--amber {
  --bg: var(--ochre);
  --fg: var(--ochre-ink);
  border: 1px solid color-mix(in oklab, var(--ochre) 70%, #000);
}
.btn--amber:hover { --bg: var(--ochre-hi); }
.btn--plate,
.btn--ghost {
  border: 1px solid var(--line);
}
input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="url"],
input:not([type]),
textarea,
select {
  border-radius: var(--sw-key-r);
  box-shadow: none;
}

/* ============================================================ displays */
/* the run panel, the show player and Mission Control already use the screen
   tokens; SW-1 makes the frame thinner and the screen dark */
.rp-console { box-shadow: none; border-radius: 14px; }
.rp-bezel { padding: 4px 4px 0; }
.rp-screen { border-radius: 10px; box-shadow: inset 0 0 0 1px var(--scr-line); }
.sp__screen {
  background: var(--scr) !important;
  color: var(--scr-ink) !important;
  border-radius: 10px;
  box-shadow: 0 0 0 4px var(--bezel), inset 0 0 0 1px var(--scr-line) !important;
  margin: 4px;
}
.sp__t { color: var(--scr-hi); font-weight: 300; }
.sp__d { color: var(--scr-ink-3); }
.sp-scrub__fill { background: var(--scr-live) !important; }
.sp-scrub__track { background: var(--scr-line) !important; }
.sp-scrub__thumb { background: var(--scr-hi) !important; box-shadow: none !important; }
.sp__play {
  background: var(--scr-hi) !important;
  color: var(--scr) !important;
  box-shadow: none !important;
}
.sp__skip, .sp__rate { color: var(--scr-ink) !important; border-color: var(--scr-line) !important; }

/* ============================================================== strips */
/* The input that drives a page sits on walnut. Text never sits on the
   grain: the field and the keys are plates set into it. */
.swarm-any__bar,
.chat__composer,
.sw-strip {
  background: var(--walnut) var(--wood-h) center / 2400px 220px !important;
  border: 0 !important;
  border-radius: var(--sw-r) !important;
  padding: 9px !important;
  box-shadow: none !important;
  gap: 9px !important;
}
.swarm-any__bar textarea,
.swarm-any__input,
.chat__composer textarea,
.chat__input,
.sw-strip input,
.sw-strip textarea {
  background: var(--card-2) !important;
  color: var(--ink) !important;
  border: 1px solid rgba(0, 0, 0, 0.25) !important;
  border-radius: var(--sw-key-r) !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}
.swarm-any__go,
.chat__send { min-height: 44px; }
.chat__composer .chat__actions { gap: 9px; }
.chat__composer .chat__actions > :not(.btn) { color: #ecdcc2; }
.chat__composer select,
.chat__composer .chat__which { background: var(--card-2); color: var(--ink); }

/* ============================================================== sheets */
/* Swiss: page titles are the biggest thing on the sheet, labels are small
   mono caps, lists are ruled rows instead of rounded cards. */
.view h1:not(.hero__wordmark):not(.rp__title) {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.card {
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
}

/* Launch: a compact title line, the show as a display, the brief on walnut,
   the capabilities as a ruled index under a heavy rule. */
.hero { padding-block: 4px 12px !important; min-height: 0 !important; }
.hero__grid { grid-template-columns: minmax(0, 1fr) !important; }
.hero__subject { display: none !important; }
.hero__wordmark { font-size: 28px !important; letter-spacing: -0.03em; margin: 2px 0 0 !important; }
.hero__tagline { font-size: 15px !important; margin: 4px 0 0 !important; }
.hero__ingredients { font-size: 12.5px !important; color: var(--ink-2); max-width: 70ch; }
.capgroup {
  border-top: 1px solid var(--ink);
  padding-top: 14px;
}
.cap {
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
}
.cap:hover { background: var(--card-2) !important; transform: none !important; }

/* runs: a ledger */
.run-hist { gap: 0 !important; border-top: var(--sw-sheet-rule); }
.run-hist__row {
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
}
.run-hist__row:hover { background: var(--card-2) !important; }

/* schedules: ruled rows */
.sched { border-radius: 0 !important; box-shadow: none !important; background: transparent !important; border: 0 !important; border-top: 1px solid var(--line) !important; }

@media (prefers-reduced-motion: reduce) {
  .masthead__link.is-on::after { animation: none; }
}

/* ======================================================= page building blocks */
:root { --maxw: 100%; --gutter: 16px; }
.sw-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 12px 16px 28px;
  display: grid;
  gap: 12px;
  align-content: start;
}

/* the display */
.sw-bezel { background: var(--bezel); border-radius: var(--sw-r); padding: 4px; box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.sw-screen {
  min-width: 0;
  background: var(--scr);
  color: var(--scr-hi);
  border-radius: 10px;
  padding: 16px 18px 14px;
  box-shadow: inset 0 0 0 1px var(--scr-line);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px 22px;
  font-family: var(--f-code);
}
.sw-screen--split { grid-template-columns: 236px minmax(0, 1fr); }
.sw-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; min-width: 0; }
.sw-led { display: inline-flex; align-items: center; gap: 7px; flex: none; font: 500 10px var(--f-code); letter-spacing: 0.16em; text-transform: uppercase; color: var(--scr-live); }
.sw-led i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sw-led--live i { animation: swBreathe 2.8s var(--ease) infinite; }
.sw-led--done { color: var(--scr-brass); }
.sw-led--idle { color: var(--scr-ink-3); }
.sw-led--fault { color: var(--scr-terra); }
@keyframes swBreathe { 50% { opacity: 0.25; } }
.sw-title { min-width: 0; flex: 1; font: 500 14.5px/1.3 var(--f-ui); color: var(--scr-hi); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-title small { font: 500 10px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--scr-ink-3); margin-right: 8px; }
.sw-readouts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; align-content: start; }
.sw-ro { display: grid; gap: 2px; padding: 2px 0 6px; border-bottom: 1px solid var(--scr-line); min-width: 0; }
.sw-ro--wide { grid-column: 1 / -1; }
.sw-ro .k { display: flex; justify-content: space-between; gap: 6px; font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--scr-ink-3); }
.sw-ro .v { font: 300 30px/1.1 var(--f-ui); letter-spacing: -0.02em; color: var(--scr-hi); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-ro .v small { font-size: 14px; color: var(--scr-ink-3); margin-left: 2px; letter-spacing: 0; }
.sw-ro--brass .v { color: var(--scr-brass); }
.sw-lbl { font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--scr-ink-3); }
.sw-sbtn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 30px; padding: 0 11px; border: 1px solid var(--scr-line); border-radius: 6px; background: none; color: var(--scr-ink); font: 500 10px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; }
.sw-sbtn:hover { color: var(--scr-hi); border-color: var(--scr-ink-3); }
.sw-sbtn.is-on { background: var(--scr-hi); color: var(--scr); border-color: var(--scr-hi); }

/* 30-day chart */
.sw-chart { min-width: 0; display: grid; gap: 6px; align-content: start; }
.sw-days { display: grid; gap: 3px; align-items: end; height: 96px; }
.sw-day { display: flex; flex-direction: column-reverse; gap: 2px; min-width: 0; }
.sw-day i, .sw-legend i { height: 9px; border-radius: 2px; background: rgba(205, 176, 122, 0.75); }
.sw-day i.f, .sw-legend i.f { background: var(--scr-terra); }
.sw-day i.r, .sw-legend i.r { background: var(--scr-live); }
.sw-day i.r { animation: swBreathe 2.8s var(--ease) infinite; }
.sw-day.is-today { box-shadow: 0 1px 0 var(--scr-hi); }
.sw-dayax { display: flex; justify-content: space-between; border-top: 1px solid var(--scr-line); padding-top: 4px; }
.sw-dayax span, .sw-legend { font-size: 8.5px; letter-spacing: 0.1em; color: var(--scr-ink-3); text-transform: uppercase; }
.sw-legend { display: flex; gap: 14px; }
.sw-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sw-legend i { display: inline-block; width: 8px; height: 8px; }

/* the strip */
.sw-strip { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.sw-strip__main { display: flex; align-items: center; gap: 9px; min-width: 0; }
.sw-strip__main > input, .sw-strip__main > textarea { flex: 1; min-width: 0; height: 42px; padding: 0 14px; font: inherit; font-size: 14px; }
.sw-strip__keys { display: flex; gap: 9px; }
.sw-engr { flex: none; padding: 0 3px 0 7px; font: 500 9.5px var(--f-code); letter-spacing: 0.16em; text-transform: uppercase; color: #ecdcc2; white-space: nowrap; }
.sw-key {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 14px;
  border: 1px solid rgba(0, 0, 0, 0.25); border-radius: var(--sw-key-r);
  background: var(--card-2); color: var(--ink);
  font: 600 10px var(--f-code); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; transition: background-color 0.2s var(--ease);
}
.sw-key:hover { background: var(--card); }
.sw-key--ochre { background: var(--ochre); color: var(--ochre-ink); border-color: color-mix(in oklab, var(--ochre) 70%, #000); }
.sw-key--ochre:hover { background: var(--ochre-hi); }
.sw-key[aria-pressed="true"] { background: var(--rail-plate); color: var(--rail-ink); }
.sw-keyseg { display: flex; }
.sw-keyseg .sw-key { border-radius: 0; }
.sw-keyseg .sw-key + .sw-key { border-left: 0; }
.sw-keyseg .sw-key:first-child { border-radius: var(--sw-key-r) 0 0 var(--sw-key-r); }
.sw-keyseg .sw-key:last-child { border-radius: 0 var(--sw-key-r) var(--sw-key-r) 0; }

/* the sheet */
.sw-sheet { min-width: 0; background: var(--card); border: 1px solid var(--line); border-top: var(--sw-sheet-rule); border-radius: var(--sw-r); overflow: clip; padding: 22px 24px 32px; display: grid; gap: 22px; align-content: start; }
.sw-sheet > .report__head, .sw-sheet .sw-sheet__head { display: grid; gap: 8px; margin: 0; padding: 0; }
.sw-sheet .back-link { justify-self: start; }
.sw-sheet .hero__tagline { font-size: 14px !important; color: var(--ink-2); max-width: 62ch; margin: 0 !important; }

@media (max-width: 860px) {
  .sw-page { padding: 10px 12px 24px; }
  .sw-screen, .sw-screen--split { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .sw-head { flex-wrap: wrap; row-gap: 6px; }
  .sw-title { flex-basis: 100%; order: 3; white-space: normal; }
  .sw-readouts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .sw-ro .v { font-size: 21px; }
  .sw-ro .v small { font-size: 11px; }
  .sw-strip { grid-template-columns: minmax(0, 1fr); padding: 8px !important; gap: 8px !important; }
  .sw-engr { display: none; }
  .sw-strip__main > input, .sw-strip__main > textarea { height: 44px; font-size: 16px; }
  .sw-strip__keys { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .sw-keyseg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .sw-key { padding: 0 6px; min-width: 0; }
  .sw-sheet { padding: 18px 16px 26px; }
  .sw-days { height: 70px; }
}
@media (max-width: 420px) {
  .sw-readouts { grid-template-columns: 1fr 1fr; }
  .sw-ro .v { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .sw-led--live i, .sw-day i.r { animation: none; }
}
.sw-sheet__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sw-sheet .run-hist { border-top: 1px solid var(--ink); }
.sw-sheet > .report__head { border: 0 !important; padding-bottom: 0 !important; margin-bottom: 0 !important; }
/* ledger rows: a flat identity dot, status as small caps with an LED */
.run-hist__dot { width: 8px !important; height: 8px !important; min-width: 8px; background: color-mix(in oklab, var(--ink-3) 70%, transparent) !important; box-shadow: none !important; }
.run-hist__dot::before, .run-hist__dot::after { content: none !important; }
.run-hist__status {
  display: inline-flex !important; align-items: center; gap: 6px;
  border: 0 !important; background: none !important; padding: 0 !important;
  font: 500 9.5px var(--f-code) !important; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2) !important;
}
.run-hist__status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.run-hist__status.is-running::before { background: var(--ok); animation: swBreathe 2.8s var(--ease) infinite; }
.run-hist__status.is-completed::before { background: var(--done); }
.run-hist__status.is-failed, .run-hist__status.is-cancelled { color: var(--terra) !important; }
.run-hist__status.is-failed::before, .run-hist__status.is-cancelled::before { background: var(--terra); }
.run-hist__title { font-weight: 550; }
.run-hist__meta, .run-hist__credits { font-family: var(--f-code); font-size: 11px; letter-spacing: 0.02em; }
/* the week sequencer */
.sw-wk { min-width: 0; display: grid; grid-template-columns: minmax(70px, 160px) repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; align-content: start; }
.sw-wk__dh { font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--scr-ink-3); text-align: center; }
.sw-wk__dh.is-today { color: var(--scr-hi); }
.sw-wk__rl { font-size: 10px; color: var(--scr-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-wk__rl.is-off { color: var(--scr-ink-3); text-decoration: line-through; }
.sw-wk__c { height: 22px; border: 1px solid var(--scr-line); border-radius: 3px; }
.sw-wk__c.is-on { background: rgba(158, 214, 191, 0.32); border-color: transparent; }
.sw-wk__c.is-off { background: rgba(158, 214, 191, 0.08); }
.sw-wk__c.is-next { background: var(--scr-live); border-color: transparent; animation: swBreathe 2.2s var(--ease) infinite; }
.sw-wk__c.is-today { box-shadow: inset 0 0 0 1px var(--scr-ink-3); }
@media (max-width: 860px) { .sw-wk { grid-template-columns: 58px repeat(7, minmax(0, 1fr)); gap: 3px; } .sw-wk__rl { font-size: 8.5px; } .sw-wk__dh { font-size: 7.5px; letter-spacing: 0.04em; } }
@media (prefers-reduced-motion: reduce) { .sw-wk__c.is-next { animation: none; } }
/* schedule rows on the sheet */
.sw-sheet .sched-list { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.sw-strip__note { flex: 1; min-width: 0; padding: 0 6px; font-size: 13px; color: #ecdcc2; }
@media (max-width: 860px) { .sw-strip__note { font-size: 12.5px; } }
.sw-screen--r4 .sw-readouts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sw-strip--compose .sw-strip__main { align-items: stretch; }
.sw-strip--compose textarea { flex: 1; min-width: 0; min-height: 44px; height: auto; padding: 11px 14px; resize: vertical; font: inherit; font-size: 14px; }
/* status pills become small caps with an LED */
.sched__state, .rp__state { border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; font: 500 9.5px var(--f-code) !important; letter-spacing: 0.1em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.sched__state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--done); }
.sched__state.is-off::before { background: var(--ink-3); }
.sched__mode { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; }
.sched__cad, .sched__meta { font-family: var(--f-code); font-size: 11px; }
.sched__prompt { font-size: 15px; font-weight: 550; }
@media (max-width: 860px) { .sw-screen--r4 .sw-readouts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 420px) { .sw-screen--r4 .sw-readouts { grid-template-columns: 1fr 1fr; } }
.sw-strip--sticky { position: sticky; top: 8px; z-index: 5; }
.sw-strip--compose .sw-strip__keys { color: #ecdcc2; align-items: center; }
.sw-strip--compose .sw-strip__keys select { background: var(--card-2); color: var(--ink); border: 1px solid rgba(0,0,0,.25); border-radius: var(--sw-key-r); min-height: 42px; padding: 0 10px; }
.sw-strip--compose .sw-strip__keys .chat__note, .sw-strip--compose .sw-strip__keys > span { color: #ecdcc2; font-size: 12px; }
.sw-page.chat .chat__thread { border-top: 1px solid var(--ink); padding-top: 4px; }
@media (max-width: 860px) { .sw-strip--sticky { top: 4px; } }
.sw-strip .chat__which { display: flex; border: 0; background: none; padding: 0; gap: 0; }
.sw-strip .chat__which button {
  min-height: 42px; padding: 0 12px; margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.25); border-radius: 0; background: var(--card-2); color: var(--ink);
  font: 600 10px var(--f-code); letter-spacing: 0.1em; text-transform: uppercase; box-shadow: none;
}
.sw-strip .chat__which button + button { border-left: 0; }
.sw-strip .chat__which button:first-child { border-radius: var(--sw-key-r) 0 0 var(--sw-key-r); }
.sw-strip .chat__which button:last-child { border-radius: 0 var(--sw-key-r) var(--sw-key-r) 0; }
.sw-strip .chat__which button[aria-checked="true"] { background: var(--rail-plate); color: var(--rail-ink); }
.sw-strip .chat__note:empty { display: none; }
/* conversation turns: ruled rows with a small label, no bubbles */
.sw-page.chat .chat__thread { gap: 0; margin: 0; max-height: calc(100vh - 360px); min-height: 160px; padding-right: 6px; }
.chat__msg,
.chat__msg--me,
.chat__msg--them {
  max-width: 76ch;
  align-self: stretch;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: none;
}
.chat__msg:first-child { border-top: 0; }
.chat__msg::before { font: 500 9.5px/2.2 var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); content: "Swarmio"; }
.chat__msg--me::before { content: "You"; color: var(--ink); }
.chat__msg--me .chat__text { font-weight: 550; }
.chat__text { font-size: 15px; line-height: 1.6; }
.chat__msg > :not(.chat__text) { grid-column: 2; }
@media (max-width: 860px) {
  .chat__msg, .chat__msg--me, .chat__msg--them { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .sw-page.chat .chat__thread { max-height: none; }
}

/* =============================================================== launch */
.sw-h { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.12; letter-spacing: -0.025em; text-transform: none !important; color: var(--ink); }
.sw-lede { margin: 0; color: var(--ink-2); font-size: 14px; max-width: 62ch; }
.hub-screen.sw-page > .banner { margin: 0; }
/* the brief: the swarm-anything box is the strip itself */
.swarm-any.sw-brief {
  max-width: none; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0;
  display: grid; gap: 8px;
}
.sw-brief .swarm-any__eyebrow { display: none; }
.sw-brief .swarm-any__input { min-height: 44px !important; height: 44px; padding: 11px 14px; font-size: 14px; resize: vertical; }
.sw-brief .swarm-any__hint { font-size: 12px; color: var(--ink-2); padding: 0 4px; }
.sw-brief .swarm-any__result:empty { display: none; }
.swarm-any__bar:not(:has(.sw-engr))::before { content: "Brief"; align-self: center; flex: none; padding: 0 3px 0 7px; font: 500 9.5px var(--f-code); letter-spacing: 0.16em; text-transform: uppercase; color: #ecdcc2; }
.sw-brief .swarm-any__go { border-radius: var(--sw-key-r); padding-inline: 18px; }
/* the show as the display */
.sw-bezel--show { padding: 4px; }
.sw-bezel--show > .show {
  max-width: none; margin: 0; padding: 16px 18px 14px; border: 0; border-radius: 10px;
  background: var(--scr); color: var(--scr-hi); box-shadow: inset 0 0 0 1px var(--scr-line);
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px;
}
.sw-bezel--show .show__head { color: var(--scr-ink-3); font: 500 10px var(--f-code); letter-spacing: 0.14em; text-transform: uppercase; }
.sw-bezel--show .show__mark, .sw-bezel--show .show__title { color: var(--scr-brass); }
.sw-bezel--show .show__hint { color: var(--scr-ink-3); }
.sw-bezel--show .show__ep-title { font: 500 18px/1.3 var(--f-ui) !important; color: var(--scr-hi); letter-spacing: -0.01em; }
.sw-bezel--show .sp__screen { box-shadow: inset 0 0 0 1px var(--scr-line) !important; margin: 0; background: var(--scr-2) !important; }
.sw-bezel--show details, .sw-bezel--show summary, .sw-bezel--show .show__text, .sw-bezel--show label, .sw-bezel--show .field__hint { color: var(--scr-ink); }
.sw-bezel--show summary { font: 500 10px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; }
.sw-bezel--show input, .sw-bezel--show textarea { background: var(--scr-2) !important; color: var(--scr-hi) !important; border: 1px solid var(--scr-line) !important; }
.sw-bezel--show .btn--ghost { color: var(--scr-ink); border-color: var(--scr-line); background: none; }
.sw-bezel--show .sp-line__who { color: var(--scr-brass); }
.sw-bezel--show .sp-line__t { color: var(--scr-ink); }
.sw-bezel--show a { color: var(--scr-hi); }

/* the sheet: hero copy as a quiet head, then the ruled capability index */
.hub-screen .sw-sheet .hero { padding: 0 !important; }
.hub-screen .sw-sheet .hero__wordmark { font-size: 15px !important; font-weight: 700; letter-spacing: 0.02em !important; }
.hub-screen .sw-sheet .hero__wordmark .dot { display: none; }
.hub-screen .sw-sheet .hero__tagline { font-size: 14px !important; }
.hub-screen .sw-sheet .hub { max-width: none; padding: 0; display: grid; gap: 8px; }
.caps.capgroups { gap: 26px; margin-top: 16px; }
.capgroup { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 24px; padding-top: 14px; border-top: 1px solid var(--ink); }
.capgroup__head { display: grid; align-content: start; gap: 4px; margin: 0; padding: 0; border: 0; }
.capgroup__title { font: 650 14px var(--f-ui) !important; letter-spacing: -0.005em !important; text-transform: none !important; }
.capgroup__blurb { display: block !important; font-size: 12.5px !important; color: var(--ink-2) !important; max-width: 26ch; }
.capgroup__grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 0 !important; border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.cap { padding: 12px 14px !important; display: grid; gap: 5px; align-content: start; min-height: 112px; color: var(--ink); }
.cap::after { content: none !important; }
.cap__orb { position: absolute !important; top: 18px; left: 14px; width: 7px !important; height: 7px !important; margin: 0 !important; border-radius: 50%; box-shadow: none !important; }
.cap__orb::before, .cap__orb::after { content: none !important; }
.cap__label { padding-left: 15px; font: 600 15px var(--f-ui) !important; letter-spacing: -0.01em !important; color: var(--ink) !important; }
.cap__blurb { font-size: 12.5px !important; color: var(--ink-2) !important; margin: 0 !important; max-width: none !important; }
.cap__go { margin-top: 2px !important; font: 500 9.5px var(--f-code) !important; letter-spacing: 0.12em !important; color: var(--ink-3) !important; }
@media (max-width: 1100px) { .capgroup__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 980px) { .capgroup { grid-template-columns: minmax(0, 1fr); gap: 10px; } .capgroup__blurb { max-width: none; } }
@media (max-width: 860px) {
  .swarm-any__bar::before { display: none; }
  .sw-brief .swarm-any__input { font-size: 16px; }
}
@media (max-width: 520px) { .capgroup__grid { grid-template-columns: minmax(0, 1fr) !important; } .cap { min-height: 0; } }
.swarm-any.sw-brief, .sw-brief .swarm-any__bar { width: 100%; max-width: none !important; }
.sw-brief .swarm-any__bar { box-sizing: border-box; }
@media (max-width: 860px) {
  .sw-brief .swarm-any__bar { flex-direction: row !important; align-items: stretch; }
  .sw-brief .swarm-any__input { height: 44px !important; min-height: 44px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sw-brief .swarm-any__go { width: auto !important; flex: none; padding-inline: 14px; }
}

/* =============================================================== report */
.report.sw-report { max-width: none; padding: 12px 16px 28px; }
.sw-verdict { display: grid; gap: 8px; align-content: start; }
.sw-verdict p { margin: 0; font: 400 22px/1.25 var(--f-ui); color: var(--scr-hi); letter-spacing: -0.015em; max-width: 40ch; }
.sw-report .sw-sheet .md, .sw-report .sw-sheet .rsec, .sw-report .sw-sheet .kfinds { max-width: 76ch; }
/* Continue this run: the composer on walnut */
.panel.cont.sw-cont {
  background: var(--walnut) var(--wood-h) center / 2400px 220px !important;
  border: 0 !important; border-radius: 12px !important; box-shadow: none !important; padding: 9px !important; margin: 0 !important;
}
.sw-cont .panel__head { padding: 2px 6px 8px !important; border: 0 !important; background: none !important; }
.sw-cont .panel__head .eyebrow { color: #ecdcc2 !important; }
.sw-cont .panel__body { padding: 0 !important; display: grid; gap: 8px; }
.sw-cont .cont__input { background: var(--card-2) !important; border: 1px solid rgba(0,0,0,.25) !important; border-radius: var(--sw-key-r) !important; box-shadow: inset 0 1px 2px rgba(0,0,0,.12) !important; min-height: 44px; }
.sw-cont .cont__row { margin: 0 !important; align-items: center; }
.sw-cont .cont__note { color: #ecdcc2 !important; }
.sw-cont .cont__mode, .sw-cont select { background: var(--card-2) !important; color: var(--ink) !important; border: 1px solid rgba(0,0,0,.25) !important; border-radius: var(--sw-key-r) !important; min-height: 40px; }
.sw-cont .btn--ghost { background: var(--card-2); color: var(--ink); border: 1px solid rgba(0,0,0,.25); }
@media (max-width: 860px) { .report.sw-report { padding: 10px 12px 24px; } .sw-verdict p { font-size: 18px; } }

/* run panel: annunciators are dim outlines; lit ones glow brass (caution),
   terra (alarm) or mint (notice) */
.rp-tile {
  background: none !important; box-shadow: inset 0 0 0 1px var(--scr-line) !important; color: var(--scr-ink-3) !important;
  border-radius: 4px !important; font: 500 8.5px var(--f-code) !important; letter-spacing: 0.12em;
}
.rp-tile[data-lit="caution"] { background: rgba(205, 176, 122, 0.16) !important; color: var(--scr-brass) !important; box-shadow: inset 0 0 0 1px rgba(205, 176, 122, 0.45) !important; }
.rp-tile[data-lit="alarm"] { background: rgba(232, 149, 126, 0.16) !important; color: var(--scr-terra) !important; box-shadow: inset 0 0 0 1px rgba(232, 149, 126, 0.45) !important; }
.rp-tile[data-lit="notice"] { background: rgba(134, 205, 176, 0.16) !important; color: var(--scr-live) !important; box-shadow: inset 0 0 0 1px rgba(134, 205, 176, 0.45) !important; }
@keyframes rpFlash { 50% { opacity: 0.35; } }
.run.rp { max-width: none; padding-inline: 16px; }
.rp__state::before { content: none; }
/* live sessions: flat cards on the sheet, the browser view as a small display */
.sess__card { border-radius: 0 !important; box-shadow: none !important; background: transparent !important; border: 0 !important; border-top: 1px solid var(--ink) !important; padding: 12px 0 !important; text-align: left; }
.sess__card:hover { background: var(--card-2) !important; transform: none !important; }
.sess__mode { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.sess__title { font-size: 15px; font-weight: 600; }
.sess__thumb { border-radius: 10px; box-shadow: 0 0 0 4px var(--bezel) !important; margin: 8px 4px 4px; background: var(--scr) !important; }
.live__badge { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ok); }
/* account */
.report.billing.sw-page { max-width: none; }
.sw-bal { display: grid; gap: 14px; align-content: start; min-width: 0; }
.sw-balbar { display: grid; grid-template-columns: repeat(40, 1fr); gap: 2px; }
.sw-balbar i { height: 8px; border-radius: 1px; background: var(--scr-line); }
.sw-balbar i.on { background: var(--scr-live); }
.sw-ro--wide .v { font-size: 44px; }
.sw-strip--topup .sw-strip__note { flex: 1; }
.billing .panel, .sw-sheet .panel { border-radius: 0 !important; box-shadow: none !important; background: transparent !important; border: 0 !important; border-top: 1px solid var(--ink) !important; }
.billing .panel__head, .sw-sheet .panel__head { background: none !important; border: 0 !important; padding: 12px 0 8px !important; }
.billing .panel__body, .sw-sheet .panel__body { padding: 0 0 12px !important; }
.pack-buy { border-radius: var(--sw-r-in) !important; box-shadow: none !important; background: transparent !important; border: 1px solid var(--line) !important; }
.pack-buy:hover { background: var(--card-2) !important; transform: none !important; }
.price-row__dot { width: 7px !important; height: 7px !important; box-shadow: none !important; }
.price-row__v, .tx__ts, .tx__amt, .tx__bal { font-family: var(--f-code); font-size: 11px; }
@media (max-width: 860px) {
  .sw-ro--wide .v { font-size: 34px; }
  .sw-strip--topup .sw-strip__main { flex-wrap: wrap; }
  .sw-strip--topup .sw-keyseg { flex: 1 1 100%; }
  .sw-strip--topup .sw-strip__note { display: none; }
  .sw-strip--topup .sw-key--ochre { flex: 1 1 100%; }
}

/* every screen not yet built from the SW-1 blocks still reads as a sheet:
   full width, a heavy ink rule on top, flush left */
.view.report:not(.sw-page) {
  max-width: none; width: auto; margin: 12px 16px 28px; padding: 22px 24px 32px;
  background: var(--card); border-top: var(--sw-sheet-rule); border-bottom: 1px solid var(--line);
}
.view.report:not(.sw-page) > .report__head { border-bottom: 0; }
.view .panel { border-radius: 0; box-shadow: none; }
@media (max-width: 860px) { .view.report:not(.sw-page) { margin: 10px 12px 24px; padding: 18px 16px 26px; } }

/* ============================================================ split sheet */
/* One ruled sheet in lettered panels (A / B / C), hairlines between them. */
.sw-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 0; padding: 0 !important; }
.sw-split > .sw-panel { min-width: 0; display: flex; flex-direction: column; }
.sw-split > .sw-panel + .sw-panel { border-left: 1px solid var(--line); }
.sw-ph { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.sw-ph__id { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; color: var(--ink-3); }
.sw-ph__t { font: 600 13.5px var(--f-ui); color: var(--ink); }
.sw-ph__n { margin-left: auto; font: 600 13.5px var(--f-ui); color: var(--ink); font-variant-numeric: tabular-nums; }
.sw-pbody { min-width: 0; padding: 14px 18px 18px; }
.sw-rows { list-style: none; margin: 0; padding: 0; }
.sw-rows > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.sw-rows > li > b { font-weight: 600; font-size: 13.5px; color: var(--ink); display: flex; align-items: center; gap: 7px; min-width: 0; }
.sw-rows > li > b i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.sw-rows > li.is-run > b i { background: var(--ok); }
.sw-rows > li.is-done > b i { background: var(--done); }
.sw-rows > li.is-fail > b i { background: var(--alarm, #b5543d); }
.sw-rows > li > em { grid-row: 1; grid-column: 2; font: 400 10.5px var(--f-code); font-style: normal; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.sw-rows > li > span { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.sw-srcs { list-style: none; margin: 0; padding: 0; counter-reset: src; }
.sw-srcs > li { counter-increment: src; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sw-srcs > li::before { content: counter(src); grid-row: 1 / span 2; font: 400 10.5px var(--f-code); color: var(--ink-3); padding-top: 2px; }
.sw-srcs a, .sw-srcs b { font-weight: 500; font-size: 13px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.sw-srcs a:hover { text-decoration: underline; }
.sw-srcs small { font: 400 10.5px var(--f-code); color: var(--ok); overflow-wrap: anywhere; }
.sw-empty { margin: 0; font-size: 12.5px; color: var(--ink-3); }

/* ============================================================== crew tape */
.sw-tape { position: relative; min-width: 0; display: grid; gap: 5px; align-content: start; font-family: var(--f-code); }
.sw-tape__row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 70px; align-items: center; gap: 8px; }
.sw-tape__k { font-size: 8.5px; letter-spacing: 0.12em; color: var(--scr-ink-3); }
.sw-tape__k--r { text-align: right; }
.sw-tape__ruler { position: relative; height: 14px; border-bottom: 1px solid var(--scr-line); }
.sw-tape__tick { position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--scr-ink-3); }
.sw-tape__tick span { position: absolute; bottom: 7px; left: -6px; font-size: 9px; color: var(--scr-ink-3); }
.sw-lane__tn { height: 24px; display: grid; place-items: center; border: 1px solid var(--scr-line); border-radius: 4px; font-size: 10px; color: var(--scr-ink-3); }
.sw-lane.is-run .sw-lane__tn { color: var(--scr-hi); }
.sw-lane__area { position: relative; height: 24px; background: color-mix(in oklab, var(--scr) 93%, var(--scr-hi)); border-radius: 4px; overflow: hidden; }
.sw-lane__st { font-size: 8.5px; letter-spacing: 0.1em; color: var(--scr-ink-3); text-align: right; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-lane.is-run .sw-lane__st { color: var(--scr-live); }
.sw-lane.is-done .sw-lane__st { color: var(--scr-brass); }
.sw-lane.is-fail .sw-lane__st { color: var(--scr-terra); }
.sw-clip { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; overflow: hidden; background: color-mix(in oklab, var(--scr-live) 18%, transparent); box-shadow: inset -2px 0 0 var(--scr-live); }
.sw-lane.is-done .sw-clip { background: color-mix(in oklab, var(--scr-brass) 16%, transparent); box-shadow: none; }
.sw-lane.is-fail .sw-clip { background: color-mix(in oklab, var(--scr-terra) 18%, transparent); box-shadow: none; }
.sw-lane.is-pend .sw-clip { background-image: radial-gradient(color-mix(in oklab, var(--scr-hi) 32%, transparent) 0.9px, transparent 1.2px); background-size: 5px 5px; background-color: transparent; box-shadow: inset 0 0 0 1px var(--scr-line); }
.sw-clip__name { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); z-index: 2; padding: 1px 5px; border-radius: 3px; background: var(--scr); font-size: 9.5px; color: var(--scr-hi); white-space: nowrap; max-width: calc(100% - 10px); overflow: hidden; text-overflow: ellipsis; }
.sw-bar { position: absolute; bottom: 2px; height: 14px; width: 2px; background: var(--scr-brass); opacity: 0.8; pointer-events: none; }
.sw-lane.is-run .sw-bar { background: var(--scr-live); opacity: 0.95; }
.sw-bar.is-fail { background: var(--scr-terra); opacity: 1; width: 3px; }
.sw-tape__ph { position: absolute; top: 0; bottom: 0; left: 42px; right: 78px; pointer-events: none; }
.sw-tape__playhead { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--scr-live); }
.sw-tape__playhead::before { content: ""; position: absolute; top: 0; left: -4px; border: 4.5px solid transparent; border-top: 6px solid var(--scr-live); }
.sw-tape__more { font-size: 8.5px; letter-spacing: 0.1em; color: var(--scr-ink-3); text-transform: uppercase; padding-left: 42px; }
.sw-tape__more:empty { display: none; }

/* ======================================================= the running screen */
.sw-run .sw-screen { grid-template-columns: 236px minmax(0, 1fr); }
.sw-run .sw-readouts { grid-template-columns: 1fr 1fr; }
.sw-run .sw-ann { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.sw-run .sw-ann .rp-tile { min-height: 26px; }
.sw-run .sw-annmsg { grid-column: 1 / -1; min-height: 1.4em; font: 400 12px var(--f-ui); color: var(--scr-ink); }
.sw-run .sw-annmsg .rp-annmsg__ok { color: var(--scr-ink-3); }
.sw-run .sw-annmsg .btn { margin-left: 8px; }
.sw-run .sw-strip form { display: contents; }
.sw-run .rp__hold { position: relative; overflow: hidden; }
.sw-run .rp__hold::before { content: ""; position: absolute; inset: 0; background: color-mix(in oklab, var(--alarm, #b5543d) 30%, transparent); transform-origin: left; transform: scaleX(var(--hold, 0)); }
.sw-run .rp__hold > span { position: relative; }
.sw-run .sw-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, 0.8fr); }
.sw-run .sw-pbody { max-height: 560px; overflow: auto; }
.sw-run .rp-side { display: grid; gap: 8px; }
.sw-run .rp-trace { max-height: none; background: none; padding: 0; font: 400 11px/1.5 var(--f-code); }
.sw-run .rp-tr { display: grid; grid-template-columns: 62px 88px minmax(0, 1fr); gap: 8px; margin: 0; padding: 3px 0; }
.sw-run .rp-tr__tag { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) {
  .sw-run .sw-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sw-run .sw-split > .sw-panel:last-child { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .sw-split, .sw-run .sw-split { grid-template-columns: minmax(0, 1fr) !important; }
  .sw-split > .sw-panel + .sw-panel { border-left: 0; border-top: 1px solid var(--line); }
  .sw-run .sw-screen { grid-template-columns: minmax(0, 1fr); }
  .sw-run .sw-readouts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sw-tape__row { grid-template-columns: 26px minmax(0, 1fr) 0; gap: 6px; }
  .sw-lane__st, .sw-tape__k--r { visibility: hidden; }
  .sw-tape__ph { left: 32px; right: 6px; }
  .sw-run .sw-ann { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sw-run .sw-pbody { max-height: 420px; }
  .sw-run .rp-tr { grid-template-columns: 56px minmax(0, 1fr); }
  .sw-run .rp-tr__m { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .sw-run .sw-readouts { grid-template-columns: 1fr 1fr; }
}

.sw-crew > li[data-st="work"] > b i { background: var(--ok); }
.sw-crew > li[data-st="done"] > b i { background: var(--done); }
.sw-crew > li[data-st="fail"] > b i { background: var(--alarm, #b5543d); }
.sw-crew__st { font: 400 10px var(--f-code); color: var(--ink-3); letter-spacing: 0.04em; margin-left: 4px; }
.sw-run .sw-strip__main form > input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; font: inherit; font-size: 14px; }
.sw-run .sw-ro .k > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 62%; }
@media (max-width: 860px) { .sw-run .sw-strip__main form > input { height: 44px; font-size: 16px; } }

.sw-run .rp-panetabs { display: flex; gap: 2px; margin: -4px 0 6px; }
.sw-run .rp-panetabs:has(.rp-panetab:only-child) { display: none; }
.sw-run .rp-panetab { min-height: 0 !important; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--sw-key-r); background: none; color: var(--ink-2); font: 500 9.5px var(--f-code); letter-spacing: 0.1em; text-transform: uppercase; }
.sw-run .rp-panetab[aria-selected="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }

/* =========================================================== the report */
.sw-report .sw-screen--split { grid-template-columns: 236px minmax(0, 1fr); }
.sw-report .sw-readouts { grid-template-columns: 1fr 1fr; }
.sw-verdict p.sw-verdict__h { font: 400 24px/1.2 var(--f-ui); color: var(--scr-hi); letter-spacing: -0.015em; max-width: 34ch; }
.sw-verdict p.sw-verdict__m { font: 400 12px/1.55 var(--f-code); color: var(--scr-live); max-width: 62ch; letter-spacing: 0; }
.sw-chip { margin-left: auto; padding: 2px 9px; border: 1px solid var(--line); border-radius: 10px; font: 400 10px var(--f-code); color: var(--ink-2); white-space: nowrap; }
.sw-chip::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--done); margin-right: 6px; vertical-align: 1px; }
.sw-ph .sw-chip + .sw-ph__n:empty { display: none; }
.sw-findings { display: grid; gap: 18px; min-width: 0; }
.sw-findings .md, .sw-findings .rsec, .sw-findings .kfinds { max-width: 76ch; }
.sw-facts { margin-top: 18px; display: grid; gap: 8px; }
.sw-facts dl { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 10px; margin: 0; }
.sw-facts dt { font: 500 9.5px var(--f-code); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.sw-facts dd { margin: 0; font-size: 13px; color: var(--ink); }
.sw-actions { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; }
.sw-key--sm { min-height: 32px !important; padding: 0 10px !important; font-size: 9.5px !important; }
.sw-strip select.sw-sel { height: 42px; min-width: 0; max-width: 150px; padding: 0 10px; border: 1px solid rgba(0, 0, 0, 0.25); border-radius: var(--sw-key-r); background: var(--card-2); color: var(--ink); font: 600 10px var(--f-code); letter-spacing: 0.06em; text-transform: uppercase; }
.sw-strip.sw-cont { display: grid !important; }
.sw-strip__note { color: #ecdcc2; font-size: 13px; padding: 0 6px; }
/* a renderer's own source list, set as the B column */
.sw-report .sw-panel .sources { margin: 0; padding: 0; border: 0; background: none; }
.sw-report .sw-panel .source-list { display: grid; gap: 0; }
.sw-report .sw-panel .source { display: grid; grid-template-columns: 28px minmax(0, 1fr); padding: 9px 0; border-bottom: 1px solid var(--line); background: none; border-radius: 0; }
.sw-report .sw-panel .source__n { font: 400 10.5px var(--f-code); color: var(--ink-3); }
.sw-report .sw-panel .source__u { font-size: 12.5px; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 1100px) { .sw-report .sw-split { grid-template-columns: minmax(0, 1fr) !important; } .sw-report .sw-split > .sw-panel + .sw-panel { border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 860px) {
  .sw-report .sw-screen--split { grid-template-columns: minmax(0, 1fr); }
  .sw-report .sw-readouts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sw-verdict p.sw-verdict__h { font-size: 19px; }
  .sw-strip select.sw-sel { max-width: none; height: 40px; }
}
@media (max-width: 420px) { .sw-report .sw-readouts { grid-template-columns: 1fr 1fr; } }

.sw-facts[hidden] { display: none; }
.sw-cont .cont__go { flex: none; }
.sw-cont .sw-strip__main > .cont__input { flex: 1 1 auto; width: auto; min-width: 0; min-height: 0; height: 42px; }
@media (max-width: 860px) { .sw-cont .sw-strip__main > .cont__input { height: 44px; } }

.sw-findings .sec-overview, .sw-findings .rtoc, .sw-findings.has-lead .rlead { display: none; }
.sw-findings .report__doc { display: grid; gap: 22px; }
.sw-findings .rsec { border: 0; padding: 0; margin: 0; background: none; }
.sw-findings .rsec__sum { list-style: none; pointer-events: none; padding: 0 0 8px; border: 0; }
.sw-findings .rsec__sum::-webkit-details-marker { display: none; }
.sw-findings .rsec__sum::after, .sw-findings .rsec__lvl { display: none; }
.sw-findings .rsec__h { font: 600 19px/1.25 var(--f-ui); color: var(--ink); letter-spacing: -0.01em; }
.sw-findings .rsec__body { padding: 0; }
.sw-findings .md ol { padding-left: 0; list-style: none; counter-reset: fnd; }
.sw-findings .md ol > li { counter-increment: fnd; display: grid; grid-template-columns: 30px minmax(0, 1fr); margin: 0 0 12px; }
.sw-findings .md ol > li::before { content: counter(fnd, decimal-leading-zero); font: 400 10.5px var(--f-code); color: var(--ink-3); padding-top: 4px; }
.sw-report .sw-panel .coverage { margin: 18px 0 0; padding: 0; border: 0; background: none; }
.sw-report .sw-panel .coverage h3 { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
@media (max-width: 860px) {
  .sw-cont .sw-strip__keys { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row; }
  .sw-cont .sw-strip__keys > select.sw-sel { grid-column: 1 / -1; }
}

/* the brief: one line on the walnut, no resize grip or scroll arrows */
.swarm-any__input { resize: none !important; overflow: hidden !important; height: 44px !important; min-height: 44px !important; padding: 11px 14px !important; line-height: 20px !important; white-space: nowrap; text-overflow: ellipsis; }
.swarm-any__input:focus { white-space: normal; overflow: auto !important; }
/* the router's pick: a ruled card, not a striped callout */
.swarm-any__pick, .swarm-any__pick.is-sure { border: 1px solid var(--line) !important; border-top: 3px solid var(--ink) !important; border-radius: var(--sw-r-in) !important; background: var(--card) !important; box-shadow: none !important; }

/* ================================================================ the hub */
/* the show as the display */
.sw-bezel--show .sw-screen--show { grid-template-columns: 236px minmax(0, 1fr); }
.sw-bezel--show .sw-readouts { grid-template-columns: 1fr 1fr; }
.sw-show { min-width: 0; display: grid; gap: 10px; align-content: start; }
.sw-show__title { font: 500 17px/1.25 var(--f-ui); color: var(--scr-hi); letter-spacing: -0.01em; }
.sw-show__note { grid-column: 1 / -1; display: grid; gap: 12px; }
.sw-show__note p, p.sw-show__note { margin: 0; font: 400 13.5px/1.55 var(--f-ui); color: var(--scr-ink); max-width: 72ch; }
.sw-wave { position: relative; height: 64px; display: flex; align-items: center; gap: 2px; cursor: pointer; touch-action: none; }
.sw-wave i { flex: 1; min-width: 1px; border-radius: 1px; background: var(--scr-ink-3); opacity: 0.55; pointer-events: none; transition: height 0.4s var(--ease); }
.sw-wave i.on { background: var(--scr-live); opacity: 1; }
.sw-wave__head { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--scr-hi); pointer-events: none; }
.sw-wave:focus-visible { outline: 2px solid var(--ochre); outline-offset: 4px; }
.sw-chaps { position: relative; height: 14px; border-top: 1px solid var(--scr-line); }
.sw-chaps span { position: absolute; top: 3px; font: 400 8.5px var(--f-code); letter-spacing: 0.12em; color: var(--scr-ink-3); white-space: nowrap; text-transform: uppercase; max-width: 22%; overflow: hidden; text-overflow: ellipsis; }
.sw-chaps span::before { content: ""; position: absolute; left: 0; top: -7px; width: 1px; height: 5px; background: var(--scr-ink-3); }
.sw-chaps span.on { color: var(--scr-hi); }
.sw-transport { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sw-transport__sp { flex: 1; }
.sw-screen .sw-key { min-height: 30px; padding: 0 11px; background: transparent; color: var(--scr-hi); border-color: var(--scr-line); font-size: 9.5px; }
.sw-screen .sw-key:hover { background: color-mix(in oklab, var(--scr-hi) 8%, transparent); }
.sw-screen .sw-key--lit { background: var(--scr-hi); color: var(--scr); border-color: var(--scr-hi); }
.sw-screen .sw-key--lit:hover { background: var(--scr-hi); filter: brightness(1.05); }
.sw-screen .sw-key--lit svg { width: 11px; height: 11px; }
.sw-screen .sw-key--ochre { background: var(--ochre); color: var(--ochre-ink); border-color: transparent; }
.sw-key.is-loading { opacity: 0.6; }

/* the brief on walnut */
.sw-brief.swarm-any { display: grid; gap: 10px; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.sw-brief .swarm-any__bar { display: flex !important; align-items: center; min-width: 0; }
.sw-brief .swarm-any__bar > .swarm-any__input { flex: 1; min-width: 0; height: 42px !important; min-height: 42px !important; padding: 0 14px !important; font: inherit; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden !important; }
.sw-brief .swarm-any__go { flex: none; }
.sw-key__ico { display: inline-grid; line-height: 0; }
.sw-key__ico svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.5; }
.sw-brief .swarm-any__result:empty { display: none; }

/* the sheet head: what the show has to say */
.sw-showx:empty { display: none; }
.sw-showx__in { display: grid; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.sw-showx__k { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.sw-showx .show__sugg { display: grid; gap: 0; border-top: 1px solid var(--line); }
.sw-showx .show__sugg-btn { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; align-items: baseline; text-align: left; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: var(--ink); font: 500 13.5px var(--f-ui); }
.sw-showx .show__sugg-btn:hover { background: var(--card-2); }
.sw-showx .show__sugg-mode { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--done); }
.sw-showx .show__reply-row { display: flex; gap: 8px; }
.sw-showx .show__reply-in { flex: 1; min-width: 0; height: 40px; }
.sw-showx .sw-read { border-top: 1px solid var(--line); padding-top: 10px; }
.sw-showx .sw-read summary { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; }

/* the capability index: group on the left, a ruled four-column grid */
.hub .capgroups { display: grid; gap: 26px; }
.capgroup { display: grid !important; grid-template-columns: 200px minmax(0, 1fr); gap: 0 24px; padding-top: 14px; border-top: 1px solid var(--ink); background: none !important; border-radius: 0 !important; box-shadow: none !important; margin: 0 !important; }
.capgroup__head { display: block; padding: 0; margin: 0; border: 0; }
.capgroup__title { margin: 0; font: 650 14px var(--f-ui) !important; letter-spacing: -0.005em; color: var(--ink); text-transform: none !important; }
.capgroup__blurb { margin: 4px 0 0 !important; font: 400 12.5px/1.45 var(--f-ui) !important; color: var(--ink-2); max-width: 26ch; font-style: normal !important; }
.capgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); min-width: 0; }
.capx { text-align: left; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: none; padding: 12px 14px; display: grid; gap: 5px; align-content: start; min-height: 112px; color: var(--ink); cursor: pointer; border-radius: 0; font: inherit; }
.capx:hover { background: var(--card-2); }
.capx b { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.capx b i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: oklch(0.62 0.12 var(--cap-h, 160)); }
.capx span { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.capx em { font: normal 500 9.5px var(--f-code); letter-spacing: 0.12em; color: var(--ink-3); padding-top: 4px; text-transform: uppercase; }
.capx:hover em { color: var(--ink); }
@media (max-width: 1100px) { .capgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) { .capgroup { grid-template-columns: minmax(0, 1fr); gap: 10px; } .capgroup__blurb { max-width: none; } }
@media (max-width: 860px) {
  .sw-bezel--show .sw-screen--show { grid-template-columns: minmax(0, 1fr); }
  .sw-bezel--show .sw-readouts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sw-show__title { font-size: 15px; }
  .sw-wave { height: 52px; }
  .sw-wave i:nth-of-type(2n) { display: none; }
  .sw-brief .swarm-any__bar { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .sw-brief .swarm-any__bar > .sw-engr { display: none; }
  .sw-brief .swarm-any__bar > .swarm-any__input { height: 44px !important; min-height: 44px !important; font-size: 16px; }
  .sw-brief .swarm-any__bar > .sw-key:last-child { grid-column: 1 / -1; }
  .sw-showx .show__sugg-btn { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (max-width: 520px) { .capgrid { grid-template-columns: minmax(0, 1fr); } .capx { min-height: 0; } }
@media (max-width: 420px) { .sw-bezel--show .sw-readouts { grid-template-columns: 1fr 1fr; } }

.hub .caps.capgroups { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; gap: 26px; }
.hub .capgroup > * { min-width: 0; }
/* the daily brief and fresh results: ruled rows on the sheet */
.sw-sheet .recap { justify-self: stretch; max-width: none; margin: 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.sw-sheet .recap__head { width: 100%; justify-content: flex-start; padding: 12px 0; border: 0; border-radius: 0; background: none; }
.sw-sheet .recap__title { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.sw-sheet .recap__hint { font-size: 12.5px; color: var(--ink-2); }
.sw-showx .linklike, .sw-showx .show__stamp { font: 500 9.5px var(--f-code); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; }
.sw-showx .linklike:hover { color: var(--ink); text-decoration: underline; }

/* ================================================================== chat */
.sw-screen--chat .sw-meter { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 3px; }
.sw-meter i { height: 5px; border-radius: 1px; background: var(--scr-line); }
.sw-meter i.on { background: var(--scr-live); }
.sw-chatlist { list-style: none; margin: 0; padding: 0; }
.sw-chatlist li { border-bottom: 1px solid var(--line); }
.sw-chatlist button { width: 100%; display: grid; gap: 3px; padding: 11px 0; border: 0; background: none; text-align: left; color: var(--ink); cursor: pointer; font: inherit; min-height: 0; }
.sw-chatlist button:hover b { text-decoration: underline; }
.sw-chatlist b { font: 500 13.5px/1.35 var(--f-ui); }
.sw-chatlist li.is-on b::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 7px; vertical-align: 2px; }
.sw-chatlist small { font: 400 10.5px var(--f-code); color: var(--ink-3); }
.sw-ph__acts { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.sw-ph__acts .sw-chip { margin: 0; }
.sw-ph__acts .chat__share-btn, .sw-ph__acts .sw-ph__back { min-height: 26px !important; padding: 0 10px; font: 500 9.5px var(--f-code); letter-spacing: 0.1em; text-transform: uppercase; }
.sw-ph:has(.sw-ph__acts) .sw-ph__n:empty { display: none; }
.sw-chat__thread .sw-pbody { display: grid; gap: 12px; align-content: start; }
.sw-chat .chat__thread { max-height: none; overflow: visible; }
.sw-chat .chat__msg { max-width: 68ch; }
.sw-chat__blank { display: grid; gap: 12px; max-width: 62ch; }
.sw-chat .sw-pbody { min-height: 0; }
.sw-chat > .sw-panel:first-child .sw-pbody { max-height: 70vh; overflow: auto; }
.chat .sw-strip--compose textarea { height: 42px; min-height: 42px; padding: 10px 14px; resize: none; line-height: 20px; }
@media (max-width: 860px) {
  .sw-screen--chat .sw-meter { grid-template-columns: repeat(20, minmax(0, 1fr)); }
  .sw-screen--chat .sw-meter i:nth-child(n + 21) { display: none; }
  .sw-chat > .sw-panel:first-child .sw-pbody { max-height: 220px; }
  .sw-chat > .sw-panel:first-child { order: 2; }
  .sw-chat > .sw-panel + .sw-panel { border-top: 0; }
  .sw-chat > .sw-panel:first-child { border-top: 1px solid var(--line); }
  .chat .sw-strip--compose textarea { height: 44px; min-height: 44px; font-size: 16px; }
}

.sw-screen.sw-screen--chat { grid-template-columns: minmax(0, 1fr) !important; }
.sw-screen--chat .sw-readouts { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.sw-chat .chat__thread { border-top: 0 !important; padding-top: 0 !important; margin-top: 0 !important; }
.chat .sw-strip--compose .sw-strip__main { align-items: center; }
@media (max-width: 420px) { .sw-screen--chat .sw-readouts { grid-template-columns: 1fr 1fr !important; } }

/* The chat is an app screen, not a document: the page holds still at the
   viewport's height and the thread scrolls inside its own panel, so the
   display and the Ask strip stay put through a long conversation. On a
   phone that applies to an open thread (the list is one tap away under
   "All chats"); short landscape viewports keep plain page scrolling. */
.sw-ph__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-ph__acts { flex: none; }
.sw-ph__back { display: none; }
@media (min-width: 861px) and (min-height: 560px) {
  .app:has(> .sw-page.chat) > .footer { display: none; }
  .app:has(> .sw-page.chat) { min-height: 0 !important; }
  .sw-page.chat { height: 100dvh; padding-bottom: 16px; grid-template-rows: auto auto minmax(0, 1fr); }
  .sw-page.chat .sw-chat { min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .sw-page.chat .sw-chat > .sw-panel { min-height: 0; }
  .sw-page.chat .sw-chat .sw-pbody { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; }
  .sw-page.chat .sw-chat__thread .sw-pbody { display: flex; flex-direction: column; overflow: hidden; }
  .sw-page.chat .sw-chat__thread .sw-pbody > * { flex: none; }
  .sw-page.chat .sw-chat .chat__thread { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 860px) and (min-height: 520px) {
  .app:has(> .sw-page.chat .sw-chat__thread) > .footer { display: none; }
  .app:has(> .sw-page.chat .sw-chat__thread) { min-height: 0 !important; }
  .sw-page.chat:has(.sw-chat__thread) { height: calc(100dvh - 78px - env(safe-area-inset-bottom, 0px)); padding-bottom: 10px; grid-template-rows: auto auto minmax(0, 1fr); }
  .sw-page.chat:has(.sw-chat__thread) .sw-readouts,
  .sw-page.chat:has(.sw-chat__thread) .sw-meter { display: none !important; }
  .sw-page.chat .sw-chat:has(.sw-chat__thread) { min-height: 0; grid-template-rows: minmax(0, 1fr); }
  .sw-page.chat .sw-chat:has(.sw-chat__thread) > .sw-panel:first-child { display: none; }
  .sw-page.chat .sw-chat__thread { min-height: 0; border-top: 0; }
  .sw-page.chat .sw-chat__thread .sw-pbody { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  .sw-page.chat .sw-chat__thread .sw-pbody > * { flex: none; }
  .sw-page.chat .sw-chat__thread .chat__thread { flex: 1 1 auto; min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
  .sw-ph__back { display: inline-flex; }
  .sw-chat__thread .sw-ph__acts .sw-chip { display: none; }
  body:has(.s2-mini:not(.hidden)) .sw-page.chat:has(.sw-chat__thread) { height: calc(100dvh - 78px - 64px - env(safe-area-inset-bottom, 0px)); }
}

/* ============================================================= schedules */
.sched-list { display: grid; gap: 0; }
.sched-list .sched { padding: 0 !important; margin: 0 !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
.sched__row { display: grid; grid-template-columns: 90px minmax(0, 2.4fr) minmax(0, 1fr) 110px minmax(0, 1.2fr) 150px; gap: 14px; align-items: center; padding: 12px 0; }
.sched__row--head { padding: 0 0 8px; border-bottom: 1px solid var(--ink); }
.sched__row--head span { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.sched__row--head span:last-child { text-align: right; }
.sched__state { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.sched__state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--done); }
.sched__state.is-off::before { background: var(--ink-3); }
.sched__brief { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sched__brief i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: oklch(0.62 0.12 var(--cap-h, 160)); }
.sched__brief b { font: 600 13.5px var(--f-ui); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched__cad, .sched__next, .sched__res { font: 400 11px var(--f-code); color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sched__res.is-fail { color: var(--alarm, #b5543d); }
.sched__res .linklike { font: inherit; color: var(--ink); }
.sched__acts { display: inline-flex; gap: 6px; justify-content: flex-end; }
.sched__more { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 0 12px 104px; }
.sched__more.hidden { display: none; }
.sched__deliv { font: 400 11px var(--f-code); color: var(--ink-3); margin-left: 6px; }
.sched.is-paused .sched__brief b { color: var(--ink-2); }
.sched .sched__edit { padding: 14px 0; }
.sched .sched__hist:not(.hidden) { padding: 0 0 12px 104px; }
@media (max-width: 980px) {
  .sched__row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; }
  .sched__row--head { display: none; }
  .sched__state { grid-column: 1; grid-row: 1; }
  .sched__brief { grid-column: 1 / -1; grid-row: 2; }
  .sched__brief b { white-space: normal; }
  .sched__cad { grid-column: 1; grid-row: 3; }
  .sched__next { grid-column: 2; grid-row: 3; text-align: right; }
  .sched__res { grid-column: 1 / -1; grid-row: 4; }
  .sched__acts { grid-column: 2; grid-row: 1; }
  .sched__more, .sched .sched__hist:not(.hidden) { padding-left: 0; }
}

/* =============================================================== account */
.sw-acct { grid-column: 1 / -1; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: end; }
.sw-acct__bal { display: grid; gap: 6px; }
.sw-acct__v { font: 300 48px/1 var(--f-ui); letter-spacing: -0.03em; color: var(--scr-hi); font-variant-numeric: tabular-nums; }
.sw-acct__v small { font-size: 18px; color: var(--scr-ink-3); margin-left: 3px; letter-spacing: 0; }
.sw-acct__gs { font: 500 10px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--scr-live); white-space: pre; }
.sw-acct__gs b { color: var(--scr-hi); font-weight: 500; }
.sw-acct__chart { display: grid; gap: 8px; min-width: 0; }
.sw-acct .sw-lbl { color: var(--scr-ink-3); }
.sw-acct .sw-balbar { margin-top: 6px; }
.sw-cost { display: grid; }
.sw-cost__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sw-cost__row--head { padding: 0 0 8px; border-bottom: 1px solid var(--ink); }
.sw-cost__row--head span { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.sw-cost__m { display: flex; align-items: center; gap: 8px; font: 500 13.5px var(--f-ui); color: var(--ink); }
.sw-cost__m i { width: 7px; height: 7px; border-radius: 50%; background: oklch(0.62 0.12 var(--cap-h, 160)); flex: none; }
.sw-cost__v { display: inline-flex; align-items: center; gap: 8px; font: 400 11px var(--f-code); color: var(--ink-2); white-space: nowrap; }
.sw-cost__bar { display: inline-block; height: 3px; background: var(--ink-3); border-radius: 1px; }
.sw-prefs { display: grid; }
.sw-pref { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.sw-pref b { font: 600 13.5px var(--f-ui); color: var(--ink); }
.sw-pref > span { grid-column: 1; font-size: 12.5px; color: var(--ink-2); }
.sw-pref > :last-child { grid-row: 1 / span 2; grid-column: 2; }
.sw-pref .themesw { --sw-line: var(--line); --sw-ink: var(--ink-2); --sw-thumb: var(--ink); --sw-on: var(--card-2); width: 108px; }
.sw-tog { position: relative; width: 38px; height: 22px; padding: 0; border-radius: 11px; border: 1px solid var(--line); background: var(--card-2); cursor: pointer; min-height: 0 !important; }
.sw-tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-3); transition: transform 0.25s var(--ease), background-color 0.25s var(--ease); }
.sw-tog[aria-checked="true"] { background: var(--ink); border-color: var(--ink); }
.sw-tog[aria-checked="true"]::after { transform: translateX(16px); background: var(--card-2); }
.sw-prefsec { display: grid; gap: 8px; padding: 16px 0 4px; justify-items: start; }
.sw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-chip--plain { margin: 0; }
.sw-facts__dl { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 10px; margin: 0; }
.sw-facts__dl dt { font: 500 9.5px var(--f-code); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.sw-facts__dl dd { margin: 0; font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .sw-acct { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sw-acct__v { font-size: 40px; }
}

.sw-prefs .linklike, .sw-findings .linklike { font: 500 9.5px var(--f-code); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; }
.sw-prefs .linklike:hover { color: var(--ink); text-decoration: underline; }
.billing .sw-lede + .sw-cost { margin-top: 14px; }

/* ================================================================= inbox */
.sw-inbox .sw-screen--split { grid-template-columns: 236px minmax(0, 1fr); }
.sw-inbox .sw-readouts { grid-template-columns: 1fr 1fr; }
.sw-strip--inbox .sw-strip__main { flex-wrap: wrap; }
.sw-notes { display: grid; border-top: 1px solid var(--line); }
.sw-note { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: start; width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: var(--ink); cursor: pointer; font: inherit; min-height: 0; }
.sw-note:hover { background: var(--card-2); }
.sw-note[hidden] { display: none; }
.sw-note__dot { width: 7px; height: 7px; margin: 6px 0 0 4px; border-radius: 50%; border: 1px solid var(--ink-3); }
.sw-note.is-unread .sw-note__dot { background: var(--ok); border-color: var(--ok); }
.sw-note.is-bad .sw-note__dot { border-color: var(--alarm, #b5543d); }
.sw-note.is-bad.is-unread .sw-note__dot { background: var(--alarm, #b5543d); }
.sw-note__main { display: grid; gap: 4px; min-width: 0; }
.sw-note__t { font: 500 14px var(--f-ui); color: var(--ink); }
.sw-note.is-unread .sw-note__t { font-weight: 600; }
.sw-note__t small { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-right: 8px; }
.sw-note__b { font-size: 13px; color: var(--ink-2); max-width: 72ch; overflow-wrap: anywhere; }
.sw-note__when { font: 400 10.5px var(--f-code); color: var(--ink-3); white-space: nowrap; padding-top: 2px; }
@media (max-width: 860px) {
  .sw-inbox .sw-screen--split { grid-template-columns: minmax(0, 1fr); }
  .sw-inbox .sw-readouts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sw-strip--inbox .sw-strip__main .sw-keyseg { flex: 1 1 100%; }
}
@media (max-width: 420px) { .sw-inbox .sw-readouts { grid-template-columns: 1fr 1fr; } }

/* ============================================ code: lettered panels, keys */
.cw-grid { counter-reset: pane; }
.cw-grid > .cw-col > :first-child { counter-increment: pane; }
.cw-grid > .cw-col > :first-child::before { content: counter(pane, upper-alpha); font: 500 9.5px var(--f-code, var(--cw-mono)); letter-spacing: 0.12em; color: var(--ink-3); margin-right: 10px; align-self: center; }
.cw-btn--danger, .cw-strip .cw-btn--danger { color: var(--ink) !important; }
.cw-echo { border-left: 0 !important; padding: 0 0 12px !important; border-bottom: 1px solid var(--line); color: var(--ink) !important; }

/* no stripes: callouts are ruled or boxed, never edged in colour */
.md blockquote { border-left-width: 1px !important; }
.ctx-chip, .dossier-note, .rhero, .rlead { border-left: 1px solid var(--line) !important; }

.cw-grid > .cw-col > :first-child { display: flex !important; align-items: center; justify-content: flex-start !important; gap: 10px; }
.cw-grid > .cw-col > :first-child::before { margin-right: 0; }
.cw-grid .cw-pane-h > span { font: 600 13.5px var(--f-ui); color: var(--ink); }
.cw-grid .cw-filters { margin-left: auto; }

/* ========================================================== launch form */
.sw-launchpage .sw-screen--split { grid-template-columns: 236px minmax(0, 1fr); }
.sw-launchpage .sw-readouts { grid-template-columns: 1fr 1fr; }
.sw-strip--launch .sw-strip__main { align-items: stretch; }
.sw-strip--launch textarea.sw-launch__in { flex: 1; min-width: 0; height: 42px; min-height: 42px; max-height: 40vh; padding: 10px 14px; resize: vertical; line-height: 20px; font: inherit; font-size: 14px; }
.sw-strip--launch textarea.sw-launch__in:focus { height: 96px; }
.sw-strip--launch .sw-strip__keys { align-items: center; }
.sw-strip--launch .sw-strip__keys > :not(.sw-key) { color: #ecdcc2; font: 500 10px var(--f-code); letter-spacing: 0.08em; }
.sw-launch { display: grid; gap: 18px; }
.sw-launch .ask__actions { margin: 0; padding: 0; }
.sw-presets { border-top: 1px solid var(--ink); padding-top: 14px; }
.sw-presets .panel, .sw-presets .panel__body { padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; }
@media (max-width: 860px) {
  .sw-launchpage .sw-screen--split { grid-template-columns: minmax(0, 1fr); }
  .sw-strip--launch textarea.sw-launch__in { height: 44px; min-height: 44px; font-size: 16px; }
}

/* the Live page's session cards: the badge sits in its header, not the page corner */
.sess__head { display: flex; align-items: baseline; gap: 10px; }
.sess__head .live__badge { position: static; margin-left: auto; }

/* a plain report page set under a display (see frame() in app.js) */
.sw-page > .report.sw-wrapped { max-width: none; width: auto; margin: 0; padding: 22px 24px 32px; background: var(--card); border-top: var(--sw-sheet-rule); border-bottom: 1px solid var(--line); }
.sw-page > .report.sw-wrapped > .report__head { border-bottom: 0; }
.sw-screen--slim { grid-template-columns: minmax(0, 1fr) !important; }
@media (max-width: 860px) { .sw-page > .report.sw-wrapped { padding: 18px 16px 26px; } }

/* the rail: a seven-character token count fits at a smaller size */
.masthead .credits.is-long .credits__v { font-size: 14.5px !important; letter-spacing: -0.03em; }
/* fresh results: ruled rows on the sheet */
.sw-sheet .samples { display: grid; gap: 10px; margin: 0; padding: 0; }
.sw-sheet .samples .hub__lead { font: 600 19px/1.25 var(--f-ui) !important; margin: 0; max-width: 40ch; }
.sw-sheet .samples__grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 0 !important; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.sw-sheet .sample { border: 0 !important; border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; padding: 12px 14px !important; text-align: left; display: grid; gap: 5px; }
.sw-sheet .sample:hover { background: var(--card-2) !important; }
.sw-sheet .sample__tag { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--done); }
.sw-sheet .sample__title { font: 600 14px/1.35 var(--f-ui); color: var(--ink); }
.sw-sheet .sample__meta { font: 400 10.5px var(--f-code); color: var(--ink-3); }
@media (max-width: 860px) { .sw-sheet .samples__grid { grid-template-columns: minmax(0, 1fr) !important; } }

.sw-chaps span.is-end { transform: translateX(-100%); text-align: right; }
.sw-chaps span.is-end::before { left: auto; right: 0; }
.cw-strip--launch .cw-textarea { overflow: hidden; }
.cw-strip--launch .cw-textarea:focus { overflow: auto; }

/* ============================================================== sign in */
.sw-auth .sw-split { min-height: 0; }
.sw-auth .sw-pbody > section, .sw-auth .sw-pbody > div:first-child { max-width: 440px; }
.sw-auth .login, .sw-auth .panel { border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; max-width: 440px; }
.sw-auth .panel__head { display: none; }
.sw-auth .panel__body { padding: 0 !important; }
.sw-shelf { display: grid; gap: 14px; }
.sw-shelf__g { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.sw-shelf__m { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.sw-shelf__m span { display: inline-flex; align-items: center; gap: 6px; font: 500 13px var(--f-ui); color: var(--ink); }
.sw-shelf__m i { width: 6px; height: 6px; border-radius: 50%; background: oklch(0.62 0.12 var(--cap-h, 160)); }
.sw-auth .sw-split + * { margin-top: 0; }
.masthead .masthead__meta:has(> .themesw:only-child) { flex: 1; justify-content: flex-end; }
.masthead .masthead__meta:has(> .themesw:only-child) .themesw { margin-top: auto; }
@media (max-width: 48rem) { .masthead .masthead__meta:has(> .themesw:only-child) { display: none; } }

.sw-shelf + .sw-empty { margin-top: 14px; }

/* a required brief left empty: visible on the walnut */
.sw-strip .is-invalid { outline: 2px solid var(--alarm, #b5543d) !important; outline-offset: 1px; }

/* the run log stays a collapsed, clickable section under the findings */
.sw-findings .rlog { border-top: 1px solid var(--line) !important; padding-top: 10px !important; }
.sw-findings .rlog > .rsec__sum { pointer-events: auto; cursor: pointer; }
.sw-findings .rlog > .rsec__sum .rsec__lvl { display: inline; margin-right: 6px; color: var(--ink-3); }
.sw-findings .rlog > .rsec__sum .rsec__h { font: 500 9.5px var(--f-code); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
