/* ════════════════════════════════════════════════════════════════════
   Flosight · the operator console
   The instrument: dark, still, precise, editorial. Left-aligned and
   asymmetric. Character from structure (hairlines, numbered sections,
   ruled lists), not decoration. Every value is a token. Ember appears
   only where trust moves: the one gold CTA, the consent-held line, the
   cap marker. No card grids.
   ════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--obsidian);
  color: var(--platinum);
  font-family: var(--body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--ember); color: var(--ember-ink); }

.mono { font-family: var(--mono); }
.lbl {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--plat-faint);
}
.ember { color: var(--ember); }
.muted { color: var(--plat-dim); }
.faint { color: var(--plat-faint); }

/* ── header ── */
header {
  position: sticky; top: 0; z-index: 20;
  background: var(--header-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex; align-items: center; gap: 18px;
  height: 58px; padding: 0 var(--gutter);
  max-width: var(--max-w); margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--disp); font-size: 15px; letter-spacing: .02em; }
.brand b { color: var(--ember); font-weight: 400; }
.brand-mark { width: 23px; height: 23px; flex: none; color: var(--tool-onsight); }
.mode-chip {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--plat-dim); border: 1px solid var(--line); border-radius: var(--r-chip);
  padding: 4px 9px; display: inline-flex; align-items: center; gap: 7px;
}
.mode-chip .d { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--green); }
.mode-chip.composed .d { background: var(--trust); }
.bar .spacer { margin-left: auto; }
.bar .navlink {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--plat-dim); transition: color var(--m-fast) var(--ease);
}
.bar .navlink:hover { color: var(--platinum); }

/* ── shell ── */
.shell { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.work {
  display: grid; grid-template-columns: 5fr 7fr; gap: 0;
  border-bottom: 1px solid var(--line);
}
.work > .rail { border-right: 1px solid var(--line); }
@media (max-width: 900px) {
  .work { grid-template-columns: 1fr; }
  .work > .rail { border-right: none; border-bottom: 1px solid var(--line); }
  .work.editing > .rail { display: none; }
  .work:not(.editing) > .detail { display: none; }
}

/* ── section heads (calm, humanist sentence-case) ── */
.sec-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 22px 24px 16px; border-bottom: 1px solid var(--line);
}
.sec-title { font-size: 16px; font-weight: 650; letter-spacing: -.01em; color: var(--platinum); }
.sec-head .meta { margin-left: auto; }
.sec-head .meta.mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--plat-faint); }
.idx-hint { font-family: var(--body); font-size: 12.5px; color: var(--plat-dim); }

/* ── the workflow index (ruled list, the compiled sentence is the content) ── */
.idx { }
.idx-row {
  display: grid; grid-template-columns: 34px 1fr; gap: 14px;
  padding: 18px 24px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background var(--m-fast) var(--ease);
}
.idx-row:hover { background: var(--tint-hover); }
.idx-row.active { background: var(--tint-row); }
.idx-row.active .ix-no { color: var(--ember); }
.ix-no { font-family: var(--mono); font-size: 11px; color: var(--plat-faint); padding-top: 3px; }
.ix-name { display: flex; align-items: baseline; gap: 10px; }
.ix-name .nm { font-size: 15px; font-weight: 650; letter-spacing: -.01em; color: var(--platinum); }
.ix-state {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px; color: var(--plat-faint);
}
.ix-state .d { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--plat-faint); }
.ix-state.on { color: var(--green); }
.ix-state.on .d { background: var(--green); }
.ix-sentence { font-size: 13.5px; color: var(--plat-dim); line-height: 1.5; margin-top: 6px; max-width: 60ch; }
.ix-foot { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--plat-faint); margin-top: 8px; }
.idx-new {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--line);
}
.tlink {
  display: inline-flex; align-items: baseline; gap: 7px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--plat-dim); transition: color var(--m-fast) var(--ease);
}
.tlink:hover { color: var(--platinum); }
.tlink .arr { color: var(--plat-dim); transition: transform var(--m-fast) var(--ease), color var(--m-fast) var(--ease); }
.tlink:hover .arr { transform: translateX(3px); color: var(--platinum); }

/* ── the detail / builder pane ── */
.detail { min-height: 60vh; }
.back { display: none; }
@media (max-width: 900px) { .back { display: inline-flex; } }

/* the live compile figure */
.compile-fig { padding: 22px 24px; border-bottom: 1px solid var(--line); }
.fig-frame { border: 1px solid var(--line); border-radius: var(--r-card); background: var(--graphite-2); overflow: hidden; }
.panel-head {
  display: flex; align-items: center; gap: 9px; padding: 11px 15px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--plat-faint);
}
.panel-head .dot { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--green); }
.panel-head .right { margin-left: auto; }
.panel-body { padding: 18px 16px; }
.sentence { font-size: 17px; line-height: 1.5; color: var(--platinum); }
.sentence .k { color: var(--ember-hi); }

/* the cap meter */
.cap {
  display: flex; align-items: center; gap: 14px; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--line);
}
.cap .used { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--plat-faint); white-space: nowrap; }
.cap .track { flex: 1 1 auto; height: 2px; background: var(--line); position: relative; }
.cap .track > span { position: absolute; inset: 0 auto 0 0; background: var(--ember); transition: width var(--m-base) var(--ease); }
.cap .max { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ember); white-space: nowrap; }
.cap.full .max { color: var(--red); }

/* builder blocks */
.builder { padding: 8px 24px 26px; }
.block { padding: 18px 0; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: none; }
.block-head {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px;
}
.block-title { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; color: var(--platinum); }
.block-head .step-count { margin-left: auto; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--plat-faint); }
.filter-row { margin-top: 12px; }

/* form controls */
.field { display: inline-flex; flex-direction: column; gap: 6px; }
/* field labels read as calm humanist type, not mono eyebrows */
.field > .lbl {
  margin: 0; font-family: var(--body); font-size: 11.5px; font-weight: 500;
  letter-spacing: 0; text-transform: none; color: var(--plat-dim);
}
select, input[type="text"], input[type="number"], input[type="url"], input[type="email"] {
  background: var(--graphite-2); color: var(--platinum);
  border: 1px solid var(--line); border-radius: var(--r-control);
  padding: 10px 12px; font-size: 14px; min-width: 0;
  transition: border-color var(--m-fast) var(--ease);
}
select:focus, input:focus { outline: none; border-color: var(--ember-deep); }
input::placeholder { color: var(--plat-faint); }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.grow { flex: 1 1 220px; }

/* trigger filter toggle */
.filter-toggle {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--plat-dim);
  display: inline-flex; align-items: center; gap: 8px; margin-top: 12px;
}

/* steps */
.steps { display: flex; flex-direction: column; }
.step {
  display: grid; grid-template-columns: 30px 88px 1fr auto; gap: 14px;
  align-items: center; padding: 13px 0; border-top: 1px solid var(--line);
}
.step:first-child { border-top: none; }
.step .sno { font-family: var(--mono); font-size: 10px; color: var(--plat-faint); }
.step .skind {
  font-family: var(--body); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--plat-dim);
}
.step.is-action.gated .skind { color: var(--ember); }
.step .sbody { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.step .sbody .grow { flex: 1 1 180px; }
.step .stxt { font-size: 14px; color: var(--plat-dim); }
.step .sctl { display: inline-flex; gap: 4px; }
.icon-btn {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-inner);
  color: var(--plat-dim); font-family: var(--mono); font-size: 13px; line-height: 1;
  transition: border-color var(--m-fast) var(--ease), color var(--m-fast) var(--ease);
}
.icon-btn:hover { border-color: var(--line-hi); color: var(--platinum); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.icon-btn.danger:hover { border-color: var(--red); color: var(--red); }
@media (max-width: 560px) {
  .step { grid-template-columns: 24px 1fr; row-gap: 8px; }
  .step .skind { grid-column: 2; }
  .step .sbody { grid-column: 1 / -1; }
  .step .sctl { grid-column: 1 / -1; justify-content: flex-end; }
}

/* add-step bar */
.addbar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.add-btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  background: transparent; border: 1px dashed var(--line-hi); border-radius: var(--r-control);
  color: var(--plat-dim); padding: 9px 14px;
  transition: border-color var(--m-fast) var(--ease), color var(--m-fast) var(--ease);
}
.add-btn:hover { border-color: var(--ember-deep); color: var(--platinum); }
.add-btn[disabled] { opacity: .4; cursor: default; }
.add-btn[disabled]:hover { border-color: var(--line-hi); color: var(--plat-dim); }
.cap-note { margin-top: 10px; }

/* the action picker popover */
.picker {
  margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-card);
  background: var(--graphite-2); overflow: hidden;
}
.picker-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 12px 15px; border-top: 1px solid var(--line);
  transition: background var(--m-fast) var(--ease);
}
.picker-row:first-child { border-top: none; }
.picker-row:hover { background: var(--tint-hover); }
.picker-row .pl { font-size: 14px; color: var(--platinum); }
.picker-row .pmark {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ember); border: 1px solid var(--ember-deep); border-radius: var(--r-chip); padding: 2px 6px;
}

/* detail header: the name + quiet chrome (active switch, delete).
   The primary action does not live here; it sits with the segmented nav. */
.detail-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--line);
}
.detail-head .name-field { flex: 1 1 220px; }
.detail-head .name-field input { width: 100%; font-size: 16px; font-weight: 600; }
.detail-head .spacer { margin-left: auto; }
.quiet-act {
  font-family: var(--body); font-size: 12.5px; color: var(--plat-dim);
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-control);
  padding: 8px 14px; transition: border-color var(--m-fast) var(--ease), color var(--m-fast) var(--ease);
}
.quiet-act:hover { border-color: var(--red); color: var(--red); }

/* segmented control (Build | Trace) + the one earned gold CTA */
.detail-nav {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 24px; border-bottom: 1px solid var(--line);
}
.seg {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--graphite-2); border: 1px solid var(--line); border-radius: var(--r-control);
}
.seg-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 13px; color: var(--plat-dim);
  background: transparent; border: 0; border-radius: var(--r-inner); padding: 8px 16px;
  transition: color var(--m-fast) var(--ease), background var(--m-fast) var(--ease), box-shadow var(--m-base) var(--ease);
}
.seg-btn:hover { color: var(--platinum); }
.seg-btn.on { color: var(--platinum); background: var(--graphite-3); box-shadow: var(--e1); }
.seg-btn .seg-n {
  font-size: 10.5px; letter-spacing: .04em; color: var(--plat-faint);
  border: 1px solid var(--line); border-radius: var(--r-chip); padding: 1px 6px;
}
.seg-btn.on .seg-n { color: var(--plat-dim); border-color: var(--line-hi); }
.detail-nav .btn-gold { margin-left: auto; }
@media (max-width: 560px) {
  .detail-nav { flex-wrap: wrap; }
  .detail-nav .seg { flex: 1 1 auto; }
  .detail-nav .seg-btn { flex: 1 1 0; justify-content: center; }
  .detail-nav .btn-gold { flex: 1 1 100%; margin-left: 0; justify-content: center; }
}

/* the two panes: one shows at a time */
.pane { }

/* toggle switch */
.switch { display: inline-flex; align-items: center; gap: 9px; }
.switch .sw {
  width: 38px; height: 22px; border-radius: var(--r-pill); background: var(--graphite);
  border: 1px solid var(--line); position: relative; transition: background var(--m-base) var(--ease), border-color var(--m-base) var(--ease);
}
.switch .sw::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: var(--r-pill); background: var(--plat-dim); transition: transform var(--m-base) var(--ease-spring), background var(--m-base) var(--ease);
}
.switch.on .sw { background: color-mix(in srgb, var(--green) 18%, transparent); border-color: var(--green); }
.switch.on .sw::after { transform: translateX(16px); background: var(--green); }
.switch .t { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--plat-dim); }

/* the one gold CTA */
.btn-gold {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em;
  color: var(--ember-ink); background: var(--grad-ember);
  padding: 12px 20px; border: none; border-radius: var(--r-control);
  transition: transform var(--m-fast) var(--ease-spring);
}
.btn-gold:hover { transform: translateY(-1px); }

/* ── the run trace (the audit surface) ── */
.trace-wrap { padding: 22px 24px 30px; }
.trace-meta {
  display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px;
}
.trace-meta .trace-title { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; color: var(--platinum); }
.trace-meta .trace-note { margin-left: auto; font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--plat-faint); }
.trace-meta .dry { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; color: var(--ember); }
.run {
  border: 1px solid var(--line); border-radius: var(--r-card); background: var(--graphite-2);
  overflow: hidden; margin-bottom: 14px;
}
.run-head {
  display: flex; align-items: baseline; gap: 10px; padding: 11px 15px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--plat-faint);
}
.run-head .rel { color: var(--plat-dim); text-transform: none; letter-spacing: .02em; }
.run-head .held { margin-left: auto; color: var(--ember); }
.tline {
  display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: baseline;
  padding: 9px 15px; border-top: 1px solid var(--line); font-size: 13.5px;
}
.tline:first-child { border-top: none; }
.tline .tg { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; padding-top: 2px; }
.tline.pass .tg { color: var(--green); }
.tline.stop .tg { color: var(--red); }
.tline.wait .tg { color: var(--plat-faint); }
.tline.done .tg { color: var(--plat-dim); }
.tline.held .tg, .tline.held .tx { color: var(--ember); }
.tline .tx { color: var(--plat-dim); }
.tline.held .tx { color: var(--ember-hi); }
.empty-trace { font-size: 13.5px; color: var(--plat-faint); padding: 8px 0; }

/* empty state */
.empty {
  padding: 64px 24px; max-width: 52ch;
}
.empty h2 { font-family: var(--disp); font-weight: 400; font-size: 22px; letter-spacing: -.01em; margin: 0 0 12px; }
.empty p { color: var(--plat-dim); font-size: 15px; line-height: 1.6; margin: 0 0 22px; }

/* footer */
footer { border-top: 1px solid var(--line); }
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  max-width: var(--max-w); margin: 0 auto; padding: 26px var(--gutter) 48px;
}
.foot .mark { font-family: var(--disp); font-size: 14px; }
.foot .mark b { color: var(--ember); font-weight: 400; }
.foot .the house { font-family: var(--mono); font-size: 11px; color: var(--plat-faint); letter-spacing: .08em; }

/* ════════════════════════════════════════════════════════════════════
   LEGACY EVOLVED · the elevation component language (the "tangible")
   Layered, warm-black shadows make every surface read as liftable
   hardware instead of a flat hairline. USAGE LAW: one tier per surface,
   never stack. e1 rest controls · e2 cards · e3 floating/overlay. The
   one gold CTA carries e2; focus speaks in the ember ring. Data colors
   (green/amber/red/trust) stay the field language, untouched.
   ════════════════════════════════════════════════════════════════════ */

/* ── SURFACES rest on hairlines; elevation is spent only where it is earned.
   The compile figure and the persisted run cards stay flat (border only) so
   the one gold CTA and any held run keep the room's only depth. ── */
.fig-frame,
.run {
  box-shadow: none;
}

/* ── FLOATING / overlay surfaces earn a lift: the sticky header and the
   action picker popover, which sits above the builder. ── */
header {
  box-shadow: var(--e2);
}
.picker {
  box-shadow: var(--e-inset), var(--e2);
}

/* ── INTERACTIVE rows that read as objects: the workflow index.
   A calm tint on hover, no lift, so the board stays flat and the map/list
   is the hero. ── */
.idx-row { transition: background var(--m-fast) var(--ease); }
.idx-row:hover { background: var(--tint-hover); }
.idx-row.active { background: var(--tint-row); }

/* ── INPUTS · focus speaks in the ember ring (not a bare border swap) ── */
select:focus, input:focus { box-shadow: var(--ring-ember); }

/* ── SECONDARY BUTTONS · flat at rest (hairline only), settle on press so
   the gold CTA keeps the room's only earned lift ── */
.icon-btn:active, .add-btn:active { box-shadow: var(--e-press); transform: translateY(1px); }

/* ── THE ONE GOLD CTA · the earned surface, e2 at rest, lifts on hover ── */
.btn-gold { box-shadow: var(--e2); }
.btn-gold:hover { box-shadow: var(--e3); }
.btn-gold:active { box-shadow: var(--e-press); transform: translateY(0); }

/* ── CARD STANDARD · status/important card = left accent + graphite + e2.
   The run card earns it when a send is held by the consent gate (ember,
   the trust line) and the over-cap warning earns the red accent. ── */
.run.is-held {
  border-left: 3px solid var(--ember);
  background: var(--graphite);
  border-radius: var(--r-card);
  box-shadow: var(--e-inset), var(--e2);
}
.cap.full {
  border-top-color: var(--red);
}
.cap.full .track { background: var(--tint-red); }
.cap.full .track > span { background: var(--red); }

/* ════════════════════════════════════════════════════════════════════
   FLOSIGHT · the sovereign type voice + component elevation
   Space Grotesk (via --disp, remapped in assets/flosight-theme.css)
   carries the brand voice INSIDE the product: the wordmark, the compiled
   sentence, section titles, and the one gold CTA. Inter stays the working
   UI hand; IBM Plex Mono stays the data hand. Below that, the components
   an operator touches most are made friendlier: the cap becomes a
   lit-tick meter you can count, the add-step buttons become real buttons,
   and the action picker explains each action in one line.
   ════════════════════════════════════════════════════════════════════ */

/* naked buttons (tlink, filter-toggle) must not carry the UA button skin */
button { background: none; border: 0; padding: 0; }

/* inside a column .field the value control must not inherit the row-growth
   flex-basis (it turns vertical and balloons the input); grow the FIELD in
   the row, never the control in the field */
.field > .grow { flex: 0 0 auto; width: 100%; min-width: 0; }

/* ── the brand voice ── */
.brand { font-family: var(--disp); font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.brand b { font-weight: 600; }
.foot .mark { font-family: var(--disp); font-weight: 600; font-size: 15px; }
.foot .mark b { font-weight: 600; }
.sec-title, .block-title, .trace-title {
  font-family: var(--disp); font-weight: 600; letter-spacing: -.01em;
}
.empty h2 { font-family: var(--disp); font-weight: 600; font-size: 24px; }
.ix-name .nm { font-family: var(--disp); font-weight: 500; letter-spacing: -.01em; }

/* the compiled sentence is the product's voice: display face, room to breathe */
.sentence {
  font-family: var(--disp); font-weight: 500; letter-spacing: -.01em;
  font-size: clamp(17px, 2.2vw, 20px); line-height: 1.45;
}

/* the one gold CTA speaks display, not mono */
.btn-gold {
  font-family: var(--disp); font-weight: 600; font-size: 14.5px; letter-spacing: 0;
  padding: 12px 22px;
}

/* ── the 12-step cap as a lit-tick meter (count it at a glance) ── */
.capmeter { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.capmeter .ticks { display: flex; gap: 4px; }
.capmeter .tick { flex: 1 1 0; height: 6px; border-radius: 3px; background: var(--line); transition: background var(--m-base) var(--ease); }
.capmeter .tick.lit { background: var(--ember); }
.capmeter.full .tick.lit { background: var(--red); }
.capmeter .caption {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--plat-faint);
}
.capmeter .caption .max { color: var(--ember); }
.capmeter.full .caption .max { color: var(--red-text); }

/* ── add-step: real buttons, not dashed ghosts ── */
.add-btn {
  font-family: var(--body); font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none;
  background: var(--graphite-2); border: 1px solid var(--line); border-radius: var(--r-control);
  color: var(--platinum); padding: 10px 16px; box-shadow: var(--e1);
  transition: background var(--m-fast) var(--ease), border-color var(--m-fast) var(--ease), box-shadow var(--m-fast) var(--ease);
}
.add-btn:hover { background: var(--graphite-3); border-color: var(--line-hi); color: var(--platinum); }
.add-btn:active { box-shadow: var(--e-press); }
.add-btn[disabled] { opacity: .45; box-shadow: none; }
.add-btn[disabled]:hover { background: var(--graphite-2); border-color: var(--line); }

/* ── the action picker: label + one-line explanation, gated marked ── */
.picker { box-shadow: var(--e-inset), var(--e3); }
.picker-row { align-items: start; padding: 13px 16px; }
.picker-row .pl { font-weight: 600; font-size: 14px; }
.picker-row .pd { display: block; font-size: 12.5px; color: var(--plat-faint); line-height: 1.5; margin-top: 3px; }
.picker-row .pmark {
  background: var(--tint-ember); border-color: transparent; color: var(--ember-hi);
  padding: 3px 8px; white-space: nowrap; margin-top: 2px;
}

/* ── keyboard focus speaks in the ring everywhere ── */
.btn-gold:focus-visible, .add-btn:focus-visible, .icon-btn:focus-visible,
.seg-btn:focus-visible, .tlink:focus-visible, .switch:focus-visible,
.quiet-act:focus-visible, .picker-row:focus-visible, .idx-row:focus-visible {
  outline: none; box-shadow: var(--ring-ember);
}

/* ── AA in daylight: gold-as-text and the CTA label ride semantic tokens
   (flosight-theme.css) that deepen in light mode instead of washing out ── */
::selection { background: var(--sel-bg); color: var(--sel-ink); }
.btn-gold { color: var(--gold-label); }
.sentence .k { color: var(--ember-text); }
.tline.held .tx { color: var(--ember-text); }
.picker-row .pmark { color: var(--ember-text); }
.trace-meta .dry { color: var(--ember-text); }

/* ── armor against unbroken user strings (long names, pasted URLs):
   wrap inside the card, never clip silently or force the page sideways ── */
.sentence, .ix-sentence, .ix-name .nm, .tline .tx, .step .stxt { overflow-wrap: anywhere; }
.run-head .rel { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
