Skip to content

Desktop app that records your on-screen work session and uses the GitHub Copilot SDK to reconstruct it as an intent + ordered steps, then builds a reusable Skill or Automation for Microsoft Autopilots like Scout, Microsoft Copilot Cowork, or Copilot Studio.

66.4 KB
Raw Blame
/* Segoe Sans — Scout's brand typeface (bundled from the Scout app). */
@font-face {
  font-family: "Segoe Sans";
  src: url("./assets/fonts/Segoe-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Segoe Sans";
  src: url("./assets/fonts/Segoe-sans-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* ── Scout skin (light) — the warm "cream" companion look ────────────────
     Scout's default identity: a warm cream canvas (hue 36) with neutral-grey
     ink and the "lobster" coral accent. Neutrals stay desaturated; only the
     canvas and the sand accent carry warmth, exactly as Scout does. */
  --deck: hsl(36, 33%, 97%);       /* window canvas — warm cream (Scout surface-default) */
  --surface: hsl(0, 0%, 100%);     /* raised panels / cards / rows */
  --surface-2: hsl(40, 19%, 94%);  /* chips / inset controls — warm sand (Scout brand-subtle) */
  --line: hsl(0, 0%, 87%);         /* Scout border-subtle */
  --line-strong: hsl(0, 0%, 74%);  /* neutral hover / stronger divider */
  --text: hsl(0, 0%, 14%);         /* Scout foreground-primary */
  --muted: hsl(0, 0%, 44%);        /* Scout foreground-tertiary */
  --faint: hsl(0, 0%, 53%);        /* least-emphasis labels */

  /* Lobster brand — Scout's signature coral. Light mode uses the base solid
     hsl(7, 76%, 50%) ≈ #E0341E, with white text on the fill. */
  --brand: hsl(7, 76%, 50%);
  --brand-hover: hsl(7, 76%, 43%);
  --brand-fg: hsl(0, 0%, 100%);    /* white text sits on the coral fill */
  --brand-ink: hsl(7, 74%, 41%);   /* darker coral for small text on pale coral tints */
  --brand-rgb: 224, 52, 30;

  /* Record red — the "recording" affordance, in the same warm lobster family. */
  --rec: hsl(6, 82%, 50%);
  --rec-rgb: 232, 44, 23;

  /* --signal is the primary-action alias used throughout; it IS the brand
     coral. Everything referencing it inherits the shift. */
  --signal: var(--brand);
  --signal-dim: rgba(var(--brand-rgb), 0.13);
  --go: hsl(158, 100%, 26%);       /* Scout success-loud (dark green) */
  --go-rgb: 0, 133, 84;
  --warn: hsl(35, 92%, 42%);       /* amber for "needs setup" (not an error) */
  --warn-rgb: 206, 123, 9;

  --sans: "Segoe Sans", Aptos, Calibri, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;
  --mono: Consolas, "SF Mono", "JetBrains Mono", Menlo, "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--deck);
  color: var(--text);
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

body[data-route="recording-controls"] {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: transparent;

  /* ── HUD skin (dark) — the recording overlay's night surface ─────────────
     An always-on-top bar floats over arbitrary screen content, so it stays a
     dark HUD for legibility. These tokens make that darkness a deliberate part
     of the Scout system: desaturated neutrals with a whisper of warmth (hue 30–40)
     so it belongs to the cream family, and the SAME lobster-coral accent as the
     main app — reused from the global --brand / --rec / --signal tokens. */
  --hud-surface: hsl(30, 6%, 13%);      /* bar / dialog / menu card */
  --hud-surface-2: hsl(30, 5%, 19%);    /* inset chips (mic split) */
  --hud-raised: hsl(30, 5%, 23%);       /* neutral secondary buttons (Discard / Keep) */
  --hud-line: rgba(255, 255, 255, 0.12);
  --hud-line-strong: rgba(255, 255, 255, 0.2);
  --hud-hover: rgba(255, 255, 255, 0.06);  /* subtle lighten on hover for dark controls */
  --hud-text: hsl(40, 12%, 96%);        /* primary text — warm off-white */
  --hud-muted: hsl(40, 6%, 68%);        /* secondary text */
  --hud-accent: hsl(8, 85%, 67%);       /* coral that reads on dark (mic-on, selected, error) */
  --hud-warn: hsl(38, 92%, 62%);        /* amber that reads on dark */
  --hud-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.35);
}

body[data-route="recording-controls"] #root {
  width: 100%;
  height: 100%;
}

body[data-route="terminal"] {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #211f1e;
  color: #f8f5ef;
  user-select: text;
}

body[data-route="terminal"] #root {
  width: 100%;
  height: 100%;
}

.terminal-page {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: #211f1e;
}

.terminal-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 9px 12px 9px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #292624;
  user-select: none;
}

.terminal-recording-state {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.terminal-recording-state > span:last-child {
  min-width: 0;
  display: grid;
}

.terminal-recording-state strong {
  font-size: 12px;
  font-weight: 650;
}

.terminal-recording-state small {
  color: #aaa39d;
  font-size: 10px;
}

.terminal-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8e8883;
  flex: none;
}

.terminal-state-dot.running,
.terminal-state-dot.starting {
  background: #e7b45f;
}

.terminal-state-dot.error {
  background: #f47c68;
}

.terminal-state-dot.idle {
  background: #63c59b;
}

.terminal-shell-picker {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #aaa39d;
  font-size: 11px;
  user-select: none;
}

.terminal-shell-picker select {
  max-width: 190px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  padding: 5px 26px 5px 8px;
  color: #f8f5ef;
  background: #35312f;
  font: 11px var(--sans);
}

.terminal-hide {
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ddd7d1;
  background: transparent;
  font-size: 11px;
}

.terminal-hide:hover {
  background: rgba(255, 255, 255, 0.06);
}

.terminal-error {
  padding: 7px 14px;
  color: #ffd7cf;
  background: rgba(244, 124, 104, 0.14);
  border-bottom: 1px solid rgba(244, 124, 104, 0.35);
  font-size: 11px;
}

.terminal-error:empty {
  display: none;
}

.terminal-viewport {
  min-width: 0;
  min-height: 0;
  padding: 8px 0 0 10px;
  overflow: hidden;
}

.terminal-viewport .xterm {
  height: 100%;
}

/* --- Shared primitives ---------------------------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.pill {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 1px 8px;
  line-height: 16px;
  min-width: 18px;
  text-align: center;
}

button {
  font: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease, border-color 0.15s ease,
    transform 0.12s ease;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

button:focus-visible,
.fb-input:focus-visible,
.overall-fb:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

/* Coral "signal" call-to-action — the primary action colour. */
.record-cta {
  background: var(--signal);
  color: var(--brand-fg);
  font-weight: 600;
  font-size: 13px;
  padding: 9px 16px;
  box-shadow: 0 2px 12px -3px rgba(var(--brand-rgb), 0.4);
}

.record-cta:not(:disabled):hover {
  background: var(--brand-hover);
  box-shadow: 0 3px 16px -3px rgba(var(--brand-rgb), 0.5);
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
}

.ghost:hover {
  border-color: var(--signal);
  color: var(--text);
}

.secondary {
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  padding: 9px 14px;
}

.secondary:not(:disabled):hover {
  filter: brightness(1.12);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.status-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-cancel {
  margin-left: auto;
  flex: none;
}

.spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--signal);
  animation: spin 0.7s linear infinite;
  flex: 0 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.28;
  }
}

.conf {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 5px;
  font-weight: 600;
}

.conf.high {
  background: rgba(var(--go-rgb), 0.18);
  color: var(--go);
}

.conf.medium {
  background: var(--signal-dim);
  color: var(--brand-ink);
}

.conf.low {
  background: rgba(var(--rec-rgb), 0.16);
  color: var(--brand-ink);
}

/* Status labels stay quiet: neutral uppercase mono text, with a single small
   dot carrying the only colour. Keeps the brand coral as the one true accent
   and avoids candy-coloured pills clashing on the selected card. */
.tag {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong); /* neutral dot — "analyzed" / default */
  flex: none;
}

.tag.ok::before {
  background: var(--go); /* approved — a quiet, deep success green */
}

.tag.warn::before {
  background: var(--faint); /* processing — gentle activity */
  animation: pulse 1.4s ease-in-out infinite;
}

.tag.recorded {
  color: var(--rec); /* recorded but not yet analyzed — the one thing to act on */
}

.tag.recorded::before {
  background: var(--rec);
  box-shadow: 0 0 6px rgba(var(--rec-rgb), 0.55);
}

.tag.auto {
  color: var(--brand-ink); /* automation — a distinct coral, set apart from the green skill tag */
}

.tag.auto::before {
  background: var(--brand-ink);
}

.sess-tags {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

/* =========================================================================
   Recorder HUD (compact window)
   ========================================================================= */

.hud {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px 14px;
  min-height: 100vh;
}

/* The signature: a physical record transport. */
.transport {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 10px 0 4px;
}

.record {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #ffffff, #f4efe8);
  border: 1px solid var(--line);
  box-shadow: 0 5px 16px -6px rgba(60, 45, 35, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
}

.record:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.record:active {
  transform: translateY(0);
}

.record-glyph {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 0 4px rgba(var(--rec-rgb), 0.16);
  transition: width 0.18s ease, height 0.18s ease, border-radius 0.18s ease;
}

.record.on {
  border-color: rgba(var(--rec-rgb), 0.5);
  animation: recpulse 1.7s ease-in-out infinite;
}

.record.on .record-glyph {
  width: 21px;
  height: 21px;
  border-radius: 5px;
}

@keyframes recpulse {
  0%,
  100% {
    box-shadow: 0 5px 16px -6px rgba(60, 45, 35, 0.28), 0 0 0 0 rgba(var(--rec-rgb), 0),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
  50% {
    box-shadow: 0 5px 16px -6px rgba(60, 45, 35, 0.28), 0 0 0 8px rgba(var(--rec-rgb), 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

.timecode {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--faint);
  line-height: 1;
}

.timecode.live {
  color: var(--text);
}

.transport-sub {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  min-height: 15px;
}

.narrate {
  position: relative;
  flex: none;
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.narrate-head {
  display: flex;
  align-items: stretch;
}

.narrate-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 11px;
  text-align: left;
  background: transparent;
  color: inherit;
}

.narrate-toggle:not(:disabled):hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.narrate.on {
  border-color: rgba(var(--brand-rgb), 0.45);
  background: var(--signal-dim);
}

.narrate-toggle:disabled {
  opacity: 0.9;
  cursor: default;
}

.narrate-settings-toggle {
  display: grid;
  place-items: center;
  flex: none;
  align-self: center;
  width: 32px;
  height: 32px;
  margin-right: 2px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.narrate-switch-btn {
  display: flex;
  align-items: center;
  flex: none;
  align-self: center;
  padding: 0 11px 0 2px;
  background: transparent;
  cursor: pointer;
}

.narrate-switch-btn:disabled {
  cursor: default;
  opacity: 0.9;
}

.narrate-settings-toggle:not(:disabled):hover,
.narrate-settings-toggle.open {
  color: var(--brand-ink);
  background: rgba(var(--brand-rgb), 0.08);
}

.narrate-settings-toggle:disabled {
  opacity: 0.65;
}

.narrate-icon {
  display: flex;
  flex: none;
  color: var(--muted);
}

.narrate.on .narrate-icon {
  color: var(--brand-ink);
}

.narrate-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.narrate-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.narrate-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
}

.narrate.on .narrate-sub {
  color: var(--brand-ink);
}

.narrate-switch {
  flex: none;
  box-sizing: border-box;
  width: 36px;
  height: 22px;
  border-radius: 999px;
  background: var(--line-strong);
  padding: 3px;
  transition: background 0.15s ease;
}

.narrate-switch.on {
  background: var(--brand);
}

.narrate-knob {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.narrate-switch.on .narrate-knob {
  transform: translateX(14px);
}

/* Dim the rest of the HUD while the settings are open so the floating panel
   reads as a deliberate layer instead of colliding with the content beneath it
   (the recorder window is a fixed size, so the panel has to overlap). */
.narrate-scrim {
  position: fixed;
  inset: 0;
  z-index: 15;
  padding: 0;
  border: none;
  border-radius: 0;
  background: rgba(28, 18, 14, 0.18);
  cursor: default;
  animation: narrate-scrim-in 0.13s ease-out;
}

@keyframes narrate-scrim-in {
  from {
    opacity: 0;
  }
}

.narrate-settings {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px 11px;
  padding: 13px;
  border: 1px solid rgba(var(--brand-rgb), 0.34);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 22px 46px -18px rgba(28, 18, 14, 0.45),
    0 6px 16px -10px rgba(28, 18, 14, 0.28);
  animation: narrate-settings-in 0.14s ease-out;
}

/* A small caret linking the panel back to the gear button it opened from. */
.narrate-settings::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 15px;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border-left: 1px solid rgba(var(--brand-rgb), 0.34);
  border-top: 1px solid rgba(var(--brand-rgb), 0.34);
  border-radius: 3px 0 0 0;
  transform: rotate(45deg);
}

@keyframes narrate-settings-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
}

.narrate-settings label {
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-ink);
}

.narrate-select-wrap {
  position: relative;
  min-width: 0;
}

.narrate-select-wrap select {
  width: 100%;
  height: 34px;
  padding: 0 30px 0 11px;
  appearance: none;
  border: 1px solid rgba(var(--brand-rgb), 0.42);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.narrate-select-wrap select:not(:disabled):hover {
  border-color: rgba(var(--brand-rgb), 0.7);
}

.narrate-select-wrap select:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(var(--brand-rgb), 0.22);
}

.narrate-select-chevron {
  position: absolute;
  top: 50%;
  right: 11px;
  color: var(--brand-ink);
  font-size: 11px;
  pointer-events: none;
  transform: translateY(-52%);
}

.narrate-settings-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.narrate-settings-note.warn {
  color: #8a5d00;
}

.narrate-settings-note.error {
  color: var(--rec);
}

.privacy-note {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 13px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.privacy-note:hover {
  border-color: var(--line-strong);
  background: var(--surface);
}

.privacy-note-icon {
  display: flex;
  flex: none;
  color: var(--brand-ink);
}

.privacy-note-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.privacy-note-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.privacy-note-sub {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.25;
}

.privacy-note-chevron {
  display: flex;
  flex: none;
  color: var(--faint);
  transition: transform 0.15s ease;
}

.privacy-note:hover .privacy-note-chevron {
  transform: translateX(2px);
}

/* Pre-recording privacy warning */
.recording-warning {
  display: flex;
  flex-direction: column;
  gap: 13px;
  width: 100%;
  max-width: 344px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.4);
  animation: sheet-rise 0.18s ease;
}

.recording-warning-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.recording-warning-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(var(--warn-rgb), 0.14);
  color: #8a5d00;
}

.recording-warning-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.recording-warning-copy,
.recording-warning-detail {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.recording-warning-copy {
  color: var(--text);
}

.recording-warning-detail {
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 9px 11px;
}

.recording-warning-actions {
  display: grid;
  gap: 8px;
}

.recording-warning-actions button {
  width: 100%;
  min-height: 38px;
}

/* What's-recorded disclosure sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.34);
  animation: sheet-fade 0.16s ease;
}

.sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 344px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.4);
  animation: sheet-rise 0.18s ease;
}

.sheet:focus {
  outline: none;
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sheet-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--signal-dim);
  color: var(--brand-ink);
}

.sheet-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.sheet-lead {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.sheet-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sheet-block h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}

.sheet-note {
  margin: 0;
  font-size: 11px;
  font-style: italic;
  color: var(--faint);
}

.sheet-block ul {
  margin: 2px 0 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sheet-block li {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.sheet-caution {
  margin: 3px 0 0;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--brand-ink);
  background: var(--signal-dim);
  border-radius: 9px;
  padding: 9px 11px;
}

.sheet-close {
  margin-top: 2px;
  background: var(--brand);
  color: var(--brand-fg);
  border: 0;
  border-radius: 10px;
  padding: 11px;
  font-size: 13px;
  font-weight: 600;
}

.sheet-close:hover {
  background: var(--brand-hover);
}

@keyframes sheet-fade {
  from {
    opacity: 0;
  }
}

@keyframes sheet-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sheet-backdrop,
  .recording-warning,
  .sheet {
    animation: none;
  }
}

/* =========================================================================
   In-recording control overlay
   ========================================================================= */

  .recording-controls {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    height: 100%;
    padding: 4px 6px 2px;
    color: var(--hud-text);
  }

  .recording-bar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    -webkit-app-region: drag;
  }

  .recording-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 58px;
    padding: 8px 9px 8px 14px;
    border: 1px solid var(--hud-line);
    border-radius: 14px;
    background: var(--hud-surface);
    box-shadow: var(--hud-shadow);
    -webkit-app-region: drag;
  }

  .recording-bar button,
  .recording-discard-confirm,
  .recording-discard-confirm button,
  .recording-terminal-confirm,
  .recording-terminal-confirm button,
  .recording-microphone-menu,
  .recording-microphone-menu button {
    -webkit-app-region: no-drag;
  }

  .recording-live {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 118px;
    -webkit-app-region: drag;
  }

  .recording-live-dot {
    width: 7px;
    height: 7px;
    flex: none;
    border-radius: 50%;
    background: var(--rec);
    box-shadow: 0 0 0 3px rgba(var(--rec-rgb), 0.18);
    animation: pulse 1.2s ease-in-out infinite;
  }

  .recording-live-copy {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
  }

  .recording-live-copy strong {
    font-size: 12px;
    font-weight: 650;
    color: var(--hud-text);
  }

  .recording-live-copy span {
    font-family: var(--mono);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
    color: var(--hud-muted);
  }

  .recording-divider {
    width: 1px;
    height: 26px;
    flex: none;
    background: var(--hud-line);
  }

  .recording-microphone-split {
    display: flex;
    align-items: center;
    height: 36px;
    border: 1px solid var(--hud-line);
    border-radius: 10px;
    background: var(--hud-surface-2);
    color: var(--hud-muted);
    overflow: hidden;
    -webkit-app-region: no-drag;
  }

  .recording-microphone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 59px;
    height: 34px;
    padding: 0 7px;
    background: transparent;
    color: inherit;
    font-size: 10px;
  }

  .recording-microphone-menu-toggle {
    display: grid;
    place-items: center;
    width: 23px;
    height: 34px;
    border-left: 1px solid var(--hud-line);
    background: transparent;
    color: inherit;
  }

  .recording-microphone-split.on {
    border-color: rgba(var(--brand-rgb), 0.5);
    background: rgba(var(--brand-rgb), 0.18);
    color: var(--hud-accent);
  }

  .recording-microphone-split.error {
    border-color: color-mix(in srgb, var(--hud-warn) 55%, transparent);
    color: var(--hud-warn);
  }

  .recording-microphone:not(:disabled):hover,
  .recording-microphone-menu-toggle:not(:disabled):hover {
    background: var(--hud-hover);
  }

  .recording-terminal {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    min-width: 89px;
    padding: 0 10px;
    border: 1px solid var(--hud-line);
    border-radius: 10px;
    background: var(--hud-surface-2);
    color: var(--hud-muted);
    font-size: 10.5px;
    font-weight: 600;
  }

  .recording-terminal:not(:disabled):hover,
  .recording-terminal.active {
    border-color: var(--hud-line-strong);
    color: var(--hud-text);
    background: var(--hud-hover);
  }

  .recording-terminal.error {
    border-color: color-mix(in srgb, var(--hud-accent) 55%, transparent);
    color: var(--hud-accent);
  }

  .recording-terminal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hud-muted);
  }

  .recording-terminal-dot.running,
  .recording-terminal-dot.starting {
    background: var(--hud-warn);
  }

  .recording-terminal-dot.idle {
    background: hsl(158, 62%, 52%);
  }

  .recording-terminal-dot.error {
    background: var(--hud-accent);
  }

  .recording-discard,
  .recording-done {
    height: 36px;
    padding: 0 13px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 600;
  }

  .recording-discard {
    margin-left: auto;
    border: 1px solid var(--hud-line);
    background: var(--hud-raised);
    color: var(--hud-text);
  }

  .recording-discard:not(:disabled):hover {
    border-color: var(--hud-line-strong);
    filter: brightness(1.15);
  }

  .recording-done {
    min-width: 62px;
    background: var(--signal);
    color: var(--brand-fg);
    box-shadow: 0 2px 12px -3px rgba(var(--brand-rgb), 0.5);
  }

  .recording-done:not(:disabled):hover {
    background: var(--brand-hover);
    box-shadow: 0 3px 16px -3px rgba(var(--brand-rgb), 0.6);
  }

  .recording-bar button:disabled,
  .recording-discard-confirm button:disabled,
  .recording-terminal-confirm button:disabled {
    opacity: 0.45;
  }

  .recording-bar button:focus-visible,
  .recording-discard-confirm button:focus-visible,
  .recording-terminal-confirm button:focus-visible,
  .recording-microphone-menu button:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 2px;
  }

  .recording-drag-handle {
    display: block;
    width: 34px;
    height: 4px;
    border-radius: 999px;
    background: var(--hud-line-strong);
    -webkit-app-region: drag;
  }

  .recording-discard-confirm,
  .recording-terminal-confirm {
    display: flex;
    flex-direction: column;
    gap: 13px;
    width: 100%;
    padding: 15px 16px;
    border: 1px solid var(--hud-line);
    border-radius: 12px;
    background: var(--hud-surface);
    box-shadow: var(--hud-shadow);
    color: var(--hud-text);
    animation: recording-confirm-in 0.15s ease-out;
  }

  .recording-microphone-menu {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 100%;
    max-height: 150px;
    padding: 12px;
    border: 1px solid var(--hud-line);
    border-radius: 12px;
    background: var(--hud-surface);
    box-shadow: var(--hud-shadow);
    color: var(--hud-text);
    animation: recording-confirm-in 0.15s ease-out;
  }

  .recording-microphone-menu header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
  }

  .recording-microphone-menu header strong {
    flex: none;
    font-size: 12px;
  }

  .recording-microphone-menu header span {
    overflow: hidden;
    color: var(--hud-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .recording-microphone-options {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-height: 0;
    overflow-y: auto;
  }

  .recording-microphone-options button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 29px;
    padding: 0 8px;
    border-radius: 7px;
    background: transparent;
    color: var(--hud-text);
    font-size: 10.5px;
    text-align: left;
  }

  .recording-microphone-options button:hover {
    background: var(--hud-hover);
  }

  .recording-microphone-options button.selected {
    background: rgba(var(--brand-rgb), 0.14);
    color: var(--hud-accent);
  }

  .recording-microphone-options button > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .recording-microphone-selected {
    flex: none;
    color: var(--hud-accent);
    font-size: 9px;
  }

  .recording-microphone-menu p {
    margin: 0;
    color: var(--hud-muted);
    font-size: 10px;
    line-height: 1.35;
  }

  .recording-microphone-menu p.warn {
    color: var(--hud-warn);
  }

  .recording-microphone-menu p.error {
    color: var(--hud-accent);
  }

  .recording-discard-confirm h2,
  .recording-terminal-confirm h2 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 650;
  }

  .recording-discard-confirm p,
  .recording-terminal-confirm p {
    margin: 0;
    color: var(--hud-muted);
    font-size: 11.5px;
    line-height: 1.4;
  }

  .recording-discard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
  }

  .recording-keep,
  .recording-confirm-discard,
  .recording-close-terminal {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 600;
  }

  .recording-keep {
    border: 1px solid var(--hud-line);
    background: var(--hud-raised);
    color: var(--hud-text);
  }

  .recording-keep:not(:disabled):hover {
    border-color: var(--hud-line-strong);
    filter: brightness(1.15);
  }

  .recording-confirm-discard {
    background: var(--rec);
    color: #fff;
  }

  .recording-confirm-discard:not(:disabled):hover {
    filter: brightness(0.92);
  }

  .recording-close-terminal {
    background: var(--signal);
    color: var(--brand-fg);
  }

  .recording-close-terminal:hover {
    background: var(--brand-hover);
  }

  .recording-controls-live {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  @keyframes recording-confirm-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }

@media (prefers-reduced-motion: reduce) {
  .recording-live-dot,
  .recording-discard-confirm,
  .recording-terminal-confirm,
  .recording-microphone-menu {
    animation: none;
  }
}

.sessions-open {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--surface-2);
  border: 0;
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  transition: box-shadow 0.15s ease, background 0.15s ease, transform 0.06s ease;
}

.sessions-open:hover {
  background: var(--surface-2);
  box-shadow: 0 7px 18px -6px rgba(0, 0, 0, 0.16);
}

.sessions-open:active {
  transform: translateY(1px);
  box-shadow: 0 3px 9px -6px rgba(0, 0, 0, 0.16);
}

.sessions-open-icon {
  display: flex;
  flex: none;
  color: var(--muted);
}

.sessions-open-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.sessions-open-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.sessions-open-sub {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.25;
}

.sessions-open-chevron {
  display: flex;
  flex: none;
  color: var(--faint);
  transition: color 0.15s ease, transform 0.15s ease;
}

.sessions-open:hover .sessions-open-chevron {
  color: var(--signal);
  transform: translateX(2px);
}

/* A recording is waiting to be analyzed: draw the eye to the one next step. */
.sessions-open.has-new {
  background: rgba(var(--rec-rgb), 0.05);
  box-shadow: inset 0 0 0 1px rgba(var(--rec-rgb), 0.32);
}

.sessions-open.has-new:hover {
  background: rgba(var(--rec-rgb), 0.08);
  box-shadow: inset 0 0 0 1px rgba(var(--rec-rgb), 0.32), 0 7px 18px -6px rgba(var(--rec-rgb), 0.28);
}

.sessions-open.has-new .sessions-open-icon {
  color: var(--rec);
}

.sessions-open-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sessions-open-flag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--rec);
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sessions-open-sub.is-new {
  color: var(--rec);
  font-weight: 600;
}

.doctor {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.row-label {
  flex: 1;
  color: var(--muted);
}

.row-note {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faint);
}

.badge {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
}

.badge.good {
  background: var(--go);
}

.badge.bad {
  background: var(--rec);
}

.badge.warn {
  background: var(--warn);
}

.row-action {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brand-ink);
  background: var(--signal-dim);
  border: 1px solid rgba(var(--brand-rgb), 0.3);
  border-radius: 5px;
  padding: 2px 8px;
  cursor: pointer;
}

.row-action:hover:not(:disabled) {
  background: rgba(var(--brand-rgb), 0.2);
}

.row-action:disabled {
  opacity: 0.55;
  cursor: default;
}

.hint {
  margin: 0;
  font-size: 11px;
  color: var(--faint);
  text-align: center;
  font-family: var(--mono);
  letter-spacing: 0.03em;
}

/* =========================================================================
   Sessions library (resizable window)
   ========================================================================= */

.lib {
  display: flex;
  height: 100vh;
}

.lib-list {
  width: 300px;
  flex: 0 0 300px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: var(--deck);
}

.lib-list-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 10px;
}

.lib-list-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 12px;
}

.sessions-empty {
  margin: 8px 4px;
  font-size: 12px;
  color: var(--muted);
}

.sess-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sess {
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text);
}

.sess:hover {
  border-color: var(--line-strong);
}

.sess.on {
  border-color: var(--signal);
  background: var(--surface-2);
}

.sess-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.sess-when {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.sess-intent {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sess-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}

.sess-size {
  font-size: 9px;
  color: var(--faint);
}

/* Per-row delete: a quiet trash affordance revealed on hover/focus, plus an
   inline confirm that swaps in so deletion always takes a deliberate second tap. */
.sess-row {
  position: relative;
}

.sess-del {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--faint);
  opacity: 0;
  transition: opacity 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.sess-row:hover .sess-del,
.sess-del:focus-visible {
  opacity: 1;
}

.sess-del:hover {
  background: rgba(var(--rec-rgb), 0.12);
  color: var(--rec);
}

.sess-confirm {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--signal);
  border-radius: 10px;
  padding: 11px 12px;
}

.sess-confirm-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.sess-confirm-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.sess-confirm-sub {
  font-size: 11px;
  color: var(--muted);
}

.sess-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.danger {
  background: var(--rec);
  color: var(--brand-fg);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
}

.danger:not(:disabled):hover {
  background: hsl(6, 82%, 43%);
}

.sess-notice {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px 8px;
  padding: 8px 10px;
  text-align: left;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--brand-ink);
  background: var(--signal-dim);
  border-radius: 8px;
}

.lib-detail {
  flex: 1;
  min-width: 0;
  display: flex;
}

.detail-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  padding: 40px;
  text-align: center;
}

.detail-empty p {
  max-width: 320px;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* --- Analysis workspace --------------------------------------------------- */

.ws {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
}

.ws-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}

.ws-titles {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ws-when {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

/* Subtle per-session debug bundle download, right side of the session header. */
.debug-dl {
  display: flex;
  align-items: center;
  gap: 8px;
}

.debug-dl-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  transition: background 0.12s ease, color 0.12s ease;
}

.debug-dl-icon:not(:disabled):hover {
  background: var(--signal-dim);
  color: var(--signal);
}

.debug-dl-icon:disabled {
  cursor: default;
}

.debug-dl-icon.is-saved {
  color: var(--go);
}

.debug-dl-note {
  font-size: 11px;
  color: var(--warn);
}

/* Privacy-warning modal — reuses the .sheet system (see WhatsRecorded). */
.debug-sheet {
  max-width: 380px;
  gap: 12px;
}

.sheet-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 2px;
}

.ws-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ws-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.ws-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.ws-empty-lead {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.analyze-disclosure {
  max-width: 620px;
  margin: -2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.analyze-disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  user-select: none;
}

.analyze-disclosure > summary::-webkit-details-marker {
  display: none;
}

.analyze-disclosure > summary::before {
  content: "";
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.analyze-disclosure[open] > summary::before {
  transform: rotate(45deg);
}

.analyze-disclosure > summary:hover {
  color: var(--text);
}

.analyze-disclosure > p {
  margin: 8px 0 0;
  max-width: 620px;
  line-height: 1.5;
  color: var(--muted);
}

.cloud-analysis-caution {
  color: var(--brand-ink);
}

/* On-device sensitive-detail review (pre-send gate) */
.sensitive-review {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
}

.sensitive-review-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sensitive-review-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  color: var(--text);
}

.sensitive-review-headline {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.sensitive-review-toggle {
  flex: none;
  font-size: 12px;
  font-weight: 600;
}

.sensitive-dismiss {
  flex: none;
  font-size: 12px;
}

.sensitive-review-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

.sensitive-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 2px;
}

.sensitive-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sensitive-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 9px;
  padding: 9px 11px;
}

.sensitive-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--muted);
}

.sensitive-dot.sev-high {
  background: var(--rec);
  box-shadow: 0 0 6px rgba(var(--rec-rgb), 0.5);
}

.sensitive-dot.sev-medium {
  background: var(--warn);
}

.sensitive-item-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sensitive-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sensitive-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.sensitive-source {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
}

.sensitive-count {
  font-size: 11px;
  color: var(--muted);
}

.sensitive-snippet {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  word-break: break-word;
  white-space: pre-wrap;
}

.sensitive-caveat {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* --- Protection status badge (in the "what's recorded" HUD button) ---------
   The Advanced-protection control moved into the "What's recorded" sheet; the
   HUD keeps a compact, read-only badge so on/off/ready state stays visible and
   the whole row opens the sheet to change it. */
.privacy-note-badge {
  flex: none;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.privacy-note-badge.is-off {
  color: var(--faint);
  background: var(--surface);
  border-color: var(--line);
}

/* --- Advanced protection toggle (inside the "what's recorded" sheet) -------- */
.sheet-advp {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sheet-advp.on {
  border-color: rgba(var(--brand-rgb), 0.4);
  background: var(--signal-dim);
}

.sheet-advp-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.sheet-advp-copy {
  flex: 1;
  min-width: 0;
}

.sheet-advp-copy h3 {
  margin: 0;
}

.sheet-switch-btn {
  flex: none;
  display: flex;
  align-items: center;
  margin-top: 2px;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.sheet-switch-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.sheet-switch {
  box-sizing: border-box;
  width: 40px;
  height: 24px;
  border-radius: 999px;
  background: var(--line-strong);
  padding: 3px;
  transition: background 0.15s ease;
}

.sheet-switch.on {
  background: var(--brand);
}

.sheet-switch-knob {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

.sheet-switch.on .sheet-switch-knob {
  transform: translateX(16px);
}

.sheet-advp-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
}

.sheet-advp-status.is-error {
  color: var(--warn);
}

.sheet-advp-download {
  flex: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-ink);
  background: transparent;
  padding: 2px 4px;
  cursor: pointer;
  text-decoration: underline;
}

.record-cta.danger {
  background: var(--rec);
  box-shadow: 0 2px 12px -3px rgba(var(--rec-rgb), 0.45);
}

.record-cta.danger:not(:disabled):hover {
  filter: brightness(1.06);
  box-shadow: 0 3px 16px -3px rgba(var(--rec-rgb), 0.55);
}

.voice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(var(--warn-rgb), 0.45);
  background: rgba(var(--warn-rgb), 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
}

.voice-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.voice-card-copy strong {
  color: var(--text);
  font-size: 12.5px;
}

.voice-card-error {
  color: var(--rec);
}

.voice-card-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-analysis-note {
  max-width: 520px;
  margin: -4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.analysis-error {
  background: rgba(var(--rec-rgb), 0.12);
  border: 1px solid rgba(var(--rec-rgb), 0.5);
  color: var(--brand-ink);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 12px;
}

.analysis-error p {
  margin: 0;
}

.analysis-error .signin-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.analysis-error .signin-manual {
  margin-top: 8px;
  color: var(--faint);
}

.analysis-error .signin-command {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  overflow-wrap: anywhere;
  user-select: text;
}

.ws-read {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-text {
  margin: 2px 0 0;
  font-size: 21px;
  font-weight: 650;
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--text);
}

.summary-why {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
}

.summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

/* Small helper text under an edit field, e.g. where the Name shows up. */
.edit-hint {
  font-size: 11.5px;
  color: var(--faint);
}

.summary-edit {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 2px;
}

.edit-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.edit-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.edit-title,
.edit-intent {
  width: 100%;
  background: var(--deck);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  padding: 10px 12px;
  user-select: text;
}

.edit-title {
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.012em;
}

.edit-intent {
  font-size: 14px;
  line-height: 1.5;
  min-height: 58px;
  resize: vertical;
}

.edit-title:focus,
.edit-intent:focus {
  outline: none;
  border-color: var(--signal);
}

.edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.summary .tag.ok {
  align-self: flex-start;
}

.story {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-step {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.story-step:first-child {
  border-top: none;
  padding-top: 2px;
}

.sstep-num {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--signal);
  line-height: 1.5;
}

.sstep-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sstep-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.4;
  color: var(--text);
}

.sstep-detail {
  margin: 5px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
}

.sstep-flag {
  margin-top: 10px;
  align-self: flex-start;
  font-size: 11.5px;
  color: var(--brand-ink);
  background: var(--signal-dim);
  border-radius: 7px;
  padding: 4px 9px;
}

.sstep-tools {
  display: flex;
  gap: 18px;
  margin-top: 10px;
}

.linky {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  color: var(--faint);
  cursor: pointer;
  font-family: inherit;
}

.linky:hover {
  color: var(--signal);
}

.sstep-details {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.drow {
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text);
  align-items: baseline;
}

.dkey {
  flex: none;
  width: 52px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.dsignals {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sig {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 2px 7px;
}

.sstep-fb {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fb-chips {
  display: flex;
  gap: 6px;
}

.fb-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.fb-chip:hover {
  border-color: var(--signal);
  color: var(--text);
}

.fb-input,
.overall-fb {
  width: 100%;
  background: var(--deck);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  padding: 9px 11px;
  font-family: inherit;
  user-select: text;
}

.overall-fb {
  min-height: 66px;
  resize: vertical;
}

.fb-input:focus,
.overall-fb:focus {
  outline: none;
  border-color: var(--signal);
}

.overall-zone {
  padding-top: 2px;
}

.ws-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
}

.ws-foot-actions {
  display: flex;
  gap: 10px;
}

.foot-status {
  font-size: 12px;
  color: var(--go);
}

@media (prefers-reduced-motion: reduce) {
  .record.on,
  .narrate-scrim,
  .narrate-settings {
    animation: none;
  }
}

/* ── Skill builder ───────────────────────────────────────────────────────
   Reuses ws / ws-head / ws-foot / status-line / record-cta. The two signature
   moments are the input-source badges and the action → native-tool rows, so
   those carry the only colour; everything else stays quiet sand + neutral. */
.skill-builder .ws-foot-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.skill-review-sheet {
  max-width: 920px;
}

.skill-review-sheet .sheet-head {
  justify-content: space-between;
}

.skill-review-source {
  min-height: 120px;
  max-height: 55vh;
  margin: 0;
  padding: 14px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  background: var(--deck);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.skill-review-source code {
  user-select: text;
}

.skill-review-actions {
  flex-wrap: wrap;
  flex-shrink: 0;
}

.sb-arch {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.sb-lead {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.arch-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 14px;
}

.arch-card:not(:disabled):hover {
  border-color: var(--line-strong);
}

.arch-card.on {
  border-color: var(--signal);
  box-shadow: 0 2px 14px -6px rgba(var(--brand-rgb), 0.45);
}

.arch-card:disabled {
  opacity: 0.55;
  cursor: default;
}

.arch-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.arch-note {
  font-size: 11.5px;
  color: var(--muted);
}

.sb-arch .record-cta {
  align-self: flex-start;
}

/* Plan view */
.sb-plan {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 660px;
  margin: 0 auto;
  width: 100%;
}

.sb-planhead {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.sb-title {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
}

.sb-slug {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--brand-ink);
  background: var(--signal-dim);
  border-radius: 6px;
  padding: 2px 7px;
}

.sb-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.sb-sec {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sb-sec > p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}

.sb-muted {
  color: var(--muted) !important;
}

/* Value pills — a fixed value referenced from step text as {{id}}. In read mode each
   token renders as a named, inline chip; click it to edit the literal that substitutes
   into the exported SKILL.md / automation.json. One value, edited once, applies everywhere. */
.val-pill {
  font: inherit;
  font-weight: 600;
  color: var(--brand-ink);
  background: var(--signal-dim);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 6px;
  margin: 0 1px;
  cursor: text;
}

.val-pill:hover {
  border-color: var(--signal);
}

/* A declared value with no literal yet — a dashed, muted chip inviting a value. */
.val-pill-empty {
  color: var(--muted);
  background: var(--surface-2);
  border: 1px dashed var(--line);
}

/* A {{token}} with no matching value — flagged so it's caught before export. */
.val-pill-unresolved {
  font-family: var(--mono);
  font-size: 0.9em;
  color: var(--warn);
  background: rgba(var(--warn-rgb), 0.12);
  border-radius: 6px;
  padding: 0 5px;
}

/* The pill's active state while its editor popover is open. */
.val-pill-active {
  border-color: var(--signal);
  box-shadow: 0 0 0 2px rgba(var(--brand-rgb), 0.25);
}

/* Floating value editor anchored under a pill (portaled to <body> so nothing clips it). */
.val-pop {
  position: fixed;
  z-index: 1000;
  width: 340px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
.val-pop-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.val-pop-input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--signal);
  border-radius: 6px;
  padding: 6px 8px;
  min-height: 1.8em;
  resize: none;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.val-pop-input:focus {
  outline: none;
}
.val-pop-hint {
  font-size: 11px;
  color: var(--muted);
}

/* Inline prose editor: pills stay as atomic, non-editable chips while the wording around
   them is edited, so the raw {{token}} is never shown. */
.token-edit {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: text;
}
.token-edit:focus {
  outline: none;
}
.token-edit .val-pill {
  cursor: default;
  user-select: none;
}

/* A step body that carries pills flows inline (mixed text + chips), not preformatted. */
.ed-detail.has-pills {
  white-space: normal;
}

/* Steps — ordered calculations + actions, each with its native tool. */
.sb-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-row {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}

.step-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.step-text {
  flex: 1 1 auto;
  min-width: 0;
}

.step-adjust {
  flex: none;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  padding: 0 2px;
  opacity: 0;
  transition: opacity 0.12s ease;
}

.step-row:hover .step-adjust {
  opacity: 1;
}

.step-adjust:hover {
  color: var(--brand-ink);
  text-decoration: underline;
}

.step-adjust:disabled {
  cursor: default;
  opacity: 0;
}

.step-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  padding-left: 2px;
}

.step-tool {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  background: var(--surface-2);
  border-radius: 6px;
  padding: 2px 8px;
}

.step-confirm {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--warn);
  border: 1px solid var(--warn);
  border-radius: 5px;
  padding: 1px 7px;
}

.sb-refine {
  padding-top: 2px;
}

.sb-refine-hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* Done */
.sb-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  max-width: 520px;
  margin: 32px auto 0;
  width: 100%;
}

.sb-check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(var(--go-rgb), 0.14);
  color: var(--go);
  font-size: 22px;
  font-weight: 700;
}

.sb-done p {
  margin: 0;
  font-size: 14px;
  color: var(--text);
}

.sb-path {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted) !important;
  word-break: break-all;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 11px;
}

/* Automation-specific: trigger, prompt-steps, and the import hint */
.sb-trigger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
}

.trigger-when {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.trigger-cond {
  font-size: 12.5px;
  color: var(--muted);
}

.sb-steps li .sb-step-label {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.sb-steps li .sb-step-prompt {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

.sb-import-hint {
  margin: 4px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted) !important;
  max-width: 460px;
}

/* ==========================================================================
   Read-first review tiles (src/plan-edit.tsx). Each gate reads as a calm report
   of what Copilot proposed; a field becomes an input only when clicked. Controls
   (reorder / remove) are revealed on hover. No wall of text boxes by default.
   ========================================================================== */

.tiles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.tile-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tile-num {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

/* --- read mode: plain text that hints it's editable ---------------------- */
.ed-read {
  display: block;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 3px 6px;
  margin: -3px -6px; /* keep read + edit visually aligned (no jump on click) */
  color: var(--text);
  cursor: text;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  transition: background 0.1s ease, border-color 0.1s ease;
}

.ed-read:hover {
  background: var(--surface-2);
}

.ed-read:focus-visible {
  outline: none;
  border-color: var(--signal);
  background: var(--surface-2);
}

.ed-empty {
  color: var(--faint);
  font-style: italic;
}

/* Optional fields stay invisible until you hover the tile. */
.ed-hide {
  opacity: 0;
  transition: opacity 0.12s ease;
}
.tile:hover .ed-hide,
.ed-hide:focus-visible {
  opacity: 0.7;
}

/* Per-field read typography. */
.ed-name {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  font-size: 14px;
}
.ed-strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.ed-detail {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
/* Read-only annotation of the native tool a captured step used (not user-editable). */
.step-tool {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.ed-title {
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.012em;
}
.ed-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* --- edit mode: the field is an input / textarea ------------------------- */
.ed-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--deck);
  border: 1px solid var(--signal);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  padding: 3px 6px;
  margin: -3px -6px;
  user-select: text;
}
.ed-input:focus {
  outline: none;
}
.ed-input-multi {
  resize: vertical;
  min-height: 44px;
}
.ed-input.ed-name,
.ed-input.ed-title {
  font-weight: 620;
}

/* Header title/description sit flush with the plan header (no shift on click). */
.sb-title.ed-read,
.sb-desc.ed-read,
.sb-title.ed-input,
.sb-desc.ed-input {
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}
.sb-title.ed-read:hover,
.sb-desc.ed-read:hover {
  background: transparent;
}
.sb-title.ed-read:focus-visible,
.sb-desc.ed-read:focus-visible {
  border-color: transparent;
  background: transparent;
  box-shadow: inset 0 -1px 0 var(--signal);
}
.sb-title.ed-input,
.sb-desc.ed-input {
  border-color: transparent;
  border-bottom-color: var(--signal);
  border-radius: 0;
  background: transparent;
}

/* --- inline select (used by the schedule editor) ------------------------- */
.tile-select {
  flex: none;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  padding: 5px 8px;
  cursor: pointer;
}
.tile-select:focus {
  outline: none;
  border-color: var(--signal);
}

/* --- reorder / remove, revealed on hover --------------------------------- */
.row-controls {
  flex: none;
  margin-left: auto;
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.tile:hover .row-controls,
.tile:focus-within .row-controls {
  opacity: 1;
}

.tile-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.tile-btn:not(:disabled):hover {
  border-color: var(--line-strong);
  color: var(--text);
}
.tile-btn:disabled {
  opacity: 0.32;
  cursor: default;
}
.tile-btn-del:not(:disabled):hover {
  border-color: var(--rec);
  color: var(--rec);
  background: rgba(var(--rec-rgb), 0.08);
}

/* --- skill-step foot: native tool ---------------------------------------- */
.tile-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-left: 2px;
}

/* --- "+ Add …" — a quiet, intentional affordance ------------------------- */
.tile-add {
  align-self: stretch;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  padding: 7px 10px;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.tile-add:hover {
  border-color: var(--brand);
  color: var(--brand-ink);
  background: var(--signal-dim);
}

/* --- build-view header (read-first title + description) ------------------ */
.sb-planhead .ed-title {
  flex: 1 1 auto;
  min-width: 0;
}

/* --- schedule: reads as a sentence; "Edit" reveals controls -------------- */
.sched-read {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
}
.sched-when {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.sched-done {
  margin-left: auto;
}

.sched-edit {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px;
}
.sched-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sched-times {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sched-time-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.sched-days {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.sched-lbl {
  font-size: 12.5px;
  color: var(--muted);
}
.sched-every {
  font-style: italic;
}

.tile-input {
  background: var(--deck);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  padding: 6px 9px;
}
.tile-input:focus {
  outline: none;
  border-color: var(--signal);
}
.tile-time {
  width: auto;
  flex: none;
}

.day-chip {
  min-width: 32px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-family: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.day-chip:hover {
  border-color: var(--line-strong);
}
.day-chip.on {
  border-color: var(--brand);
  color: var(--brand-ink);
  background: var(--signal-dim);
}