/**
 * Copyright (c) 2026 Dennis Global (Pty) Ltd. All Rights Reserved.
 * Proprietary and Confidential.
 */
:root {
  --ink: #141c18;
  --muted: #5a645e;
  --paper: #ece7dc;
  --sheet: #fffcf6;
  --line: #d5ccbe;
  --green: #17382c;
  --brass: #8a6430;
  --seal: #7a2f2b;
  --flag: #f4ddd6;
  --shadow: 0 10px 28px rgba(20, 28, 24, 0.08);
  color: var(--ink);
  background: var(--paper);
  font: 13px/1.35 "Segoe UI", Candara, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: Palatino, "Palatino Linotype", Georgia, serif; font-weight: 600; margin: 0; }
h1 { font-size: 1.65rem; letter-spacing: -0.03em; }
h2 { font-size: 1.28rem; margin-bottom: 0.35rem; }
h3 { font-size: 0.95rem; margin: 0.9rem 0 0.35rem; }

.app { padding-bottom: 420px; }
.top, .rail, .sheet, .dock, .toolbar { border: 1px solid var(--line); }
.top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  margin: 0.6rem 0.75rem 0;
  padding: 0.65rem 0.8rem;
  background: var(--sheet);
  box-shadow: var(--shadow);
}
.eyebrow { margin: 0; color: var(--brass); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.68rem; }
.badge {
  margin: 0;
  padding: 0.55rem 0.7rem;
  background: var(--green);
  color: #f6f1e4;
  border-radius: 3px;
  line-height: 1.3;
  font-weight: 600;
}
.who-box { min-width: 220px; }
.who-box p { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.78rem; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.45rem 0.75rem;
  padding: 0.4rem 0.55rem;
  background: #e7e1d3;
}
.toast { color: var(--seal); font-weight: 600; }
button, .toolbar button, .examples button {
  border: 1px solid var(--green);
  background: var(--green);
  color: #f7f3ea;
  border-radius: 3px;
  padding: 0.32rem 0.55rem;
}
button.ghost, .examples button { background: transparent; color: var(--green); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.layout { display: grid; grid-template-columns: 230px 1fr; gap: 0.65rem; margin: 0 0.75rem; }
.layout.split-open { grid-template-columns: 210px minmax(0, 1fr) minmax(280px, 0.92fr); }
.rail { background: #e6dfd0; padding: 0.35rem; height: fit-content; position: sticky; top: 0.4rem; }
.tree-label {
  margin: 0.45rem 0.35rem 0.15rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.tree-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--ink);
  border-color: transparent;
  margin-bottom: 0.12rem;
}
.tree-btn.active { background: var(--sheet); border-color: var(--line); color: var(--green); }
.sheet { background: var(--sheet); padding: 0.85rem 0.95rem 1.1rem; box-shadow: var(--shadow); min-height: 62vh; }
.note, .warning { padding: 0.45rem 0.55rem; background: #f7f1e1; border-left: 3px solid var(--brass); margin: 0.4rem 0; }
.warning { background: var(--flag); border-left-color: var(--seal); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 0.75rem; }
label { display: flex; flex-direction: column; gap: 0.15rem; }
input, select, textarea { border: 1px solid var(--line); background: white; padding: 0.28rem 0.4rem; border-radius: 2px; }
textarea { min-height: 3.4rem; width: 100%; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin-top: 0.55rem; }
.metrics div { background: #f4f0e8; border: 1px solid var(--line); padding: 0.45rem 0.5rem; }
.metrics span { display: block; color: var(--muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.metrics strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
.table-wrap { overflow: auto; margin-top: 0.45rem; max-height: 52vh; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid var(--line); padding: 0.22rem 0.32rem; text-align: left; vertical-align: top; }
th { font-size: 0.68rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); position: sticky; top: 0; background: #f7f3ea; }
td.num, th.num { text-align: right; }
.grid-table input, .grid-table select { width: 100%; border: 1px solid transparent; background: transparent; padding: 0.12rem; }
.grid-table input:focus, .grid-table select:focus { border-color: var(--green); background: white; }
.locked-cell { color: var(--muted); }
.lead-card { display: grid; grid-template-columns: 1fr 2fr; gap: 0.7rem; align-items: center; padding-bottom: 0.5rem; border-bottom: 2px solid var(--green); }
.locker {
  border: 1px dashed var(--brass);
  padding: 0.7rem;
  background: #faf6ee;
  position: relative;
  min-height: 3.2rem;
}
.locker.hot { background: #efe4c8; }
.locker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.locker.is-locked { opacity: 0.65; cursor: not-allowed; }
.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.badge-file { display: inline-flex; gap: 0.3rem; align-items: center; border: 1px solid var(--line); padding: 0.15rem 0.35rem; background: white; }
.signoff { padding-left: 1.1rem; }
.signoff li { margin: 0.35rem 0; }
.inline-actions, .examples { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }
.file { border: 1px dashed var(--line); padding: 0.4rem; }
.drawer { margin-top: 0.7rem; border: 1px solid var(--line); padding: 0.55rem; background: #f7f3ea; }
footer { margin: 0.6rem 0.75rem; color: var(--muted); font-size: 0.78rem; }
footer p { margin: 0; }
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #12241c;
  color: #f4efe4;
  padding: 0.6rem 0.85rem 0.7rem;
  z-index: 40;
}
.dock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.35rem;
}
.dock h2 { color: #f4efe4; font-size: 0.95rem; }
.dock p { margin: 0.15rem 0; color: #d9d0c0; font-size: 0.75rem; }
.dock-context {
  margin: 0;
  padding: 0.28rem 0.55rem;
  border: 1px solid #8ea396;
  border-radius: 999px;
  background: #1c3328;
  color: #f4efe4;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.dock-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.mic-btn {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid #d4b36a;
  background: radial-gradient(circle at 32% 28%, #2a4f40 0%, #17382c 58%, #10261d 100%);
  color: #f7f3ea;
  box-shadow: 0 4px 12px rgba(8, 16, 12, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.mic-btn .mic-icon { display: block; pointer-events: none; }
.mic-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(196, 43, 43, 0.55);
  opacity: 0;
  pointer-events: none;
}
.mic-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(8, 16, 12, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.mic-btn:focus-visible {
  outline: 2px solid #d4b36a;
  outline-offset: 3px;
}
.mic-btn.listening,
.mic-btn.recording,
.mic-btn[aria-pressed="true"] {
  background: radial-gradient(circle at 32% 28%, #e25555 0%, #c42b2b 55%, #8e1c1c 100%);
  border-color: #ffd0d0;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(196, 43, 43, 0.22), 0 8px 18px rgba(140, 28, 28, 0.45);
}
.mic-btn.listening .mic-ring,
.mic-btn.recording .mic-ring,
.mic-btn[aria-pressed="true"] .mic-ring {
  animation: pulse-ring 1.4s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.72; }
  70% { transform: scale(1.28); opacity: 0.18; }
  100% { transform: scale(1.4); opacity: 0; }
}
.dock-voice {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dock-command {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.dock-command #command { flex: 1; min-width: 0; }
.dock-command #run { flex: 0 0 auto; white-space: nowrap; }
.intent-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin: 0.4rem 0 0.15rem;
  padding: 0.28rem 0.4rem;
  border: 1px solid #8ea396;
  border-radius: 8px;
  background: #0f1d17;
}
.intent-preview.ok { border-color: #c4a15a; }
.intent-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c4a15a;
  font-weight: 700;
  margin-right: 0.2rem;
}
.intent-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  background: #1c3328;
  color: #f4efe4;
  font-size: 0.78rem;
  max-width: 28rem;
}
.intent-chip em {
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #b7c4bb;
}
.conclusion-box {
  border: 1px solid var(--green);
  background: #f3f6f2;
  padding: 0.55rem 0.7rem;
  margin: 0.55rem 0;
}
.tick-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.35rem 0 0.6rem;
}
tr.break-row { background: #f8e8e4; }
tr.lead-drill { cursor: pointer; }
tr.lead-drill:hover { background: rgba(23, 56, 44, 0.06); }
tr.lead-drill:focus { outline: 2px solid var(--brass); outline-offset: -2px; }

tr.vouch-active {
  outline: 2px solid var(--green);
  outline-offset: -2px;
  background: #e7f0ea;
}
tr.drop-hot { background: #efe4c8; }
.vouch-progress {
  margin: 0.45rem 0 0.2rem;
  padding: 0.35rem 0.5rem;
  background: #e7f0ea;
  border: 1px solid #c5d4cb;
  font-weight: 600;
  color: var(--green);
}
.row-dropzone {
  min-width: 7.5rem;
  padding: 0.25rem 0.35rem;
  border: 1px dashed var(--brass);
  background: #faf6ee;
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
}
.row-dropzone.has-file { border-style: solid; color: var(--green); }
.evidence-split {
  background: var(--sheet);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0.4rem;
  max-height: calc(100vh - 8rem);
}
.evidence-split[hidden] { display: none; }
.split-head {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.split-head h2 { font-size: 1rem; }
.split-actions { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: end; }
.split-note-label { min-width: 12rem; flex: 1; }
.split-body { flex: 1; min-height: 18rem; overflow: auto; padding: 0.45rem; }
.split-frame, .split-image { width: 100%; min-height: 28rem; border: 1px solid var(--line); background: white; }
.split-image { object-fit: contain; height: 28rem; }
.split-drop {
  border: 1px dashed var(--brass);
  background: #faf6ee;
  min-height: 16rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
}
.split-drop.hot { background: #efe4c8; }
.ocr-panel { padding: 0.45rem 0.55rem 0; }
.ocr-panel[hidden] { display: none; }
.ocr-card {
  border: 1px solid var(--line);
  background: #f7f3ea;
  padding: 0.45rem 0.55rem 0.55rem;
}
.ocr-card.ok { border-color: var(--green); background: #e7f0ea; }
.ocr-card.warn { border-color: var(--brass); background: #f7f1e1; }
.ocr-card.bad { border-color: var(--seal); background: var(--flag); }
.ocr-progress {
  margin: 0.25rem 0;
  font-weight: 700;
  color: var(--green);
}
.ocr-overall { margin: 0.2rem 0 0.4rem; }
.ocr-compare { font-size: 0.78rem; }
.ocr-badge {
  display: inline-block;
  padding: 0.08rem 0.35rem;
  border-radius: 2px;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ocr-badge.ok { background: var(--green); color: #f7f3ea; }
.ocr-badge.bad { background: var(--seal); color: #f7f3ea; }
.ocr-badge.warn { background: var(--brass); color: #f7f3ea; }
.ocr-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 0.5rem;
  margin-top: 0.35rem;
}
.ocr-fallback { margin-top: 0.4rem; }
.ocr-fallback summary { cursor: pointer; color: var(--green); font-weight: 600; }
.muted { color: var(--muted); margin: 0.2rem 0 0; }
tr.completeness-row,
tr.isa510-row { background: #f8ece6; }
.isa510-panel { margin: 0.9rem 0 0.4rem; }
.sub-schedule-panel {
  margin: 1rem 0;
  padding: 0.7rem 0.75rem;
  border: 1px solid #d5ddd6;
  border-radius: 8px;
  background: #fbfcf9;
}
.suad-banner .pill { margin: 0.35rem 0; }
.hide-inactive {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  margin: 0.2rem 0;
}
.completeness-badge { white-space: nowrap; }
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.45rem 0;
}
.pager input[type="search"] {
  min-width: 14rem;
  flex: 1;
}
.pager span { color: var(--muted); font-size: 0.8rem; }
#voice-mode[aria-pressed="true"] { background: var(--brass); border-color: var(--brass); color: white; }
.command-label { position: absolute; width: 1px; height: 1px; overflow: hidden; }
#command { width: 100%; background: #fffdf8; color: var(--ink); }
.examples button, .dock .ghost { color: #f4efe4; border-color: #8ea396; }
.hearing {
  min-height: 2.15rem;
  margin: 0;
  padding: 0.38rem 0.6rem;
  border: 1px solid #3d5a4c;
  border-radius: 10px;
  background: #0f1d17;
  color: #f0d48a;
  font-size: 0.78rem;
  line-height: 1.35;
}
.dock-row:has(.mic-btn.listening) .hearing,
.dock-row:has(.mic-btn.recording) .hearing {
  border-color: #e05a5a;
  box-shadow: inset 0 0 0 1px rgba(224, 90, 90, 0.18);
}
.warn { color: var(--seal); }
.mapping-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.55rem 0; }
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--green);
  color: #f6f1e4;
  font-size: 0.78rem;
}
.pill.warn { background: var(--seal); }
.pill.quiet { background: #e8efe8; color: var(--green); }
.assertion-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.45rem 0 0.55rem;
}
.assert-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 0.08rem;
  border: 1px solid var(--green);
  border-radius: 12px;
  padding: 0.28rem 0.65rem 0.32rem;
  background: #eef4ee;
  cursor: pointer;
  min-width: 8.5rem;
}
.assert-pill.selected { background: var(--green); color: #f6f1e4; }
.assert-pill.scoped { background: #f7f3ea; border-color: var(--line); color: var(--muted); }
.assert-pill input { accent-color: var(--brass); }
.assert-pill span {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.scope-rationale { display: block; margin: 0.35rem 0 0.7rem; }
.scope-rationale input { width: 100%; }
.scoped-procs { opacity: 0.8; }
code, .code, td.code input {
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  letter-spacing: 0.01em;
}
tr.unmapped { background: #fbf3e8; }
.basis, .muted { color: var(--muted); font-size: 0.72rem; }
select.lead-select { min-width: 12.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.isa-header {
  border: 1px solid var(--green);
  background: #f3f6f2;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.7rem;
}
.isa-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem 0.7rem;
}
.isa-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.isa-grid strong { font-size: 0.86rem; }
.isa-span { grid-column: 1 / -1; }
.mod-form {
  border: 1px solid var(--seal);
  background: var(--flag);
  padding: 0.55rem 0.65rem;
  margin: 0.55rem 0;
}
.mod-log { padding-left: 1.1rem; }
.cert-footer {
  margin-top: 0.9rem;
  padding: 0.5rem 0.55rem;
  border-top: 2px solid var(--green);
  font-weight: 600;
  color: var(--green);
}
.privacy-toggle {
  border: 1px solid #8ea396;
  border-radius: 8px;
  margin: 0.45rem 0 0.2rem;
  padding: 0.45rem 0.6rem;
  color: #f4efe4;
}
.privacy-toggle legend {
  padding: 0 0.3rem;
  color: #c4a15a;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.privacy-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1rem;
  font-size: 0.8rem;
}
.privacy-toggle p { margin: 0.35rem 0 0; color: #d9d0c0; }
.voice-confirm {
  margin-top: 0.4rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid #c4a15a;
  border-radius: 8px;
  background: #1c3328;
  color: #f4efe4;
}
.voice-confirm[hidden] { display: none; }
.voice-confirm .inline-actions { margin-top: 0.35rem; }
.voice-history-drawer {
  margin-top: 0.45rem;
  max-height: min(42vh, 360px);
  overflow: auto;
  padding: 0.55rem 0.6rem;
  border: 1px solid #8ea396;
  border-radius: 8px;
  background: #0f1a15;
  color: #f4efe4;
}
.voice-history-drawer[hidden] { display: none; }
.voice-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.voice-history-head h3 { margin: 0; font-size: 0.9rem; color: #f4efe4; }
.voice-history-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.voice-history-item {
  border: 1px solid #2f4a3c;
  border-radius: 6px;
  padding: 0.45rem 0.5rem;
  background: #14241c;
}
.voice-history-item.reverted { opacity: 0.82; border-style: dashed; }
.voice-history-item .quote { font-style: italic; color: #d9d0c0; font-size: 0.78rem; }
.voice-history-item p { margin: 0.2rem 0; font-size: 0.8rem; }
.dock-command #btn-voice-history { flex: 0 0 auto; white-space: nowrap; font-size: 0.75rem; }
.offline-speech-panel {
  margin-top: 0.45rem;
  display: grid;
  gap: 0.35rem;
  padding: 0.45rem 0.5rem;
  border: 1px dashed #c4a15a;
  border-radius: 6px;
  background: #14241c;
}
.offline-speech-panel[hidden] { display: none; }
.offline-speech-panel textarea {
  width: 100%;
  min-height: 2.6rem;
  resize: vertical;
  background: #0f1a15;
  color: #f4efe4;
  border: 1px solid #3d5a4a;
  border-radius: 4px;
  padding: 0.35rem 0.45rem;
}
.fieldwork-grid th { white-space: nowrap; }
.evidence-badge {
  display: inline-block;
  margin-right: 0.25rem;
  padding: 0.05rem 0.3rem;
  border-radius: 2px;
  background: var(--green);
  color: #f7f3ea;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.row-dropzone:not(.has-file) .evidence-badge { background: var(--muted); }
.lead-drill { cursor: pointer; }
.lead-drill:hover { background: #efe8d8; }
.fieldwork-copilot, .asset-drawer {
  border-left: 3px solid var(--brass);
  background: #faf7f0;
}
.asset-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.4rem 0.55rem;
  margin: 0.4rem 0;
}
.asset-form label, .grow { display: grid; gap: 0.15rem; }
.split-image-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.split-image-stage {
  overflow: auto;
  background: #1a1a1a;
  border: 1px solid var(--line);
  min-height: 18rem;
  display: grid;
  place-items: center;
}
.split-image-stage .split-image {
  width: auto;
  max-width: none;
  min-height: 0;
  height: auto;
  transition: transform 0.15s ease;
  transform-origin: center center;
}
.examples.compact { margin-top: 0.35rem; }
.examples.compact button { font-size: 0.72rem; }
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(16, 24, 20, 0.72);
}
.login-gate[hidden] { display: none; }
.unsaved-badge {
  background: var(--seal);
  color: #fff;
  border-color: var(--seal);
  font-weight: 700;
}
.unsaved-badge[hidden] { display: none; }
.popia-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
}
.popia-toggle input[type="password"] { max-width: 9rem; }
.demo-presets { display: grid; gap: 0.4rem; margin-top: 0.35rem; }
.demo-presets button { text-align: left; }
.login-card {
  width: min(32rem, calc(100vw - 2rem));
  display: grid;
  gap: 0.55rem;
  padding: 1.1rem 1.2rem;
  background: var(--sheet);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.login-card h2 { margin-bottom: 0.15rem; }
.progress-bar {
  display: block;
  min-width: 12rem;
  font-weight: 600;
  color: var(--green);
}
.whisper-progress {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.45rem;
}
.whisper-progress[hidden] { display: none; }
.whisper-progress-track {
  flex: 1;
  height: 0.7rem;
  background: #e7e1d6;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.whisper-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--green);
}
.whisper-progress-label { min-width: 3rem; font-weight: 700; color: var(--green); }
.firm-stamp {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid var(--green);
}
.firm-logo { max-height: 48px; max-width: 160px; object-fit: contain; }
.firm-stamp strong { display: block; font-size: 1.05rem; }
.firm-stamp span { color: var(--muted); }
.tie-out-bar {
  margin: 0 0.75rem 0.45rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--sheet);
}
.tie-out-bar .tie-out-badge {
  display: inline-block;
  margin: 0 0.55rem 0.2rem 0;
  padding: 0.18rem 0.45rem;
  font-weight: 700;
  border-radius: 3px;
}
.tie-out-bar.ok { background: #1f7a43; color: #f4fff6; border-color: #145c32; }
.tie-out-bar.ok .tie-out-badge { background: #f4fff6; color: #145c32; }
.tie-out-bar.alert { background: #9f1d1d; color: #fff6f5; border-color: #6d1210; }
.tie-out-bar.alert .tie-out-badge { background: #fff6f5; color: #9f1d1d; }
.tie-out-bar ul { margin: 0.35rem 0 0; padding-left: 1.15rem; }
.tb-preview-tools { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.45rem 0; }
#backup-link-status { color: var(--muted); font-size: 0.78rem; }
body.locked .app,
body.locked .command-bar { pointer-events: none; filter: grayscale(0.15); }
@media (max-width: 900px) {
  .top, .layout, .layout.split-open, .grid, .metrics, .lead-card, .isa-grid { grid-template-columns: 1fr; }
  .dock-row { align-items: flex-start; }
  .dock-command { flex-wrap: wrap; }
  .app { padding-bottom: 520px; }
  .rail { position: static; }
  .evidence-split { position: static; max-height: none; }
}
@media print {
  .top, .toolbar, .rail, .dock, footer, .inline-actions, .evidence-split { display: none !important; }
  .app { padding: 0; }
  .sheet { box-shadow: none; border: 0; min-height: 0; }
  .table-wrap { max-height: none; overflow: visible; }
}
