/* ============================================================
   Prism AI — Editorial Component Layer
   ------------------------------------------------------------
   ALL rules scoped to `body.prism-themed` — INERT until opt-in.
   Component classes match the dashboard's existing naming
   (`.card`, `.btn`, `.kpi`, `.badge`, `nav`, `table`...) so
   T-032 can flip pages by adding the prism-themed class and
   removing the duplicated embedded rules.
   ============================================================ */

/* ---------- Layout shell ---------- */
body.prism-themed .shell {
  display: flex;
  min-height: 100vh;
}

body.prism-themed main {
  flex: 1;
  padding: var(--space-5) var(--space-6);
  min-width: 0;
  overflow: hidden;
}

/* ---------- Side nav ---------- */
body.prism-themed nav {
  width: 220px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  padding: var(--space-3) 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--shell) 0%, var(--frame) 100%);
  border-right: 1px solid var(--border);
}

body.prism-themed nav .logo {
  padding: 0 var(--space-5) var(--space-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

body.prism-themed nav .logo img {
  height: 32px;
  width: auto;
}

body.prism-themed nav .logo h1 {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--white);
  letter-spacing: 0.01em;
}

body.prism-themed nav .logo span {
  font-size: 10px;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--sky);
  font-weight: var(--weight-medium);
}

body.prism-themed nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 5px var(--space-5);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition:
    color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    border-left-color var(--dur-fast) var(--ease-out);
}

body.prism-themed nav a:hover {
  color: var(--white);
  background: rgba(189, 201, 221, 0.04);
}

body.prism-themed nav a.active {
  color: var(--white);
  border-left-color: var(--gold);
  background: linear-gradient(
    90deg,
    rgba(200, 164, 90, 0.10) 0%,
    rgba(58, 89, 152, 0.06) 60%,
    transparent 100%
  );
}

body.prism-themed nav .nav-section {
  font-size: 10px;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-dim);
  padding: var(--space-3) var(--space-5) 2px;
  margin-top: 2px;
}

/* "More" group — collapsible nav section using <details>. */
body.prism-themed nav details.nav-more { display: block; }
body.prism-themed nav details.nav-more > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
body.prism-themed nav details.nav-more > summary::-webkit-details-marker { display: none; }
body.prism-themed nav details.nav-more .nav-more-chevron {
  display: inline-block;
  font-size: 9px;
  transition: transform var(--dur-fast) var(--ease-out);
  color: var(--text-dim);
}
body.prism-themed nav details.nav-more[open] .nav-more-chevron {
  transform: rotate(90deg);
}

/* End of Day collapsible on Daily Agenda */
body.prism-themed details#agenda-end-of-day > summary {
  list-style: none;
  cursor: pointer;
}
body.prism-themed details#agenda-end-of-day > summary::-webkit-details-marker { display: none; }
body.prism-themed details#agenda-end-of-day .eod-chevron {
  display: inline-block;
  transition: transform var(--dur-fast) var(--ease-out);
}
body.prism-themed details#agenda-end-of-day[open] .eod-chevron { transform: rotate(90deg); }

body.prism-themed main { margin-left: 220px; }

/* ---------- Cards ---------- */
body.prism-themed .card {
  background: var(--shell);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--elev-1);
  transition:
    transform var(--dur-normal) var(--ease-out),
    background var(--dur-normal) var(--ease-out),
    box-shadow var(--dur-normal) var(--ease-out),
    border-color var(--dur-normal) var(--ease-out);
}

body.prism-themed .card.interactive:hover,
body.prism-themed a.card:hover,
body.prism-themed button.card:hover {
  background: var(--shell-elevated);
  transform: translateY(-2px);
  box-shadow: var(--elev-2);
  border-color: var(--border-strong);
}

/* ---------- KPI tiles ---------- */
body.prism-themed .kpi {
  position: relative;
  background: var(--shell);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  overflow: hidden;
  transition:
    transform var(--dur-normal) var(--ease-out),
    box-shadow var(--dur-normal) var(--ease-out),
    border-color var(--dur-normal) var(--ease-out);
}

body.prism-themed .kpi::after {
  content: '';
  position: absolute;
  left: var(--space-5);
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--grad-chrome);
  transition: width var(--dur-normal) var(--ease-out);
}

body.prism-themed .kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--elev-2);
  border-color: var(--border-strong);
}

body.prism-themed .kpi:hover::after { width: calc(100% - var(--space-7)); }

body.prism-themed .kpi .kpi-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

body.prism-themed .kpi .kpi-value {
  font-size: var(--text-kpi);
  font-weight: var(--weight-bold);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

body.prism-themed .kpi .kpi-delta {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}

body.prism-themed .kpi .kpi-delta.up    { color: var(--success); }
body.prism-themed .kpi .kpi-delta.down  { color: var(--danger); }
body.prism-themed .kpi .kpi-delta.flat  { color: var(--text-dim); }

/* ---------- Buttons ---------- */
body.prism-themed .btn,
body.prism-themed button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out);
}

body.prism-themed .btn-primary {
  background: var(--grad-chrome);
  color: var(--navy);
}
body.prism-themed .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(200, 164, 90, 0.35);
}

body.prism-themed .btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--sky);
}
body.prism-themed .btn-secondary:hover {
  border-color: var(--gold);
  color: var(--white);
  background: rgba(200, 164, 90, 0.08);
}

body.prism-themed .btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
body.prism-themed .btn-ghost:hover {
  color: var(--white);
  background: rgba(189, 201, 221, 0.06);
}

body.prism-themed .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------- Badges ---------- */
body.prism-themed .badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 3px var(--space-2);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  line-height: 1.4;
}

body.prism-themed .badge-success,
body.prism-themed .badge-completed,
body.prism-themed .badge-active {
  background: rgba(79, 180, 138, 0.14);
  color: #6FCFA3;
  border-color: rgba(79, 180, 138, 0.30);
}
body.prism-themed .badge-warning,
body.prism-themed .badge-pending,
body.prism-themed .badge-in_progress {
  background: rgba(200, 164, 90, 0.14);
  color: var(--gold);
  border-color: rgba(200, 164, 90, 0.32);
}
body.prism-themed .badge-danger,
body.prism-themed .badge-overdue,
body.prism-themed .badge-blocked {
  background: rgba(217, 106, 106, 0.14);
  color: #E58B8B;
  border-color: rgba(217, 106, 106, 0.30);
}
body.prism-themed .badge-info,
body.prism-themed .badge-new {
  background: rgba(74, 109, 181, 0.18);
  color: var(--sky);
  border-color: rgba(74, 109, 181, 0.38);
}
body.prism-themed .badge-muted,
body.prism-themed .badge-scoping {
  background: rgba(156, 143, 224, 0.12);
  color: #B4A8E8;
  border-color: rgba(156, 143, 224, 0.28);
}

/* View-only lock badge (PS-053 / T-019 — keep recognizable) */
body.prism-themed .badge-locked {
  background: rgba(189, 201, 221, 0.08);
  color: var(--text-dim);
  border-color: var(--border);
}

/* ---------- Inputs ---------- */
body.prism-themed input,
body.prism-themed textarea,
body.prism-themed select {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text);
  background: var(--frame);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  transition: border-color var(--dur-fast) var(--ease-out);
}
body.prism-themed input:focus-visible,
body.prism-themed textarea:focus-visible,
body.prism-themed select:focus-visible {
  border-color: var(--gold);
  box-shadow: var(--ring);
  outline: none;
}

body.prism-themed input::placeholder,
body.prism-themed textarea::placeholder {
  color: var(--text-dim);
}

/* ---------- Tables ---------- */
body.prism-themed table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
body.prism-themed table thead th {
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-muted);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: transparent;
}
body.prism-themed table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
body.prism-themed table tbody tr {
  transition: background var(--dur-fast) var(--ease-out);
}
body.prism-themed table tbody tr:hover {
  background: rgba(189, 201, 221, 0.03);
}
body.prism-themed table tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- Modals ---------- */
body.prism-themed .modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6, 11, 31, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
body.prism-themed .modal {
  background: var(--core);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-modal);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-6);
}

/* ---------- Chart container ---------- */
body.prism-themed .chart-container,
body.prism-themed .chart-card {
  background: var(--shell);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--elev-1);
}
body.prism-themed .chart-container canvas,
body.prism-themed .chart-card canvas {
  max-width: 100%;
}

/* ---------- Section heading row ---------- */
body.prism-themed .section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
body.prism-themed .section-header .eyebrow {
  margin-bottom: var(--space-1);
}

/* ---------- Chat FAB / panel (preserves existing IDs) ---------- */
body.prism-themed #chat-fab {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--grad-chrome);
  color: var(--navy);
  border: none;
  cursor: pointer;
  z-index: 200;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(200, 164, 90, 0.35);
  transition: transform var(--dur-fast) var(--ease-out);
}
body.prism-themed #chat-fab:hover { transform: scale(1.08); }

body.prism-themed #chat-panel {
  position: fixed;
  bottom: 88px;
  right: var(--space-5);
  width: 420px;
  height: 520px;
  background: var(--shell-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-2);
  z-index: 199;
  display: none;
  flex-direction: column;
}
body.prism-themed #chat-panel.open { display: flex; }

/* ---------- Responsive ----------
   Mobile nav is a slide-in drawer. Keep position:fixed from the base
   rule (line 25) so nav doesn't become a flex child of .shell — that
   was the regression that pushed <main> off-screen on iPhone. The
   embedded #nav-toggle button in index.html toggles `body.nav-open`. */
@media (max-width: 768px) {
  body.prism-themed nav {
    width: 240px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 2px 0 16px rgba(0,0,0,0.5);
  }
  body.prism-themed.nav-open nav { transform: translateX(0); }
  body.prism-themed main { margin-left: 0; padding: 60px var(--space-3) var(--space-4); overflow-x: hidden; }
  body.prism-themed #chat-panel { width: calc(100% - var(--space-8)); right: var(--space-4); }
}

/* ---------- End of Day editorial card (T-036c) ---------- */
/* Three-zone layout: header strip / Top 10 lead / category grid / muted Narrative footer.
   Aesthetic bar: Cowork "Linkedin Sprint Calendar" Live Artifact (2026-05-22 decisions-log).
   Gold accent reserved for Top 10 numerals and sprint chip; everything else is muted or category-colored. */

body.prism-themed .eod-card {
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

/* — Header strip — */
body.prism-themed .eod-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
}
body.prism-themed .eod-header-left {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
}
body.prism-themed .eod-header-date {
  font-size: 16px;
  font-weight: var(--weight-semibold);
  color: var(--text);
  letter-spacing: 0.2px;
}
body.prism-themed .eod-header-year {
  font-size: 12px;
  color: var(--text-muted, var(--muted));
  font-weight: var(--weight-medium);
}
body.prism-themed .eod-header-sprint {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--gold);
  font-weight: var(--weight-semibold);
  padding-left: var(--space-3);
  border-left: 1px solid var(--border);
}
body.prism-themed .eod-header-right .btn-sm.eod-link-doc {
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* — Prismatic seam under header — */
body.prism-themed .eod-seam {
  height: 1px;
  background: var(--seam, linear-gradient(90deg, transparent, rgba(189,201,221,0.18), transparent));
  margin: var(--space-3) 0;
}

/* — Zone label (Top 10 / Categories / Narrative) — */
body.prism-themed .eod-zone-label {
  font-size: 10px;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--space-2);
}

/* — Top 10 list — */
body.prism-themed .eod-top10 {
  margin-bottom: var(--space-4);
}
body.prism-themed .eod-top10-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.prism-themed .eod-top10-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--space-2);
  align-items: baseline;
  padding: 4px 0;
}
body.prism-themed .eod-top10-n {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  font-weight: var(--weight-semibold);
  color: var(--gold);
  text-align: right;
  letter-spacing: 0.5px;
}
body.prism-themed .eod-top10-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
body.prism-themed .eod-top10-tag {
  margin-left: var(--space-2);
  font-size: 10px;
}
body.prism-themed .eod-top10-empty {
  font-size: 13px;
  color: var(--text-muted, var(--muted));
  padding: var(--space-2) 0;
  font-style: italic;
}
body.prism-themed .eod-top10-empty .muted-hint {
  color: var(--text-dim);
  font-style: normal;
}

/* — Category grid — */
body.prism-themed .eod-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
body.prism-themed .eod-cat-card {
  background: rgba(189, 201, 221, 0.04);
  border-radius: var(--radius-sm, 6px);
  border-left: 2px solid var(--cat-color, var(--sky));
  padding: var(--space-3) var(--space-4);
}
body.prism-themed .eod-cat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--cat-color, var(--sky));
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
body.prism-themed .eod-cat-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}
body.prism-themed .eod-cat-add {
  font-size: 9px;
  padding: 1px 6px;
  opacity: 0.4;
  margin-left: auto;
}
body.prism-themed .eod-cat-add:hover { opacity: 0.9; }

/* — Mini-markdown rendered inside categories and Narrative — */
body.prism-themed .eod-md-p { margin: 0 0 var(--space-2); }
body.prism-themed .eod-md-p:last-child { margin-bottom: 0; }
body.prism-themed .eod-md-h { margin: var(--space-3) 0 var(--space-2); font-weight: var(--weight-semibold); color: var(--text); }
body.prism-themed h4.eod-md-h { font-size: 13px; }
body.prism-themed h5.eod-md-h { font-size: 12px; color: var(--text-muted, var(--muted)); }
body.prism-themed .eod-md-ul,
body.prism-themed .eod-md-ol { margin: var(--space-1) 0 var(--space-2); padding-left: var(--space-5); }
body.prism-themed .eod-md-ul li,
body.prism-themed .eod-md-ol li { margin-bottom: 2px; }
body.prism-themed .eod-cat-body code,
body.prism-themed .eod-narrative-body code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  padding: 1px 5px;
  background: rgba(189, 201, 221, 0.08);
  border-radius: 3px;
}

/* — Narrative footer (muted; visually de-emphasizes prose-dumping) — */
body.prism-themed .eod-narrative {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-left: 2px solid var(--text-dim);
  background: transparent;
}
body.prism-themed .eod-narrative-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-dim);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}
body.prism-themed .eod-narrative-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted, var(--muted));
}

/* — Empty state — */
body.prism-themed .eod-empty {
  color: var(--text-muted, var(--muted));
  font-size: 13px;
  padding: var(--space-4) 0;
  text-align: center;
  font-style: italic;
}

/* — Sources collapsible (preserved layout, restyled) — */
body.prism-themed .eod-sources {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}
body.prism-themed .eod-sources-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  width: fit-content;
}
body.prism-themed .eod-sources-chevron {
  font-size: 10px;
  color: var(--muted);
  transition: transform var(--dur-fast, 150ms) var(--ease-out, ease-out);
  display: inline-block;
}
body.prism-themed .eod-sources-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--muted);
  font-weight: var(--weight-semibold);
}
body.prism-themed .eod-sources-body {
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  padding-left: 4px;
}

/* — Docs container (existing renderUnsectionedDocs slot) — */
body.prism-themed .eod-docs { margin-top: var(--space-3); }

/* — Narrow viewports — */
@media (max-width: 768px) {
  body.prism-themed .eod-card { padding: var(--space-4); }
  body.prism-themed .eod-header { gap: var(--space-2); }
  body.prism-themed .eod-header-sprint { padding-left: var(--space-2); }
  body.prism-themed .eod-top10-row { grid-template-columns: 22px 1fr; }
  body.prism-themed .eod-cat-card { padding: var(--space-2) var(--space-3); }
}

/* — Per-day collapsible (T-036g) — */
/* Each daily review card is its own <details> inside the End of Day parent.
   Latest day open by default; older days closed. Summary acts as the click
   target; body holds the Top 10 + categories + narrative + sources. */
body.prism-themed .eod-day {
  padding: 0;
  overflow: hidden;
  margin-bottom: var(--space-3);
}
body.prism-themed .eod-day > summary.eod-day-summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-4);
}
body.prism-themed .eod-day > summary.eod-day-summary::-webkit-details-marker { display: none; }
body.prism-themed .eod-day-chevron {
  font-size: 10px;
  color: var(--muted);
  transition: transform var(--dur-fast, 150ms) var(--ease-out, ease-out);
  display: inline-block;
  flex-shrink: 0;
}
body.prism-themed .eod-day[open] .eod-day-chevron { transform: rotate(90deg); }
body.prism-themed .eod-day-summary:hover {
  background: rgba(189, 201, 221, 0.03);
}
body.prism-themed .eod-day-top10-count {
  margin-left: auto;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--gold);
  font-weight: var(--weight-semibold);
  padding: 2px 8px;
  border: 1px solid rgba(200, 164, 90, 0.30);
  border-radius: var(--radius-pill, 999px);
  background: rgba(200, 164, 90, 0.06);
}
body.prism-themed .eod-day-body {
  padding: var(--space-2) var(--space-4) var(--space-4);
  border-top: 1px solid var(--border);
}
body.prism-themed .eod-day-body .eod-header-right {
  display: flex;
  justify-content: flex-end;
  margin-bottom: var(--space-2);
}

/* — Top 10 source label (which path extracted the items) — */
body.prism-themed .eod-top10-source {
  margin-left: var(--space-2);
  font-size: 9px;
  text-transform: lowercase;
  letter-spacing: 0.2px;
  color: var(--text-dim);
  font-weight: var(--weight-medium);
  padding: 1px 6px;
  border-radius: var(--radius-pill, 999px);
  background: rgba(189, 201, 221, 0.06);
  vertical-align: middle;
}

/* ---------- Morning Brief surface (T-036e) ---------- */
/* Above-the-fold Top 10 + collapsible Needs/Carry/Maturity/etc. sections.
   Source: reports/cos-morning-brief-YYYY-MM-DD.md parsed by the
   /api/mission-control/morning-brief endpoint. Aesthetic matches the Cowork
   Sprint Calendar bar — gold accent reserved for Top 10 numerals and key counts. */

body.prism-themed .brief-card {
  background: var(--shell);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: var(--elev-1);
}
body.prism-themed .brief-loading {
  color: var(--text-muted, var(--muted));
  font-size: 13px;
  padding: var(--space-3) 0;
}
body.prism-themed .brief-empty {
  color: var(--text-muted, var(--muted));
  font-size: 13px;
  padding: var(--space-3) 0;
  font-style: italic;
}

/* — Header — */
body.prism-themed .brief-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}
body.prism-themed .brief-headline {
  font-size: 17px;
  font-weight: var(--weight-semibold);
  color: var(--text);
  letter-spacing: 0.2px;
}
body.prism-themed .brief-subheader {
  font-size: 12px;
  color: var(--gold);
  margin-top: 2px;
  letter-spacing: 0.3px;
}
body.prism-themed .brief-date-chip {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text-muted, var(--muted));
  padding: 2px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill, 999px);
  white-space: nowrap;
}

/* — Today looks like — narrative paragraph at top — */
body.prism-themed .brief-narrative {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: rgba(189, 201, 221, 0.04);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius-sm, 6px);
}
body.prism-themed .brief-narrative p { margin: 0 0 var(--space-2); }
body.prism-themed .brief-narrative p:last-child { margin-bottom: 0; }

/* — Bucket counts chip strip — */
body.prism-themed .brief-buckets {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
body.prism-themed .brief-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(189, 201, 221, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill, 999px);
  font-size: 11px;
}
body.prism-themed .brief-chip-active {
  background: rgba(200, 164, 90, 0.10);
  border-color: rgba(200, 164, 90, 0.30);
}
body.prism-themed .brief-chip-label {
  color: var(--text-muted, var(--muted));
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  font-size: 10px;
  font-weight: var(--weight-semibold);
}
body.prism-themed .brief-chip-count {
  color: var(--text);
  font-weight: var(--weight-semibold);
  font-family: var(--font-mono, ui-monospace, monospace);
}
body.prism-themed .brief-chip-active .brief-chip-count {
  color: var(--gold);
}

/* — Zone label (Top 10 for today) — */
body.prism-themed .brief-zone-label {
  font-size: 10px;
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--space-2);
}

/* — Top 10 list — */
body.prism-themed .brief-top10 {
  margin-bottom: var(--space-4);
}
body.prism-themed .brief-top10-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
body.prism-themed .brief-top10-row {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--space-3);
  align-items: baseline;
}
body.prism-themed .brief-top10-n {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  color: var(--gold);
  letter-spacing: 0.5px;
  text-align: right;
  padding-top: 2px;
}
body.prism-themed .brief-top10-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
body.prism-themed .brief-top10-body p { margin: 0 0 var(--space-1); }
body.prism-themed .brief-top10-body p:last-child { margin-bottom: 0; }
body.prism-themed .brief-top10-body strong {
  color: var(--white);
  font-weight: var(--weight-semibold);
}
body.prism-themed .brief-top10-body code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  padding: 1px 5px;
  background: rgba(189, 201, 221, 0.08);
  border-radius: 3px;
}
body.prism-themed .brief-top10-empty {
  color: var(--text-muted, var(--muted));
  font-size: 13px;
  font-style: italic;
  padding: var(--space-2) 0;
}
body.prism-themed .brief-top10-empty .muted-hint {
  color: var(--text-dim);
  font-style: normal;
}

/* — Collapsible sub-sections (Needs Michele / Carry-forward / etc.) — */
body.prism-themed .brief-section {
  margin-top: var(--space-3);
  border-top: 1px solid var(--border);
}
body.prism-themed .brief-section > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--space-3) 0 var(--space-2);
}
body.prism-themed .brief-section > summary::-webkit-details-marker { display: none; }
body.prism-themed .brief-section-chevron {
  font-size: 10px;
  color: var(--muted);
  transition: transform var(--dur-fast, 150ms) var(--ease-out, ease-out);
  display: inline-block;
}
body.prism-themed .brief-section[open] .brief-section-chevron { transform: rotate(90deg); }
body.prism-themed .brief-section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--text);
  font-weight: var(--weight-semibold);
}
body.prism-themed .brief-section-body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  padding-left: 18px;
  padding-bottom: var(--space-3);
}
body.prism-themed .brief-section-body p { margin: 0 0 var(--space-2); }
body.prism-themed .brief-section-body ul,
body.prism-themed .brief-section-body ol {
  margin: var(--space-1) 0 var(--space-2);
  padding-left: var(--space-5);
}
body.prism-themed .brief-section-body li { margin-bottom: 2px; }
body.prism-themed .brief-section-body strong { color: var(--white); font-weight: var(--weight-semibold); }
body.prism-themed .brief-section-body code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  padding: 1px 5px;
  background: rgba(189, 201, 221, 0.08);
  border-radius: 3px;
}

@media (max-width: 768px) {
  body.prism-themed .brief-card { padding: var(--space-4); }
  body.prism-themed .brief-header { gap: var(--space-2); }
  body.prism-themed .brief-top10-row { grid-template-columns: 26px 1fr; gap: var(--space-2); }
  body.prism-themed .brief-top10-n { font-size: 12px; }
}
