/* Workspace task detail, task index, and legacy deliverable surface styles. */
/* Task/deliverable workspace surfaces: relocated from app.css as measured CSS debt reduction. */
/* ------------- Tables ------------- */
table.tasks, table.facts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.facts-table { table-layout: auto; }
table.facts-table td.value-cell {
  word-break: normal;
  overflow-wrap: break-word;
  white-space: normal;
  font: 12.5px/1.5 Georgia, serif;
  color: var(--navy-deep);
  max-width: 360px;
}
table.facts-table td.value { white-space: nowrap; }
table.tasks th, table.tasks td,
table.facts-table th, table.facts-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #ECECEC;
  vertical-align: top;
}
table.tasks th, table.facts-table th {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  color: var(--slate);
  font-weight: 600;
  border-bottom: 2px solid var(--orange);
}
table.facts-table tbody tr { cursor: pointer; transition: background 0.15s; }
table.facts-table tbody tr:hover { background: rgba(208,74,2,0.05); }
table.facts-table tbody tr.selected { background: rgba(208,74,2,0.12); }
.concept { font-weight: 500; color: var(--navy-deep); }
.conf { font-size: 11px; margin-top: 2px; }
td.value { text-align: right; white-space: nowrap; font-family: "SF Mono", Menlo, monospace; font-weight: 600; color: var(--navy-deep); }

/* ------------- Tags / status ------------- */
.tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--slate);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border-radius: 11px;
  margin-right: 4px;
}
.tag-derivatives { background: #FFE3CC; color: #B33F00; border-color: #F4B183; }
.tag-debt { background: #DCEEF2; color: #0B5C66; border-color: #B6D7DC; }
.tag-auditor_report { background: #E6E6F4; color: #4338CA; border-color: #C8C8E0; }
.tag-liquidity_securities { background: #DCFAE6; color: #166534; border-color: #B6E0C0; }
.tag-fair_value_hierarchy { background: #FFF2CC; color: #8A6D00; border-color: #ECD89B; }
.tag-credit_losses { background: #FCE7E7; color: #B91C1C; border-color: #EFC0C0; }
.tag-hedge_accounting { background: #E0EAFA; color: #1E3A8A; border-color: #C1D4F4; }

.status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 11px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 600;
}
.status-queued { background: #E8E8E8; color: #475569; }
.status-resolving_issuer, .status-fetching_source, .status-parsing, .status-extracting {
  background: #FFF3E0; color: #B33F00;
}
.status-complete { background: #D4EDDA; color: #166534; }
.status-failed { background: #FEE2E2; color: var(--red); }
.status-large { padding: 6px 14px; font-size: 12px; }
.state {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 9px;
  background: #DCFAE6;
  color: #166534;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ------------- Page header / task header ------------- */
.page-header { margin-bottom: 22px; }
.page-header h1 { font: 600 26px Georgia, serif; color: var(--navy-deep); margin: 0 0 6px 0; }

.task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 22px 26px;
  margin-bottom: 18px;
  gap: 20px;
}
.task-header h1 { font: 600 24px Georgia, serif; color: var(--navy-deep); margin: 0 0 6px 0; }
.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--slate);
}
.task-meta li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.task-meta li + li::before {
  content: "·";
  color: var(--slate-light);
  flex: 0 0 auto;
}
.task-header-status { text-align: right; }
.status-message { font-size: 12px; margin-top: 6px; max-width: 360px; }

/* ------------- Task pipeline (live AI progress) ------------- */
.task-pipeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-bottom: 18px;
  background: white;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 14px 18px;
}
.task-pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 12px;
  position: relative;
  opacity: 0.45;
  transition: all 0.25s;
}
.task-pipeline-step + .task-pipeline-step::before {
  content: "→";
  position: absolute;
  left: -8px;
  top: 14px;
  color: var(--slate-light);
  font-size: 14px;
  font-weight: 700;
}
.task-pipeline-step-num {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--rule);
  align-items: center;
  justify-content: center;
  font: 700 11px Georgia, serif;
  color: var(--slate);
  margin-bottom: 6px;
}
.task-pipeline-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
}
.task-pipeline-step-sub {
  font-size: 10.5px;
  color: var(--slate-light);
  margin-top: 2px;
}
.task-pipeline-step.active { opacity: 1; }
.task-pipeline-step.active .task-pipeline-step-num {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
  animation: pulseOrange 1.2s ease-in-out infinite;
}
.task-pipeline-step.active .task-pipeline-step-label { color: var(--navy-deep); }
.task-pipeline-step.done { opacity: 1; }
.task-pipeline-step.done .task-pipeline-step-num {
  background: #D4EDDA;
  border-color: #B6E0C0;
  color: #166534;
}
.task-pipeline-step.done .task-pipeline-step-label { color: var(--navy-deep); }
@keyframes pulseOrange {
  0%, 100% { box-shadow: 0 0 0 0 rgba(208,74,2,0.45); }
  50% { box-shadow: 0 0 0 6px rgba(208,74,2,0); }
}

/* ------------- Deliverable bar ------------- */
.deliverable-bar {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 12px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.deliverable-bar-label {
  font-size: 10.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--slate);
  margin-right: 12px;
}
.deliverable-bar-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ------------- Tabs ------------- */
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 2px solid var(--rule);
  margin-bottom: 18px;
}
.tab {
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--slate);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
}
.tab:hover { color: var(--navy-deep); text-decoration: none; }
.tab.active {
  color: var(--navy-deep);
  border-bottom-color: var(--orange);
}
.tabs-actions { margin-left: auto; padding-bottom: 6px; }

.tab-pane { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ------------- Source pane ------------- */
.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: flex-start;
}
.grid-two > * { min-width: 0; }
.source-pane h3 { margin-bottom: 10px; }
.source-meta {
  background: var(--paper);
  border-left: 3px solid var(--orange);
  padding: 12px 14px;
  border-radius: 0 4px 4px 0;
  font-size: 12.5px;
  color: var(--slate);
  margin-bottom: 14px;
}
.source-meta strong { color: var(--navy-deep); }
.source-meta code { background: #ECECEC; padding: 1px 6px; border-radius: 3px; color: #555; }
.source-meta .micro { font-size: 10px; margin-top: 6px; letter-spacing: 1px; text-transform: uppercase; }
.source-excerpt {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 16px 18px;
  border-radius: 4px;
  font: 13px/1.65 Georgia, serif;
  color: var(--navy-deep);
  max-height: 420px;
  overflow-y: auto;
  white-space: normal;
}
.source-excerpt mark {
  background: #FFE0B2;
  color: var(--navy-deep);
  padding: 0 3px;
  border-radius: 2px;
  font-weight: 500;
}
.source-footer {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #ECECEC;
  font-size: 11.5px;
  line-height: 1.7;
}

/* ------------- References panel (applicability) ------------- */
.references-panel {
  margin-top: 14px;
  padding: 12px 14px;
  background: #F8F9FC;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.references-title {
  font: 600 10px -apple-system, sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--slate);
  margin-bottom: 10px;
}
.ref-row { padding: 8px 0; border-bottom: 1px dotted #E0E0E0; }
.ref-row:last-child { border-bottom: none; }
.ref-row-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 3px;
}
.ref-title { font-weight: 600; color: var(--navy-deep); font-size: 12.5px; }
.ref-pref { font-size: 10.5px; font-family: "SF Mono", Menlo, monospace; }
.ref-summary { font-size: 11.5px; line-height: 1.5; margin: 2px 0 4px 0; }
.ref-meta { display: flex; gap: 10px; font-size: 10px; flex-wrap: wrap; align-items: center; }
.ref-level {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
}
.ref-level-binding_standard { background: #E0EAFA; color: #1E3A8A; }
.ref-level-reporting_taxonomy { background: #DCEEF2; color: #0B5C66; }
.ref-level-staff_guidance { background: #FFF2CC; color: #8A6D00; }
.ref-level-firm_methodology { background: #E6E6F4; color: #4338CA; }
.ref-level-practice_corpus { background: #F1F1F1; color: var(--slate); }
.ref-level-internal_product_schema { background: var(--paper); color: var(--slate); }
.ref-license {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}
.ref-license-public_authoritative { background: #D4EDDA; color: #166534; }
.ref-license-licensed_required { background: #FCE7E7; color: #B91C1C; }
.ref-license-staff_publication { background: #FFF2CC; color: #8A6D00; }
.ref-license-taxonomy_concept { background: #DCEEF2; color: #0B5C66; }
.ref-license-uncertain { background: #F1F1F1; color: var(--slate); }
.ref-relation {
  font-size: 9.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--slate);
}

/* ------------- Reviewer actions ------------- */
.rv-btn {
  background: white;
  color: var(--navy-deep);
  border: 1px solid var(--rule);
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.6px;
  border-radius: 4px;
  text-transform: none;
  cursor: pointer;
  transition: all 0.15s;
}
.rv-btn:hover { background: var(--paper); }
.rv-accept:hover { background: #D4EDDA; color: #166534; border-color: #B6E0C0; }
.rv-override:hover { background: #FFF2CC; color: #8A6D00; border-color: #ECD89B; }
.rv-reject:hover { background: #FCE7E7; color: #B91C1C; border-color: #EFC0C0; }
.history-row {
  padding: 4px 0;
  font-size: 11.5px;
  border-top: 1px dashed #E0E0E0;
}
.history-row:first-of-type { border-top: none; }
.history-action {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 8px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  margin-right: 6px;
}
.history-accept { background: #D4EDDA; color: #166534; }
.history-override { background: #FFF2CC; color: #8A6D00; }
.history-reject { background: #FCE7E7; color: #B91C1C; }
.history-meta { color: var(--slate-light); font-size: 10.5px; }
.history-reason { margin-top: 2px; font-style: italic; }

/* ------------- Task stats bar ------------- */
.task-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.stat-tile {
  background: white;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--orange);
  padding: 12px 14px;
  border-radius: 4px;
}
.stat-tile .label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 600;
  margin-bottom: 4px;
}
.stat-tile .value {
  font: 600 22px Georgia, serif;
  color: var(--navy-deep);
}
.stat-tile .sub { font-size: 11px; color: var(--slate-light); margin-top: 2px; }

/* ------------- Hierarchy block ------------- */
.hierarchy {
  font: 12px/1.6 "SF Mono", Menlo, monospace;
  background: var(--paper);
  border-left: 3px solid var(--orange);
  padding: 14px 18px;
  border-radius: 0 4px 4px 0;
  color: var(--navy-deep);
}
.rules { padding-left: 22px; line-height: 1.7; font-size: 13px; }
.rules li { margin-bottom: 4px; }

/* ------------- Diagnostics tab ------------- */
.tab-count {
  display: inline-block;
  font-size: 9.5px;
  margin-left: 4px;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 1px;
}

/* ------------- Interactive checklist ------------- */
.checklist-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.checklist-progress {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
}
.small { font-size: 12px; }

.checklist-live { margin-top: 14px; display: grid; gap: 16px; }

.cl-row {
  display: grid;
  grid-template-columns: 28px 1fr 30px;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #ECECEC;
  align-items: flex-start;
  transition: opacity 0.2s;
}
.cl-row:last-child { border-bottom: none; }
.cl-row.checked { opacity: 0.55; }
.cl-row.checked .cl-text { text-decoration: line-through; color: var(--slate); }

.cl-box { position: relative; cursor: pointer; padding-top: 1px; }
.cl-box input { position: absolute; opacity: 0; pointer-events: none; }
.cl-box-tick {
  display: block;
  width: 22px;
  height: 22px;
  border: 2px solid var(--rule);
  border-radius: 5px;
  background: white;
  position: relative;
  transition: all 0.15s;
}
.cl-box:hover .cl-box-tick { border-color: var(--orange); }
.cl-box input:checked + .cl-box-tick {
  background: var(--orange);
  border-color: var(--orange);
}
.cl-box input:checked + .cl-box-tick::after {
  content: "";
  position: absolute;
  left: 6px; top: 2px;
  width: 6px; height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cl-text { font-size: 14px; color: var(--navy-deep); line-height: 1.45; }
.cl-note { font-size: 12px; margin-top: 4px; line-height: 1.5; }
.cl-meta { font-size: 11px; margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.cl-cat { font-size: 9.5px; }
.tag-source { background: #E0EAFA; color: #1E3A8A; border-color: #C1D4F4; }
.tag-scope { background: #FFE3CC; color: #B33F00; border-color: #F4B183; }
.tag-review { background: #DCFAE6; color: #166534; border-color: #B6E0C0; }
.tag-specific { background: #FFF2CC; color: #8A6D00; border-color: #ECD89B; }
.tag-custom { background: var(--paper); color: var(--slate); border-color: var(--rule); }

.cl-del {
  background: none;
  border: none;
  color: var(--slate-light);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  transition: all 0.15s;
}
.cl-del:hover { color: var(--red); background: #FCE7E7; }

.checklist-add {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.checklist-add input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  font-size: 13.5px;
  color: var(--navy-deep);
  outline: none;
}
.checklist-add input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(208,74,2,0.10);
}
.checklist-add button {
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: 1.2px;
  background: var(--navy-deep);
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 5px;
  border: none;
  color: white;
  cursor: pointer;
}
.checklist-add button:hover { background: var(--orange); }

/* ------------- Breadcrumb + view header ------------- */
.breadcrumb {
  font-size: 12px;
  color: var(--slate-light);
  margin-bottom: 14px;
  letter-spacing: 0.3px;
}
.breadcrumb a,
.breadcrumb [data-primitive="action_trigger"] {
  color: var(--slate);
  text-decoration: none;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: none;
}
.breadcrumb a:hover,
.breadcrumb [data-primitive="action_trigger"]:hover { color: var(--orange); }
.breadcrumb span { margin: 0 6px; }
.breadcrumb .current { color: var(--navy-deep); font-weight: 600; }

.view-header {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 22px;
}
.view-header-main { display: flex; align-items: center; gap: 16px; }
.view-icon {
  font-size: 32px;
  width: 56px;
  height: 56px;
  background: var(--paper);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.view-header h1 {
  font: 600 22px Georgia, serif;
  color: var(--navy-deep);
  margin: 0 0 4px 0;
}
.view-meta { font-size: 13px; color: var(--slate); }
.view-meta code { font-size: 11px; background: var(--paper); padding: 1px 6px; border-radius: 3px; }
.view-actions { display: flex; gap: 10px; }

/* ------------- Deck view ------------- */
.deck-stage {
  display: grid;
  gap: 22px;
  margin-bottom: 28px;
}
.slide {
  background: white;
  border-radius: 10px;
  padding: 36px 44px;
  box-shadow: 0 4px 16px rgba(8,26,46,0.06);
  border: 1px solid var(--rule);
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.slide::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  background: var(--orange);
}
.slide-cover {
  background: var(--navy-deep);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 70px;
}
.slide-cover::before { width: 6px; height: 100%; background: var(--orange); }
.slide-cover-mark {
  font: 700 italic 40px Georgia, serif;
  color: var(--orange);
  margin-bottom: 4px;
}
.slide-cover-kicker {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--orange-light);
  margin: 24px 0 14px 0;
  font-weight: 700;
}
.slide-cover-title {
  font: 700 44px Georgia, serif;
  color: white;
  margin: 0 0 18px 0;
  letter-spacing: -0.5px;
}
.slide-cover-sub {
  font-size: 16px;
  color: #CADCFC;
  font-style: italic;
  line-height: 1.6;
}
.slide-cover-foot {
  margin-top: auto;
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--orange);
  text-transform: uppercase;
  font-weight: 700;
}
.slide-eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 700;
  margin-bottom: 8px;
}
.slide-title {
  font: 700 28px Georgia, serif;
  color: var(--navy-deep);
  margin: 0 0 8px 0;
}
.slide-sub {
  font-size: 13px;
  color: var(--slate);
  margin: 0 0 22px 0;
  font-style: italic;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.stat-tile-dark {
  background: var(--navy-deep);
  color: white;
  padding: 18px;
  border-radius: 6px;
  border-top: 4px solid var(--orange);
}
.stat-tile-dark .stat-tile-label {
  font-size: 9px;
  letter-spacing: 2.5px;
  color: var(--orange-light);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}
.stat-tile-dark .stat-tile-value {
  font: 700 26px Georgia, serif;
  color: white;
  line-height: 1.1;
}
.stat-tile-dark .stat-tile-unit {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
  font-style: italic;
}
.claim-register {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 12px 18px;
}
.claim-register-title {
  font-size: 9.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 8px;
}
.claim-register-table { width: 100%; font-size: 11.5px; border-collapse: collapse; }
.claim-register-table th, .claim-register-table td {
  padding: 5px 8px;
  text-align: left;
  border-bottom: 1px dotted #ECECEC;
}
.claim-register-table th {
  font-size: 9px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--slate);
  border-bottom: 1.5px solid var(--orange);
}
.claim-register-table .value { text-align: right; }
.claim-register-table .value-text { font-family: "SF Mono", Menlo, monospace; font-weight: 600; color: var(--navy-deep); }
.empty-section {
  background: var(--paper);
  border: 2px dashed var(--rule);
  border-radius: 6px;
  padding: 36px;
  text-align: center;
}
.empty-mark {
  font: 700 14px Georgia, serif;
  color: var(--orange);
  letter-spacing: 3px;
  margin-bottom: 8px;
}
.empty-text { font-size: 13px; color: var(--slate); font-style: italic; max-width: 480px; margin: 0 auto; }
.slide-provenance .span-2 { grid-column: span 2; }
.slide-provenance .mono { font-family: "SF Mono", Menlo, monospace; font-size: 11px; }

/* ------------- Memo view ------------- */
.memo {
  background: white;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 56px 72px;
  max-width: 820px;
  margin: 0 auto 28px;
  font: 14.5px/1.7 Georgia, serif;
  color: var(--navy-deep);
}
.memo-disclaimer {
  font: italic 11.5px/1.6 -apple-system, sans-serif;
  color: var(--slate-light);
  background: var(--paper);
  border-left: 3px solid var(--orange);
  padding: 12px 16px;
  margin-bottom: 32px;
  border-radius: 0 4px 4px 0;
}
.memo-section { margin-bottom: 32px; }
.memo-section-title {
  font: 700 22px Georgia, serif;
  color: var(--navy-deep);
  margin: 0 0 4px 0;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 6px;
}
.memo-section-sub {
  font-size: 12.5px;
  color: var(--slate);
  margin: 6px 0 18px 0;
  font-style: italic;
}
.memo-list dt {
  font-weight: 700;
  color: var(--navy-deep);
  margin-top: 10px;
}
.memo-list dd {
  margin: 2px 0 6px 0;
  padding-left: 0;
  color: var(--navy-deep);
}
.memo-value { font-weight: 700; font-family: "SF Mono", Menlo, monospace; }
/* Narrative facts (CAM/KAM rationale, opinion type prose, etc.) inherit
   the memo body's Georgia serif so a sentence of disclosure reads as
   prose — not as a wall of monospaced characters posing as a value. */
.memo-narrative {
  display: block;
  font: italic 14px/1.55 Georgia, serif;
  color: var(--navy-deep);
  margin: 4px 0 4px 0;
  padding: 6px 10px 6px 14px;
  border-left: 3px solid var(--paper-2, #e6e6e6);
  background: rgba(0,0,0,0.012);
  border-radius: 0 4px 4px 0;
}
.memo-unit { color: var(--slate); }
.memo-period { color: var(--slate-light); font-size: 12px; font-style: italic; }
.memo-fn { color: var(--orange); font-size: 9px; vertical-align: super; }
.memo-fn a { text-decoration: none; color: var(--orange); }
.memo-footnotes, .memo-source {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
}
.memo-footnotes h3, .memo-source h3 {
  font: 600 12px -apple-system, sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--slate);
  margin: 0 0 10px 0;
}
.memo-fn-row { font-size: 11px; color: var(--slate); margin: 4px 0; }
.fn-marker { color: var(--orange); font-weight: 700; margin-right: 6px; }

/* ------------- Sheet view ------------- */
.sheet-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 22px 26px;
}
.sheet-stat .label {
  font-size: 9.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 700;
  margin-bottom: 6px;
}
.sheet-stat .value {
  font: 700 24px Georgia, serif;
  color: var(--navy-deep);
}
.sheet-stat .value.mono { font-family: "SF Mono", Menlo, monospace; font-size: 14px; }
.sheet-section { padding: 22px 28px; }
.sheet-section-head { margin-bottom: 14px; }
.sheet-section-head h3 { margin: 0; }
.sheet-section .small { font-size: 12px; margin-top: 2px; }
.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sheet-table th, .sheet-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid #F0F0F0;
  vertical-align: top;
}
.sheet-table th {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 700;
  border-bottom: 2px solid var(--orange);
}
.sheet-table .num { text-align: right; }
.sheet-table .value { font-family: "SF Mono", Menlo, monospace; font-weight: 600; color: var(--navy-deep); }
.sheet-table .source-cell .anchor {
  font-size: 10px;
  background: var(--paper);
  padding: 1px 4px;
  border-radius: 2px;
  color: var(--slate);
}
.empty-sheet-row {
  font-size: 12px;
  color: var(--slate-light);
  padding: 16px;
  text-align: center;
  background: var(--paper);
  border-radius: 4px;
  font-style: italic;
}
.empty-sheet-row em { color: var(--orange); font-style: normal; letter-spacing: 1.5px; font-weight: 700; font-size: 10px; }

/* ------------- Checklist view ------------- */
.checklist-stage { display: grid; gap: 18px; margin-bottom: 28px; }
.checklist-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
}
.checklist-overall { display: flex; align-items: baseline; gap: 12px; }
.overall-pct {
  font: 700 44px Georgia, serif;
  color: var(--orange);
}
.overall-text {
  font-size: 14px;
  color: var(--slate);
}
.checklist-meta {
  display: flex;
  gap: 22px;
  font-size: 12px;
  color: var(--slate);
}
.checklist-meta strong { color: var(--navy-deep); }
.checklist-meta code { font-size: 11px; }

.checklist-layer-card { padding: 22px 28px; }
.layer-title {
  font: 600 11px -apple-system, sans-serif;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 12px 0;
}
.checklist-big { list-style: none; margin: 0; padding: 0; }
.checklist-big li {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #F2F2F2;
  align-items: flex-start;
}
.checklist-big li:last-child { border-bottom: none; }
.check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1.5px solid var(--rule);
  font: 700 12px -apple-system, sans-serif;
  flex-shrink: 0;
  margin-top: 1px;
}
.checklist-big li.done .check-box {
  background: #D4EDDA;
  border-color: #B6E0C0;
  color: #166534;
}
.check-text { font-size: 13.5px; color: var(--navy-deep); }
.check-note { font-size: 11.5px; margin-top: 2px; }
.checklist-disclaimer {
  text-align: center;
  font-size: 11.5px;
  font-style: italic;
  margin-top: 12px;
}

#rm-observation {
  width: 100%;
  min-height: 140px;
  font: 14px/1.6 Georgia, serif;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--navy-deep);
  outline: none;
  resize: vertical;
}
#rm-observation:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(208,74,2,0.10);
}
#rm-observation:disabled { background: var(--paper); color: var(--slate); }

/* ============================================================
   Issue-oriented spine (deck) — reviewer feedback 2026-05-20
   ============================================================ */
.slide-issue-overview {
  background: linear-gradient(180deg, #FFF8F2 0%, white 70%);
}
.issue-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.issue-overview-card {
  background: white;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--orange);
  border-radius: 6px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
}
.issue-overview-card:hover { border-color: var(--orange); }
.issue-overview-title { font: 600 14px Georgia, serif; color: var(--navy-deep); }
.issue-overview-stats {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--slate);
}

.slide-issue { background: white; }
.issue-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}
@media (max-width: 1000px) {
  .issue-grid { grid-template-columns: 1fr 1fr; }
}
.issue-cell {
  background: #FBFCFD;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 12px;
}
.issue-cell-wide { grid-column: span 3; }
@media (max-width: 1000px) { .issue-cell-wide { grid-column: span 2; } }
.issue-cell-head {
  font: 600 10.5px -apple-system, sans-serif;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.issue-cell-list { margin: 0; padding-left: 16px; font-size: 12px; }
.issue-cell-list li { padding: 2px 0; color: var(--navy-deep); }
.issue-cell-list-small li { font-size: 11.5px; line-height: 1.4; }
.issue-cell-state {
  display: inline-block;
  font-size: 9.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 8px;
  background: #F1F5F9;
  color: var(--slate);
  margin-left: 6px;
}
.issue-cell-state-reviewer-accepted { background: #DCFCE7; color: var(--green); }
.issue-cell-state-overridden { background: #FEF3C7; color: #8A6D00; }
.issue-cell-state-rejected { background: #FEE2E2; color: var(--red); }
.issue-framework { font-size: 12px; margin-bottom: 6px; }
.issue-pitfalls {
  margin-top: 10px;
  padding: 8px 10px;
  background: #FFF8E0;
  border-left: 2px solid #D4A91A;
  border-radius: 0 4px 4px 0;
  font-size: 11.5px;
}
.issue-pitfalls-head { font-weight: 600; color: var(--slate); margin-bottom: 4px; }
.issue-pcaob-refs { margin-top: 6px; }

/* ============================================================
   Mobile collapse for rigid tile / stat grids
   ============================================================
   Several pages declare `grid-template-columns: repeat(N, 1fr)`
   with no responsive collapse. At 375px width, a 6-col grid gives
   each cell ~50px, a 4-col grid gives ~80px — unreadable. Each
   tile/stat grid below stacks to a single column at ≤720px.
   Surface-specific tile grids move with their canonical stylesheet. */
@media (max-width: 720px) {
  .task-header {
    flex-direction: column;
    padding: 18px;
  }
  .task-header-status {
    text-align: left;
    width: 100%;
  }
  .task-meta {
    align-items: flex-start;
    gap: 5px 0;
  }
  .task-meta li {
    flex-basis: 100%;
  }
  .task-meta li + li::before {
    content: none;
  }
  .task-pipeline {
    gap: 0;
    padding: 8px 14px;
  }
  .task-pipeline-step {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    column-gap: 10px;
    align-items: start;
    padding: 12px 0;
    opacity: 1;
    border-bottom: 1px solid var(--rule);
  }
  .task-pipeline-step:last-child {
    border-bottom: none;
  }
  .task-pipeline-step + .task-pipeline-step::before {
    content: none;
  }
  .task-pipeline-step-num {
    grid-row: span 2;
    margin: 0;
  }
  .task-pipeline-step-label,
  .task-pipeline-step-sub {
    min-width: 0;
  }
  .deliverables,
  .task-pipeline,
  .task-stats,
  .sheet-stats {
    grid-template-columns: 1fr !important;
  }
}
