/* ═══════════════════════════════════════════════════════════════════════════
   DepositionPal

   Design brief: this is read by a frightened person, at a glance, between
   questions, while a camera is pointed at her. So —
     · light, document-like, calm. Nothing that looks like a hacking tool if
       it's glimpsed on video.
     · one thing is the biggest thing on the screen: the shape of the answer.
     · colour is used sparingly and only ever to mean urgency.
     · large type throughout. She is 70, not 25, and she is stressed.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --ink:        #1a1d23;
  --ink-soft:   #4a5160;
  --ink-faint:  #838b99;
  --paper:      #faf9f7;
  --card:       #ffffff;
  --line:       #e3e1dc;
  --line-soft:  #eeece8;

  --accent:     #2f5d50;   /* deep green — the "you're fine" colour */
  --accent-bg:  #eef4f1;
  --caution:    #8a5a1a;   /* amber — slow down, check something */
  --caution-bg: #fdf5e7;
  --urgent:     #9a2c2c;   /* red — stop */
  --urgent-bg:  #fbeeee;

  --radius:     12px;
  --shadow:     0 1px 2px rgba(20,22,28,.04), 0 4px 14px rgba(20,22,28,.05);
  --shadow-lg:  0 8px 40px rgba(20,22,28,.14);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

.muted { color: var(--ink-faint); }
.small { font-size: .875rem; }

/* ── banner ─────────────────────────────────────────────────────────────── */
.backend-status {
  background: var(--urgent);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .01em;
}

/* ── top bar ────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand { display: flex; align-items: baseline; gap: 9px; }
.brand-mark {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1;
}
.brand-name {
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}

.mode-switch {
  display: inline-flex;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.mode-btn {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 5px 16px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}
.mode-btn.active {
  background: var(--ink);
  color: #fff;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-timer {
  display: flex;
  align-items: baseline;
  gap: 7px;
  font-variant-numeric: tabular-nums;
}
.timer-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ink-faint);
}
.timer-value { font-weight: 650; font-size: .95rem; }

.break-btn,
.ghost-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 550;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.break-btn:hover,
.ghost-btn:hover { border-color: var(--ink-faint); color: var(--ink); }
.ghost-btn.small { padding: 5px 11px; font-size: .8rem; }
.ghost-btn.danger:hover { border-color: var(--urgent); color: var(--urgent); }

.break-btn.due {
  background: var(--caution-bg);
  border-color: var(--caution);
  color: var(--caution);
  font-weight: 650;
}

.linklike {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* ── layout ─────────────────────────────────────────────────────────────── */
/* Three live columns on top; the case-file manager spans the full width
   underneath, because it's set up once and rarely touched mid-deposition. */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .9fr);
  gap: 20px;
  padding: 20px 24px 140px;
  max-width: 1680px;
  margin: 0 auto;
  align-items: start;
}

.col-file { grid-column: 1 / -1; }

.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title {
  margin: 0 0 12px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-faint);
}
.panel-head .panel-title { margin: 0; }

.pill {
  font-size: .75rem;
  font-weight: 650;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  white-space: nowrap;
}
.pill.good    { background: var(--accent-bg);  border-color: #c6ddd4; color: var(--accent); }
.pill.caution { background: var(--caution-bg); border-color: #ecd9b4; color: var(--caution); }
.pill.warn    { background: var(--urgent-bg);  border-color: #eec8c8; color: var(--urgent); }

/* ── the NOW card — the one thing she looks at ──────────────────────────── */
.now-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  transition: border-color .25s, background .25s;
}
.now-card.caution { border-left-color: var(--caution); }
.now-card.urgent  { border-left-color: var(--urgent); background: var(--urgent-bg); }

.now-card.thinking .now-eyebrow::after {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.1s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes pulse { 0%,100% { opacity: .25; } 50% { opacity: 1; } }

.now-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.now-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-faint);
}
.qtype-chip {
  font-size: .78rem;
  font-weight: 650;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}

.shape-form {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 6px;
}
.now-card.urgent .shape-form { color: var(--urgent); }

.shape-why {
  font-size: 1.02rem;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.shape-phrasing {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--accent);
  background: var(--accent-bg);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.now-card.urgent .shape-phrasing { color: var(--urgent); background: #fff; }

.trap-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  background: var(--caution-bg);
  border: 1px solid #ecd9b4;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 14px 0;
}
.trap-label {
  font-weight: 700;
  font-size: .9rem;
  color: var(--caution);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.trap-note { font-size: .95rem; color: var(--ink); flex: 1 1 200px; }

.guidance { font-size: 1rem; color: var(--ink); }
.guidance p { margin: 0 0 8px; }
.guidance p:last-child { margin-bottom: 0; }
.guidance ul, .guidance ol { margin: 6px 0 8px; padding-left: 20px; }
.guidance li { margin-bottom: 4px; }
.guidance strong { font-weight: 700; }
.guidance code {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: .87em;
}
.guidance small { color: var(--ink-faint); font-size: .78rem; }

.detected-q {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.detected-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-faint);
}
.detected-text {
  font-style: italic;
  color: var(--ink-soft);
  font-size: .95rem;
}

/* ── cautions ───────────────────────────────────────────────────────────── */
.cautions-list { display: flex; flex-direction: column; gap: 12px; }
.caution {
  border-left: 3px solid var(--caution);
  padding-left: 12px;
}
.caution-trap {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--caution);
}
.caution-quote {
  font-style: italic;
  color: var(--ink-soft);
  font-size: .93rem;
  margin: 3px 0;
}
.caution-fix { font-size: .96rem; }

/* ── follow-ups (practice mode) ─────────────────────────────────────────── */
.followups-list { margin: 0; padding-left: 20px; }
.followups-list li { margin-bottom: 7px; color: var(--ink-soft); font-style: italic; }

/* ── phrases ────────────────────────────────────────────────────────────── */
.phrases { display: flex; flex-wrap: wrap; gap: 7px; }
.phrase {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: .9rem;
  color: var(--ink-soft);
}

/* ── sync chip ──────────────────────────────────────────────────────────── */
.sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 550;
  cursor: pointer;
}
.sync-chip:hover { border-color: var(--ink-faint); color: var(--ink); }

.sync-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex-shrink: 0;
}
.sync-dot.synced  { background: var(--accent); }
.sync-dot.syncing { background: var(--caution); animation: pulse 1.1s ease-in-out infinite; }
.sync-dot.error   { background: var(--urgent); }
.sync-dot.locked  { background: var(--caution); }

/* ── attorney instructions ──────────────────────────────────────────────── */
.attorney-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.ap-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 3px solid var(--accent);
  padding-left: 11px;
}
.ap-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
}
.ap-row span:not(.ap-label) { font-size: .95rem; }
.ap-row ul { margin: 2px 0 0; padding-left: 18px; font-size: .93rem; }
.ap-row li { margin-bottom: 3px; }

.attorney-actions { display: flex; gap: 8px; }

.primary-btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.primary-btn:hover { opacity: .88; }
.primary-btn.small { padding: 5px 13px; font-size: .82rem; }

/* ── recall from her documents (inline in the Right Now card) ───────────── */
.recall-inline {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.recall-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.recall-inline-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-faint);
}
.recall-list { display: flex; flex-direction: column; gap: 14px; }
.recall-item {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}
.recall-fact { font-weight: 600; margin-bottom: 5px; }
.recall-quote {
  margin: 0 0 5px;
  padding: 8px 12px;
  background: var(--paper);
  border-radius: 6px;
  font-family: var(--serif);
  font-size: .95rem;
  color: var(--ink);
  white-space: pre-wrap;
}
.recall-source {
  font-size: .78rem;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── case file (full-width bottom panel) ────────────────────────────────── */
.casefile-blurb { margin: -4px 0 14px; }

.casefile-body {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
}
.casefile-left, .casefile-right { min-width: 0; }

/* ── the dropzone ───────────────────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  cursor: pointer;
  background: var(--paper);
  transition: border-color .18s, background .18s, transform .18s;
}
.dropzone:hover { border-color: var(--accent); background: var(--accent-bg); }
.dropzone:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-bg);
  transform: scale(1.015);
}
body.dragging-files .dropzone { border-style: solid; }

.dz-icon {
  font-size: 1.7rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.dz-title { font-weight: 650; font-size: 1.02rem; margin-bottom: 3px; }
.dz-sub { font-size: .9rem; color: var(--ink-soft); }
.dz-privacy {
  margin-top: 10px;
  font-size: .78rem;
  color: var(--ink-faint);
  line-height: 1.4;
}

.ingest-status {
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: .875rem;
  color: var(--ink-soft);
}
.ingest-status.busy { border-color: var(--accent); color: var(--accent); }

.memory-bar {
  margin: 12px 0 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--accent-bg);
  border: 1px solid #d6e5de;
  font-size: .85rem;
  color: var(--accent);
}

/* ── document cards ─────────────────────────────────────────────────────── */
.doc-list { display: flex; flex-direction: column; gap: 8px; }

.doc-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  background: var(--card);
  transition: opacity .18s, border-color .18s;
}
.doc-card.pinned { border-color: var(--accent); background: var(--accent-bg); }
.doc-card.muted-doc { opacity: .48; }
.doc-card.muted-doc .doc-name { text-decoration: line-through; }

.doc-main { flex: 1; min-width: 0; }
.doc-name {
  font-weight: 600;
  font-size: .95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pin-mark { font-size: .8rem; }
.doc-meta { font-size: .78rem; color: var(--ink-faint); }
.doc-note-preview {
  margin-top: 4px;
  font-size: .84rem;
  font-style: italic;
  color: var(--ink-soft);
  border-left: 2px solid var(--line);
  padding-left: 8px;
}

.doc-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.icon-btn {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  width: 28px; height: 28px;
  font-size: .85rem;
  color: var(--ink-faint);
  cursor: pointer;
  display: grid;
  place-items: center;
  filter: grayscale(1);
  opacity: .6;
  transition: opacity .15s, background .15s, filter .15s;
}
.icon-btn:hover { opacity: 1; filter: none; background: var(--paper); }
.icon-btn.on { opacity: 1; filter: none; }
.icon-btn.danger:hover { background: var(--urgent-bg); color: var(--urgent); }

/* toggle switch */
.toggle { position: relative; display: inline-flex; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  width: 34px; height: 20px;
  border-radius: 999px;
  background: #d3d0ca;
  display: block;
  transition: background .18s;
  position: relative;
}
.toggle-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .18s;
}
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(14px); }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--accent); outline-offset: 2px; }

.casefile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

/* ── standing-watch widgets ─────────────────────────────────────────────── */
.widgets { display: flex; flex-direction: column; gap: 6px; }

.widget {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 8px 11px;
  transition: border-color .2s, background .2s;
}
.widget.idle { opacity: .42; }
.widget.live {
  border-color: var(--line);
  background: var(--paper);
}

.widget-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.widget-label {
  font-size: .72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-faint);
}
.widget-state {
  font-size: .87rem;
  font-weight: 650;
  color: var(--ink);
  text-align: right;
}
.widget.idle .widget-state { color: var(--ink-faint); font-weight: 500; }
.widget-note {
  margin-top: 4px;
  font-size: .85rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ── the eight rules ────────────────────────────────────────────────────── */
.rules-list {
  margin: 0;
  padding-left: 22px;
  font-size: .93rem;
  color: var(--ink-soft);
}
.rules-list li { margin-bottom: 7px; }
.rules-list strong { color: var(--ink); font-weight: 650; }

/* ── floating dock ──────────────────────────────────────────────────────── */
.dock {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 50;
}

.dock-btn {
  position: relative;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.dock-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 19px;
  padding: 0 5px;
  height: 19px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  line-height: 19px;
}
.dock-count.empty { display: none; }

.mic-btn {
  width: 68px; height: 68px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: background .2s, transform .12s;
}
.mic-btn:hover { transform: scale(1.04); }
.mic-btn:disabled { opacity: .4; cursor: not-allowed; }
.mic-btn.active {
  background: var(--urgent);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  0%,100% { box-shadow: var(--shadow-lg), 0 0 0 0 rgba(154,44,44,.32); }
  50%     { box-shadow: var(--shadow-lg), 0 0 0 14px rgba(154,44,44,0); }
}

.mic-status {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: var(--shadow);
  white-space: nowrap;
}

/* ── modals ─────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,29,35,.42);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 100;
}
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  width: min(760px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 { margin: 0; font-size: 1.05rem; font-weight: 650; }
.modal-actions { display: flex; gap: 6px; }
.modal-foot { padding: 0 20px 14px; margin: 0; }

.transcript-display {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.transcript-placeholder { color: var(--ink-faint); font-style: italic; }
.transcript-segment {
  padding: 8px 12px;
  background: var(--paper);
  border-radius: 8px;
  font-size: .95rem;
}
.transcript-segment.interim { opacity: .55; font-style: italic; }

.doc-modal-body,
.help-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
}

.field-label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ink-faint);
  margin: 0 0 6px;
}

.text-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: .95rem;
  background: var(--card);
  color: var(--ink);
  resize: vertical;
}
.text-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.text-input::placeholder { color: var(--ink-faint); }

.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.modal-wide { width: min(880px, 100%); }
.attorney-body, .vault-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
}
.vault-body p { margin: 0 0 10px; }

.vault-msg {
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--accent-bg);
  border: 1px solid #d6e5de;
  color: var(--accent);
  font-size: .88rem;
  margin-bottom: 12px;
}
.vault-msg.bad { background: var(--urgent-bg); border-color: #eec8c8; color: var(--urgent); }

.vault-actions { display: flex; gap: 8px; margin-bottom: 14px; }

.doc-origin { opacity: .7; }

.doc-text-preview {
  margin: 6px 0 0;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  max-height: 320px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--ink-soft);
}

.help-body h3 {
  margin: 18px 0 6px;
  font-size: .95rem;
  font-weight: 700;
}
.help-body h3:first-child { margin-top: 0; }
.help-body p { margin: 0 0 9px; color: var(--ink-soft); }
.help-body strong { color: var(--ink); }
.help-body ul { margin: 0 0 9px; padding-left: 20px; color: var(--ink-soft); }
.help-body li { margin-bottom: 5px; }

/* ── practice mode gets a visible tint so she never confuses the two ────── */
body.practice-mode { background: #f5f6fa; }
body.practice-mode .topbar { border-bottom-color: #cfd6e6; }
body.practice-mode .brand-mark { color: #3d5a99; }

/* ── responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1320px) {
  .grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .col-watch { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .col-watch .panel { flex: 1 1 320px; }
  .widgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; padding: 16px 14px 150px; }
  .col-watch { flex-direction: column; }
  .casefile-body { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .topbar-right { width: 100%; margin-left: 0; flex-wrap: wrap; }
  .shape-form { font-size: 1.6rem; }
}

/* ── dark mode: only for late-night prep, not the deposition itself ─────── */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #e9e7e3;
    --ink-soft:   #b0aca6;
    --ink-faint:  #7d7973;
    --paper:      #16171a;
    --card:       #1e2023;
    --line:       #32353a;
    --line-soft:  #292c30;
    --accent:     #6fb39c;
    --accent-bg:  #1c2b27;
    --caution:    #d9a95c;
    --caution-bg: #2b2317;
    --urgent:     #e07b7b;
    --urgent-bg:  #2c1c1c;
    --shadow:     0 1px 2px rgba(0,0,0,.3), 0 4px 14px rgba(0,0,0,.25);
    --shadow-lg:  0 8px 40px rgba(0,0,0,.5);
  }
  .toggle-track { background: #45484d; }
  .mic-btn { background: #e9e7e3; color: #16171a; }
  .mode-btn.active { background: #e9e7e3; color: #16171a; }
  body.practice-mode { background: #14161c; }
}
