@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=DM+Sans:wght@400;500;600;700&display=swap');

/* =============================================================================
 * DESIGN TOKENS — TSB Clients Program (coral anchor)
 * =========================================================================== */
:root {
  /* Core TSB */
  --navy: #0A0A2E;
  --electric-blue: #1A1AFF;
  --electric-teal: #00D4C8;
  --white: #FFFFFF;

  /* Clients program anchor */
  --coral: #FF6B35;
  --co-light: #FF9068;
  --co-deep: #C94A1A;
  --co-dark: #3D0F00;
  --co-mist: #FFD8C8;
  --co-tint: #FFF8F5;
  --co-pale: #FFEFE6;

  /* Semantic */
  --text: #0A0A2E;
  --text-dim: #4A4A6A;
  --text-muted: #8080A0;
  --border: rgba(10, 10, 46, 0.08);
  --border-soft: rgba(10, 10, 46, 0.04);

  /* Status */
  --status-built: #00A87A;
  --status-progress: #F5C300;
  --status-notstarted: #B0B0C0;
  --status-critical: #C94A1A;

  /* Effects */
  --radius-card: 22px;
  --radius-btn: 8px;
  --radius-chip: 6px;
  --shadow-card: 0 1px 2px rgba(10,10,46,0.04), 0 8px 32px rgba(10,10,46,0.04);
  --shadow-card-hover: 0 2px 4px rgba(10,10,46,0.05), 0 16px 40px rgba(10,10,46,0.07);
}

/* =============================================================================
 * RESET + BASE
 * =========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--co-deep); text-decoration: none; transition: color 120ms ease; }
a:hover { color: var(--coral); }

button { font-family: inherit; cursor: pointer; }

img, svg { display: block; max-width: 100%; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
  font-weight: 600;
}

h1 { font-size: 42px; line-height: 1.15; }
h2 { font-size: 28px; line-height: 1.25; }
h3 { font-size: 20px; line-height: 1.35; }
h4 { font-size: 16px; line-height: 1.4; font-weight: 600; }

p { margin: 0 0 16px 0; }

ul, ol { margin: 0 0 16px 0; padding-left: 22px; }
li { margin-bottom: 6px; }

/* =============================================================================
 * APP SHELL — topbar + sidebar + main
 * =========================================================================== */
.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 64px 1fr;
  grid-template-areas:
    "topbar topbar"
    "sidebar main";
  min-height: 100vh;
}

.topbar {
  grid-area: topbar;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 20px;
}

.topbar-wordmark {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.topbar-wordmark .accent { color: var(--coral); }

.topbar-meta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--text-dim);
}
.topbar-meta .pipe { color: var(--border); }
.topbar-meta a { color: var(--text-dim); }
.topbar-meta a:hover { color: var(--coral); }

.topbar-inbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--co-tint);
  border: 1px solid var(--co-mist);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--co-deep) !important;
  transition: all 120ms ease;
}
.topbar-inbox:hover {
  background: var(--co-pale);
  color: var(--co-deep) !important;
  border-color: var(--coral);
}
.topbar-inbox-claude {
  display: inline-block;
  padding: 1px 6px;
  background: var(--electric-blue);
  color: var(--white);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: 2px;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--co-tint);
  color: var(--text-dim);
  font-size: 13px;
  min-width: 220px;
  transition: border-color 120ms ease;
}
.topbar-search:hover { border-color: var(--co-mist); }
.topbar-search input {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  width: 100%;
}
.topbar-search input::placeholder { color: var(--text-muted); }

/* Hamburger */
.topbar-hamburger {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

/* Sidebar */
.sidebar {
  grid-area: sidebar;
  background: var(--co-tint);
  border-right: 1px solid var(--border);
  padding: 24px 18px 48px 18px;
  overflow-y: auto;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
}

.sidebar-toggle {
  display: flex;
  padding: 3px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 24px;
}
.sidebar-toggle button {
  flex: 1;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  transition: all 160ms ease;
}
.sidebar-toggle button.active {
  background: var(--coral);
  color: var(--white);
}

.sidebar-group { margin-bottom: 22px; }
.sidebar-group-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 0 10px 8px 10px;
}

.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li { margin: 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 6px 6px 0;
  transition: all 120ms ease;
}
.sidebar-link:hover {
  background: rgba(255, 107, 53, 0.06);
  color: var(--text);
}
.sidebar-link.active {
  border-left-color: var(--coral);
  color: var(--coral);
  background: rgba(255, 107, 53, 0.08);
  font-weight: 600;
}

.sidebar-num {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 18px;
}
.sidebar-link.active .sidebar-num { color: var(--coral); }

/* Expandable children (module list) */
.sidebar-children {
  list-style: none;
  padding: 4px 0 4px 32px;
  margin: 0;
}
.sidebar-children li { margin: 0; }
.sidebar-children a {
  display: block;
  padding: 5px 10px;
  color: var(--text-dim);
  font-size: 13px;
  border-radius: 4px;
  transition: all 100ms ease;
}
.sidebar-children a:hover { background: rgba(255, 107, 53, 0.05); color: var(--text); }
.sidebar-children a.active { color: var(--coral); font-weight: 600; }

/* Main */
.main {
  grid-area: main;
  background: var(--white);
  padding: 48px 64px;
  min-width: 0;
}

.content {
  max-width: 960px;
  margin: 0 auto;
}
.content-wide {
  max-width: 1200px;
  margin: 0 auto;
}

/* =============================================================================
 * HEADINGS with numbered anchors
 * =========================================================================== */
.numbered-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 56px 0 18px 0;
  scroll-margin-top: 80px;
  position: relative;
}
.numbered-heading:first-child { margin-top: 0; }

.num-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 53, 0.08);
  color: var(--co-deep);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: var(--radius-chip);
  letter-spacing: 0.02em;
  flex-shrink: 0;
  line-height: 1.3;
}
.num-chip-lg { font-size: 13px; padding: 5px 10px; }

.anchor-copy {
  opacity: 0;
  margin-left: 6px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  transition: all 120ms ease;
  line-height: 0;
}
.numbered-heading:hover .anchor-copy { opacity: 1; }
.anchor-copy:hover { background: rgba(255, 107, 53, 0.08); color: var(--coral); }
.anchor-copy.copied {
  opacity: 1;
  color: var(--status-built);
  background: rgba(0, 168, 122, 0.08);
}

/* =============================================================================
 * CHIPS
 * =========================================================================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  background: var(--co-tint);
  color: var(--text-dim);
  border: 1px solid var(--border-soft);
  white-space: nowrap;
}
.chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.chip-built { background: rgba(0, 168, 122, 0.08); color: #007a58; border-color: rgba(0, 168, 122, 0.15); }
.chip-built .chip-dot { background: var(--status-built); }
.chip-progress { background: rgba(245, 195, 0, 0.1); color: #8a6d00; border-color: rgba(245, 195, 0, 0.2); }
.chip-progress .chip-dot { background: var(--status-progress); }
.chip-notstarted { background: rgba(176, 176, 192, 0.14); color: var(--text-dim); }
.chip-notstarted .chip-dot { background: var(--status-notstarted); }
.chip-critical { background: rgba(201, 74, 26, 0.1); color: var(--co-deep); border-color: rgba(201, 74, 26, 0.18); }
.chip-critical .chip-dot { background: var(--status-critical); }

.chip-phase { background: var(--co-pale); color: var(--co-deep); border-color: rgba(201, 74, 26, 0.12); }

.chip-priority-critical { background: rgba(201, 74, 26, 0.1); color: var(--co-deep); font-weight: 600; }
.chip-priority-high { background: rgba(255, 107, 53, 0.1); color: var(--co-deep); }
.chip-priority-medium { background: rgba(245, 195, 0, 0.1); color: #8a6d00; }
.chip-priority-low { background: rgba(176, 176, 192, 0.14); color: var(--text-dim); }

.chip-risk-low { background: rgba(0, 168, 122, 0.08); color: #007a58; }
.chip-risk-medium { background: rgba(245, 195, 0, 0.1); color: #8a6d00; }
.chip-risk-high { background: rgba(201, 74, 26, 0.1); color: var(--co-deep); }

/* Reference ID chip */
.id-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 107, 53, 0.08);
  color: var(--co-deep);
  padding: 3px 8px;
  border-radius: var(--radius-chip);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.01em;
  transition: background 120ms ease;
}
.id-chip:hover { background: rgba(255, 107, 53, 0.15); color: var(--co-deep); }
.id-chip-sm { font-size: 12px; padding: 2px 7px; }

/* =============================================================================
 * CARDS
 * =========================================================================== */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 32px;
  box-shadow: var(--shadow-card);
  transition: all 180ms ease;
}
.card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(255, 107, 53, 0.2);
}

.card-quiet {
  background: var(--co-tint);
  box-shadow: none;
  border-color: var(--border-soft);
}

.card-critical {
  border: 1.5px solid rgba(201, 74, 26, 0.35);
  background: linear-gradient(180deg, #FFF8F5 0%, #FFFFFF 40%);
}

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

.card-title { margin: 0; }
.card-meta { font-size: 12px; color: var(--text-muted); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* =============================================================================
 * BUTTONS
 * =========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  background: var(--coral);
  color: var(--white);
  cursor: pointer;
  transition: all 120ms ease;
  text-decoration: none;
}
.btn:hover { background: var(--co-deep); color: var(--white); transform: translateY(-1px); }
.btn-secondary { background: var(--white); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--co-tint); color: var(--text); border-color: var(--co-mist); }
.btn-ghost { background: transparent; color: var(--co-deep); border-color: rgba(201, 74, 26, 0.2); }
.btn-ghost:hover { background: var(--co-pale); color: var(--co-deep); border-color: rgba(201, 74, 26, 0.35); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* =============================================================================
 * HERO + AURORA
 * =========================================================================== */
.hero {
  position: relative;
  padding: 64px 48px 56px 48px;
  border-radius: var(--radius-card);
  background: var(--co-tint);
  overflow: hidden;
  margin-bottom: 48px;
}
.hero-aurora {
  background: var(--white);
  border: 1px solid var(--border-soft);
}
.aurora-blob {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  filter: blur(88px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.aurora-coral {
  background: var(--coral);
  top: -180px;
  right: -120px;
  animation: drift-a 22s ease-in-out infinite;
}
.aurora-teal {
  background: var(--electric-teal);
  bottom: -200px;
  left: -140px;
  opacity: 0.28;
  animation: drift-b 26s ease-in-out infinite;
}
.aurora-peach {
  background: var(--co-light);
  top: 40%;
  left: 40%;
  opacity: 0.35;
  animation: drift-c 30s ease-in-out infinite;
}
@keyframes drift-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-40px, 30px); }
}
@keyframes drift-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(50px, -30px); }
}
@keyframes drift-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 20px) scale(1.1); }
}
.hero-inner { position: relative; z-index: 1; }

.hero h1 {
  font-size: 54px;
  line-height: 1.1;
  margin-bottom: 16px;
}
.hero h1 .accent { color: var(--coral); }
.hero-sub {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 620px;
  margin-bottom: 28px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 14px 22px;
  border-radius: var(--radius-card);
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  flex-wrap: wrap;
}
.hero-status .divider { color: var(--border); }
.hero-status strong { color: var(--coral); font-weight: 700; }

/* =============================================================================
 * QUICK FACTS (page 1)
 * =========================================================================== */
.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.fact {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
}
.fact-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.fact-value {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

/* =============================================================================
 * PROGRESS BAR (modules built)
 * =========================================================================== */
.module-progress {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
}
.module-progress-cell {
  flex: 1;
  height: 40px;
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  transition: transform 120ms ease;
}
.module-progress-cell:hover { transform: translateY(-2px); }
.module-progress-cell.built { background: var(--coral); color: var(--white); }
.module-progress-cell.in_progress {
  background: linear-gradient(90deg, var(--co-light) 0%, var(--co-light) 50%, var(--co-pale) 50%, var(--co-pale) 100%);
  color: var(--co-deep);
}
.module-progress-cell.not_started { background: var(--co-pale); color: var(--text-muted); }
.module-progress-bonus {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.module-progress-bonus .module-progress-cell { height: 32px; font-size: 10px; }

/* =============================================================================
 * TIMELINE
 * =========================================================================== */
.timeline {
  position: relative;
  padding: 20px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--co-mist);
  border-radius: 1px;
}
.timeline-inner {
  display: flex;
  justify-content: space-between;
  position: relative;
  gap: 12px;
}
.timeline-item { flex: 1; text-align: center; position: relative; }
.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--coral);
  margin: 0 auto 14px auto;
  position: relative;
  z-index: 1;
}
.timeline-dot.past { background: var(--coral); }
.timeline-dot.future { background: var(--white); border-color: var(--co-mist); }
.timeline-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--co-deep);
  margin-bottom: 4px;
}
.timeline-label {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* =============================================================================
 * LISTS / TABLES
 * =========================================================================== */
.update-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.update-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.update-list li:last-child { border-bottom: 0; }
.update-stamp {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 110px;
  flex-shrink: 0;
  padding-top: 2px;
}
.update-body { color: var(--text); font-size: 14px; line-height: 1.55; }
.update-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--co-deep);
  background: var(--co-pale);
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 8px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--co-tint);
}
.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.data-table tr:hover td { background: var(--co-tint); }
.data-table td .id-chip { margin-right: 0; }

/* =============================================================================
 * QUICK LINKS
 * =========================================================================== */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.quick-link {
  display: block;
  padding: 18px 20px;
  background: var(--co-tint);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  transition: all 140ms ease;
  color: var(--text);
}
.quick-link:hover {
  background: var(--co-pale);
  border-color: var(--co-mist);
  color: var(--text);
  transform: translateY(-1px);
}
.quick-link-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--coral);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.quick-link-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  font-weight: 600;
}

/* =============================================================================
 * PHASE BLOCKS (architecture page)
 * =========================================================================== */
.phase-block {
  background: var(--co-tint);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 32px 36px;
  margin-bottom: 20px;
}
.phase-block h3 {
  font-size: 24px;
  margin-bottom: 6px;
}
.phase-block h3 .chip { margin-left: 10px; vertical-align: middle; }
.phase-desc { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; }
.phase-modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.phase-module {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 140ms ease;
  color: var(--text);
}
.phase-module:hover {
  transform: translateY(-1px);
  border-color: var(--co-mist);
  color: var(--text);
}
.phase-module-id { font-size: 11px; font-weight: 600; color: var(--coral); letter-spacing: 0.02em; }
.phase-module-title { font-family: 'Fraunces', Georgia, serif; font-size: 15px; font-weight: 600; margin-top: 2px; }

/* =============================================================================
 * MODULE DETAIL
 * =========================================================================== */
.module-hero {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.module-hero-chips { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.module-hero h1 { margin-bottom: 12px; }
.module-hero-sub { font-size: 17px; color: var(--text-dim); max-width: 720px; }

.rebuild-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
}
.rebuild-content h2 { margin-top: 40px; margin-bottom: 12px; font-size: 24px; }
.rebuild-content h3 { margin-top: 28px; margin-bottom: 8px; font-size: 19px; }
.rebuild-content p { margin-bottom: 16px; }
.rebuild-content strong { color: var(--text); font-weight: 600; }
.rebuild-content ul { padding-left: 24px; }

.empty-state {
  background: var(--co-tint);
  border: 1px dashed var(--co-mist);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  text-align: left;
}
.empty-state-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--co-deep);
}
.empty-state-body { color: var(--text-dim); font-size: 15px; max-width: 640px; }

.source-list { list-style: none; padding: 0; margin: 18px 0 0 0; }
.source-list li {
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
}

/* =============================================================================
 * DECISIONS / GAPS / FLAGS
 * =========================================================================== */
.decision-card { border-left: 3px solid var(--coral); }
.decision-card.resolved { border-left-color: var(--text-muted); background: var(--co-tint); opacity: 0.92; }
.decision-card h3 { margin: 8px 0 12px 0; font-size: 19px; }
.decision-options { list-style: none; padding: 0; margin: 8px 0; }
.decision-options li {
  padding: 8px 12px;
  background: var(--co-tint);
  border-radius: 8px;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-dim);
}
.decision-lean {
  margin-top: 12px;
  padding: 12px 14px;
  background: rgba(255, 107, 53, 0.06);
  border-left: 3px solid var(--coral);
  border-radius: 0 8px 8px 0;
  font-size: 14px;
}
.decision-lean-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--co-deep);
  margin-bottom: 4px;
}

details.gap-group {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--coral);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
details.gap-group > summary {
  padding: 16px 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  user-select: none;
  list-style: none;
}
details.gap-group > summary::-webkit-details-marker { display: none; }
details.gap-group > summary::before {
  content: '';
  width: 6px; height: 6px;
  border-right: 2px solid var(--co-deep);
  border-bottom: 2px solid var(--co-deep);
  transform: rotate(-45deg);
  transition: transform 180ms ease;
  flex-shrink: 0;
}
details.gap-group[open] > summary::before { transform: rotate(45deg); }
details.gap-group > summary:hover { background: var(--co-tint); }
.gap-group-body { padding: 0 22px 18px 22px; }
.gap-list { list-style: none; padding: 0; margin: 0; }
.gap-list li {
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
}
.gap-list li:first-child { border-top: 0; }
.gap-desc { font-size: 14px; color: var(--text); line-height: 1.55; }
.gap-notes { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.gap-meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.flag-card h3 { margin-bottom: 10px; font-size: 19px; }
.flag-modules { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }

/* =============================================================================
 * VOC
 * =========================================================================== */
.bar-chart { margin-top: 16px; }
.bar-row { margin-bottom: 14px; }
.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}
.bar-label .bar-name { color: var(--text); font-weight: 500; }
.bar-label .bar-value { color: var(--text-muted); }
.bar {
  height: 10px;
  background: var(--co-pale);
  border-radius: 5px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--coral);
  border-radius: 5px;
}

/* =============================================================================
 * FORMS (admin)
 * =========================================================================== */
.form { max-width: 720px; }
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: border-color 120ms ease;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}
.form-row textarea {
  min-height: 120px;
  line-height: 1.6;
  resize: vertical;
}
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; }

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.admin-nav a {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  font-size: 13px;
  color: var(--text-dim);
}
.admin-nav a:hover { background: var(--co-tint); border-color: var(--co-mist); color: var(--text); }
.admin-nav a.active { background: var(--coral); color: var(--white); border-color: var(--coral); }

/* =============================================================================
 * FILTER CHIPS
 * =========================================================================== */
.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}
.filter-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 120ms ease;
}
.filter-chip:hover { border-color: var(--co-mist); color: var(--text); }
.filter-chip.active {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral);
}

/* =============================================================================
 * CALLOUT
 * =========================================================================== */
.callout {
  background: var(--co-pale);
  border-left: 3px solid var(--coral);
  padding: 18px 22px;
  border-radius: 0 12px 12px 0;
  margin: 24px 0;
}
.callout-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--co-deep);
  margin-bottom: 6px;
}
.callout p:last-child { margin-bottom: 0; }

/* =============================================================================
 * FLASH / TOAST / LOGIN
 * =========================================================================== */
.flash {
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(0, 168, 122, 0.08);
  color: #007a58;
  border: 1px solid rgba(0, 168, 122, 0.2);
  font-size: 14px;
  margin-bottom: 20px;
}
.flash-error {
  background: rgba(201, 74, 26, 0.08);
  color: var(--co-deep);
  border-color: rgba(201, 74, 26, 0.2);
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--co-tint);
  padding: 20px;
}
.login-card {
  max-width: 420px;
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  padding: 40px 36px;
  box-shadow: var(--shadow-card);
}
.login-card h1 { font-size: 28px; margin-bottom: 10px; }
.login-card p { color: var(--text-dim); margin-bottom: 24px; }

/* =============================================================================
 * SEARCH
 * =========================================================================== */
.search-result {
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
  background: var(--white);
  transition: border-color 140ms ease;
}
.search-result:hover { border-color: var(--co-mist); }
.search-result-kind {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--coral);
  font-weight: 600;
  margin-bottom: 4px;
}
.search-result-title { font-weight: 600; margin-bottom: 4px; color: var(--text); }
.search-result-snippet { font-size: 14px; color: var(--text-dim); line-height: 1.55; }

/* =============================================================================
 * PROGRAM PICKER (topbar)
 * =========================================================================== */
.program-picker {
  position: relative;
  margin-left: 4px;
}
.program-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--white);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 120ms ease;
}
.program-picker-btn:hover { border-color: var(--co-mist); background: var(--co-tint); }
.program-picker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px var(--white), 0 0 0 2.5px rgba(10,10,46,0.06);
}
.program-picker-caret {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 2px;
}

.program-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(10,10,46,0.12);
  padding: 6px;
  z-index: 60;
  display: none;
}
.program-picker.open .program-picker-menu { display: block; }
.program-picker-menu-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 10px 12px 6px 12px;
  font-weight: 600;
}
.program-picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  transition: background 120ms ease;
}
.program-picker-item:hover { background: var(--co-tint); color: var(--text); }
.program-picker-item.active { background: var(--co-pale); font-weight: 600; }
.program-picker-item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.program-picker-item-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.program-picker-item.active .program-picker-item-name { color: var(--coral); font-weight: 600; }
.program-picker-item-status {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.program-picker-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 6px 4px;
}

/* Sidebar program header */
.sidebar-program-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 20px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--border-soft);
  color: var(--text);
  transition: all 140ms ease;
}
.sidebar-program-header:hover {
  background: var(--co-pale);
  border-color: var(--co-mist);
  color: var(--text);
}
.sidebar-program-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--coral);
  flex-shrink: 0;
  box-shadow: 0 0 0 1.5px var(--white), 0 0 0 2.5px rgba(10,10,46,0.06);
}
.sidebar-program-name { flex: 1; min-width: 0; }
.sidebar-program-eyebrow {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
}
.sidebar-program-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.sidebar-program-switch {
  font-size: 14px;
  color: var(--text-muted);
  padding: 2px 6px;
}

/* =============================================================================
 * LANDING PAGE — programs index
 * =========================================================================== */
.app-fullwidth {
  grid-template-columns: 1fr;
  grid-template-areas: "topbar" "main";
}
.app-fullwidth .main { padding: 56px 48px; }

.programs-hero {
  max-width: 820px;
  margin: 0 auto 56px auto;
  text-align: center;
}
.programs-hero h1 { font-size: 48px; margin-bottom: 16px; }
.programs-hero p { font-size: 17px; color: var(--text-dim); line-height: 1.65; }

.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.program-card {
  position: relative;
  display: block;
  padding: 32px 32px 28px 32px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: all 180ms ease;
  color: var(--text);
}
.program-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--accent-color, var(--coral));
}
.program-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  color: var(--text);
  border-color: var(--accent-color, var(--coral));
}
.program-card.planned { background: var(--co-tint); }
.program-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  margin-top: 4px;
}
.program-card-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}
.program-card-tagline {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 17px;
  line-height: 1.4;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 14px;
}
.program-card-description {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 20px;
}
.program-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
}
.program-card-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
}
.program-card-stats strong { color: var(--text); font-weight: 600; }
.program-card-arrow {
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 160ms ease;
}
.program-card:hover .program-card-arrow { transform: translateX(4px); color: var(--accent-color, var(--coral)); }

.program-card-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.program-card-status-chip.active { background: rgba(0, 168, 122, 0.1); color: #007a58; }
.program-card-status-chip.planned { background: rgba(176, 176, 192, 0.18); color: var(--text-dim); }
.program-card-status-chip.archived { background: rgba(128, 128, 160, 0.15); color: var(--text-muted); }

/* No-sidebar variant body */
body.no-sidebar .main { padding: 56px 48px; }

/* =============================================================================
 * DISCUSSIONS — speech bubble indicators on headings
 * =========================================================================== */
.discuss-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  border: 0;
  cursor: pointer;
  opacity: 0;
  transition: all 140ms ease;
  position: relative;
  line-height: 0;
}
.numbered-heading:hover .discuss-indicator { opacity: 1; }
.discuss-indicator:hover { background: rgba(255, 107, 53, 0.1); color: var(--coral); }
.discuss-indicator.has-threads {
  opacity: 1;
  background: rgba(255, 107, 53, 0.12);
  color: var(--co-deep);
}
.discuss-indicator .count {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-left: 2px;
  letter-spacing: 0.02em;
}

/* Selection toolbar (floating) */
.selection-toolbar {
  position: absolute;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 28px rgba(10,10,46,0.28);
  z-index: 70;
  cursor: pointer;
  user-select: none;
  transform: translate(-50%, -100%);
  margin-top: -6px;
  transition: opacity 100ms ease, transform 100ms ease;
  white-space: nowrap;
}
.selection-toolbar.visible { display: inline-flex; }
.selection-toolbar::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: var(--navy);
  transform: translateX(-50%) rotate(45deg);
}
.selection-toolbar:hover { background: var(--coral); }
.selection-toolbar svg { width: 14px; height: 14px; position: relative; z-index: 1; }
.selection-toolbar-label { position: relative; z-index: 1; }

/* =============================================================================
 * DISCUSSION DRAWER (slide-in from right)
 * =========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 46, 0.24);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 100vw;
  background: var(--white);
  box-shadow: -24px 0 48px rgba(10, 10, 46, 0.12);
  z-index: 210;
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.32, 0.72, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-back {
  background: transparent;
  border: 0;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  transition: all 120ms ease;
  display: none;
  align-items: center;
  gap: 4px;
}
.drawer-back.visible { display: inline-flex; }
.drawer-back:hover { background: var(--co-tint); color: var(--text); }
.drawer-title {
  flex: 1;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  min-width: 0;
}
.drawer-title-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.drawer-close {
  background: transparent;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 20px;
  transition: all 120ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-close:hover { background: var(--co-tint); color: var(--text); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}

.drawer-empty {
  color: var(--text-dim);
  text-align: center;
  padding: 40px 20px;
  font-size: 14px;
  line-height: 1.6;
}

/* Thread list view */
.thread-list { list-style: none; padding: 0; margin: 0; }
.thread-list li {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--co-tint);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 140ms ease;
  border: 1px solid transparent;
}
.thread-list li:hover { background: var(--co-pale); border-color: var(--co-mist); }
.thread-list li.resolved { opacity: 0.75; }
.thread-list-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.thread-list-anchor {
  font-size: 11px;
  font-weight: 600;
  color: var(--co-deep);
  letter-spacing: 0.02em;
  background: rgba(255, 107, 53, 0.12);
  padding: 2px 8px;
  border-radius: 5px;
}
.thread-list-status {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.thread-list-status.open { color: var(--coral); }
.thread-list-status.resolved { color: var(--status-built); }
.thread-list-preview {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.thread-list-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.thread-list-meta .claude-flag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(26, 26, 255, 0.08);
  color: var(--electric-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Thread detail view */
.thread-context {
  padding: 14px 16px;
  background: var(--co-tint);
  border-radius: 10px;
  border-left: 3px solid var(--coral);
  margin-bottom: 20px;
}
.thread-context-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--co-deep);
  margin-bottom: 6px;
}
.thread-context-selection {
  font-size: 13px;
  color: var(--text);
  line-height: 1.55;
  font-style: italic;
}
.thread-context-anchor {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.thread-messages { display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px; }
.thread-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.thread-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  text-transform: uppercase;
}
.thread-msg-avatar.claude { background: var(--electric-blue); }
.thread-msg-body { flex: 1; min-width: 0; }
.thread-msg-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.thread-msg-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.thread-msg-time {
  font-size: 11px;
  color: var(--text-muted);
}
.thread-msg-voice {
  font-size: 10px;
  font-weight: 600;
  color: var(--coral);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.thread-msg-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Composer */
.drawer-composer {
  flex-shrink: 0;
  padding: 16px 22px 22px 22px;
  border-top: 1px solid var(--border);
  background: var(--white);
}
.composer-textarea {
  width: 100%;
  min-height: 70px;
  max-height: 220px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  resize: vertical;
  transition: border-color 120ms ease;
}
.composer-textarea:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}
.composer-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.composer-mic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-dim);
  transition: all 140ms ease;
  flex-shrink: 0;
}
.composer-mic:hover { background: var(--co-tint); color: var(--co-deep); border-color: var(--co-mist); }
.composer-mic.recording {
  background: var(--coral);
  color: var(--white);
  border-color: var(--coral);
  animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(255, 107, 53, 0); }
}
.composer-mic.recording .mic-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
}
.composer-status {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
  min-width: 0;
}
.composer-status.recording { color: var(--coral); font-weight: 600; }
.composer-send {
  background: var(--coral);
  color: var(--white);
  border: 0;
  padding: 9px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
  flex-shrink: 0;
}
.composer-send:hover { background: var(--co-deep); }
.composer-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Thread actions bar (resolve / reopen / flag for Claude) */
.thread-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.thread-action {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 120ms ease;
  font-family: inherit;
}
.thread-action:hover { background: var(--co-tint); color: var(--text); border-color: var(--co-mist); }
.thread-action.active {
  background: rgba(26, 26, 255, 0.08);
  color: var(--electric-blue);
  border-color: rgba(26, 26, 255, 0.3);
}
.thread-action.resolve {
  background: var(--status-built);
  color: var(--white);
  border-color: var(--status-built);
}
.thread-action.resolve:hover { background: #00895f; border-color: #00895f; color: var(--white); }

/* =============================================================================
 * INBOX PAGE
 * =========================================================================== */
.inbox-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.inbox-thread {
  display: block;
  padding: 22px 26px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
  transition: all 140ms ease;
  color: var(--text);
  position: relative;
}
.inbox-thread:hover {
  border-color: var(--co-mist);
  transform: translateY(-1px);
  color: var(--text);
}
.inbox-thread.claude-ready { border-left: 4px solid var(--electric-blue); }
.inbox-thread.resolved { opacity: 0.7; background: var(--co-tint); }

.inbox-thread-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.inbox-thread-where {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.inbox-thread-where strong { color: var(--text); }
.inbox-thread-selection {
  font-size: 14px;
  font-style: italic;
  color: var(--text-dim);
  padding: 10px 14px;
  background: var(--co-tint);
  border-left: 3px solid var(--coral);
  border-radius: 0 8px 8px 0;
  margin-bottom: 10px;
  line-height: 1.5;
}
.inbox-thread-preview {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 10px;
}
.inbox-thread-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.inbox-thread-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.inbox-thread-actions button, .inbox-thread-actions a {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 120ms ease;
  font-family: inherit;
  text-decoration: none;
}
.inbox-thread-actions button:hover, .inbox-thread-actions a:hover {
  background: var(--co-tint);
  color: var(--text);
  border-color: var(--co-mist);
}

/* =============================================================================
 * RESPONSIVE
 * =========================================================================== */
@media (max-width: 640px) {
  .drawer { width: 100vw; }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas: "topbar" "main";
  }
  .sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 220ms ease;
    box-shadow: 12px 0 40px rgba(10,10,46,0.08);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    top: 64px;
    inset: 64px 0 0 0;
    background: rgba(10,10,46,0.4);
    z-index: 39;
  }
  .sidebar-backdrop.open { display: block; }
  .topbar-hamburger { display: inline-flex; }
  .topbar-search { display: none; }
  .program-picker-menu { right: auto; left: 0; }
  .app-fullwidth .main { padding: 28px 20px; }
  .programs-hero h1 { font-size: 32px; }
  .main { padding: 28px 20px; }
  .hero { padding: 40px 28px 32px 28px; }
  .hero h1 { font-size: 36px; }
  .facts-grid { grid-template-columns: 1fr; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .timeline-inner { flex-direction: column; gap: 20px; }
  .timeline::before { display: none; }
  .phase-block { padding: 22px 20px; }
  .card { padding: 22px 20px; }
  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
}

/* =============================================================================
 * PRINT
 * =========================================================================== */
@media print {
  .topbar, .sidebar, .sidebar-backdrop, .topbar-hamburger, .anchor-copy, .btn { display: none !important; }
  .app { grid-template-columns: 1fr; grid-template-areas: "main"; }
  .main { padding: 0; }
  .card, .phase-block, .hero { box-shadow: none !important; border: 1px solid #ddd !important; background: var(--white) !important; }
  .aurora-blob { display: none !important; }
  body { font-size: 12pt; color: #000; }
  h1, h2, h3 { color: #000; font-family: Georgia, serif; page-break-after: avoid; }
  a { color: #000; text-decoration: underline; }
  .id-chip, .chip, .num-chip { border: 1px solid #888 !important; background: #fff !important; color: #000 !important; }
}
