/* Origami brand: paper, ink, a single green accent, a hairline rule.
   Serif for anything that reads as a heading; the interface stays quiet. */
:root {
  --bg: #FAF7F2;
  --paper: #FFFFFF;
  --ink: #1A1A1A;
  --ink-soft: #5A554D;
  --ink-faint: #8C857A;
  --accent: #557A4E;
  --accent-soft: #EDF2EB;
  --rule: #E8E2D6;
  --warn: #A8562B;
  --warn-soft: #FBF0E8;
  --font-display: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --topbar-h: 60px;
  --rail-w: 320px;
  --gutter: 16px;
}

* { box-sizing: border-box; }

/* Every author `display:` below outranks the UA's [hidden]{display:none}, so state toggled
   with el.hidden would render anyway. This one line keeps the attribute authoritative. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

/* Three rows, not four: the 34px status strip is gone and its tenants moved to the controls
   they belong to (the dot, the Save menu, the toasts, the landing). */
body {
  display: grid;
  grid-template-rows: var(--topbar-h) minmax(0, 1fr) auto;
}

/* Text that exists for a screen reader — and for anything else asking the page what it knows —
   without taking a pixel. The measured WebMCP string lives here, behind the status dot. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.brand { display: flex; align-items: baseline; gap: 8px; flex: 0 0 auto; }
/* On the mini tool pages the wordmark is the way home (docs/SITE.md: "Every page links home via
   the brand wordmark"), so .brand is an <a> there. It must not read as body-copy link. */
a.brand { color: inherit; text-decoration: none; border-radius: 4px; }
a.brand:hover .wordmark { text-decoration: underline; text-underline-offset: 3px; }
a.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mark { width: 26px; height: 26px; align-self: center; }
.mark.big { width: 56px; height: 56px; opacity: 0.9; margin-bottom: 18px; }
.wordmark { font-family: var(--font-display); font-size: 20px; letter-spacing: -0.01em; }
.subbrand { font-size: 12px; color: var(--ink-faint); letter-spacing: 0.09em; text-transform: uppercase; }

.deck-title {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink-soft);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

button {
  font: inherit;
  font-size: 13px;
  padding: 7px 13px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
button:hover:not(:disabled) { background: var(--accent-soft); border-color: #CFD9CB; }
button:disabled { opacity: 0.42; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover:not(:disabled) { background: #4A6D44; border-color: #4A6D44; }
button.ghost { border-color: transparent; background: transparent; color: var(--ink-soft); }
button.danger { color: var(--warn); }
button.danger:hover:not(:disabled) { background: var(--warn-soft); border-color: #EBD6C6; }

/* ---------- status dot, save menu, popover ---------- */

.popwrap { position: relative; display: inline-flex; align-items: center; }

.statusdot {
  padding: 6px;
  border-color: transparent;
  background: transparent;
  line-height: 0;
}
.statusdot:hover:not(:disabled) { background: var(--bg); border-color: var(--rule); }
.statusdot .dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
}
.statusdot[data-state="on"] .dot { background: var(--accent); }
.statusdot[data-state="partial"] .dot { background: var(--warn); }
.statusdot[data-state="off"] .dot { background: var(--rule); border: 1px solid var(--ink-faint); }

.savegroup { gap: 0; }
.savegroup .primary { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.savegroup .chev {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 0;
  padding: 7px 9px;
  color: var(--ink-soft);
}
/* The Save button carries its own state: amber while there is work to lose, green once there
   is not. A dot beats a sentence here — it is next to the control that acts on it. */
.statepip {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-left: 7px;
  vertical-align: middle;
  background: transparent;
}
.statepip.dirty { background: #F0C08A; }
.statepip.saved { background: #CFE3C9; }

.popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: 288px;
  padding: 13px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 6px 20px rgba(26, 26, 26, 0.05);
  text-align: left;
}
.popover p { margin: 0 0 8px; font-size: 12px; line-height: 1.55; color: var(--ink-soft); }
.popover p:last-child { margin-bottom: 0; }
.pop-lede { color: var(--ink) !important; }
.pop-note { color: var(--ink-faint) !important; }
.pop-warn { color: var(--warn) !important; }
.pop-tech {
  font-family: var(--font-mono);
  font-size: 11px !important;
  color: var(--ink-faint) !important;
  border-top: 1px solid var(--rule);
  padding-top: 8px;
  margin-top: 10px !important;
  word-break: break-word;
}
.pop-code {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  margin: 0 0 8px;
  padding: 8px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-all;
}

.savemenu { width: 264px; padding: 10px; }
.savemenu .pop-file {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
  padding: 0 4px 2px;
  word-break: break-all;
}
.savemenu .pop-state { font-size: 12px; color: var(--ink-faint); padding: 0 4px 9px; border-bottom: 1px solid var(--rule); margin-bottom: 8px; }
.savemenu button { display: block; width: 100%; text-align: left; border-color: transparent; margin-top: 3px; }
.savemenu button:hover:not(:disabled) { background: var(--accent-soft); border-color: #CFD9CB; }

/* ---------- theme button ---------- */

/* Same rhythm as New / Open — border, radius, padding, height — plus the one thing those don't
   carry: a dot in the deck's OWN colour. The colour is the Fold's, not the shell's, so it can
   only ever be set inline (see theme-control.ts); the shell still contributes nothing to the
   palette, it just frames one. */
.themebtn { display: inline-flex; align-items: center; gap: 7px; }
.themebtn .swatch {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.thememenu { width: 264px; padding: 8px; max-height: 340px; overflow-y: auto; }
.theme-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.theme-row:hover, .theme-row:focus-visible { background: var(--bg); }
.theme-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.theme-row[aria-current="true"] { background: var(--accent-soft); }
.theme-swatches { display: flex; flex: none; }
.theme-swatches i {
  display: block;
  width: 11px;
  height: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin-left: -4px;
}
.theme-swatches i:first-child { margin-left: 0; border-radius: 3px 0 0 3px; }
.theme-swatches i:last-child { border-radius: 0 3px 3px 0; }
.theme-row-label { flex: 1 1 auto; min-width: 0; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-tag { flex: none; }
.theme-row-del { flex: none; font-size: 11px; padding: 2px 8px; }

/* ---------- toasts ---------- */

.toasts {
  position: absolute;
  left: var(--gutter);
  bottom: var(--gutter);
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(420px, calc(100% - 2 * var(--gutter)));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid #CFD9CB;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: 0 2px 10px rgba(26, 26, 26, 0.05);
  pointer-events: auto;
}
.toast.bad { border-color: #EBD6C6; background: var(--warn-soft); color: var(--warn); }
.toast-close {
  flex: none;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
}
.toast-close:hover:not(:disabled) { background: transparent; opacity: 0.7; }

/* ---------- main split ---------- */

main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  min-height: 0;
}

/* The deck is the object; the stage is the desk it sits on. The gutter and the hairline frame
   are what make the Fold read as a document rather than as the page's background.

   `min-height: 0` is load-bearing, not tidying: a grid item defaults to min-height:auto, so the
   stage refuses to shrink below its content — and a landing taller than a short window then
   pushed the stage down over the tool console, where (being position:relative) it painted on
   top and swallowed every click on the tool list. The landing scrolls inside the stage instead. */
.stage { position: relative; min-width: 0; min-height: 0; background: var(--bg); padding: var(--gutter); }

.preview {
  width: 100%;
  height: 100%;
  display: block;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 1px 3px rgba(26, 26, 26, 0.05);
}

/* The landing: one centred 560px column. It is the empty state AND the product page, so the
   type steps up (34px serif headline) and the three ways in sit on one row — which wraps
   rather than overflowing when the stage narrows. */
.empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  overflow-y: auto;
}
.empty h1 { font-family: var(--font-display); font-weight: 600; font-size: 34px; margin: 0 0 12px; letter-spacing: -0.015em; }
.empty p { max-width: 52ch; color: var(--ink-soft); line-height: 1.6; margin: 0; }
.empty code { font-family: var(--font-mono); font-size: 12px; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; }
.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  max-width: 560px;
}
.empty-actions .play { font-size: 10px; margin-right: 3px; }
.empty .connect { margin-top: 14px; }

/* Only while the recorded run is playing: what it is doing, and the way out of it. */
.replaybar {
  position: absolute;
  left: 50%;
  bottom: var(--gutter);
  transform: translateX(-50%);
  z-index: 31;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 2 * var(--gutter));
  padding: 7px 9px 7px 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 2px 10px rgba(26, 26, 26, 0.05);
}
.replaybar .pulse { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.1s ease-in-out infinite; }
.replaybar .replay-step {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.replaybar button { font-size: 12px; padding: 4px 12px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) { .replaybar .pulse { animation: none; } }

/* The one control that recovers lost work, on the one screen where losing it is still fixable. */
.resumecard {
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--paper);
  text-align: left;
  max-width: 360px;
  box-shadow: 0 1px 3px rgba(26, 26, 26, 0.05);
}
.resume-head { font-family: var(--font-display); font-size: 14px; margin-bottom: 3px; }
.resume-meta { font-size: 11.5px; color: var(--ink-faint); margin-bottom: 11px; word-break: break-all; }
.resume-actions { display: flex; gap: 8px; }
.resume-actions button { font-size: 12px; padding: 6px 12px; }

.dropveil {
  position: absolute;
  inset: 12px;
  border: 2px dashed var(--accent);
  border-radius: 12px;
  background: rgba(85, 122, 78, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--accent);
  pointer-events: none;
}

/* ---------- activity rail ---------- */

.rail {
  border-left: 1px solid var(--rule);
  background: var(--paper);
  overflow-y: auto;
  min-width: 0;
  min-height: 0; /* same reason as .stage: a grid item must be allowed to scroll, not to grow */
  display: flex;
  flex-direction: column;
}
/* The support slot: pinned under the feed (margin-top:auto), never over it, never animated. */
.rail-support {
  margin-top: auto;
  display: block;
  padding: 10px 16px;
  border-top: 1px solid var(--rule);
  font-size: 11.5px;
  text-align: center;
  color: var(--ink-faint);
  text-decoration: none;
}
.rail-support:hover, .rail-support:focus-visible { color: var(--accent); background: var(--bg); }

.rail-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 10px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.rail-head h2 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: 0; }
.rail-head .grow { flex: 1 1 auto; }

/* Live indicator: the ONE place the page admits a tool is running, for every route in. */
.rail-live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px; color: var(--accent); min-width: 0; }
.rail-live span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-live .pulse { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.72); } }
@media (prefers-reduced-motion: reduce) { .rail-live .pulse { animation: none; } }

.feed { padding: 10px 12px 16px; }

.activity-list { list-style: none; margin: 0; padding: 0; }

.arow {
  padding: 8px 6px;
  border-bottom: 1px solid var(--rule);
}
.arow:last-child { border-bottom: 0; }
.arow.goto { cursor: pointer; border-radius: 6px; }
.arow.goto:hover { background: var(--bg); }
.arow.goto:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.arow-head { display: flex; align-items: baseline; gap: 8px; }
.arow-summary {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.arow-time { flex: none; font-size: 10.5px; color: var(--ink-faint); white-space: nowrap; }
.arow-foot { display: flex; margin-top: 4px; }
.arow-foot .undo { margin-left: auto; font-size: 11px; padding: 2px 9px; }
.arow.bad .arow-summary { color: var(--warn); }
.arow.bad .chip { color: var(--warn); border-color: #EBD6C6; }

/* Same shape as the proposal cards' action tag — one vocabulary of little bordered caps. */
.chip {
  flex: none;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid #CFD9CB;
  border-radius: 4px;
  padding: 1px 5px;
  background: var(--paper);
}

.feed-empty { list-style: none; font-size: 12px; color: var(--ink-faint); line-height: 1.6; padding: 6px 4px; }
.feed-empty p { margin: 0 0 8px; }
.linky { border: 0; background: transparent; padding: 0; font-size: 12px; color: var(--accent); text-decoration: underline; }
.linky:hover:not(:disabled) { background: transparent; color: #4A6D44; }

.count {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  text-align: center;
}

/* Staged proposals sit at the head of the same feed, in the same rhythm as the rows: quieter
   than the old standalone cards, but still the only thing in the rail with buttons on it. */
.proposal-list { display: flex; flex-direction: column; gap: 10px; }
.proposal-list:not(:empty) { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }

.card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--bg);
  padding: 12px;
}
.card.conflicted { border-color: #EBD6C6; background: var(--warn-soft); }
.card-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.card-action {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid #CFD9CB;
  border-radius: 4px;
  padding: 1px 5px;
  background: var(--paper);
}
.card.conflicted .card-action { color: var(--warn); border-color: #EBD6C6; }
.card-title { font-family: var(--font-display); font-size: 14px; line-height: 1.3; }
.card-meta { font-size: 11px; color: var(--ink-faint); margin-bottom: 9px; }
.card-meta code { font-family: var(--font-mono); }
.card-prompt { font-size: 12px; color: var(--ink-soft); font-style: italic; margin: 0 0 9px; line-height: 1.5; }
.card-conflict { font-size: 11px; color: var(--warn); margin-bottom: 8px; line-height: 1.5; }
.card pre {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 8px;
  margin: 0 0 9px;
  max-height: 128px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.card .diff-label { font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 3px; }
.card details.markup { margin-bottom: 9px; }
.card details.markup summary { font-size: 11px; color: var(--ink-faint); cursor: pointer; margin-bottom: 7px; }
.card details.markup pre:last-child { margin-bottom: 0; }
.card-actions { display: flex; gap: 8px; }
.card-actions button { flex: 1 1 auto; font-size: 12px; padding: 6px 10px; }

/* ---------- tool console ---------- */

.console { border-top: 1px solid var(--rule); background: var(--paper); }

.console-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.console-toggle:hover { background: var(--bg); }
.console-toggle .hint { font-weight: 400; color: var(--ink-faint); font-size: 12px; margin-left: 4px; }
.console-toggle .chev { color: var(--ink-faint); transition: transform 140ms ease; }
.console-toggle[aria-expanded="false"] .chev { transform: rotate(-90deg); }

.console-body {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  border-top: 1px solid var(--rule);
  height: 320px;
}
.console-body[hidden] { display: none; }

.tool-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  border-right: 1px solid var(--rule);
  overflow-y: auto;
  background: var(--bg);
}
.tool-list li { margin: 0; }
/* Small-caps group headers: 29 flat tool names is a list you search, not one you read. */
.tool-group {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 12px 9px 4px;
}
.tool-group:first-child { padding-top: 4px; }
.tool-list button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 6px 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.tool-list button:hover { background: var(--paper); }
.tool-list button[aria-current="true"] { background: var(--accent); color: #fff; }

.tool-run { padding: 14px 18px; overflow-y: auto; }
.tool-run h3 { font-family: var(--font-mono); font-size: 14px; margin: 0 0 6px; font-weight: 600; }
.tool-desc { font-size: 12px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 10px; }
.schema { margin-bottom: 10px; }
.schema summary { font-size: 12px; color: var(--ink-faint); cursor: pointer; }
.schema pre, .result {
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 7px;
  padding: 10px;
  margin: 6px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.schema pre { max-height: 160px; }
.result { max-height: 220px; margin-top: 4px; }
.result.error { border-color: #EBD6C6; background: var(--warn-soft); color: var(--warn); }

.args-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 10px 0 4px;
}

/* ---------- generated argument form ---------- */

.args-head { display: flex; align-items: center; gap: 10px; }
.args-head .args-label { flex: 1 1 auto; margin-bottom: 4px; }
.modes { display: inline-flex; }
.modes button {
  font-size: 11px;
  padding: 3px 10px;
  color: var(--ink-faint);
  border-radius: 0;
}
.modes button:first-child { border-radius: 7px 0 0 7px; }
.modes button:last-child { border-radius: 0 7px 7px 0; border-left: 0; }
.modes button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: #CFD9CB; }

.tool-form { display: flex; flex-direction: column; gap: 10px; }
.tool-form[hidden] { display: none; }
.field { display: flex; flex-direction: column; gap: 3px; }
.field-label { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink); }
.field-hint { font-size: 11px; color: var(--ink-faint); line-height: 1.45; margin: 0; }
.field input[type="text"], .field select {
  font: inherit;
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
}
.field input[type="number"] {
  font: inherit;
  font-size: 12px;
  padding: 6px 8px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  width: 140px;
}
.field input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); }
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-none { font-size: 12px; color: var(--ink-faint); margin: 0; }

textarea {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  padding: 9px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}
textarea:focus, button:focus-visible, .tool-list button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.run-row { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.run-state { font-size: 12px; color: var(--ink-faint); }
.run-state.bad { color: var(--warn); }

@media (max-width: 900px) {
  main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .rail { border-left: 0; border-top: 1px solid var(--rule); max-height: 40vh; }
  .console-body { grid-template-columns: minmax(0, 1fr); }
  .tool-list { border-right: 0; border-bottom: 1px solid var(--rule); max-height: 120px; }
}
