/* Lorm Dashboard Styles — Editorial Light Theme */

/* === Keyframe Animations === */

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

@keyframes dash-pulse {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 10; }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* === Body Background === */

body {
  background: #FAFAF9;
  color: #18181B;
}

/* === Card Base === */

.glass {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
}

/* === Editorial Card === */
.editorial-card {
  background: #fff;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  overflow: hidden;
  scroll-margin-top: 152px;
}

.editorial-card .section-header:hover {
  background: #f4f6f8;
}

.editorial-card .section-header .chevron {
  color: #9aa2ac;
}

.glass-strong {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
}

/* Editorial white card */
.card {
  background: #ffffff;
  border: 1px solid #dbe0e5;
  border-radius: 0;
}

/* === Gradient Utilities === */

.gradient-text {
  font-family: 'DM Sans', sans-serif;
  color: #0EA5E9;
  -webkit-text-fill-color: #0EA5E9;
}

.section-header h2 {
  font-family: 'DM Sans', sans-serif;
}

/* === Settings Panel (replaces .gradient-border for Programme Settings) === */
.settings-panel {
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  border-radius: 0;
}

.gradient-border {
  position: relative;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 0;
}

.gradient-border::before {
  display: none;
}

.btn-gradient {
  background: #0EA5E9;
  transition: all 0.3s ease;
}

.btn-gradient:hover {
  background: #0284c7;
}

/* === Collapsible Sections === */

.section-collapsible {
  max-height: 500000px; /* Large enough so long content (e.g. research moodboard) is never clipped */
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-collapsible.collapsed {
  max-height: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-header {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.section-header:hover {
  background: rgba(0, 0, 0, 0.02);
}

.section-header .chevron {
  transition: transform 0.3s ease;
}

.section-header.collapsed .chevron {
  transform: rotate(-90deg);
}

/* Section info icon and tooltip */
.section-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1;
  color: #9aa2ac;
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}
.section-info-btn:hover {
  color: #0EA5E9;
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.3);
}

.section-info-tooltip {
  position: fixed;
  z-index: 100;
  max-width: 280px;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #2a2f3a;
  background: #FFFFFF;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}
.section-info-tooltip.hidden {
  display: none;
}

/* === Timeline Styles === */

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #0EA5E9 0%, #0EA5E9 100%);
  opacity: 0.3;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
  animation: fade-in-up 0.4s ease backwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }
.timeline-item:nth-child(5) { animation-delay: 0.5s; }
.timeline-item:nth-child(n+6) { animation-delay: 0.6s; }

.timeline-node {
  position: absolute;
  left: -1.55rem;
  top: 0.25rem;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: #0EA5E9;
}

.timeline-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #0EA5E9;
  font-weight: 600;
}

.timeline-text {
  color: #18181B;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.timeline-remove {
  position: absolute;
  right: 0;
  top: 0.15rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.timeline-remove:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.timeline-remove-h {
  position: relative;
  right: auto;
  top: auto;
  margin-left: 0.5rem;
  flex-shrink: 0;
}
.timeline-h-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

/* === Area Tree Styles === */

.area-tree-item {
  position: relative;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0;
  background: #FFFFFF;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.area-tree-item:hover {
  background: #F5F5F4;
  transform: translateX(2px);
}

.area-tree-item.main-section {
  border-left-color: #0EA5E9;
  font-weight: 600;
  padding-left: 1rem;
}

.area-tree-item.subsection {
  border-left-color: #8b5cf6;
  padding-left: 2rem;
  opacity: 0.9;
}

.area-tree-item.item {
  border-left-color: rgba(139, 92, 246, 0.3);
  padding-left: 3rem;
  opacity: 0.8;
  font-size: 0.875rem;
}

/* === KPI Card Grid === */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.kpi-grid-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Category Headers */
.kpi-category-header {
  grid-column: 1 / -1;
  padding: 0.75rem 1rem;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  border-radius: 0;
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  border-left: 3px solid #0EA5E9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fade-in-up 0.4s ease backwards;
}

.kpi-category-header:first-child {
  margin-top: 0;
}

.kpi-category-title {
  font-weight: 700;
  font-size: 0.75rem;
  color: #2a2f3a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.kpi-category-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.kpi-category-divider {
  color: #dbe0e5;
}

/* KPI Cards */
.kpi-card {
  position: relative;
  padding: 1rem 1.125rem;
  padding-left: 1rem;
  border-radius: 0;
  background: #fff;
  border: 1px solid #dbe0e5;
  border-left: 3px solid #0EA5E9;
  transition: all 0.15s ease;
  animation: fade-in-up 0.4s ease backwards;
}

.kpi-card:hover {
  background: #fff;
  border-color: #c9d0d8;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.kpi-card.expandable {
  cursor: pointer;
}

.kpi-card .kpi-number {
  min-width: 2rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  border-radius: 0;
  background: #f4f6f8;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  flex-shrink: 0;
}

.kpi-card .kpi-content {
  position: relative;
}

.kpi-card.expandable .kpi-content {
  padding-right: 2rem;
}

/* Card header (number + title inline) */
.kpi-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.kpi-card .kpi-title-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.kpi-card .kpi-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: #2a2f3a;
  margin-bottom: 0;
  line-height: 1.35;
}

.kpi-source-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.4rem;
  border-radius: 0;
  white-space: nowrap;
}

.kpi-source-direct {
  background: #d1fae5;
  color: #059669;
}

.kpi-source-inferred {
  background: #fef3c7;
  color: #d97706;
}

.kpi-citation {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #dbe0e5;
  font-size: 0.8rem;
  color: #6b7280;
}

.kpi-excerpt {
  font-style: italic;
  margin-bottom: 0.35rem;
  line-height: 1.5;
}

.kpi-source-ref {
  color: #52525B;
}

.kpi-doc-name {
  font-weight: 500;
}

.kpi-page {
  opacity: 0.9;
}

/* Description preview (2-line clamp) */
.kpi-description-preview {
  color: #6b7280;
  font-size: 0.8rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

/* Full description (hidden by default) */
.kpi-description-full {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.kpi-card.expanded .kpi-description-preview {
  display: none;
}

.kpi-card.expanded .kpi-description-full {
  max-height: 500px;
  opacity: 1;
}

/* Expand icon */
.kpi-expand-icon {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  color: #9aa2ac;
  transition: all 0.3s ease;
}

.kpi-card:hover .kpi-expand-icon {
  color: #6b7280;
}

.kpi-card.expanded .kpi-expand-icon svg {
  transform: rotate(180deg);
}

/* Weight pill/badge */
.kpi-weight-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0;
  margin-top: 0.5rem;
  white-space: nowrap;
}

/* Summary bar */
.kpi-summary {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: #f4f6f8;
  border-radius: 0;
  font-size: 0.875rem;
  color: #6b7280;
}

.kpi-summary-divider {
  color: #dbe0e5;
}

/* === Drawing Grid / Tags === */

.drawing-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.drawing-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 6px 12px;
  border-radius: 0;
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  font-size: 0.75rem;
  font-weight: 500;
  color: #374151;
  transition: all 0.15s ease;
}

.drawing-tag:hover {
  background: #fff;
  border-color: #c9d0d8;
}

.drawing-tag .type-badge {
  font-size: 0.625rem;
  font-weight: 700;
  color: #0EA5E9;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* === Jury Member Cards === */

.jury-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
}

.jury-card:hover {
  background: #FAFAF9;
  transform: translateX(4px);
}

.jury-card .jury-name {
  font-weight: 600;
  color: #18181B;
  font-size: 1rem;
}

.jury-card .jury-role {
  color: #52525B;
  font-size: 0.875rem;
  margin-top: 0.125rem;
}

.jury-card .jury-badge {
  margin-left: auto;
  padding: 0.25rem 0.75rem;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.jury-badge.explicit {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.jury-badge.assumed {
  background: rgba(251, 191, 36, 0.15);
  color: #b45309;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

/* === File Chips === */

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0;
  background: #F5F5F4;
  border: 1px solid #E5E5E5;
  font-size: 0.875rem;
  color: #18181B;
  transition: all 0.2s ease;
}

.file-chip:hover {
  background: #E5E5E5;
}

.file-chip .remove-btn {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.file-chip .remove-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  transform: scale(1.1);
}

/* === Drag and Drop Zone (compact) === */

.drop-zone {
  position: relative;
  border: 2px dashed rgba(14, 165, 233, 0.4);
  border-radius: 0;
  padding: 0.5rem 0.75rem;
  transition: all 0.3s ease;
  background: #FAFAF9;
}

.drop-zone:hover {
  border-color: rgba(14, 165, 233, 0.6);
  background: #F5F5F4;
}

.drop-zone.drag-over,
.ov-ph-dropzone.drag-over {
  border-color: #0EA5E9;
  background: rgba(14, 165, 233, 0.08);
  border-style: solid;
  animation: dash-pulse 1s ease-in-out infinite;
}

/* Full-page drop overlay — shown when dragging files anywhere on the page */
.body-drag-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(14, 165, 233, 0.06);
  border: 3px dashed rgba(14, 165, 233, 0.4);
  pointer-events: none;
  align-items: center;
  justify-content: center;
}
.body-drag-overlay .body-drag-label {
  background: #fff;
  padding: 16px 32px;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0EA5E9;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}
body.dragging-file .body-drag-overlay {
  display: flex;
}

.drop-zone .upload-icon {
  width: 1.25rem;
  height: 1.25rem;
  opacity: 0.6;
}

/* === Toast Notifications === */

.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  padding: 1rem 1.25rem;
  border-radius: 0;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  animation: toast-in 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast.hiding {
  animation: toast-out 0.3s ease forwards;
}

.toast.success {
  border-left: 3px solid #10b981;
}

.toast.error {
  border-left: 3px solid #ef4444;
}

.toast.info {
  border-left: 3px solid #0EA5E9;
}

.toast-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

.toast-message {
  color: #374151;
  font-size: 0.875rem;
  line-height: 1.5;
  flex: 1;
}

.gantt-toast-undo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.toast-action-btn.gantt-undo-btn {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(14, 165, 233, 1);
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.4);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.toast-action-btn.gantt-undo-btn:hover {
  background: rgba(14, 165, 233, 0.25);
  border-color: rgba(14, 165, 233, 0.6);
}

/* === Progress Indicators === */

.progress-line {
  height: 3px;
  background: #E5E5E5;
  border-radius: 0;
  overflow: hidden;
  position: relative;
}

.progress-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 30%;
  background: linear-gradient(90deg, #0EA5E9, #0EA5E9);
  animation: progress-slide 1.5s ease-in-out infinite;
}

@keyframes progress-slide {
  0% { left: -30%; }
  100% { left: 100%; }
}

/* === Batch 2 Workspace Header === */

.batch2-workspace-header {
  padding: 0.75rem 1rem;
  border-radius: 0;
  background: #ffffff;
  border: 1px solid #dbe0e5;
}

.batch2-workspace-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.batch2-workspace-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.batch2-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #f3f4f6;
  color: #9aa2ac;
  border: 1px solid #dbe0e5;
  white-space: nowrap;
  flex-shrink: 0;
}

.batch2-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2a2f3a;
  line-height: 1.25;
}

.batch2-desc {
  font-size: 0.72rem;
  color: #9aa2ac;
  line-height: 1.4;
  margin-top: 0.1rem;
}

/* Subtle left border accent on Batch 2 sections */
.batch2-section {
  border-left: 2px solid rgba(14,165,233,0.2);
}

/* ── Four-tab view gating ──────────────────────────────────────────────────
   #detail-sections carries .view-overview / .view-site / .view-research / .view-design.
   Overview tab: show only batch1-section items.
   Site tab:     show only site-section items (Map, Site Background, Environment).
   Research tab: show batch2 items, hide batch1 + batch3 + site items.
   Design tab:   show batch3 items, hide batch1 + batch2 + site + context-workspace.
   ─────────────────────────────────────────────────────────────────────────── */

/* Overview tab: hide batch2/batch3/site items and the Batch 3 group label */
#detail-sections.view-overview .batch2-section,
#detail-sections.view-overview .batch3-section,
#detail-sections.view-overview .site-section,
#detail-sections.view-overview #context-workspace,
#detail-sections.view-overview .batch-group-label {
  display: none;
}

/* Site tab: show only site-section; hide everything else.
   #context-workspace is NOT hidden here — site-section elements live inside it. */
#detail-sections.view-site .batch1-section,
#detail-sections.view-site .batch2-section,
#detail-sections.view-site .batch3-section,
#detail-sections.view-site .batch-group-label,
#detail-sections.view-site .ed-reading-progress {
  display: none;
}

/* Research tab: hide batch1, batch3, and site items */
#detail-sections.view-research .batch1-section,
#detail-sections.view-research .batch3-section,
#detail-sections.view-research .site-section {
  display: none;
}

/* Design tab: hide batch1 + batch2 + site items and context-workspace */
#detail-sections.view-design .batch1-section,
#detail-sections.view-design .batch2-section,
#detail-sections.view-design .site-section,
#detail-sections.view-design #context-workspace {
  display: none;
}

/* Hide editorial chapter nav + progress bar when not on research tab */
#detail-sections:not(.view-research) ~ .ed-reading-progress,
#detail-sections:not(.view-research) ~ .ed-chapter-actions {
  display: none;
}

/* Design tab nav — active uses accent blue */
.design-chapter-top-nav .ed-chapter-nav-link.active {
  color: #0EA5E9;
  border-bottom-color: #0EA5E9;
  font-weight: 600;
}

/* ── Provenance badges: hidden until section has data ─────────────────────── */
.provenance-badges {
  display: none;
}
.provenance-badges.visible {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .batch2-workspace-inner { flex-direction: column; align-items: flex-start; }
  .batch2-desc { display: none; }
}

/* === Context Workspace — Batch 2 editorial container === */
#context-workspace {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* === Unified Progress Panel === */

.progress-panel {
  position: sticky;
  top: 56px;
  z-index: 40;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E5E5;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.progress-panel.hidden {
  display: none;
}

.progress-panel-inner {
  width: 100%;
  max-width: 1800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0.75rem 1.5rem;
}

.progress-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.progress-panel-header span:first-child {
  font-weight: 600;
  color: #18181B;
}

#progress-panel-time {
  font-size: 0.875rem;
  color: #52525B;
  font-variant-numeric: tabular-nums;
}

.progress-panel-bar {
  height: 4px;
  background: #E5E5E5;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-panel-fill {
  height: 100%;
  background: linear-gradient(90deg, #0EA5E9, #0EA5E9);
  border-radius: 0;
  transition: width 0.3s ease;
}

.progress-panel-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.progress-panel-steps li {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.progress-panel-step-icon {
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
}

.progress-panel-step-icon.complete {
  color: #34d399;
}

.progress-panel-step-icon.running {
  color: #0EA5E9;
  animation: progress-spin 1s linear infinite;
}

.progress-panel-step-icon.queued {
  color: rgba(148, 163, 184, 0.9);
}

.progress-panel-step-icon.failed {
  color: #ef4444;
}

@keyframes progress-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn-cancel {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #52525B;
  background: #F5F5F4;
  border: 1px solid #E5E5E5;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-cancel:hover {
  background: #E5E5E5;
  border-color: #D4D4D8;
}

.progress-panel.complete-brief .progress-panel-header span:first-child {
  color: #34d399;
}

/* === Custom Inputs === */

.input-glass {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  color: #18181B;
  transition: all 0.2s ease;
}

.input-glass:focus {
  background: #FFFFFF;
  border-color: #0EA5E9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  outline: none;
}

.input-glass::placeholder {
  color: #A1A1AA;
}

/* === Editorial Input === */
.input-editorial {
  background: #fff;
  border: 1px solid #dbe0e5;
  color: #374151;
  transition: all 0.2s ease;
}

.input-editorial:focus {
  background: #fff;
  border-color: #0EA5E9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  outline: none;
}

.input-editorial::placeholder {
  color: #9aa2ac;
}

/* === Login Page === */

.login-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 2rem;
  color: #2a2f3a;
  line-height: 1.1;
}

.btn-dark {
  background: #2a2f3a;
  color: #f4f6f8;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.btn-dark:hover {
  background: #374151;
}

.login-page .gradient-text {
  font-family: 'DM Sans', sans-serif;
  color: #0EA5E9;
  -webkit-text-fill-color: #0EA5E9;
}

.login-page .btn-gradient {
  background: #0EA5E9;
}

.login-page .btn-gradient:hover {
  background: #0284c7;
}

.login-page .input-editorial:focus {
  border-color: #0EA5E9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
  outline: none;
}

/* Password field: flex wrapper acts as the visual input border */
.password-field-wrap {
  display: flex;
  align-items: center;
  width: 100%;
}
.password-field-wrap:focus-within {
  border-color: #0EA5E9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
  outline: none;
}
.password-field-input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 1rem;
  border: none;
  outline: none;
  background: transparent;
  color: #374151;
  font-size: inherit;
  font-family: inherit;
}
.password-field-input::placeholder { color: #9aa2ac; }
.password-field-toggle {
  flex-shrink: 0;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
}

.login-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.login-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  border-radius: 0;
  background: rgba(14, 165, 233, 0.1);
  color: #0EA5E9;
}

.login-check svg {
  width: 0.875rem;
  height: 0.875rem;
}

.login-hint {
  line-height: 1.5;
}

.btn-register {
  background: transparent;
  color: #2a2f3a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1.5px solid #2a2f3a;
}

.btn-register:hover {
  background: #2a2f3a;
  color: #f4f6f8;
}

.checkbox-ink {
  accent-color: #2a2f3a;
}

/* === Onboarding Guide (first visit — multi-step walkthrough) === */

.onboarding-guide {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: none;
  pointer-events: none;
}

.onboarding-guide.onboarding-visible {
  display: block;
  pointer-events: auto;
}

.onboarding-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  transition: opacity 0.25s ease;
}

/* Spotlight cutout — positioned by JS over the target element */
.onboarding-spotlight {
  position: fixed;
  z-index: 9991;
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  transition: top 0.35s ease, left 0.35s ease, width 0.35s ease, height 0.35s ease;
  pointer-events: none;
  display: none;
}

.onboarding-guide.onboarding-visible .onboarding-spotlight.onboarding-spotlight-active {
  display: block;
}

/* Card — the floating instruction panel */
.onboarding-card {
  position: fixed;
  z-index: 9992;
  background: #FFFFFF;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  max-width: 26rem;
  width: calc(100% - 2rem);
  padding: 1.5rem 1.5rem 1.25rem;
  animation: fade-in-up 0.3s ease-out 0.05s backwards;
  transition: top 0.35s ease, left 0.35s ease;
}

/* Centre the card when no spotlight (welcome/final step) */
.onboarding-card.onboarding-card-centred {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
}

/* Step indicator */
.onboarding-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.onboarding-step-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9aa2ac;
}

.onboarding-dots {
  display: flex;
  gap: 6px;
}

.onboarding-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #dbe0e5;
  transition: background 0.2s ease;
}

.onboarding-dot.onboarding-dot-active {
  background: #2a2f3a;
}

.onboarding-dot.onboarding-dot-done {
  background: #9aa2ac;
}

/* Title */
.onboarding-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #2a2f3a;
  line-height: 1.3;
}

/* Description */
.onboarding-desc {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  color: #374151;
  line-height: 1.65;
}

.onboarding-desc strong {
  color: #2a2f3a;
  font-weight: 600;
}

/* Navigation row */
.onboarding-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.onboarding-nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.onboarding-btn-skip {
  background: none;
  border: none;
  color: #9aa2ac;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.375rem 0;
  transition: color 0.15s ease;
}

.onboarding-btn-skip:hover {
  color: #6b7280;
}

.onboarding-btn-back {
  background: none;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  color: #374151;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.onboarding-btn-back:hover {
  background: #f4f6f8;
  border-color: #9aa2ac;
}

.onboarding-btn-next {
  background: #2a2f3a;
  border: none;
  border-radius: 0;
  color: #f4f6f8;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.onboarding-btn-next:hover {
  background: #374151;
}

/* Data note callout (used in final step) */
.onboarding-note {
  display: block;
  margin: 0.75rem 0 0;
  padding: 0.625rem 0.875rem;
  background: #fef3c7;
  border: 1px solid #fde68a;
  font-size: 0.75rem;
  color: #92400e;
  line-height: 1.5;
}

/* Responsive — smaller screens */
@media (max-width: 640px) {
  .onboarding-card {
    padding: 1.25rem;
  }

  .onboarding-title {
    font-size: 1.125rem;
  }

  .onboarding-nav {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.625rem;
  }

  .onboarding-nav-right {
    justify-content: flex-end;
  }

  .onboarding-btn-skip {
    text-align: center;
  }
}

/* Upload zone pulse (after welcome dismissal) */
@keyframes drop-zone-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(14, 165, 233, 0);
  }
}

.drop-zone.drop-zone-pulse {
  animation: drop-zone-pulse 1s ease-in-out 3;
}

/* === Custom Scrollbar === */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f4f6f8;
}

::-webkit-scrollbar-thumb {
  background: #dbe0e5;
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: #c4c9d0;
}

/* === Modal overlay & content === */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  padding: 1rem;
  animation: fade-in-up 0.2s ease-out;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  max-width: 28rem;
  width: 100%;
  padding: 1.5rem;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #2a2f3a;
}

.modal-description {
  font-size: 0.875rem;
  color: #52525B;
  margin: 0 0 0.75rem;
}

.analysis-confirm-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: #52525B;
}

.analysis-confirm-checklist li {
  padding: 0.25rem 0 0.25rem 1.5rem;
  position: relative;
}

.analysis-confirm-checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: #2a2f3a;
}

.analysis-confirm-time {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin: 0 0 0.5rem;
}

.analysis-confirm-usage {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0 0 1.25rem;
}

.analysis-confirm-usage .mono,
#analysis-confirm-usage-count {
  font-family: 'JetBrains Mono', monospace;
  color: #2a2f3a;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-modal-primary {
  padding: 0.5rem 1rem;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #2a2f3a;
  color: #f4f6f8;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-modal-primary:hover {
  background: #374151;
}

.btn-modal-danger {
  background: #c0392b;
}

.btn-modal-danger:hover {
  background: #a93226;
}

.btn-modal-secondary {
  padding: 0.5rem 1rem;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 500;
  background: #F5F5F4;
  color: #52525B;
  border: 1px solid #E5E5E5;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-modal-secondary:hover {
  background: #E5E5E5;
  color: #18181B;
}

/* === Usage Ring (SVG) === */

.usage-ring {
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.5));
}

.usage-ring-bg {
  fill: none;
  stroke: #E5E5E5;
  stroke-width: 3;
}

.usage-ring-progress {
  fill: none;
  stroke: url(#usage-gradient);
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

/* Usage ring tooltip (hover) */
.usage-ring-wrapper {
  position: relative;
  cursor: default;
}

.usage-ring-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 8px 12px;
  max-width: 260px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #18181B;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 1000;
}

.usage-ring-tooltip.usage-ring-tooltip-visible {
  opacity: 1;
  visibility: visible;
}

.usage-ring-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: #E5E5E5;
}

/* === Status Badge === */

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border: 1px solid transparent;
}

.status-badge.ready {
  background: transparent;
  color: #0EA5E9;
  border-color: rgba(14, 165, 233, 0.35);
}

.status-badge.pending {
  background: transparent;
  color: #b0b8c1;
  border-color: #dbe0e5;
}

.status-badge.processing {
  background: transparent;
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.35);
}

/* === Provenance badges (source: brief / web / AI) — shown only after analysis === */
.provenance-badges {
  /* display controlled by .visible class — hidden until section has data */
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
}

.provenance-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.provenance-badge.provenance-brief {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.provenance-badge.provenance-web {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.provenance-badge.provenance-ai {
  background: rgba(139, 92, 246, 0.12);
  color: #6d28d9;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.status-badge.failed {
  background: transparent;
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.35);
}

/* === Per-section retry button (shown when a section fails during analyse-all) === */

.btn-section-retry {
  padding: 0.2rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-section-retry:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
}

/* === Batch group label (Batch 3 Design kickoff) === */
.batch-group-label {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  padding: 0.5rem 0.25rem 0.25rem;
  border-left: 2px solid rgba(14, 165, 233, 0.4);
  padding-left: 0.875rem;
  margin-bottom: -0.25rem;
}

.batch-group-label-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: #2a2f3a;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.batch-group-label-desc {
  font-size: 0.75rem;
  color: #9aa2ac;
}

/* === Batch tag (B3) shown in section headers === */
.batch-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.4rem;
  border-radius: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: #f3f4f6;
  color: #9aa2ac;
  border: 1px solid #dbe0e5;
}

/* === Pulse animation for Generate Programme button === */
@keyframes btn-pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(14, 165, 233, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

.btn-pulse {
  animation: btn-pulse-ring 1s ease-out 3;
}

/* === Section "New data ready" badge === */
.section-new-data-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 0;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(14, 165, 233, 0.15);
  color: #0EA5E9;
  border: 1px solid rgba(14, 165, 233, 0.3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* === Provenance Tags === */
/* Small source-of-data indicators shown in section headers */
.prov-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 0;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.prov-brief {
  background: rgba(34, 197, 94, 0.15);
  color: rgba(34, 197, 94, 0.9);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.prov-web {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.prov-ai {
  background: rgba(168, 85, 247, 0.15);
  color: rgba(168, 85, 247, 0.9);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* === Responsive === */

@media (max-width: 768px) {
  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast {
    min-width: auto;
  }

  .kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* === Horizontal Timeline === */

.timeline-horizontal-wrapper {
  overflow-x: auto;
  padding: 2rem 0;
  margin: 1rem 0;
}

.timeline-horizontal {
  position: relative;
  min-height: 120px;
  height: 150px;
  background: #F5F5F4;
  border-radius: 0;
  padding: 0 2rem;
  min-width: 800px;
}

.timeline-horizontal::before {
  content: '';
  position: absolute;
  left: 2rem;
  right: 2rem;
  top: 50%;
  height: 2px;
  background: linear-gradient(90deg, #0EA5E9 0%, #0EA5E9 100%);
  opacity: 0.3;
}

.timeline-h-node {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-h-node:hover {
  transform: translate(-50%, -50%) scale(1.05);
}

.timeline-h-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0EA5E9;
  margin: 0 auto;
}

.timeline-h-node.past .timeline-h-dot {
  background: #10b981;
}

.timeline-h-node.today .timeline-h-dot {
  background: #f59e0b;
}

.timeline-h-node.upcoming .timeline-h-dot {
  background: #0EA5E9;
}

.timeline-h-label {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  min-width: 120px;
  text-align: center;
}

.timeline-h-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #0EA5E9;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline-h-text {
  color: #52525B;
  font-size: 0.75rem;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-h-duration {
  position: absolute;
  top: -24px;
  left: 100%;
  font-size: 0.65rem;
  color: #71717A;
  white-space: nowrap;
  padding-left: 0.5rem;
}

.timeline-today-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 10;
}

.timeline-today-marker .marker-line {
  width: 2px;
  height: 100%;
  background: #f59e0b;
}

.timeline-today-marker .marker-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  color: #f59e0b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.timeline-node.past {
  opacity: 0.7;
}

.timeline-node.past .timeline-node {
  background: #10b981;
}

.timeline-node.today .timeline-node {
  background: #f59e0b;
}

.editable {
  cursor: text;
  padding: 2px 4px;
  border-radius: 0;
  transition: background 0.2s ease;
}

.editable:hover {
  background: rgba(0, 0, 0, 0.04);
}

.editable:focus {
  outline: 1px solid #0EA5E9;
  background: rgba(14, 165, 233, 0.05);
}

/* === Area Schedule Accordion Tree === */

.area-tree-section {
  margin-bottom: 1rem;
  border-radius: 0;
  overflow: hidden;
  background: #F5F5F4;
}

.area-tree-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(14, 165, 233, 0.08);
  border-left: 3px solid #0EA5E9;
  cursor: pointer;
  transition: all 0.2s ease;
}

.area-tree-header:hover {
  background: rgba(14, 165, 233, 0.12);
}

.chevron-area {
  transition: transform 0.3s ease;
}

.chevron-area.rotated {
  transform: rotate(-90deg);
}

.section-label {
  font-weight: 600;
  color: #18181B;
}

.item-count-badge {
  padding: 0.125rem 0.5rem;
  border-radius: 0;
  background: rgba(14, 165, 233, 0.2);
  color: #0EA5E9;
  font-size: 0.75rem;
  font-weight: 600;
}

.area-tree-children {
  max-height: 5000px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.area-tree-children.collapsed {
  max-height: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.area-tree-subsection {
  margin-left: 1rem;
  margin-top: 0.5rem;
}

.area-tree-subheader {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(139, 92, 246, 0.06);
  border-left: 2px solid #8b5cf6;
  cursor: pointer;
  transition: all 0.2s ease;
}

.area-tree-subheader:hover {
  background: rgba(139, 92, 246, 0.1);
}

.subsection-label {
  font-weight: 500;
  color: #52525B;
}

.area-tree-subitems {
  max-height: 5000px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.area-tree-subitems.collapsed {
  max-height: 0;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.area-tree-item,
.area-tree-subitem {
  display: grid;
  /* Function | Area | Amount | Head height | Notes/Requirements
     Notes column was getting ~24% which forced 6-line wraps on
     descriptions like "Includes 1,200 m2 at 5.00m height and 400 m2…".
     Notes now gets ~38% so descriptions render in 2-3 lines. */
  grid-template-columns: 2.2fr minmax(100px, 1.1fr) minmax(60px, 0.6fr) minmax(100px, 1fr) minmax(220px, 3.4fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.625rem 1rem;
  margin: 0.25rem 0;
  border-left: 1px solid rgba(139, 92, 246, 0.2);
  transition: all 0.2s ease;
}

.area-tree-item:hover,
.area-tree-subitem:hover {
  background: #F5F5F4;
  transform: translateX(2px);
}

.area-tree-item:nth-child(even),
.area-tree-subitem:nth-child(even) {
  background: #FAFAF9;
}

.area-tree-subitem {
  margin-left: 1.5rem;
  font-size: 0.875rem;
}

.item-label {
  color: #18181B;
  font-weight: 500;
}

.area-value-cell {
  position: relative;
  padding: 0.25rem 0.5rem;
  text-align: right;
}

.area-column-headers {
  display: grid;
  grid-template-columns: 3fr minmax(100px, 1.2fr) minmax(70px, 0.8fr) minmax(100px, 1.2fr) minmax(150px, 2fr);
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  background: rgba(14, 165, 233, 0.06);
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #52525B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.area-value-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.1), rgba(14, 165, 233, 0.2));
  border-radius: 0;
  z-index: 0;
}

.area-value-text {
  position: relative;
  z-index: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #0EA5E9;
  font-weight: 600;
}

/* ── Area Schedule mobile responsive ─────────────────────── */
@media (max-width: 640px) {
  /* List view: collapse 5-column grid to 2 columns (name + primary value).
     Columns 3-5 (qty, area/unit, bar) are hidden to prevent overflow. */
  .area-tree-item,
  .area-tree-subitem,
  .area-column-headers {
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
  }
  .area-tree-item > *:nth-child(n+3),
  .area-tree-subitem > *:nth-child(n+3),
  .area-column-headers > *:nth-child(n+3) {
    display: none;
  }

  /* Reduce indentation so names don't wrap too early */
  .area-tree-subsection { margin-left: 0.5rem; }
  .area-tree-subitem    { margin-left: 0.75rem; }

  /* Tighter headers */
  .area-tree-header,
  .area-tree-subheader  { padding: 0.625rem 0.75rem; gap: 0.5rem; }

  /* Treemap: shorter on mobile so tiles aren't tiny slivers */
  .area-treemap-container { height: 340px; }

  /* Prevent the whole tree section from clipping horizontally */
  .area-tree-section { overflow: visible; }
}

/* === Area Schedule View Toggle === */

.area-view-toggle {
  display: inline-flex;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  gap: 0;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 6px 12px;
  background: none;
  border: none;
  border-right: 1px solid #dbe0e5;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.view-toggle-btn:last-child {
  border-right: none;
}

.view-toggle-btn:hover {
  background: #f4f6f8;
  color: #374151;
}

.view-toggle-btn.active {
  background: #f4f6f8;
  color: #0EA5E9;
  font-weight: 600;
}

.view-toggle-btn svg {
  width: 14px;
  height: 14px;
}

/* === Treemap Visualization === */

.area-treemap-container {
  position: relative;
  width: 100%;
  height: 500px;
  background: #F5F5F4;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid #E5E5E5;
}

.treemap-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.treemap-rect {
  position: absolute;
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 2px;
}

.treemap-rect:hover {
  filter: brightness(1.15);
  z-index: 100;
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border-width: 2px;
}

.treemap-section {
  border-width: 3px;
  border-color: rgba(0, 0, 0, 0.5);
}

.treemap-subsection {
  border-width: 2px;
  border-color: rgba(0, 0, 0, 0.4);
}

.treemap-item {
  border-width: 1px;
  border-color: rgba(0, 0, 0, 0.2);
}

.treemap-label {
  padding: 0.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
  z-index: 1;
  position: relative;
}

.treemap-value {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  margin-top: 0.25rem;
  opacity: 0.8;
}

.treemap-tooltip {
  position: fixed;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 0;
  padding: 0.75rem 1rem;
  color: #18181B;
  font-size: 0.875rem;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  max-width: 320px;
  min-width: 180px;
  line-height: 1.4;
}

.treemap-tooltip-eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #71717A;
  margin-bottom: 0.25rem;
}

.treemap-tooltip-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #18181B;
  margin-bottom: 0.375rem;
  line-height: 1.3;
}

.treemap-tooltip-area {
  font-size: 0.8125rem;
  color: #52525B;
  margin-bottom: 0.5rem;
}

.treemap-tooltip-pct {
  font-size: 0.75rem;
  color: #71717A;
  margin-left: 0.375rem;
}

.treemap-tooltip-bar-track {
  height: 4px;
  background: #E5E5E5;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 0.625rem;
}

.treemap-tooltip-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, rgba(99, 179, 237, 0.8), rgba(129, 140, 248, 0.8));
  border-radius: 0;
  transition: width 0.2s ease;
}

.treemap-tooltip-extras {
  border-top: 1px solid #E5E5E5;
  padding-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.treemap-tooltip-extra-row {
  font-size: 0.75rem;
  color: #52525B;
  line-height: 1.4;
}

.treemap-tooltip-extra-key {
  color: #71717A;
  margin-right: 0.25rem;
}

/* === KPI Enhanced Cards === */

.kpi-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0;
  background: #f4f6f8;
  font-size: 0.875rem;
  color: #52525B;
}

.kpi-summary-divider {
  color: #dbe0e5;
}

.kpi-card.expandable {
  cursor: pointer;
}

.kpi-card .kpi-chart {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

.kpi-content {
  position: relative;
  flex: 1;
}

.kpi-description {
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
}

.kpi-card.expanded .kpi-description {
  max-height: 300px;
  margin-top: 0.5rem;
}

.kpi-expand-icon {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  color: #9aa2ac;
  transition: transform 0.3s ease;
}

/* === Deliverables Enhanced === */

.deliverables-summary {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0;
  background: #f4f6f8;
  font-size: 0.875rem;
  color: #374151;
}

.deliverables-tags-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.deliverables-type-group {
  border-radius: 0;
  overflow: hidden;
}

.type-group-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  background: #f4f6f8;
  border-left: 3px solid;
  margin-bottom: 0.75rem;
}

.type-group-name {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #2a2f3a;
}

.type-group-count {
  padding: 0.125rem 0.5rem;
  border-radius: 0;
  background: #fff;
  border: 1px solid #dbe0e5;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 600;
}

.drawing-tag .type-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.deliverables-table-view {
  overflow-x: auto;
}

/* Prohibited-deliverables banner. Listed-as-Optional rows for items the
   brief explicitly forbids (physical models, animation, website, etc.)
   risk disqualification — the banner is intentionally loud so it can't
   be misread as a soft suggestion. Sits above the deliverables grid. */
.deliverables-prohibited-banner {
  margin: 0 0 1rem 0;
  padding: 0.875rem 1rem;
  border-left: 3px solid #b91c1c;
  background: #fef2f2;
  color: #7f1d1d;
  border-radius: 2px;
}
.deliverables-prohibited-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}
.deliverables-prohibited-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.55;
}
.deliverables-prohibited-list li {
  margin: 0.15rem 0;
}
.deliverables-prohibited-quote {
  font-style: italic;
  color: #991b1b;
}

.deliverables-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.deliverables-table thead {
  background: #f4f6f8;
}

.deliverables-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9aa2ac;
  cursor: pointer;
  transition: background 0.15s ease;
}

.deliverables-table th:hover {
  background: #f3f4f6;
}

.deliverables-table th .sort-icon {
  margin-left: 0.25rem;
  font-size: 0.75rem;
  opacity: 0.5;
}

.deliverables-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s ease;
}

.deliverables-table tbody tr:nth-child(even) {
  background: transparent;
}

.deliverables-table tbody tr:hover {
  background: #f9fafb;
}

.deliverables-table td {
  padding: 0.75rem 1rem;
  color: #374151;
}

/* === Jury Enhanced Cards === */

.jury-card-enhanced {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 0;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.jury-card-enhanced:hover {
  background: #FAFAF9;
  transform: translateX(4px);
}

.jury-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.jury-info {
  flex: 1;
  min-width: 0;
}

.jury-expanded {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}

.jury-card-enhanced.expanded .jury-expanded {
  max-height: 200px;
  margin-top: 0.75rem;
}

.jury-detail-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.jury-detail-label {
  color: #52525B;
  font-weight: 500;
}

.jury-detail-value {
  color: #52525B;
}

.jury-dossier-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0;
  background: rgba(14, 165, 233, 0.15);
  color: #0EA5E9;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.jury-dossier-link:hover {
  background: rgba(14, 165, 233, 0.25);
}

.jury-badge-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.jury-badge-icon.explicit {
  background: rgba(14, 165, 233, 0.15);
  color: #0EA5E9;
}

.jury-badge-icon.assumed {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.jury-expand-icon {
  flex-shrink: 0;
  color: #71717A;
  transition: transform 0.3s ease;
}

/* === Jury card grid (research-style) === */
.jury-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.jury-card.jury-card-preview .jury-card-image.jury-card-placeholder,
.jury-card .jury-card-image.jury-card-placeholder {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(14, 165, 233, 0.2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.5rem;
  font-weight: 700;
}

.jury-member-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.jury-member-initials {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.jury-truncation-notice {
  margin-bottom: 1rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #b45309;
  font-size: 0.8125rem;
}

.jury-card-badge {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0;
  margin-left: 0.35rem;
}

.jury-card-badge-web {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.jury-card-badge-brief {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.jury-key-project {
  margin: 0.75rem 0;
  padding-left: 0.75rem;
  border-left: 3px solid rgba(14, 165, 233, 0.3);
}

.jury-key-project a {
  color: #0EA5E9;
  text-decoration: none;
  font-size: 0.75rem;
}

.jury-key-project a:hover {
  text-decoration: underline;
}

/* === Research Magazine Layout === */

.rm-magazine {
  max-width: 100%;
}

/* ── Magazine Opener ── */

.rm-opener {
  padding: 2.5rem 0 2rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #E5E5E5;
}

.rm-opener-title {
  margin: 0 0 1.25rem 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  font-weight: 700;
  font-style: italic;
  color: #2a2f3a;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.rm-opener-summary {
  max-width: 680px;
}

.rm-opener-summary p {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  color: #52525B;
  line-height: 1.8;
}

/* Drop cap on opener */
.rm-opener-summary p::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  float: left;
  font-size: 3.4em;
  line-height: 0.82;
  padding-right: 0.08em;
  margin-top: 0.06em;
  font-weight: 700;
  color: #2a2f3a;
}

.rm-opener-threads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.rm-opener-threads-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #A1A1AA;
  margin-right: 0.25rem;
}

.rm-thread-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #52525B;
  background: transparent;
  border: 1px solid #dbe0e5;
  padding: 0.375rem 0.875rem;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'DM Sans', 'Inter', sans-serif;
}

.rm-thread-pill:hover {
  border-color: #A1A1AA;
  color: #2a2f3a;
}

.rm-thread-pill.active {
  background: #2a2f3a;
  border-color: #2a2f3a;
  color: #fff;
}

/* ── Chapter Navigation ── */

.rm-chapter-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #E5E5E5;
  margin-bottom: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-top: 0.5rem;
}

.rm-chapter-nav::-webkit-scrollbar {
  display: none;
}

.rm-chapter-tab {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #A1A1AA;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-bottom: -1px;
  flex-shrink: 0;
}

.rm-chapter-tab:hover {
  color: #52525B;
}

.rm-chapter-tab.active {
  color: #2a2f3a;
  border-bottom-color: #2a2f3a;
}

.rm-chapter-tab-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

.rm-chapter-tab.active .rm-chapter-tab-num {
  opacity: 1;
}

.rm-chapter-tab-title {
  font-weight: 500;
}

/* ── Tab Panels (reuse existing mechanism) ── */

.research-tab-panels {
  position: relative;
}

.research-tab-panel {
  display: block;
  scroll-margin-top: 152px;
}

.research-tab-panel + .research-tab-panel {
  border-top: 2px solid #f1f5f9;
  margin-top: 2rem;
  padding-top: 2rem;
}

@keyframes rmFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .research-tab-panel { animation: none; }
}

/* ── Moodboard ── */

/* ── Moodboard Pinterest Board ── */

.moodboard-editorial-intro {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--ink-soft);
  font-style: italic;
  max-width: 720px;
  margin-bottom: 2rem;
}

.moodboard-board {
  columns: 5;
  column-gap: 10px;
}

@media (max-width: 1280px) { .moodboard-board { columns: 4; } }
@media (max-width: 960px)  { .moodboard-board { columns: 3; } }
@media (max-width: 640px)  { .moodboard-board { columns: 2; } }

.moodboard-card {
  break-inside: avoid;
  margin-bottom: 10px;
  position: relative;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--ground);
  display: block;
}

.moodboard-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

.moodboard-card:hover img {
  transform: scale(1.04);
}

.moodboard-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18,18,24,0.82) 0%, rgba(18,18,24,0.0) 55%);
  opacity: 0;
  transition: opacity 240ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.875rem;
  pointer-events: none;
}

.moodboard-card:hover .moodboard-card-overlay {
  opacity: 1;
}

.moodboard-card-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 0.2rem;
  letter-spacing: 0.01em;
}

.moodboard-card-caption {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.45;
}

.moodboard-card-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ground);
  color: var(--label);
  padding: 0.75rem;
  text-align: center;
  gap: 0.3rem;
}

.moodboard-card-placeholder-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  line-height: 1.3;
}

.moodboard-card-placeholder-caption {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 400;
  color: #9ca3af;
  line-height: 1.4;
}

/* ── Moodboard Lightbox ── */

.moodboard-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: mb-fade-in 180ms ease;
}

@keyframes mb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.moodboard-lightbox-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px rgba(0,0,0,0.18);
  max-width: 860px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  animation: mb-panel-in 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes mb-panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.moodboard-lightbox-header {
  padding: 1.5rem 1.5rem 1rem;
}

.moodboard-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--ground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1;
  transition: background 150ms ease, color 150ms ease;
}

.moodboard-lightbox-close:hover {
  background: var(--border);
  color: var(--ink);
}

.moodboard-lightbox-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 2rem 0.375rem 0;
  line-height: 1.3;
}

.moodboard-lightbox-caption {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 0 0 0.875rem;
}

.moodboard-lightbox-source {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: color 150ms ease, border-color 150ms ease;
}

.moodboard-lightbox-source:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.moodboard-lightbox-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 1.5rem 1.5rem;
}

.moodboard-lightbox-images img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 0;
  border: 1px solid var(--border-light);
  display: block;
}

.moodboard-lightbox-empty {
  padding: 2rem 1.5rem;
  font-size: 0.8125rem;
  color: var(--label);
  font-style: italic;
  text-align: center;
}

/* ── Chapter Header ── */

.rm-chapter-header {
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
}

.rm-chapter-number {
  display: block;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #A1A1AA;
  margin-bottom: 0.5rem;
}

.rm-chapter-title {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.375rem, 1rem + 1.5vw, 2rem);
  font-weight: 600;
  color: #2a2f3a;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* ── Editorial Intro ── */

.rm-editorial-intro {
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.rm-editorial-intro p {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  color: #52525B;
  line-height: 1.8;
}

.rm-editorial-intro p::first-letter {
  font-family: 'Playfair Display', Georgia, serif;
  float: left;
  font-size: 3.2em;
  line-height: 0.82;
  padding-right: 0.08em;
  margin-top: 0.06em;
  font-weight: 700;
  color: #2a2f3a;
}

/* ── Editorial Spread (featured findings) ── */

.rm-spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 3rem;
  background: #fff;
  border: 1px solid #E5E5E5;
  overflow: hidden;
}

.rm-spread-img-right {
  grid-template-columns: 1fr 1fr;
}

.rm-spread-img-right .rm-spread-image {
  order: 2;
}

.rm-spread-img-right .rm-spread-content {
  order: 1;
}

.rm-spread-image {
  min-height: 380px;
  overflow: hidden;
  position: relative;
}

.rm-spread-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.rm-spread:hover .rm-spread-image img {
  transform: scale(1.03);
}

.rm-spread-content {
  padding: 2rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rm-spread-title {
  margin: 0 0 0.75rem 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: #2a2f3a;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* ArchDaily-style metadata */
.rm-spread-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid #E5E5E5;
  border-bottom: 1px solid #E5E5E5;
  margin-bottom: 1rem;
}

.rm-spread-meta div {
  display: flex;
  flex-direction: column;
}

.rm-spread-meta dt {
  font-family: 'JetBrains Mono', 'DM Sans', monospace;
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #A1A1AA;
  margin-bottom: 0.125rem;
}

.rm-spread-meta dd {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #2a2f3a;
}

.rm-spread-body {
  margin: 0 0 1rem 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: #52525B;
  line-height: 1.7;
}

/* Pull quote */
.rm-pull-quote {
  margin: 0.5rem 0 1rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 3px solid #2a2f3a;
}

.rm-pull-quote p {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.9375rem;
  font-style: italic;
  color: #334155;
  line-height: 1.55;
}

/* Relevance */
.rm-spread-relevance,
.rm-article-relevance {
  margin: 0.5rem 0 0 0;
  font-size: 0.8125rem;
  color: #71717A;
  line-height: 1.5;
}

.rm-relevance-label {
  font-family: 'JetBrains Mono', 'DM Sans', monospace;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A1A1AA;
  margin-right: 0.5rem;
}

/* Source links */
.rm-source-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.rm-source-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #A1A1AA;
}

.rm-source-link {
  font-size: 0.75rem;
  color: #0EA5E9;
  text-decoration: none;
  padding: 0.25rem 0.625rem;
  border: 1px solid rgba(14, 165, 233, 0.25);
  transition: all 0.2s ease;
  font-weight: 500;
}

.rm-source-link:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.5);
  text-decoration: none;
}

/* ── Article Cards (regular findings) ── */

.rm-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.rm-article {
  background: #fff;
  border: 1px solid #E5E5E5;
  overflow: hidden;
  transition: all 0.3s ease;
}

.rm-article:hover {
  border-color: #D4D4D8;
}

.rm-article-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.rm-article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.rm-article:hover .rm-article-image img {
  transform: scale(1.03);
}

.rm-article-content {
  padding: 1.25rem 1.5rem 1.5rem;
}

.rm-article-title {
  margin: 0 0 0.375rem 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #2a2f3a;
  line-height: 1.3;
}

.rm-article-meta {
  margin: 0 0 0.75rem 0;
  font-size: 0.75rem;
  color: #A1A1AA;
  font-weight: 500;
}

.rm-article-body {
  margin: 0 0 0.75rem 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  color: #52525B;
  line-height: 1.65;
}

.rm-article-insight {
  margin: 0 0 0.5rem 0;
  padding: 0 0 0 1rem;
  border-left: 2px solid #dbe0e5;
}

.rm-article-insight p {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.8125rem;
  font-style: italic;
  color: #475569;
  line-height: 1.5;
}

/* ── Image Placeholders ── */

.rm-image,
.rm-article-image,
.rm-spread-image {
  position: relative;
  overflow: hidden;
}

.rm-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rm-img-placeholder-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.rm-img-fallback {
  background: linear-gradient(135deg, #1a2332, #2d3f54);
}

.rm-img-fallback img {
  display: none;
}

/* ── Moodboard Gallery ── */

.rm-gallery-theme {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2.5rem 0 1rem;
  padding: 0;
}

.rm-gallery-theme:first-child {
  margin-top: 0.5rem;
}

.rm-gallery-theme::before,
.rm-gallery-theme::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E5E5;
}

.rm-gallery-theme-label {
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #A1A1AA;
  white-space: nowrap;
}

.rm-gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 180px;
  gap: 6px;
  margin-bottom: 1rem;
}

.rm-gallery-item {
  position: relative;
  overflow: hidden;
  margin: 0;
  grid-column: span 4;
  cursor: pointer;
}

/* First item in theme is featured — spans larger */
.rm-gallery-item-featured {
  grid-column: span 6;
  grid-row: span 2;
}

.rm-gallery-item img,
.rm-gallery-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.rm-gallery-item:hover img {
  transform: scale(1.05);
}

.rm-gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 0.75rem 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.rm-gallery-item:hover figcaption {
  opacity: 1;
}

.rm-gallery-item figcaption strong {
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.rm-gallery-item figcaption span {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.35;
}

.rm-gallery-attribution {
  display: block;
  font-size: 0.5625rem;
  color: rgba(255,255,255,0.45);
  margin-top: 0.25rem;
  letter-spacing: 0.01em;
}

.rm-gallery-attribution a {
  color: rgba(255,255,255,0.45);
  text-decoration: none;
}

.rm-gallery-attribution a:hover {
  color: rgba(255,255,255,0.7);
}

/* ── Lightbox (retained) ── */

.research-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: lightbox-fade 0.2s ease;
}

@keyframes lightbox-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.research-lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}

.research-lightbox-image {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
}

.research-lightbox-close {
  position: absolute;
  top: -2rem;
  right: -1rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.research-lightbox-close:hover {
  color: #fff;
}

.research-lightbox-caption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  max-width: 600px;
}

/* Legacy detail styles (used by HTML export) */
.research-detail-text {
  margin: 0 0 0.75rem 0;
  font-size: 0.875rem;
  color: #52525B;
  line-height: 1.6;
}

.research-detail-insight {
  margin: 0 0 0.75rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid rgba(14, 165, 233, 0.4);
  background: rgba(14, 165, 233, 0.05);
}

.research-detail-insight p {
  margin: 0;
  font-size: 0.8125rem;
  font-style: italic;
  color: #475569;
  line-height: 1.5;
}

.research-detail-relevance {
  margin: 0 0 0.75rem 0;
  font-size: 0.8125rem;
  color: #52525B;
  line-height: 1.5;
  padding-left: 1rem;
  border-left: 3px solid #E5E5E5;
}

.research-detail-metadata {
  margin: 0.75rem 0;
  font-size: 0.75rem;
  color: #71717A;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .rm-spread {
    grid-template-columns: 1fr;
  }

  .rm-spread-img-right .rm-spread-image {
    order: 1;
  }

  .rm-spread-img-right .rm-spread-content {
    order: 2;
  }

  .rm-spread-image {
    min-height: 240px;
  }

  .rm-spread-content {
    padding: 1.25rem 1rem;
  }

  .rm-articles-grid {
    grid-template-columns: 1fr;
  }

  .rm-opener-title {
    font-size: 1.5rem;
  }

  .rm-chapter-title {
    font-size: 1.25rem;
  }

  .rm-gallery-grid {
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 140px;
  }

  .rm-gallery-item {
    grid-column: span 3;
  }

  .rm-gallery-item-featured {
    grid-column: span 6;
    grid-row: span 1;
  }
}

@media (max-width: 480px) {
  .rm-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 120px;
    gap: 4px;
  }

  .rm-gallery-item {
    grid-column: span 1;
  }

  .rm-gallery-item-featured {
    grid-column: span 2;
    grid-row: span 1;
  }

  .rm-spread-meta {
    gap: 0.5rem 1rem;
  }
}

/* === Enhanced Animations === */

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.kpi-card {
  animation: scale-in 0.3s ease backwards;
}

.kpi-card:nth-child(1) { animation-delay: 0.05s; }
.kpi-card:nth-child(2) { animation-delay: 0.1s; }
.kpi-card:nth-child(3) { animation-delay: 0.15s; }
.kpi-card:nth-child(4) { animation-delay: 0.2s; }
.kpi-card:nth-child(5) { animation-delay: 0.25s; }
.kpi-card:nth-child(6) { animation-delay: 0.3s; }
.kpi-card:nth-child(n+7) { animation-delay: 0.35s; }

.jury-card-enhanced {
  animation: fade-in-up 0.4s ease backwards;
}

.jury-card-enhanced:nth-child(1) { animation-delay: 0.1s; }
.jury-card-enhanced:nth-child(2) { animation-delay: 0.2s; }
.jury-card-enhanced:nth-child(3) { animation-delay: 0.3s; }
.jury-card-enhanced:nth-child(4) { animation-delay: 0.4s; }
.jury-card-enhanced:nth-child(n+5) { animation-delay: 0.5s; }

/* ==========================================================
   UI-6: Batch 2 Editorial Restyling
   ========================================================== */

/* ── Batch 2 workspace header: dark pill CTA ──────────────── */
.btn-dark-pill {
  background: #2a2f3a;
  color: #f4f6f8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 9px 20px;
  border-radius: 0;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
  text-decoration: none;
  display: inline-block;
}
.btn-dark-pill:hover { opacity: 0.82; color: #f4f6f8; text-decoration: none; }

/* ── Batch 2 section header elements ─────────────────────── */
.b2-chevron {
  width: 16px;
  height: 16px;
  color: #9aa2ac;
  flex-shrink: 0;
}

.b2-section-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #2a2f3a;
  letter-spacing: -0.01em;
}

.b2-btn-secondary {
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  color: #374151;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s;
}
.b2-btn-secondary:hover { background: #eaecef; color: #2a2f3a; text-decoration: none; }

/* ── Batch 2 section body ─────────────────────────────────── */
.b2-section-body {
  padding: 1.25rem 1.5rem 1.75rem;
}

.b2-caution-notice {
  font-size: 11.5px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0;
  padding: 0.5rem 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.b2-empty-msg {
  font-size: 13px;
  color: #9aa2ac;
  font-style: italic;
}

/* ── Jury V2 grid — 4 columns, in-place expansion ───────── */
.jury-v2-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
}

/* Collapsed card */
.jury-v2-card {
  background: #ffffff;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s;
  overflow: hidden;
  position: relative;
}

.jury-v2-card:hover {
  border-color: #b0bcc8;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

/* Expanded: span all columns, cursor back to default */
.jury-v2-card.expanded {
  grid-column: 1 / -1;
  cursor: default;
}

.jury-v2-card.expanded .jury-v2-collapsed {
  display: none;
}

.jury-v2-collapsed {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.jury-v2-portrait-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e8ecf0;
  flex-shrink: 0;
}

.jury-v2-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.jury-v2-portrait-placeholder {
  object-fit: cover;
  object-position: center;
}

/* Shared initials fallback for jury portraits across all sizes
   (jury-v2-portrait / jury-v2-exp-portrait / jury-condensed-avatar-img).
   Keeps the host class's own width/height, then adds typography. */
.jury-portrait-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: clamp(0.85rem, 2.2vw, 1.6rem);
}
.jury-condensed-avatar-img.jury-portrait-initials {
  font-size: 0.9rem;
}

.jury-v2-card-footer {
  padding: 0.625rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.jury-v2-collapsed-name {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  font-size: 13px;
  color: #2a2f3a;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.jury-v2-collapsed-role {
  font-size: 10.5px;
  color: #6b7280;
  line-height: 1.35;
}

.jury-v2-badge-row {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.jury-v2-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 0;
  letter-spacing: 0.03em;
}

.jury-v2-badge-brief { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.jury-v2-badge-web   { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }

.jury-v2-hint {
  font-size: 10px;
  color: #9aa2ac;
  transition: color 0.15s;
}

.jury-v2-card:hover .jury-v2-hint { color: #0EA5E9; }

/* ── Expanded state content ──────────────────────────────── */
.jury-v2-expanded-content {
  display: none;
  position: relative;
}

.jury-v2-card.expanded .jury-v2-expanded-content {
  display: block;
}

.jury-v2-close {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  color: #6b7280;
  transition: background 0.15s, color 0.15s;
  z-index: 2;
  line-height: 1;
}
.jury-v2-close:hover { background: #e5e7eb; color: #2a2f3a; }

/* Expanded two-column layout */
.jury-v2-exp-layout {
  display: flex;
  gap: 0;
}

.jury-v2-exp-layout--split .jury-v2-exp-left {
  flex: 0 0 55%;
  min-width: 0;
  border-right: 1px solid #f0f2f4;
}

.jury-v2-exp-layout--full .jury-v2-exp-left {
  flex: 1;
}

.jury-v2-exp-right {
  flex: 0 0 45%;
  min-width: 0;
  padding: 1.25rem 1.5rem 1.5rem;
  background: #fafbfc;
}

/* Expanded header: portrait + identity side by side */
.jury-v2-exp-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem 1.5rem 1rem;
}

.jury-v2-exp-portrait {
  width: 120px;
  height: 160px;
  border-radius: 0;
  object-fit: cover;
  object-position: top center;
  border: 1px solid #dbe0e5;
  flex-shrink: 0;
  display: block;
}

.jury-v2-exp-portrait-placeholder {
  object-position: center;
}

.jury-v2-exp-initials {
  width: 120px;
  height: 160px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  flex-shrink: 0;
}

.jury-v2-exp-identity {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.jury-v2-exp-bio {
  padding: 0 1.5rem 1.25rem;
  border-top: 1px solid #f0f2f4;
}

.jury-v2-exp-name {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  font-size: 20px;
  color: #2a2f3a;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.jury-v2-exp-role {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
}

.jury-v2-exp-org {
  font-size: 12px;
  color: #9aa2ac;
  font-style: italic;
  margin-bottom: 0.375rem;
}

.jury-v2-bio {
  font-family: 'Inter', 'system-ui', sans-serif;
  font-size: 13px;
  line-height: 1.65;
  color: #374151;
  margin-top: 0.5rem;
}

.jury-v2-bio-sub {
  font-size: 12.5px;
  color: #6b7280;
  margin-top: 0.25rem;
}

.jury-v2-brief-ref {
  font-size: 11.5px;
  color: #6b7280;
  margin-top: 0.35rem;
  font-style: italic;
}

.jury-v2-brief-citation {
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: #f8f9fa;
  border-left: 3px solid #d1d5db;
  border-radius: 0 4px 4px 0;
}

.jury-v2-brief-loc {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.jury-v2-brief-quote {
  margin: 0;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #374151;
  font-style: italic;
}

/* Key links row */
.jury-v2-links-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.jury-v2-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #0EA5E9;
  text-decoration: none;
  padding: 3px 9px 3px 7px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 0;
  transition: background 0.12s;
  white-space: nowrap;
}

.jury-v2-link:hover { background: #bae6fd; text-decoration: none; color: #0284C7; }

/* ── Projects section (right column in expanded view) ─────── */
.jury-v2-projects-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9aa2ac;
  margin-bottom: 0.875rem;
}

.jury-v2-proj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.jury-v2-proj-card {
  border: 1px solid #dbe0e5;
  border-radius: 0;
  overflow: hidden;
  background: #ffffff;
  transition: border-color 0.15s;
  display: block;
  text-decoration: none;
  color: inherit;
}

.jury-v2-proj-card:hover { border-color: #c4cdd6; }

.jury-v2-proj-thumb {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  background: #f4f6f8;
}

.jury-v2-proj-placeholder {
  width: 100%;
  height: 110px;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.jury-v2-proj-body {
  padding: 0.625rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.jury-v2-proj-role {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9aa2ac;
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  padding: 1px 5px;
  border-radius: 0;
  display: inline-block;
  margin-bottom: 0.2rem;
  align-self: flex-start;
}

.jury-v2-proj-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #2a2f3a;
  line-height: 1.3;
}

.jury-v2-proj-year {
  font-size: 11px;
  color: #9aa2ac;
}

.jury-v2-proj-desc {
  font-family: 'Inter', 'system-ui', sans-serif;
  font-size: 11.5px;
  line-height: 1.55;
  color: #6b7280;
  margin-top: 0.125rem;
}

.jury-v2-proj-link {
  font-size: 10.5px;
  color: #0EA5E9;
  text-decoration: none;
  margin-top: 0.25rem;
  display: inline-block;
}
.jury-v2-proj-link:hover { text-decoration: underline; }

.jury-v2-proj-search {
  font-size: 10px;
  color: #9aa2ac;
  text-decoration: none;
  margin-top: 0.25rem;
  display: inline-block;
}
.jury-v2-proj-search:hover { color: #0EA5E9; text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 960px) {
  .jury-v2-grid { grid-template-columns: repeat(2, 1fr); }
  .jury-v2-proj-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .jury-v2-grid { grid-template-columns: 1fr; }
  .jury-v2-proj-grid { grid-template-columns: 1fr; }
  .jury-v2-exp-header { flex-direction: column; }
  /* Stack expanded card vertically on mobile */
  .jury-v2-exp-layout { flex-direction: column; }
  .jury-v2-exp-layout--split .jury-v2-exp-left {
    flex: 0 0 auto;
    border-right: none;
    border-bottom: 1px solid #f0f2f4;
  }
  .jury-v2-exp-right { flex: 0 0 auto; }
  /* Portrait: full width on mobile */
  .jury-v2-exp-portrait,
  .jury-v2-exp-initials {
    width: 100%;
    height: 200px;
  }
}

/* === Gantt Chart Styles === */

/* Schedule quality warning banner (above Gantt) */
.schedule-quality-warning {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 0;
  color: rgba(253, 224, 71, 0.95);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.schedule-quality-warning:hover {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.5);
}
.schedule-quality-warning-icon {
  flex-shrink: 0;
  font-size: 1.125rem;
}
.schedule-quality-warning-hint {
  opacity: 0.85;
  font-size: 0.8125rem;
}

.gantt-chart-wrapper {
  width: 100%;
  overflow: hidden;
  border-radius: 0;
  background: #F5F5F4;
  border: 1px solid #E5E5E5;
}

.gantt-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 400px;
  position: relative;
}

.gantt-header {
  display: flex;
  border-bottom: 1px solid #E5E5E5;
  background: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 10;
}

.gantt-header-labels {
  width: 260px;
  flex-shrink: 0;
  padding: 0.75rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #52525B;
  border-right: 1px solid #E5E5E5;
}

.gantt-header-timeline {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gantt-header-timeline::-webkit-scrollbar {
  display: none;
}

.gantt-scale-btn.active {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.4);
  color: #18181B;
}

.gantt-timeline-header {
  display: flex;
  height: 100%;
  align-items: center;
  padding: 0.5rem 0;
  min-height: 2.5rem;
}

.gantt-timeline-header--week {
  flex-direction: column;
  align-items: stretch;
  min-height: 3.25rem;
  padding: 0.25rem 0;
}

.gantt-timeline-header-row {
  position: relative;
  height: 1.25rem;
  flex-shrink: 0;
}

.gantt-timeline-header-row--month .gantt-time-tick--month {
  font-weight: 600;
  color: #52525B;
  font-size: 0.75rem;
}

.gantt-timeline-header-row--week .gantt-time-tick--week {
  font-weight: 400;
  color: #71717A;
  font-size: 0.65rem;
}

.gantt-timeline-header--day {
  min-height: 3.25rem;
}

.gantt-time-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #71717A;
  border-left: 1px solid #E5E5E5;
  padding: 0 0.25rem;
}

.gantt-time-tick--day {
  justify-content: center;
  line-height: 1.2;
}

.gantt-time-tick-dayname {
  display: block;
  font-size: 0.6rem;
  white-space: nowrap;
}

.gantt-time-tick-date {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
}

/* Weekend/holiday in day-scale header: same grey as timeline weekend strips */
.gantt-time-tick--weekend {
  background: rgba(0, 0, 0, 0.04);
  border-left: 1px solid rgba(0, 0, 0, 0.04);
  border-right: 1px solid rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.gantt-time-tick.major {
  font-weight: 600;
  color: #52525B;
  border-left-color: #D4D4D8;
}

.gantt-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  max-height: 600px;
  min-height: 0;
}

.gantt-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.gantt-body::-webkit-scrollbar-track {
  background: #F5F5F4;
}

.gantt-body::-webkit-scrollbar-thumb {
  background: #D4D4D8;
  border-radius: 0;
}

.gantt-body::-webkit-scrollbar-thumb:hover {
  background: #A1A1AA;
}

.gantt-timeline-scroll::-webkit-scrollbar,
.gantt-rows-labels::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.gantt-timeline-scroll::-webkit-scrollbar-track,
.gantt-rows-labels::-webkit-scrollbar-track {
  background: #F5F5F4;
}
.gantt-timeline-scroll::-webkit-scrollbar-thumb,
.gantt-rows-labels::-webkit-scrollbar-thumb {
  background: #D4D4D8;
  border-radius: 0;
}
.gantt-timeline-scroll::-webkit-scrollbar-thumb:hover,
.gantt-rows-labels::-webkit-scrollbar-thumb:hover {
  background: #A1A1AA;
}

.gantt-rows-labels {
  width: 260px;
  flex-shrink: 0;
  border-right: 1px solid #E5E5E5;
  background: #FAFAF9;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

.gantt-row-label {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: #18181B;
  border-bottom: 1px solid #E5E5E5;
  font-weight: 500;
}
.gantt-row-label-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gantt-row-remove {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  color: #71717A;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
}
.gantt-row-remove:hover {
  color: #DC2626;
  background: rgba(220, 38, 38, 0.1);
}
.gantt-add-row-popover .gantt-add-row-popover-inner {
  background: #FFFFFF;
  border: 1px solid rgba(14, 165, 233, 0.4);
  border-radius: 0;
  padding: 1rem;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.gantt-add-row-popover label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #52525B;
}
.gantt-add-row-popover select,
.gantt-add-row-popover input[type="text"] {
  padding: 0.5rem;
  border-radius: 0;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: inherit;
  font-size: 0.875rem;
}
.gantt-add-row-popover .gantt-add-row-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.25rem;
}
.gantt-add-row-popover .gantt-add-row-actions button {
  padding: 0.5rem 0.75rem;
  border-radius: 0;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid #E5E5E5;
  background: #F5F5F4;
  color: #18181B;
}
.gantt-add-row-popover .gantt-add-row-apply {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.4);
}
.gantt-add-row-popover .gantt-add-row-apply:hover {
  background: rgba(14, 165, 233, 0.25);
}

.gantt-timeline-scroll {
  flex: 1;
  min-width: 0;
  overflow: auto;
  overflow-x: auto;
  overflow-y: auto;
}

.gantt-rows-timeline {
  flex: 1;
  position: relative;
  min-width: 800px;
}

.gantt-row {
  height: 44px;
  position: relative;
  border-bottom: 1px solid #E5E5E5;
}

.gantt-row:hover {
  background: #FAFAF9;
}

.gantt-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(14, 165, 233, 0.85);
  z-index: 6;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
}

.gantt-today-line::before {
  content: 'Today — ' attr(data-date);
  position: absolute;
  top: -1.75rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(14, 165, 233, 1);
  background: rgba(14, 165, 233, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 0;
  border: 1px solid rgba(14, 165, 233, 0.5);
  white-space: nowrap;
}

.gantt-weekend-layer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 1;
}

.gantt-weekend-strip {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.04);
  border-left: 1px solid rgba(0, 0, 0, 0.04);
  border-right: 1px solid rgba(0, 0, 0, 0.04);
}

.gantt-bar-assignee {
  flex-shrink: 0;
  font-size: 0.65rem;
  opacity: 0.95;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.15rem 0.35rem;
  border-radius: 0;
  margin-left: 0.35rem;
  max-width: 4.5em;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Source distinction: all bars solid; from-brief events get a distinct border */
.gantt-bar.gantt-bar-source-extracted {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1),
              0 0 0 2px rgba(255, 255, 255, 0.55);
}

.gantt-legend {
  margin-top: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  color: #71717A;
  border-top: 1px solid #E5E5E5;
}

.gantt-bar {
  position: absolute;
  height: 30px;
  top: 6px;
  border-radius: 0;
  cursor: grab;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  min-width: 24px;
}

.gantt-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.gantt-bar-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  pointer-events: auto;
  cursor: text;
}

.gantt-bar-resize-handle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: ew-resize;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 0 4px 4px 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.gantt-bar:hover .gantt-bar-resize-handle {
  opacity: 1;
}
.gantt-bar-resize-handle:hover {
  background: rgba(255, 255, 255, 0.25);
}
.gantt-bar-resize-handle-left {
  right: auto;
  left: 0;
  border-radius: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.gantt-bar:hover .gantt-bar-resize-handle-left {
  opacity: 1;
}
.gantt-bar-date-btn {
  opacity: 0;
  transition: opacity 0.15s ease;
}
.gantt-bar:hover .gantt-bar-date-btn {
  opacity: 0.9;
}

.gantt-date-popover label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.75rem;
  color: #52525B;
}
.gantt-date-popover input[type="date"] {
  padding: 0.375rem;
  border-radius: 0;
  border: 1px solid #E5E5E5;
  background: #FFFFFF;
  color: inherit;
  font-size: 0.875rem;
}
.gantt-date-popover .gantt-date-apply {
  margin-top: 4px;
  padding: 0.5rem;
  background: rgba(14, 165, 233, 0.3);
  border: 1px solid rgba(14, 165, 233, 0.5);
  border-radius: 0;
  color: inherit;
  cursor: pointer;
  font-size: 0.875rem;
}
.gantt-date-popover .gantt-date-apply:hover {
  background: rgba(14, 165, 233, 0.45);
}

.gantt-milestone {
  width: 16px;
  height: 16px;
  top: 12px;
  transform: rotate(45deg);
  padding: 0;
  border-radius: 0;
}

.gantt-milestone:hover {
  transform: rotate(45deg) scale(1.2);
}

/* Drag feedback */
.gantt-bar.dragging {
  opacity: 0.5;
  cursor: grabbing;
  z-index: 100;
}

.gantt-bar-ghost {
  opacity: 0.9;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  cursor: grabbing;
}

.gantt-bar:not(.dragging) {
  cursor: grab;
}

.gantt-row.drag-over {
  background: rgba(14, 165, 233, 0.1);
  border: 2px dashed rgba(14, 165, 233, 0.4);
}

/* Cascade offset for overlapping events */
.gantt-bar.overlapping {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Expanded rows */
.gantt-row-expanded {
  min-height: 44px;
  height: auto;
}

/* Category colors */
.gantt-bar.category-milestones {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(139, 92, 246, 0.6));
  border: 1px solid rgba(139, 92, 246, 0.9);
}

.gantt-bar.category-meetings {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.8), rgba(14, 165, 233, 0.6));
  border: 1px solid rgba(14, 165, 233, 0.9);
}

.gantt-bar.category-design_tasks {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.8), rgba(16, 185, 129, 0.6));
  border: 1px solid rgba(16, 185, 129, 0.9);
}

.gantt-bar.category-consultant_items {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.8), rgba(245, 158, 11, 0.6));
  border: 1px solid rgba(245, 158, 11, 0.9);
}

.gantt-bar.category-physical_model_items {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.8), rgba(236, 72, 153, 0.6));
  border: 1px solid rgba(236, 72, 153, 0.9);
}

.gantt-bar.category-renderings_items {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(59, 130, 246, 0.6));
  border: 1px solid rgba(59, 130, 246, 0.9);
}

.gantt-bar.category-multimedia_items {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.8), rgba(168, 85, 247, 0.6));
  border: 1px solid rgba(168, 85, 247, 0.9);
}

.gantt-bar.category-diagrams_items {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.8), rgba(34, 197, 94, 0.6));
  border: 1px solid rgba(34, 197, 94, 0.9);
}

.gantt-bar.category-panels_items {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.8), rgba(249, 115, 22, 0.6));
  border: 1px solid rgba(249, 115, 22, 0.9);
}

.gantt-bar.category-cad_items {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.8), rgba(14, 165, 233, 0.6));
  border: 1px solid rgba(14, 165, 233, 0.9);
}

.gantt-bar.category-report_items {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.8), rgba(251, 191, 36, 0.6));
  border: 1px solid rgba(251, 191, 36, 0.9);
}

.gantt-bar.category-ppt_items {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.8), rgba(244, 63, 94, 0.6));
  border: 1px solid rgba(244, 63, 94, 0.9);
}

.gantt-bar.category-custom {
  background: linear-gradient(135deg, rgba(100, 116, 139, 0.8), rgba(100, 116, 139, 0.6));
  border: 1px solid rgba(100, 116, 139, 0.9);
}

.gantt-bar.category-resource {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.5), rgba(14, 165, 233, 0.35));
  border: 1px solid rgba(14, 165, 233, 0.7);
}

.gantt-row-placeholder {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  color: #A1A1AA;
  font-style: italic;
  pointer-events: none;
}

/* First-time instructions tooltip (session reminder) */
.gantt-instructions-tooltip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.4);
  border-radius: 0;
  color: #18181B;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  animation: fade-in-up 0.3s ease;
  pointer-events: auto;
}

.gantt-instructions-tooltip .gantt-instructions-text {
  flex: 1;
}

.gantt-instructions-tooltip .gantt-instructions-dismiss {
  flex-shrink: 0;
  padding: 0.375rem 0.75rem;
  background: rgba(14, 165, 233, 0.25);
  border: 1px solid rgba(14, 165, 233, 0.5);
  border-radius: 0;
  color: #18181B;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.gantt-instructions-tooltip .gantt-instructions-dismiss:hover {
  background: rgba(14, 165, 233, 0.35);
  border-color: rgba(14, 165, 233, 0.7);
}

/* Bar hover tooltip */
.gantt-tooltip {
  position: fixed;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 0;
  padding: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
  max-width: 300px;
}

.gantt-tooltip.visible {
  opacity: 1;
}

.gantt-tooltip-title {
  font-weight: 600;
  color: #18181B;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.gantt-tooltip-dates {
  font-size: 0.75rem;
  color: #71717A;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 0.25rem;
}

.gantt-tooltip-duration {
  font-size: 0.75rem;
  color: rgba(14, 165, 233, 0.9);
}

/* Dragging cursor */
.gantt-body.dragging {
  cursor: grabbing;
  user-select: none;
}

.gantt-body:not(.dragging) {
  cursor: grab;
}

/* Empty state */
.gantt-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #71717A;
  font-size: 0.875rem;
  font-style: italic;
}

/* ── Progress fill inside bars ─────────────────────────────── */
.gantt-bar-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.18);
  pointer-events: none;
  transition: width 0.3s ease;
}
.gantt-bar-progress-label {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ── Fade-in animation for bars ────────────────────────────── */
@keyframes gantt-bar-enter {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.gantt-bar {
  animation: gantt-bar-enter 0.3s ease both;
}
.gantt-bar:nth-child(1)  { animation-delay: 0.02s; }
.gantt-bar:nth-child(2)  { animation-delay: 0.04s; }
.gantt-bar:nth-child(3)  { animation-delay: 0.06s; }
.gantt-bar:nth-child(4)  { animation-delay: 0.08s; }
.gantt-bar:nth-child(5)  { animation-delay: 0.10s; }
.gantt-bar:nth-child(6)  { animation-delay: 0.12s; }

/* ── Today line pulse ──────────────────────────────────────── */
@keyframes gantt-today-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(14, 165, 233, 0.4); }
  50%      { box-shadow: 0 0 14px rgba(14, 165, 233, 0.8); }
}
.gantt-today-line {
  animation: gantt-today-pulse 2s ease-in-out infinite;
}
.gantt-today-line::after {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(14, 165, 233, 1);
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.6);
}

/* ── Dependency arrow SVG layer ────────────────────────────── */
.gantt-dependency-layer {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}
.gantt-dep-path {
  fill: none;
  stroke: rgba(148, 163, 184, 0.45);
  stroke-width: 1.5;
  transition: stroke 0.2s ease;
}
.gantt-dep-path:hover {
  stroke: rgba(14, 165, 233, 0.8);
  stroke-width: 2;
}
.gantt-dep-arrow {
  fill: rgba(148, 163, 184, 0.45);
}
/* ── Collapsible group header ──────────────────────────────── */
.gantt-group-header {
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(14, 165, 233, 0.9);
  background: rgba(14, 165, 233, 0.06);
  border-bottom: 1px solid rgba(14, 165, 233, 0.15);
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}
.gantt-group-header:hover {
  background: rgba(14, 165, 233, 0.12);
}
.gantt-group-header-label {
  flex: 1;
  min-width: 0;
}
.gantt-group-add-row {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  padding: 0;
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  line-height: 1;
  font-weight: 600;
  color: rgba(14, 165, 233, 0.9);
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.35);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  box-sizing: border-box;
}
.gantt-group-add-row:hover {
  background: rgba(14, 165, 233, 0.3);
  color: #fff;
}
.gantt-group-chevron {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.gantt-group-header.collapsed .gantt-group-chevron {
  transform: rotate(-90deg);
}
.gantt-group-header.collapsed ~ .gantt-row-label,
.gantt-group-header.collapsed ~ .gantt-row {
  display: none;
}

/* ── Minimap ───────────────────────────────────────────────── */
.gantt-minimap {
  position: relative;
  height: 32px;
  background: #FAFAF9;
  border-top: 1px solid #E5E5E5;
  overflow: hidden;
  cursor: pointer;
}
.gantt-minimap-bar {
  position: absolute;
  height: 3px;
  border-radius: 0;
  opacity: 0.6;
}
.gantt-minimap-viewport {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.4);
  border-radius: 0;
  cursor: grab;
  transition: background 0.15s ease;
}
.gantt-minimap-viewport:hover {
  background: rgba(14, 165, 233, 0.2);
}

/* ── Search bar ────────────────────────────────────────────── */
.gantt-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.gantt-search-input {
  width: 0;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: #374151;
  font-size: 0.75rem;
  border-radius: 0;
  outline: none;
  transition: width 0.25s ease, padding 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.gantt-search-wrapper.open .gantt-search-input {
  width: 160px;
  padding: 5px 10px;
  border-color: #dbe0e5;
  background: #fff;
}
.gantt-search-btn {
  padding: 5px 8px;
  border: none;
  background: transparent;
  color: #9aa2ac;
  cursor: pointer;
  font-size: 0.85rem;
  transition: color 0.15s ease;
}
.gantt-search-btn:hover {
  color: #0EA5E9;
}
.gantt-bar.search-highlight {
  outline: 2px solid rgba(250, 204, 21, 0.8);
  outline-offset: 1px;
  z-index: 8;
}
.gantt-bar.search-dim {
  opacity: 0.25;
}

/* ── Enhanced tooltip ──────────────────────────────────────── */
.gantt-tooltip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.gantt-tooltip-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.gantt-tooltip-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #71717A;
  min-width: 52px;
}
.gantt-tooltip-value {
  font-size: 0.75rem;
  color: #52525B;
}
.gantt-tooltip-source-badge {
  display: inline-block;
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gantt-tooltip-source-badge.extracted {
  background: rgba(34, 197, 94, 0.2);
  color: rgba(34, 197, 94, 0.95);
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.gantt-tooltip-source-badge.generated {
  background: rgba(168, 85, 247, 0.2);
  color: rgba(168, 85, 247, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.4);
}
.gantt-tooltip-progress-bar {
  width: 100%;
  height: 4px;
  background: #E5E5E5;
  border-radius: 0;
  overflow: hidden;
  margin-top: 4px;
}
.gantt-tooltip-progress-fill {
  height: 100%;
  background: rgba(14, 165, 233, 0.8);
  border-radius: 0;
  transition: width 0.3s ease;
}

/* ── Export button ──────────────────────────────────────────── */
.gantt-export-btn {
  padding: 5px 12px;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #dbe0e5;
  background: #f9fafb;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}
.gantt-export-btn:hover {
  background: #f3f4f6;
  border-color: #c9d0d8;
  color: #2a2f3a;
}

/* ── Baseline comparison ghost bars ────────────────────────── */
.gantt-bar-baseline {
  position: absolute;
  height: 8px;
  bottom: -4px;
  border-radius: 0;
  background: rgba(148, 163, 184, 0.2);
  border: 1px dashed rgba(148, 163, 184, 0.35);
  pointer-events: none;
  z-index: 2;
}

/* ── Keyboard focus ────────────────────────────────────────── */
.gantt-bar:focus {
  outline: 2px solid rgba(14, 165, 233, 0.8);
  outline-offset: 2px;
  z-index: 11;
}
.gantt-bar:focus:not(:focus-visible) {
  outline: none;
}

/* ── Context menu ──────────────────────────────────────────── */
.gantt-ctx-menu {
  position: fixed;
  z-index: 1100;
  min-width: 180px;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  padding: 4px 0;
  font-size: 0.8125rem;
  color: #18181B;
  animation: gantt-bar-enter 0.12s ease;
}
.gantt-ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.1s ease;
  white-space: nowrap;
}
.gantt-ctx-item:hover {
  background: rgba(14, 165, 233, 0.15);
}
.gantt-ctx-item.danger:hover {
  background: rgba(244, 63, 94, 0.15);
  color: rgba(244, 63, 94, 0.95);
}
.gantt-ctx-icon {
  width: 14px;
  text-align: center;
  opacity: 0.6;
  font-size: 0.75rem;
}
.gantt-ctx-sep {
  height: 1px;
  background: #E5E5E5;
  margin: 4px 0;
}
.gantt-ctx-label {
  padding: 4px 14px 2px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #A1A1AA;
  pointer-events: none;
}
/* Context menu hover and separator */
.gantt-ctx-item:hover {
  background: rgba(14, 165, 233, 0.08);
}
.gantt-ctx-sep {
  background: rgba(0, 0, 0, 0.08);
}

/* ── Inline progress editor ───────────────────────────────── */
.gantt-progress-popover {
  position: fixed;
  z-index: 1101;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 0;
  padding: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}
.gantt-progress-popover label {
  font-size: 0.75rem;
  color: #52525B;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gantt-progress-popover input[type="range"] {
  width: 100%;
  accent-color: #0ea5e9;
}
.gantt-progress-popover .gantt-progress-value {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(14, 165, 233, 0.9);
  text-align: center;
}
.gantt-progress-popover button {
  padding: 6px 12px;
  background: rgba(14, 165, 233, 0.3);
  border: 1px solid rgba(14, 165, 233, 0.5);
  border-radius: 0;
  color: inherit;
  cursor: pointer;
  font-size: 0.8125rem;
}
.gantt-progress-popover button:hover {
  background: rgba(14, 165, 233, 0.45);
}

/* ── Color legend strip ────────────────────────────────────── */
.gantt-color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 6px 12px;
  font-size: 0.7rem;
  color: #71717A;
  border-top: 1px solid #E5E5E5;
  align-items: center;
}
.gantt-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.gantt-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 0;
  flex-shrink: 0;
}

/* ── Weeks-remaining badge in timeline ─────────────────────── */
.gantt-weeks-remaining {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  color: rgba(14, 165, 233, 0.85);
  background: rgba(14, 165, 233, 0.1);
  padding: 2px 8px;
  border-radius: 0;
  border: 1px solid rgba(14, 165, 233, 0.3);
  white-space: nowrap;
  pointer-events: none;
}

/* ── Missing data notice ──────────────────────────────────── */
.missing-data-notice {
  font-size: 0.875rem;
  font-style: italic;
  color: rgba(0,0,0,0.45);
  padding: 0.75rem 1rem;
  border: 1px dashed rgba(0,0,0,0.12);
  border-radius: 0;
}

/* ── Gantt mobile responsive ──────────────────────────────── */
@media (max-width: 640px) {
  /* Narrow the row-label column so the timeline gets more room */
  .gantt-rows-labels,
  .gantt-header-labels {
    width: 120px;
    min-width: 120px;
  }

  /* Hide elements that are mouse-only or take up too much space */
  .gantt-minimap { display: none !important; }
  .gantt-bar-resize-handle,
  .gantt-bar-resize-handle-left,
  .gantt-bar-date-btn { display: none !important; }
  .gantt-instructions-tooltip { display: none !important; }
  .gantt-search-wrapper,
  .gantt-export-btn { display: none !important; }
  .gantt-group-add-row,
  .gantt-row-remove { display: none !important; }

  /* Increase row/bar height for easier tap targets */
  .gantt-row,
  .gantt-row-label { height: 48px; }
  .gantt-bar { height: 34px; top: 7px; }
  .gantt-milestone { width: 18px; height: 18px; top: 15px; }

  /* Let the browser handle horizontal touch-scroll natively */
  .gantt-timeline-scroll {
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  /* No grab cursor needed on touch screens */
  .gantt-body,
  .gantt-body:not(.dragging) { cursor: default; }
  .gantt-bar,
  .gantt-bar:not(.dragging) { cursor: pointer; }

  /* Prevent bars from eating touch-scroll events */
  .gantt-bar { touch-action: pan-x; }

  /* Scale the legend text down so it wraps neatly */
  .gantt-color-legend { font-size: 0.65rem; gap: 4px 10px; }

  /* Keep the body at a reasonable height on small screens */
  .gantt-body { max-height: 420px; }

  /* Hide secondary toolbar controls that don't work on touch */
  .gantt-load-sample-btn { display: none !important; }

  /* Toolbar: stack Generate button on its own row, scale below */
  .gantt-toolbar { row-gap: 0.5rem; }
  .gantt-toolbar .gantt-scale-selector button { padding: 0.375rem 0.625rem; }
}

/* ── Print-friendly layout ─────────────────────────────────── */
@media print {
  body {
    background: #fff !important;
    color: #1e293b !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .gantt-minimap,
  .gantt-instructions-tooltip,
  #toast-container,
  .gantt-bar-resize-handle,
  .gantt-bar-resize-handle-left,
  .gantt-bar-date-btn,
  .gantt-search-wrapper,
  .gantt-export-btn,
  .gantt-group-add-row,
  .gantt-row-remove {
    display: none !important;
  }
  .gantt-body {
    max-height: none !important;
    overflow: visible !important;
  }
  .gantt-container {
    break-inside: avoid;
  }
  .gantt-rows-timeline {
    min-width: 0 !important;
  }
  .gantt-header {
    position: static !important;
  }
  .gantt-bar {
    animation: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15) !important;
  }
  .gantt-today-line {
    animation: none !important;
  }
  .gantt-tooltip { display: none !important; }
  .gantt-ctx-menu { display: none !important; }
  @page {
    size: A3 landscape;
    margin: 10mm;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Background Info Cards — shared by Site Background (J2) and
   Client Background (J3)
   ═══════════════════════════════════════════════════════════════════ */

.bg-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.bg-card {
  background: #ffffff;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.bg-card-visual {
  width: 100%;
  height: 120px;
  flex-shrink: 0;
}

.bg-card-visual-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-card-visual-icon {
  width: 42px;
  height: 42px;
  opacity: 0.65;
}

.bg-card-visual-icon svg {
  width: 100%;
  height: 100%;
}

.bg-card-body {
  padding: 1rem 1.125rem;
}

.bg-card-visual-loaded {
  animation: bgCardFadeIn 0.5s ease;
}

@keyframes bgCardFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.bg-card:hover {
  background: #fafafa;
  border-color: #c4cdd6;
}

.bg-card.expanded {
  border-color: #7dd3fc;
}

.bg-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.bg-card-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 0;
  border: 1px solid transparent;
}

.bg-card-date {
  font-size: 0.7rem;
  color: #9aa2ac;
  white-space: nowrap;
}

.bg-card-headline {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2a2f3a;
  line-height: 1.4;
  margin-bottom: 0.375rem;
}

.bg-card-summary {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.55;
  margin-bottom: 0.5rem;
}

.bg-card-detail {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.6;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid #dbe0e5;
}

.bg-card-detail p {
  margin: 0 0 0.375rem;
}

.bg-card-source {
  font-size: 0.72rem;
  color: #9aa2ac;
  font-style: italic;
  margin-top: 0.25rem !important;
}

.bg-card-source-link {
  color: #0EA5E9;
  text-decoration: none;
}
.bg-card-source-link:hover {
  text-decoration: underline;
  color: #0284c7;
}

.bg-card-toggle {
  font-size: 0.72rem;
  color: #0EA5E9;
  margin-top: 0.375rem;
  user-select: none;
}

/* ── Site Background — enhanced layout ────────────────────────── */

/* Site signal banner */
.site-bg-signal-banner {
  padding: 0.625rem 0.875rem;
  border-radius: 0;
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  line-height: 1.5;
}
.site-bg-signal-banner p {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  opacity: 0.9;
}
.site-bg-signal-icon { margin-right: 0.375rem; font-size: 0.65rem; }
.site-bg-signal-label { font-weight: 600; }

.site-bg-signal-opportunity {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #059669;
}
.site-bg-signal-neutral {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0284c7;
}
.site-bg-signal-constrained {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #d97706;
}
.site-bg-signal-heavy {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #dc2626;
}

/* Executive brief */
.site-bg-exec-brief {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  background: #f4f6f8;
  border-left: 3px solid #0EA5E9;
  border-radius: 0;
}
.site-bg-exec-brief p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #374151;
}

/* Data confidence banner */
.site-bg-confidence-banner {
  margin: 0 0 0.75rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0;
  font-size: 0.75rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #d97706;
}

/* Constraints / opportunities sections */
.site-bg-section {
  margin: 0 0 0.875rem;
  padding: 0.625rem 0.75rem;
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  border-radius: 0;
}
.site-bg-section-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa2ac;
  margin: 0 0 0.5rem;
}
.site-bg-constraint-item,
.site-bg-opportunity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #dbe0e5;
}
.site-bg-constraint-item:last-child,
.site-bg-opportunity-item:last-child { border-bottom: none; }

.site-bg-constraint-text,
.site-bg-opportunity-text {
  font-size: 0.8rem;
  font-weight: 500;
  color: #2a2f3a;
  line-height: 1.4;
}
.site-bg-implication {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.45;
  margin-top: 0.15rem;
}

/* Unstated expectations */
.site-bg-expectations {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.site-bg-expectation-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: #374151;
  line-height: 1.5;
}
.site-bg-expectation-icon {
  flex-shrink: 0;
  color: #9aa2ac;
  font-size: 0.5rem;
  margin-top: 0.35rem;
}

/* Severity badges */
.site-bg-severity-badge {
  flex-shrink: 0;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 0;
  white-space: nowrap;
}
.site-bg-severity-major {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #dc2626;
}
.site-bg-severity-moderate {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #d97706;
}
.site-bg-severity-minor {
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  color: #6b7280;
}
.site-bg-strength-strong {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #059669;
}
.site-bg-strength-moderate {
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  color: #0284c7;
}
.site-bg-strength-minor {
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  color: #6b7280;
}

/* Planning policy block */
.site-bg-policy-block {
  margin: 0 0 0.875rem;
  padding: 0.625rem 0.75rem;
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  border-radius: 0;
}
.site-bg-policy-title {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa2ac;
  margin: 0 0 0.5rem;
}
.site-bg-policy-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.4;
}
.site-bg-policy-row-label {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: #9aa2ac;
  width: 6.5rem;
}
.site-bg-policy-row-value {
  color: #374151;
}
.site-bg-policy-designation {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  background: #ede9fe;
  border: 1px solid #ddd6fe;
  color: #6d28d9;
  border-radius: 0;
}
.site-bg-policy-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.site-bg-policy-tag {
  font-size: 0.68rem;
  padding: 0.12rem 0.4rem;
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  color: #6b7280;
}

/* Card enhancements */
.bg-card-severity {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.35rem;
  border-radius: 0;
  margin-left: 0.3rem;
  vertical-align: middle;
}
.bg-card-severity-major {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #dc2626;
}
.bg-card-severity-moderate {
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #d97706;
}
.bg-card-severity-minor {
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  color: #6b7280;
}
.bg-card-severity-opportunity {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #059669;
}
.bg-card-design-note {
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.6rem;
  background: #e0f2fe;
  border-left: 2px solid #0EA5E9;
  border-radius: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #374151;
}
.bg-card-design-note-label {
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  display: block;
  margin-bottom: 0.2rem;
}

/* ── Client Profile Header ─────────────────────────────────────── */

.client-profile-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #dbe0e5;
}

.client-avatar-wrapper {
  flex-shrink: 0;
}

.client-avatar-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  display: block;
}

.client-avatar-initials {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
}

.client-avatar-circle {
  border-radius: 50%;
}

.client-avatar-rounded {
  border-radius: 0;
}

.client-profile-info {
  flex: 1;
  min-width: 0;
}

.client-profile-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #2a2f3a;
  margin-bottom: 0.125rem;
  line-height: 1.3;
}

.client-profile-type {
  font-size: 0.75rem;
  color: #0EA5E9;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.client-profile-desc {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.client-facts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 0.375rem;
}

.client-fact-item {
  font-size: 0.75rem;
  color: #6b7280;
}

.client-fact-label {
  font-weight: 600;
  color: #374151;
  margin-right: 0.25rem;
}

.client-list-section {
  margin-bottom: 1rem;
}

.client-list-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.375rem;
}

.client-list {
  list-style: disc;
  padding-left: 1.25rem;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.7;
}

/* ── Client profile: name row + competition type badge ─── */

.client-profile-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.125rem;
}

.cb-comptype-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 0;
  flex-shrink: 0;
  align-self: center;
}

.cb-comptype-commission { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.cb-comptype-prize      { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.cb-comptype-hybrid     { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }

.cb-built-unknown { color: #64748b; margin-right: 0.25rem; }

/* ── Data confidence banner ─────────────────────────────── */

.cb-confidence-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  margin: 0.75rem 0 0;
}

.cb-confidence-icon {
  flex-shrink: 0;
  font-size: 0.6rem;
  margin-top: 0.2rem;
}

.cb-confidence-label {
  font-weight: 600;
  flex-shrink: 0;
}

.cb-confidence-detail {
  color: inherit;
  opacity: 0.85;
}

.cb-confidence-low {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #d97706;
}

.cb-confidence-verylow {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #dc2626;
}

/* ── Risk assessment banner ─────────────────────────────── */

/* Executive brief — strategic summary for the decision-maker */
.cb-exec-brief {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  background: #f4f6f8;
  border-left: 3px solid #0EA5E9;
  border-radius: 0;
}

.cb-exec-brief p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.65;
  color: #374151;
}

/* Alert cards — controversy/negative sentiment, shown near risk banner */
.cb-alert-cards {
  margin: 0.5rem 0 0;
}

.cb-card-alert {
  border-color: rgba(248, 113, 113, 0.25) !important;
  background: rgba(248, 113, 113, 0.04) !important;
}

/* Entries stat — slightly smaller text to fit numbers like "150-200" */
.cb-stat-entries {
  font-size: 0.9rem;
}

.cb-risk-banner {
  padding: 0.625rem 0.875rem;
  border-radius: 0;
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.cb-risk-icon {
  margin-right: 0.375rem;
  font-size: 0.65rem;
}

.cb-risk-label {
  font-weight: 600;
}

.cb-risk-summary {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  opacity: 0.9;
}

.cb-risk-green {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #059669;
}

.cb-risk-amber {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #d97706;
}

.cb-risk-red {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #dc2626;
}

/* ── Client profile: website & mandate ──────────────────── */

.client-website {
  margin-bottom: 0.25rem;
}
.client-website a {
  font-size: 0.78rem;
  color: #0EA5E9;
  text-decoration: none;
}
.client-website a:hover {
  text-decoration: underline;
  color: #0284c7;
}
.client-mandate {
  font-size: 0.78rem;
  color: #6b7280;
  font-style: italic;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* ── Client Background: Sections ───────────────────────── */

.cb-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #dbe0e5;
}

.cb-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.875rem;
}

.cb-narrative {
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.7;
  margin-top: 0.75rem;
  padding: 0.75rem 0.875rem;
  background: #f4f6f8;
  border-radius: 0;
  border-left: 3px solid #0EA5E9;
}

/* ── Key People ──────────────────────────────────────────── */

.cb-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.cb-person-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  transition: border-color 0.15s;
}
.cb-person-card:hover {
  border-color: #c4cdd6;
}

.cb-person-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
}

.cb-person-info {
  flex: 1;
  min-width: 0;
}

.cb-person-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2a2f3a;
  line-height: 1.3;
}

.cb-person-role {
  font-size: 0.72rem;
  color: #0EA5E9;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.cb-person-bg {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0.125rem 0;
}

.cb-person-relevance {
  font-size: 0.72rem;
  color: #d97706;
  line-height: 1.4;
  margin: 0.25rem 0 0;
  font-style: italic;
}

/* ── Competition Track Record ────────────────────────────── */

.cb-stats-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.875rem;
}

.cb-stat {
  text-align: center;
}

.cb-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #2a2f3a;
  font-family: 'DM Sans', sans-serif;
  line-height: 1.2;
}
.cb-stat-good { color: #059669; }
.cb-stat-mixed { color: #d97706; }
.cb-stat-poor { color: #dc2626; }

.cb-stat-label {
  font-size: 0.68rem;
  color: #9aa2ac;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.cb-track-facts {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.cb-track-fact {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.5;
}

.cb-track-label {
  font-weight: 600;
  color: #374151;
  margin-right: 0.25rem;
}

/* ── Past Competitions Table ─────────────────────────────── */

.cb-comps-table {
  overflow-x: auto;
}

.cb-comps-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.cb-comps-table thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  color: #9aa2ac;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.625rem;
  border-bottom: 1px solid #dbe0e5;
}

.cb-comps-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.1s;
}
.cb-comps-table tbody tr:hover {
  background: #fafafa;
}

.cb-comps-table tbody td {
  padding: 0.5rem 0.625rem;
  color: #6b7280;
  vertical-align: top;
}

.cb-comp-name {
  color: #2a2f3a !important;
  font-weight: 500;
}

.cb-comp-source {
  color: #9aa2ac;
  font-size: 0.75rem;
  margin-left: 0.25rem;
  text-decoration: none;
  vertical-align: middle;
}

.cb-comp-source:hover {
  color: #5c6bc0;
}

.cb-comp-entries {
  display: block;
  font-size: 0.68rem;
  color: #9aa2ac;
  font-weight: 400;
}

.cb-comp-theme {
  font-style: italic;
  color: #6b7280;
  font-size: 0.8rem;
}

.cb-built-yes { color: #059669; margin-right: 0.25rem; }
.cb-built-no  { color: #dc2626; margin-right: 0.25rem; }

/* ── Architectural Values ────────────────────────────────── */

.cb-priorities {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.625rem;
}

.cb-priority-tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.625rem;
  border-radius: 0;
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.cb-sustainability,
.cb-architects {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 0.375rem;
}

/* ── Notable Projects Grid ───────────────────────────────── */

.cb-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.cb-project-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-decoration: none;
  color: inherit;
}
.cb-project-card:hover {
  border-color: #c4cdd6;
  box-shadow: 0 4px 16px rgba(0,0,0,0.07);
  text-decoration: none;
  color: inherit;
}

.cb-project-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}
.cb-project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.cb-project-card:hover .cb-project-image img {
  transform: scale(1.03);
}

.cb-project-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cb-project-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2a2f3a;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.cb-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.25rem;
}

.cb-project-meta span {
  font-size: 0.7rem;
  color: #9aa2ac;
}

.cb-project-meta span + span::before {
  content: '·';
  margin-right: 0.375rem;
}

.cb-project-sig {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0.25rem 0 0;
  flex: 1;
}

.cb-project-source {
  margin-top: 0.5rem;
  font-size: 0.7rem;
  padding-top: 0.5rem;
  border-top: 1px solid #f3f4f6;
}

/* ── News & Intelligence Cards ───────────────────────────── */

.cb-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.cb-card {
  border-radius: 0;
  border: 1px solid #dbe0e5;
  background: #ffffff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.cb-card:hover {
  border-color: #c4cdd6;
}

.cb-card-body {
  padding: 0.875rem;
}

.cb-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.cb-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 0;
  flex-shrink: 0;
}

.cb-badge-history        { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.cb-badge-controversy    { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.cb-badge-competition    { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.cb-badge-news           { background: #f4f6f8; color: #6b7280; border: 1px solid #dbe0e5; }
.cb-badge-reputation     { background: #d1fae5; color: #059669; border: 1px solid #a7f3d0; }
.cb-badge-strategy       { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }

.cb-sentiment { font-size: 0.65rem; flex-shrink: 0; }
.cb-sentiment-positive { color: #059669; }
.cb-sentiment-neutral  { color: #9aa2ac; }
.cb-sentiment-negative { color: #dc2626; }

.cb-card-date {
  font-size: 0.68rem;
  color: #9aa2ac;
  margin-left: auto;
}

.cb-card-chevron {
  width: 0.875rem;
  height: 0.875rem;
  color: #64748b;
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.2s;
}

.cb-card-headline {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2a2f3a;
  margin: 0 0 0.375rem 0;
  line-height: 1.4;
}

.cb-card-summary {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.55;
  margin: 0;
}

.cb-card-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.7;
  border-top: 1px solid transparent;
}

.cb-card-expanded .cb-card-detail {
  max-height: 500px;
  border-top-color: #dbe0e5;
}

.cb-card-expanded .cb-card-chevron {
  transform: rotate(180deg);
}

.cb-card-expanded {
  border-color: #bae6fd;
}

.cb-card-detail p {
  padding: 0.75rem 0.875rem 0.5rem;
  margin: 0;
}

.cb-card-source {
  font-size: 0.72rem;
  color: #9aa2ac;
  padding: 0.25rem 0 0;
  margin-top: 0.25rem;
}

.cb-source-link {
  color: #0EA5E9;
  text-decoration: none;
}
.cb-source-link:hover {
  text-decoration: underline;
  color: #0284c7;
}

@media (max-width: 640px) {
  .cb-people-grid,
  .cb-projects-grid,
  .cb-cards {
    grid-template-columns: 1fr;
  }
  .cb-stats-row {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }
  .cb-stat-value {
    font-size: 1.25rem;
  }
  .cb-comps-table table {
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .bg-card-grid {
    grid-template-columns: 1fr;
  }
  .client-profile-header {
    flex-direction: column;
    gap: 1rem;
  }
  .cb-stats-row {
    gap: 0.5rem 0.75rem;
  }
  .cb-stat-value {
    font-size: 1.125rem;
  }
}

/* ── Project Background Cards ─────────────────────────────── */

.pb-overview {
  font-size: 0.875rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 1.25rem;
  padding: 0.875rem 1rem;
  background: #f4f6f8;
  border-radius: 0;
  border-left: 3px solid #0EA5E9;
  white-space: pre-line;
}

.pb-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.875rem;
  margin-top: 1rem;
}

.pb-card {
  border-radius: 0;
  border: 1px solid #dbe0e5;
  background: #ffffff;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.pb-card:hover {
  border-color: #c4cdd6;
}

/* Image area */
.pb-card-image {
  width: 100%;
  height: 130px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Category-coloured placeholder gradients */
.pb-card-img-political   { background: linear-gradient(135deg, rgba(59,130,246,0.3) 0%, rgba(37,99,235,0.12) 100%); }
.pb-card-img-funding     { background: linear-gradient(135deg, rgba(34,197,94,0.3) 0%, rgba(22,163,74,0.12) 100%); }
.pb-card-img-planning    { background: linear-gradient(135deg, rgba(168,85,247,0.3) 0%, rgba(124,58,237,0.12) 100%); }
.pb-card-img-news        { background: linear-gradient(135deg, rgba(148,163,184,0.3) 0%, rgba(100,116,139,0.12) 100%); }
.pb-card-img-controversy { background: linear-gradient(135deg, rgba(245,158,11,0.3) 0%, rgba(217,119,6,0.12) 100%); }
.pb-card-img-history     { background: linear-gradient(135deg, rgba(251,146,60,0.3) 0%, rgba(234,88,12,0.12) 100%); }

.pb-card-img-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.2);
}

/* Card body */
.pb-card-body {
  padding: 0.875rem;
}

.pb-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.pb-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 0;
  flex-shrink: 0;
}

.pb-badge-political   { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.pb-badge-funding     { background: #d1fae5; color: #059669; border: 1px solid #a7f3d0; }
.pb-badge-planning    { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.pb-badge-news        { background: #f4f6f8; color: #6b7280; border: 1px solid #dbe0e5; }
.pb-badge-controversy { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.pb-badge-history     { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }

.pb-sentiment {
  font-size: 0.65rem;
  flex-shrink: 0;
}

.pb-sentiment-positive { color: #059669; }
.pb-sentiment-neutral  { color: #9aa2ac; }
.pb-sentiment-negative { color: #dc2626; }

.pb-card-chevron {
  width: 0.875rem;
  height: 0.875rem;
  color: #64748b;
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.2s;
}

.pb-card-headline {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2a2f3a;
  margin: 0 0 0.375rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pb-card-summary {
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Expandable detail */
.pb-card-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, border-color 0.3s ease;
  font-size: 0.8125rem;
  color: #6b7280;
  line-height: 1.7;
  border-top: 1px solid transparent;
}

.pb-card-detail p {
  padding: 0.75rem 0.875rem 0.5rem;
  margin: 0;
}

.pb-card-source {
  font-size: 0.75rem !important;
  color: #6b7280 !important;
  border-top: 1px solid #dbe0e5;
  padding-top: 0.5rem !important;
}

.pb-card.pb-card-expanded .pb-card-detail {
  max-height: 600px;
  border-top-color: #dbe0e5;
}

.pb-card.pb-card-expanded .pb-card-chevron {
  transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Batch 1 – Overview Panel (clean cards)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Overview panel: plain white background, standard border-radius */
#overview-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Toolbar */
.overview-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid #dbe0e5;
  border-radius: 0;
  padding: 0.625rem 0 0.75rem;
  margin-bottom: 0.75rem;
  font-family: 'DM Sans', sans-serif;
}

.ov-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ov-toolbar-desc {
  margin: 0.4rem 0 0;
  /* hidden via display:none when empty — JS sets content */
}

/* Plain card */
.overview-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 1.25rem;
}

.overview-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.875rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f3f4f6;
}

/* ── Key facts row ───────────────────────────────────────────────────────── */
.overview-key-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.overview-fact {
  display: flex;
  flex-direction: column;
  min-width: 130px;
  flex: 1 1 130px;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 0;
}

.overview-fact-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}

.overview-fact-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  word-break: break-word;
}

/* ── Area pie chart ──────────────────────────────────────────────────────── */
.overview-pie-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.overview-pie-canvas {
  max-width: 180px;
  max-height: 180px;
  flex-shrink: 0;
}

.overview-pie-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.overview-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #374151;
  min-width: 0;
}

.overview-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 0;
  flex-shrink: 0;
}

.overview-legend-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  color: #6b7280;
}

.overview-legend-pct {
  font-weight: 600;
  color: #374151;
  flex-shrink: 0;
}

/* ── Milestones list ─────────────────────────────────────────────────────── */
.overview-milestones-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: 320px;
  overflow-y: auto;
}

.overview-milestone-item {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid #f9fafb;
  font-size: 0.8125rem;
}

.overview-milestone-item.overview-milestone-key {
  color: #0284c7;
  font-weight: 600;
}

.overview-milestone-date {
  font-variant-numeric: tabular-nums;
  color: #6b7280;
  min-width: 90px;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.overview-milestone-key .overview-milestone-date {
  color: #0284c7;
}

.overview-milestone-text {
  flex: 1;
  color: #374151;
}

.overview-milestone-key .overview-milestone-text {
  color: #0369a1;
}

/* ── Deliverables list ───────────────────────────────────────────────────── */
.overview-deliverables-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 320px;
  overflow-y: auto;
}

.overview-deliverables-phase {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin: 0.625rem 0 0.25rem;
}

.overview-deliverables-phase:first-child {
  margin-top: 0;
}

.overview-deliverable-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: #374151;
  padding: 0.25rem 0;
}

.overview-deliverable-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d1d5db;
  flex-shrink: 0;
  margin-top: 0.4em;
}

/* ── Description block ────────────────────────────────────────────────────── */
.overview-description {
  flex-basis: 100%;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #6b7280;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 0;
}

.overview-description-toggle {
  background: none;
  border: none;
  color: #0ea5e9;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.overview-description-toggle:hover {
  color: #0284c7;
}



/* ══════════════════════════════════════════════════════════════════════════
   Project Header Strip — editorial identity bar above overview panel
   ══════════════════════════════════════════════════════════════════════════ */

.ov-project-header {
  display: flex;
  flex-direction: column;
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}
.ov-ph-brief-row {
  display: flex;
  align-items: center;
  padding: 7px 16px;
  border-bottom: 1px solid #dbe0e5;
  gap: 10px;
  min-width: 0;
}
.ov-ph-brief-inner {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.ov-ph-info-row {
  display: flex;
  align-items: stretch;
  height: 64px;
}
.ov-ph-col {
  padding: 12px 20px;
  border-right: 1px solid #dbe0e5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}
.ov-ph-col:last-child { border-right: none; }
.ov-ph-identity { flex: 1 1 auto; min-width: 200px; }
.ov-ph-eyebrow {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9aa2ac;
}
.ov-ph-name {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 20px;
  color: #2a2f3a;
  line-height: 1.2;
  margin: 0;
}
.ov-ph-desc-col { flex: 1; min-width: 0; }
.ov-ph-desc {
  font-size: 12px;
  color: #9aa2ac;
  line-height: 1.55;
  margin: 0;
}
/* Brief Documents bar — full-width row below the header strip */
.ov-documents-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #f4f6f8;
  border-bottom: 1px solid #dbe0e5;
}
.ov-documents-bar .ov-ph-label {
  flex: 0 0 auto;
  margin-right: 6px;
}
.ov-docs-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.ov-ph-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9aa2ac;
}
.ov-no-docs-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.ov-no-docs-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 380px;
  padding: 0 24px;
}
.ov-no-docs-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #2a2f3a;
  margin-bottom: 8px;
}
.ov-no-docs-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: #b0b8c1;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.ov-no-docs-text strong {
  color: #9aa2ac;
  font-weight: 600;
}
.ov-no-docs-state.hidden { display: none; }
.ov-grid.hidden { display: none; }
.ov-ph-dropzone {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.ov-ph-file-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  flex: 1;
  min-width: 0;
  scrollbar-width: none; /* Firefox */
}
.ov-ph-file-chips::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.ov-ph-add-btn {
  font-size: 11px;
  font-weight: 600;
  color: #9aa2ac;
  background: none;
  border: 1px dashed #dbe0e5;
  border-radius: 0;
  padding: 3px 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  display: inline-block;
}
.ov-ph-add-btn:hover { color: #2a2f3a; border-color: #9aa2ac; }
.ov-ph-meta-col { flex: 0 0 auto; min-width: 90px; align-items: flex-end; }
.ov-ph-meta-col[hidden] { display: none; }
.ov-ph-meta-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #2a2f3a;
  line-height: 1.4;
  white-space: nowrap;
}
.ov-ph-fee-col { flex: 0 0 auto; min-width: 100px; align-items: flex-end; }
.ov-ph-fee-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #2a2f3a;
  line-height: 1.4;
}
.ov-ph-submission-col { flex: 0 0 auto; min-width: 120px; align-items: flex-end; }
.ov-ph-label-submission { color: #c0392b; font-weight: 700; }
.ov-ph-submission-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.ov-ph-submission-date { font-size: 13px; color: #2a2f3a; font-weight: 500; }
.ov-ph-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e74c3c;
  flex-shrink: 0;
  display: none;
}
.ov-ph-status-dot.visible { display: block; }
.ov-ph-brief-row .file-chip { font-size: 11px; padding: 2px 7px; gap: 5px; }
.ov-ph-brief-row .file-chip svg { width: 12px; height: 12px; }
.ov-col-desc {
  font-size: 11px;
  color: #9aa2ac;
  line-height: 1.55;
  margin: 6px 0 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   Editorial Header — matches Uncodixify v4 mockup
   ══════════════════════════════════════════════════════════════════════════ */

.lorm-header {
  background: #FFFFFF;
  font-family: 'DM Sans', sans-serif;
}

.lorm-logo {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -0.03em;
  color: #2a2f3a;
  line-height: 1;
}

/* Nav tab links */
.lorm-nav-link {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9aa2ac;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  height: 56px;
  display: flex;
  align-items: center;
  transition: color 0.15s, border-color 0.15s;
  padding: 0;
  white-space: nowrap;
}

.lorm-nav-link:hover {
  color: #2a2f3a;
}

.lorm-nav-active {
  color: #2a2f3a;
  border-bottom-color: #2a2f3a;
}

/* Primary CTA — dark pill */
.lorm-nav-cta {
  background: #2a2f3a;
  color: #f4f6f8;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 18px;
  border-radius: 0;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.lorm-nav-cta:hover {
  opacity: 0.82;
}

.lorm-nav-cta.is-loading {
  position: relative;
  overflow: hidden;
  pointer-events: none;
  cursor: default;
  opacity: 1;
}

.lorm-nav-cta.is-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.45), transparent);
  animation: btn-loading-sweep 1.5s ease-in-out infinite;
}

.b2-btn-secondary.is-loading,
button[data-analyse].is-loading,
button[data-output].is-loading,
.lorm-nav-secondary.is-loading {
  position: relative;
  overflow: hidden;
  pointer-events: none;
  cursor: default;
}

.b2-btn-secondary.is-loading::after,
button[data-analyse].is-loading::after,
button[data-output].is-loading::after,
.lorm-nav-secondary.is-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.4), transparent);
  animation: btn-loading-sweep 1.5s ease-in-out infinite;
}

@keyframes btn-loading-sweep {
  0% { left: -40%; }
  100% { left: 120%; }
}

/* Secondary / ghost nav actions */
.lorm-nav-secondary {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #9aa2ac;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
}

.lorm-nav-secondary:hover {
  color: #2a2f3a;
}

/* Header — mobile scale-down */
@media (max-width: 640px) {
  .lorm-logo {
    font-size: 28px;
  }

  .lorm-nav-cta {
    padding: 7px 12px;
    font-size: 10px;
  }

  .lorm-nav-secondary {
    font-size: 11px;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   Editorial Overview Grid — Uncodixify v4 design
   ══════════════════════════════════════════════════════════════════════════ */

/* 3-column editorial grid container */
.ov-grid {
  display: grid;
  grid-template-columns: 260px 1fr 300px;
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  overflow: hidden;
  min-height: 520px;
  font-family: 'DM Sans', sans-serif;
}

@media (max-width: 1023px) {
  .ov-grid {
    grid-template-columns: 1fr;
  }
}

/* Individual column */
.ov-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ov-col-left  { border-right: 1px solid #dbe0e5; }
.ov-col-right { border-left: 1px solid #dbe0e5; }

@media (max-width: 1023px) {
  .ov-col-left  { border-right: none; border-bottom: 1px solid #dbe0e5; }
  .ov-col-right { border-left: none;  border-top: 1px solid #dbe0e5; }
}

/* Column header strip */
.ov-col-hdr {
  height: 48px;
  border-bottom: 1px solid #dbe0e5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9aa2ac;
  background: rgba(244, 246, 248, 0.95);
  flex-shrink: 0;
  padding: 0 1.5rem;
}

.ov-col-hdr-investigation {
  justify-content: space-between;
  gap: 0.75rem;
}

.ov-hdr-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9aa2ac;
  display: none;
}

@media (min-width: 1280px) {
  .ov-hdr-label { display: block; }
}

/* Column scrollable body */
.ov-col-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.ov-col-body-center {
  align-items: center;
  justify-content: center;
}

.ov-col-body-stacked {
  align-items: stretch;
  gap: 0;
}

/* Divider label between stacked views in the middle column */
.ov-view-section-divider {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9aa2ac;
  padding: 0.75rem 0 0.5rem;
  border-top: 1px solid #dbe0e5;
  margin-top: 2rem;
  text-align: center;
}

/* Small uppercase section label */
.ov-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9aa2ac;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #dbe0e5;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

/* ── Key facts list (vertical key-value rows in Col 1) ── */
.ov-key-facts-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0;
}

.ov-key-facts-list .overview-fact {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px dashed #dbe0e5;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  border-radius: 0;
  min-width: auto;
  flex: none;
}

.ov-key-facts-list .overview-fact-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9aa2ac;
  margin-bottom: 0;
}

.ov-key-facts-list .overview-fact-value {
  font-size: 12px;
  font-weight: 500;
  color: #2a2f3a;
  text-align: right;
  word-break: break-word;
  max-width: 55%;
}

/* Description block inside key facts col */
.ov-key-facts-list .overview-description {
  border: none;
  border-left: 2px solid #dbe0e5;
  background: none;
  padding: 0.375rem 0.625rem;
  margin-top: 0.5rem;
  font-size: 11px;
  color: #9aa2ac;
  border-radius: 0;
  flex-basis: auto;
}

/* ── Deliverables in Col 1 ── */
.ov-deliverables {
  max-height: none;
  overflow-y: visible;
}

/* ── AI check notice (bottom of Col 1) ── */
.ov-ai-notice {
  display: flex;
  gap: 0.625rem;
  border: 1px solid #dbe0e5;
  padding: 0.75rem;
  background: #e9ecee;
  font-size: 11px;
  line-height: 1.5;
  color: #9aa2ac;
  margin-top: auto;
  padding-top: 1.5rem;  /* visual gap before notice */
}

.ov-ai-notice-icon {
  font-weight: 700;
  font-size: 13px;
  color: #d6a048;
  flex-shrink: 0;
  line-height: 1.3;
}

.ov-ai-notice-text strong {
  color: #2a2f3a;
}

/* ── Pie chart — fills the column, segment labels positioned outside ring ── */
.ov-pie-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  /* horizontal padding creates the zone where outer labels live */
  padding: 2rem 11rem;
  box-sizing: border-box;
}

/* Total GFA stat shown above the donut chart */
.ov-gfa-header {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 1rem 1.5rem 0;
}
.ov-gfa-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9aa2ac;
  font-family: 'DM Sans', sans-serif;
}
.ov-gfa-value {
  font-size: 22px;
  font-weight: 700;
  color: #2a2f3a;
  font-family: 'DM Sans', sans-serif;
}
.ov-gfa-unit {
  font-size: 12px;
  font-weight: 400;
  color: #9aa2ac;
  font-family: 'DM Sans', sans-serif;
}

.ov-pie-canvas {
  max-width: 380px !important;
  max-height: 380px !important;
  width: 100% !important;
}

/* Segment labels positioned outside the ring by JS */
.ov-pie-ext-label { line-height: 1.3; }
.ov-pie-ext-name {
  font-size: 11px;
  font-weight: 600;
  color: #2a2f3a;
  font-family: 'DM Sans', sans-serif;
}
.ov-pie-ext-meta {
  font-size: 10px;
  color: #6b7280;
  font-family: 'DM Sans', sans-serif;
}

/* ── Pie / Map view toggle ── */
.ov-view-toggle {
  display: flex;
  gap: 2px;
  background: rgba(219, 224, 229, 0.6);
  padding: 2px;
  border-radius: 0;
}

.ov-toggle-btn {
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 600;
  color: #9aa2ac;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 0;
  transition: color 0.15s, background 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.ov-toggle-btn:hover {
  color: #2a2f3a;
}

.ov-toggle-active {
  background: #fff;
  color: #2a2f3a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ── View wrappers ── */
.ov-view {
  width: 100%;
}

/* ── Skeleton / ghost preview elements ── */
.ov-skeleton-line {
  height: 9px;
  background: #e8eaed;
  border-radius: 0;
  margin-bottom: 7px;
}

.ov-skeleton-facts {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 0.25rem;
}

.ov-ghost-circle-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 3rem;
  box-sizing: border-box;
  width: 100%;
}

.ov-ghost-circle {
  width: 180px;
  height: 180px;
  opacity: 0.7;
}

/* ── Area chart loading spinner ─────────────────────────────────────────── */
.ov-loading-donut {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
}
.ov-loading-donut-ring {
  width: 100%;
  height: 100%;
  animation: ov-donut-spin 1.2s linear infinite;
}
.ov-loading-donut-label {
  position: absolute;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #9aa2ac;
  letter-spacing: 0.02em;
}
@keyframes ov-donut-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.ov-ghost-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ov-ghost-milestone-row {
  padding-left: 1.375rem;
  position: relative;
  padding-bottom: 1.25rem;
}

.ov-ghost-milestone-row::before {
  content: '';
  position: absolute;
  left: -3.5px;
  top: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e0e3e7;
  border: 1px solid #dbe0e5;
}

/* ── Map placeholder ── */
.ov-map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #9aa2ac;
  min-height: 180px;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  padding: 1rem;
  width: 100%;
  background: #f7f8fa;
}

.ov-map-ghost-grid {
  width: 100%;
  max-width: 240px;
  height: auto;
  opacity: 0.8;
}

.ov-map-container {
  height: 240px;
  border-radius: 0;
  overflow: hidden;
  width: 100%;
}

/* ── Milestones timeline (Col 3) ── */
.ov-timeline {
  border-left: 1px solid #dbe0e5;
  margin-left: 0.5rem;
  max-height: none !important;
  overflow-y: visible !important;
  gap: 0 !important;
}

.ov-timeline .overview-milestone-item {
  padding-left: 1.375rem;
  position: relative;
  border-bottom: none;
  padding-top: 0.375rem;
  padding-bottom: 1.25rem;
}

.ov-timeline .overview-milestone-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0.55rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #e2e5e9;
  border: 1px solid #c8d0d8;
}

/* Importance-based dot styles */
.ov-timeline .milestone-importance-critical::before {
  width: 12px; height: 12px;
  left: -6.5px; top: 0.45rem;
  background: #2a2f3a;
  border-color: #2a2f3a;
  box-shadow: 0 0 0 3px rgba(42,47,58,0.12);
}
.ov-timeline .milestone-importance-high::before {
  width: 9px; height: 9px;
  left: -5px; top: 0.5rem;
  background: #1e5fa8;
  border-color: #1e5fa8;
}
.ov-timeline .milestone-importance-medium::before {
  width: 7px; height: 7px;
  left: -4px; top: 0.55rem;
  background: #7ca6cf;
  border-color: #7ca6cf;
}
.ov-timeline .milestone-importance-low::before {
  width: 5px; height: 5px;
  left: -3px; top: 0.6rem;
  background: #f4f6f8;
  border-color: #c8d0d8;
}

.ov-timeline .overview-milestone-item.overview-milestone-key::before {
  background: #2a2f3a;
  border-color: #2a2f3a;
  width: 12px;
  height: 12px;
  left: -6.5px;
  top: 0.45rem;
  box-shadow: 0 0 0 3px rgba(42,47,58,0.12);
}

.ov-timeline .overview-milestone-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  min-width: auto;
  color: #9aa2ac;
}

.ov-timeline .overview-milestone-text {
  font-size: 12px;
  margin-top: 0.125rem;
  display: block;
  color: #2a2f3a;
}

.ov-timeline .overview-milestone-item .overview-milestone-date,
.ov-timeline .overview-milestone-item .overview-milestone-text {
  display: block;
}

/* Key milestones use serif italic, matching the editorial mockup */
.ov-timeline .overview-milestone-item.overview-milestone-key .overview-milestone-text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 13px;
  color: #2a2f3a;
  font-weight: 600;
}

.ov-timeline .overview-milestone-item.overview-milestone-key .overview-milestone-date {
  color: #2a2f3a;
  font-weight: 700;
}

/* High importance text styling */
.ov-timeline .milestone-importance-high .overview-milestone-text {
  color: #1e5fa8;
}
.ov-timeline .milestone-importance-high .overview-milestone-date {
  color: #4a80b8;
}

/* Low importance text styling — de-emphasised */
.ov-timeline .milestone-importance-low .overview-milestone-text {
  color: #9aa2ac;
}
.ov-timeline .milestone-importance-low .overview-milestone-date {
  color: #b8bfc8;
}

/* === UX Progressive Disclosure (PD0) === */

/* Fade-in-when-ready container — hidden until revealWhenReady() fires */
.reveal-pending {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-pending.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered card animation */
.card-animate-in {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.card-animate-in.card-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll-aware "section ready" pill */
@keyframes reveal-pill-in {
  from {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes reveal-pill-out {
  from {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -12px);
  }
}

.reveal-pill-container {
  position: fixed;
  top: 5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  pointer-events: none;
}

.reveal-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  animation: reveal-pill-in 0.3s ease;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.reveal-pill:hover {
  background: #f8fafc;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.reveal-pill.pill-hiding {
  animation: reveal-pill-out 0.3s ease forwards;
}

.reveal-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0EA5E9;
  flex-shrink: 0;
}

.reveal-pill .pill-dismiss {
  width: 14px;
  height: 14px;
  opacity: 0.4;
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.reveal-pill:hover .pill-dismiss {
  opacity: 0.7;
}

/* ── PD3: KPI condensed bar chart ────────────────────────────────────────── */

.kpi-summary-bars {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.75rem 0 0.5rem;
}

.kpi-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.kpi-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.78rem;
  color: #52525B;
  line-height: 1.3;
}

.kpi-bar-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 0.5rem;
}

.kpi-bar-weight {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: #71717A;
  font-variant-numeric: tabular-nums;
}

.kpi-bar-track {
  height: 7px;
  background: #E5E5E5;
  border-radius: 0;
  overflow: hidden;
}

.kpi-bar-fill {
  height: 100%;
  border-radius: 0;
  opacity: 0.85;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-detail-toggle-row {
  display: flex;
  justify-content: flex-start;
  padding: 0.5rem 0 0.25rem;
}

.kpi-detail-toggle {
  background: none;
  border: 1px solid #E5E5E5;
  border-radius: 0;
  color: #71717A;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.kpi-detail-toggle:hover {
  color: #18181B;
  border-color: #D4D4D8;
}

.kpi-cards-hidden {
  display: none;
}

/* Reduced motion — disable all PD animations */
@media (prefers-reduced-motion: reduce) {
  .reveal-pending {
    transition: none;
  }

  .card-animate-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .reveal-pill {
    animation: none;
  }

  .reveal-pill.pill-hiding {
    animation: none;
    display: none;
  }

  .kpi-bar-fill {
    transition: none;
  }
}

/* ===================================================================
   UX-PD5: Condensed views — Milestone strip, Jury avatars,
   Deliverables summary, Background condensed
   =================================================================== */

/* ── Shared toggle bar ─────────────────────────────────────────── */
.pd-toggle-bar {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

.pd-expand-btn,
.pd-collapse-btn {
  background: none;
  border: 1px solid rgba(180, 180, 200, 0.35);
  border-radius: 0;
  color: #8b9ab0;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.75rem;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.pd-expand-btn:hover,
.pd-collapse-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: #D4D4D8;
  color: #52525B;
}

/* ── Milestone strip ───────────────────────────────────────────── */
.milestone-strip {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding: 0.5rem 0 0.25rem;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: #D4D4D8 transparent;
}

/* Connecting line */
.milestone-strip::before {
  content: '';
  position: absolute;
  top: calc(0.5rem + 20px); /* align to dot center */
  left: 0;
  right: 0;
  height: 2px;
  background: #E5E5E5;
  z-index: 0;
}

.milestone-strip-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 0 80px;
  min-width: 80px;
  max-width: 140px;
  position: relative;
  z-index: 1;
  cursor: default;
}

.milestone-strip-label {
  color: #9ca3af;
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 6px;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.milestone-strip-item.next .milestone-strip-label {
  color: #18181B;
  font-weight: 600;
}

.milestone-strip-dot {
  background: #D4D4D8;
  border: 2px solid #A1A1AA;
  border-radius: 50%;
  height: 10px;
  width: 10px;
  flex-shrink: 0;
}

.milestone-strip-dot.past {
  background: #E5E5E5;
  border-color: #D4D4D8;
}

.milestone-strip-dot.next {
  background: #3b82f6;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
  height: 12px;
  width: 12px;
}

.milestone-strip-date {
  color: #6b7280;
  font-size: 0.6rem;
  margin-top: 5px;
  text-align: center;
}

.milestone-strip-item.next .milestone-strip-date {
  color: #2563eb;
  font-weight: 600;
}

.milestone-strip-item.past .milestone-strip-label,
.milestone-strip-item.past .milestone-strip-date {
  color: #4b5563;
}

/* ── Jury condensed avatar row ─────────────────────────────────── */
.jury-condensed-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.jury-condensed-member {
  align-items: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 64px;
  max-width: 80px;
  position: relative;
  transition: transform 0.15s;
}

.jury-condensed-member:hover {
  transform: translateY(-2px);
}

.jury-condensed-member.active .jury-condensed-avatar {
  box-shadow: 0 0 0 2px #3b82f6;
}

.jury-condensed-avatar {
  border-radius: 50%;
  height: 40px;
  overflow: hidden;
  width: 40px;
  flex-shrink: 0;
}

.jury-condensed-avatar-img {
  border-radius: 50%;
  height: 40px;
  object-fit: cover;
  width: 40px;
}

.jury-condensed-avatar-initials {
  align-items: center;
  border-radius: 50%;
  display: flex;
  font-size: 0.875rem;
  font-weight: 600;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.jury-condensed-name {
  color: #d1d5db;
  font-size: 0.65rem;
  font-weight: 500;
  margin-top: 4px;
  max-width: 80px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jury-condensed-role {
  color: #6b7280;
  font-size: 0.6rem;
  max-width: 80px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jury-condensed-detail {
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 0;
  left: 50%;
  margin-top: 8px;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  position: absolute;
  top: 100%;
  transform: translateX(-50%);
  transition: max-height 0.25s ease;
  white-space: normal;
  width: 260px;
  z-index: 100;
}

.jury-condensed-detail:not(.hidden) {
  padding: 0.75rem;
}

.jury-condensed-detail-inner {
  color: #52525B;
  font-size: 0.8rem;
  line-height: 1.5;
}

/* ── Deliverables condensed summary line ───────────────────────── */
.deliverables-condensed-line {
  align-items: center;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  border-radius: 0;
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  flex-wrap: wrap;
}

.deliverables-condensed-text {
  color: #52525B;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ── Unverified-grounding badge (for sections where Gemini returned no Google-Search supports) ── */
.bg-unverified-badge {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8671f;
  background: #fff4dd;
  border: 1px solid #f1d08a;
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  margin-left: 0.5rem;
  vertical-align: middle;
  cursor: help;
}

/* ── Background condensed wrappers (project/site/client) ───────── */
.bg-condensed-wrapper {
  background: #f8f9fa;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
}

.bg-condensed-clickable {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.bg-condensed-clickable:hover {
  border-color: #c4cdd6;
  background: #f8f9fa;
}

.bg-condensed-expand-hint {
  font-size: 0.75rem;
  color: #9aa2ac;
  margin-top: 0.25rem;
  letter-spacing: 0.02em;
}

.bg-condensed-name {
  color: #2a2f3a;
  font-size: 0.875rem;
  font-weight: 600;
}

.bg-condensed-summary {
  color: #4b5563;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

.bg-article-badge {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0;
  color: #2563eb;
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  width: fit-content;
}

/* ── Gantt programme full content toggle ───────────────────────── */
#gantt-programme-full.hidden {
  display: none;
}

/* ============================================================
   Batch 3 — Editorial Restyle (V3)
   ============================================================ */

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  --ink:          #2a2f3a;
  --ink-soft:     #374151;
  --ink-muted:    #6b7280;
  --label:        #7a8490;
  --surface:      #ffffff;
  --ground:       #f4f6f8;
  --border:       #dbe0e5;
  --border-light: #f3f4f6;
  --accent:       #0EA5E9;
  --accent-hover: #0284C7;
  --danger:       #c0392b;
  --caution:      #d6a048;

  --prov-brief-bg:   #dbeafe;
  --prov-brief-text: #1e40af;
  --prov-web-bg:     #ccfbf1;
  --prov-web-text:   #0f766e;
  --prov-ai-bg:      #ede9fe;
  --prov-ai-text:    #6d28d9;

  --bar-design:   #0EA5E9;
  --bar-research: #6366f1;
  --bar-delivery: #10b981;
  --bar-admin:    #9aa2ac;
}

/* ── Batch summary strip ────────────────────────────────────── */
.batch-summary-strip {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  margin-bottom: 0.75rem;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border, #dbe0e5);
  border-left: 3px solid var(--accent, #0EA5E9);
  font-size: 12px;
  color: var(--ink-muted, #6b7280);
}
.batch-summary-strip-item {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  white-space: nowrap;
}
.batch-summary-strip-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #2a2f3a);
}
.batch-summary-strip-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border, #dbe0e5);
  flex-shrink: 0;
  align-self: center;
}

/* ── Editorial intro (contextual summary) ───────────────────── */
.b3-editorial-intro {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-muted, #6b7280);
  max-width: 640px;
  margin-bottom: 1.25rem;
}
.b3-editorial-intro strong {
  font-weight: 600;
  color: var(--ink-soft, #374151);
}

/* ── Key figures (monograph-style hero numbers) ─────────────── */
.b3-key-figures {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid var(--border-light, #f3f4f6);
  border-bottom: 1px solid var(--border-light, #f3f4f6);
  margin-bottom: 1.25rem;
}
.b3-key-figure {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.b3-key-figure-value {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-weight: 300;
  font-size: 36px;
  color: var(--ink, #2a2f3a);
  line-height: 1;
  letter-spacing: -0.03em;
}
.b3-key-figure-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--label, #7a8490);
}

/* ── Source citation ─────────────────────────────────────────── */
.b3-source-citation {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 11px;
  color: var(--ink-muted, #6b7280);
  text-align: left;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light, #f3f4f6);
}
.b3-source-citation::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z' /%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

/* ── Pull quote ──────────────────────────────────────────────── */
.b3-pull-quote {
  border-left: 3px solid var(--accent, #0EA5E9);
  padding: 0.5rem 0 0.5rem 1rem;
  margin: 1rem 0 0.5rem;
  font-size: 12.5px;
  font-style: italic;
  color: var(--ink-muted, #6b7280);
  line-height: 1.55;
}

/* ── AI check notice ─────────────────────────────────────────── */
.b3-ai-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0;
  padding: 0.625rem 0.875rem;
  font-size: 11.5px;
  color: #92400e;
  line-height: 1.45;
}
.b3-ai-notice strong {
  color: #78350f;
}

/* ── Area table (list view) ──────────────────────────────────── */
.b3-area-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.b3-area-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--label, #7a8490);
  border-bottom: 2px solid var(--border, #dbe0e5);
}
.b3-area-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-light, #f3f4f6);
  color: var(--ink-soft, #374151);
}
.b3-area-table tr:last-child td {
  border-bottom: none;
}
.b3-area-table tr:hover td {
  background: #f9fafb;
}
.b3-area-table .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.b3-area-table .total-row {
  font-weight: 700;
  background: var(--ground, #f4f6f8);
}
.b3-area-table .total-row td {
  border-bottom: none;
}
.b3-category-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 0;
  font-size: 10px;
  font-weight: 600;
}

/* ── KPI editorial layout ────────────────────────────────────── */
.b3-kpi-category {
  margin-bottom: 1.5rem;
}
.b3-kpi-category:last-child {
  margin-bottom: 0;
}
.b3-kpi-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 0;
  background: var(--ground, #f4f6f8);
  border: 1px solid var(--border, #dbe0e5);
  border-left: 3px solid var(--accent, #0EA5E9);
}
.b3-kpi-category-title {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--ink, #2a2f3a);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.b3-kpi-category-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--ink-muted, #6b7280);
}
.b3-kpi-item {
  display: grid;
  grid-template-columns: 40px 1fr 80px;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light, #f3f4f6);
}
.b3-kpi-item:last-child {
  border-bottom: none;
}
.b3-kpi-number {
  min-width: 2rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  border-radius: 0;
  background: var(--ground, #f4f6f8);
  color: var(--ink-muted, #6b7280);
  font-size: 0.7rem;
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.b3-kpi-content {}
.b3-kpi-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--ink, #2a2f3a);
  line-height: 1.35;
  margin-bottom: 4px;
}
.b3-kpi-description {
  font-size: 12px;
  color: var(--ink-muted, #6b7280);
  line-height: 1.55;
}
/* ── Per-KPI source badge + excerpt ── */
.b3-kpi-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.4rem;
  padding: 0.18rem 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6b7280;
  background: #f4f6f8;
  border: 1px solid #dbe0e5;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.4;
}
.b3-kpi-source-btn:hover {
  background: #e8ecf0;
  color: #2a2f3a;
  border-color: #c4cdd6;
}
.b3-kpi-source-btn.open {
  background: rgba(14,165,233,0.06);
  border-color: #0EA5E9;
  color: #0284c7;
}
.b3-kpi-source-inferred {
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #9aa2ac;
}
.b3-kpi-source-detail {
  display: none;
  margin-top: 0.5rem;
  border-left: 2px solid #0EA5E9;
  background: rgba(14,165,233,0.04);
  padding: 0.6rem 0.875rem;
}
.b3-kpi-source-detail.open { display: block; }
.b3-kpi-excerpt {
  font-size: 12px;
  color: #374151;
  line-height: 1.65;
  font-style: italic;
  margin: 0 0 0.3rem 0;
}
.b3-kpi-source-doc {
  font-size: 10px;
  color: #9aa2ac;
  margin: 0;
  font-style: normal;
}
.b3-kpi-weight-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 72px;
}
.b3-kpi-weight {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 0;
  background: var(--ground, #f4f6f8);
  border: 1px solid var(--border, #dbe0e5);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-soft, #374151);
  white-space: nowrap;
}
.b3-kpi-weight-bar {
  width: 100%;
  height: 3px;
  background: var(--border-light, #f3f4f6);
  border-radius: 0;
  overflow: hidden;
}
.b3-kpi-weight-bar-fill {
  height: 100%;
  background: var(--accent, #0EA5E9);
  border-radius: 0;
}
.b3-kpi-weight.weight-high {
  font-weight: 700;
  color: var(--ink, #2a2f3a);
  border-color: var(--accent, #0EA5E9);
  background: rgba(14, 165, 233, 0.06);
}
.b3-kpi-weight.weight-mid {
  font-weight: 600;
  color: var(--ink-soft, #374151);
}

/* ── Deliverables editorial layout ──────────────────────────── */
.b3-deliverables-category {
  margin-bottom: 1.25rem;
}
.b3-deliverables-category:last-child {
  margin-bottom: 0;
}
.b3-deliverables-category-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--label, #7a8490);
  margin-bottom: 0.5rem;
}
.b3-deliverables-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  list-style: none;
  padding: 0;
  margin: 0;
}
.b3-deliverable-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 6px 0;
  border-radius: 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-light, #f3f4f6);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-soft, #374151);
}
.b3-deliverable-tag:last-child {
  border-bottom: none;
}
.b3-deliverable-tag .tag-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent, #0EA5E9);
  font-weight: 400;
}
.b3-deliverable-tag.mandatory::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: var(--ink, #2a2f3a);
  border-radius: 0;
}
.b3-deliverable-tag.optional {
  opacity: 0.7;
}
.b3-deliverable-tag.optional::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: var(--border, #dbe0e5);
  border-radius: 0;
}
.b3-tag-required {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink, #2a2f3a);
  margin-left: auto;
}
.b3-tag-optional-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--label, #7a8490);
  margin-left: auto;
}

/* ── Settings panel (editorial, collapsible) ─────────────────── */
.b3-settings-panel {
  background: var(--ground, #f4f6f8);
  border: 1px solid var(--border, #dbe0e5);
  border-radius: 0;
  margin-bottom: 1.25rem;
}
.b3-settings-panel-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.b3-settings-panel-header:hover {
  background: rgba(0, 0, 0, 0.015);
}
.b3-settings-panel-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.b3-settings-panel-body {
  padding: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  border-top: 1px solid var(--border, #dbe0e5);
}

/* ── Section body (editorial padding) ────────────────────────── */
.b3-section-body {
  padding: 1.25rem 1rem 1.5rem;
}

/* ── Progress bar (processing state) ─────────────────────────── */
.b3-progress-bar-track {
  height: 3px;
  background: var(--border-light, #f3f4f6);
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 0.625rem;
}
.b3-progress-bar-fill {
  height: 100%;
  width: 45%;
  background: var(--accent, #0EA5E9);
  border-radius: 0;
  animation: b3-progress-pulse 1.5s ease-in-out infinite;
}
@keyframes b3-progress-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.b3-progress-label {
  font-size: 11px;
  color: var(--ink-muted, #6b7280);
  margin-bottom: 1rem;
}

/* ── Treemap editorial colors (V3 higher contrast) ───────────── */
.b3-treemap-cell-0 { background: #a8c4de; }
.b3-treemap-cell-1 { background: #8cc5b5; }
.b3-treemap-cell-2 { background: #c8d4a8; }
.b3-treemap-cell-3 { background: #e8c99a; }
.b3-treemap-cell-4 { background: #c9b0a0; }
.b3-treemap-cell-5 { background: #b5c7d8; }
.b3-treemap-cell-6 { background: #d4b8a0; }
.b3-treemap-cell-7 { background: #a8d8c4; }

/* ── Batch 3 responsive ──────────────────────────────────────── */
@media (max-width: 640px) {
  .b3-key-figures {
    gap: 1.25rem;
  }
  .b3-key-figure-value {
    font-size: 28px;
  }
  .b3-kpi-item {
    grid-template-columns: 32px 1fr 60px;
    gap: 0.5rem;
  }
  .batch-summary-strip {
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    font-size: 11px;
  }
  .batch-summary-strip-value {
    font-size: 12px;
  }
  .b3-area-table {
    font-size: 12px;
  }
  .b3-area-table th,
  .b3-area-table td {
    padding: 6px 6px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   EDITORIAL LAYOUT — Batch 2 Research (Magazine-style chapters)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Chapter accent colors ── */
:root {
  --ch1: #0EA5E9;
  --ch2: #059669;
  --ch3: #8b5cf6;
  --ch4: #d97706;
  --ch5: #e05d44;
  --ch6: #0f766e;
  --ch7: #1d4ed8;
  --ch8: #be185d;
  --ch9: #475569;
  --ch-env: #0891b2;
}

/* ── Reading progress bar ── */
.ed-reading-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; z-index: 200;
  background: transparent;
  pointer-events: none;
}
.ed-reading-progress-fill {
  height: 100%;
  background: var(--ch1, #0EA5E9);
  width: 0%;
  transition: width 0.1s linear;
}

/* ── Chapter top nav (horizontal, lives inside sticky header) ── */
.ed-chapter-top-nav {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  position: relative;
  background: #ffffff;
  border-bottom: 1px solid #dbe0e5;
  overflow-x: auto;
  scrollbar-width: none;
}
.ed-chapter-top-nav::-webkit-scrollbar { display: none; }
.ed-chapter-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 44px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9aa2ac;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
  touch-action: manipulation;
}
.ed-chapter-nav-link:hover { color: #4b5563; text-decoration: none; }
/* Active state: text + bottom border in chapter accent color */
.ed-chapter-nav-link.active { font-weight: 600; }
.ed-chapter-nav-link.active[data-ch="1"] { color: var(--ch1); border-bottom-color: var(--ch1); }
.ed-chapter-nav-link.active[data-ch="2"] { color: var(--ch2); border-bottom-color: var(--ch2); }
.ed-chapter-nav-link.active[data-ch="3"] { color: var(--ch3); border-bottom-color: var(--ch3); }
.ed-chapter-nav-link.active[data-ch="4"] { color: var(--ch4); border-bottom-color: var(--ch4); }
.ed-chapter-nav-link.active[data-ch="5"] { color: var(--ch5); border-bottom-color: var(--ch5); }
.ed-chapter-nav-link.active[data-ch="6"] { color: var(--ch6); border-bottom-color: var(--ch6); }
.ed-chapter-nav-link.active[data-ch="7"] { color: var(--ch7); border-bottom-color: var(--ch7); }
.ed-chapter-nav-link.active[data-ch="8"] { color: var(--ch8); border-bottom-color: var(--ch8); }
.ed-chapter-nav-link.active[data-ch="9"] { color: var(--ch9); border-bottom-color: var(--ch9); }
.ed-chapter-nav-link.active[data-ch="env"] { color: var(--ch-env); border-bottom-color: var(--ch-env); }
.ed-chapter-nav-link.active[data-ch="map"] { color: var(--ch2); border-bottom-color: var(--ch2); }

/* ── Run Research button — lives inside the chapter nav bar ── */
.ed-chapter-nav-action {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  flex-shrink: 0;
}

/* ── Research chapter tabs injected into the top nav ── */
.rm-chapter-nav-inject {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-shrink: 0;
  border-left: 1px solid #e5e7eb;
  margin-left: 4px;
  padding-left: 4px;
}

.rm-top-chapter-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.3em;
  padding: 0 20px;
  height: 40px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9aa2ac;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
}

.rm-top-chapter-tab:hover { color: #4b5563; }

.rm-top-chapter-tab.active {
  color: var(--ch6);
  border-bottom-color: var(--ch6);
  font-weight: 600;
}

.rm-top-chapter-tab .rm-chapter-tab-num {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.55;
}

.rm-top-chapter-tab.active .rm-chapter-tab-num {
  opacity: 1;
}

/* ── Chapter section containers ── */
.ed-chapter {
  background: #ffffff;
  border: 1px solid #dbe0e5;
  border-radius: 0;
  margin-top: 1.5rem;
  overflow: hidden;
  scroll-margin-top: 152px;
}
.ed-chapter:first-of-type { margin-top: 1rem; }
/* Accent stripe per chapter */
.ed-chapter[data-chapter="1"] { border-top: 3px solid var(--ch1); }
.ed-chapter[data-chapter="2"] { border-top: 3px solid var(--ch2); }
.ed-chapter[data-chapter="3"] { border-top: 3px solid var(--ch3); }
.ed-chapter[data-chapter="4"] { border-top: 3px solid var(--ch4); }
.ed-chapter[data-chapter="5"] { border-top: 3px solid var(--ch5); }
.ed-chapter[data-chapter="6"] { border-top: 3px solid var(--ch6); }
.ed-chapter[data-chapter="7"] { border-top: 3px solid var(--ch7); }
.ed-chapter[data-chapter="8"] { border-top: 3px solid var(--ch8); }
.ed-chapter[data-chapter="9"] { border-top: 3px solid var(--ch9); }
.ed-chapter[data-chapter="env"] { border-top: 3px solid var(--ch-env); }
.ed-chapter[data-chapter="map"] { border-top: 3px solid var(--ch2); }

/* ── Chapter hero header ── */
.ed-chapter-hero {
  position: relative; width: 100%;
  overflow: hidden; background: #f9fafb;
  border-bottom: 1px solid #dbe0e5;
}
.ed-chapter-hero-bg {
  position: absolute; inset: 0;
  opacity: 0.15;
  background-size: cover; background-position: center;
}
.ed-chapter-hero-inner {
  position: relative; z-index: 1;
  padding: 1rem 2rem;
}
.ed-chapter-hero .ed-headline {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700; color: #2a2f3a;
  line-height: 1.2; letter-spacing: -0.02em;
}
.ed-chapter-hero .ed-subtitle {
  display: none;
}

/* Active state — analysis has been run */
.ed-chapter-hero.has-content {
  background: #2a2f3a;
  border-bottom: none;
}
.ed-chapter-hero.has-content .ed-chapter-hero-inner {
  padding: 2.5rem 2rem 2rem;
}
.ed-chapter-hero.has-content .ed-headline {
  font-size: clamp(28px, 4vw, 42px);
  color: #f4f6f8;
  line-height: 1.15;
}
.ed-chapter-hero.has-content .ed-subtitle {
  display: block;
  font-size: 13px; color: rgba(244,246,248,0.65);
  margin-top: 0.5rem; max-width: 60ch; line-height: 1.5;
}
/* Full-opacity hero image with gradient overlay */
.ed-chapter-hero.has-image .ed-chapter-hero-bg {
  opacity: 1;
}
.ed-chapter-hero.has-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(42,47,58,0.85) 0%, rgba(42,47,58,0.4) 50%, rgba(42,47,58,0.2) 100%);
  z-index: 0;
}
.ed-chapter-hero.has-image .ed-chapter-hero-inner {
  padding: 4rem 2rem 2.5rem;
}

/* ── Chapter controls bar (buttons, status, provenance) ── */
.ed-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  background: #fafbfc;
  flex-wrap: wrap; gap: 0.5rem;
}
.ed-controls-left {
  display: flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap;
}
.ed-controls-right {
  display: flex; align-items: center; gap: 0.5rem;
}

/* ── Chapter content area ── */
.ed-content {
  padding: 1.5rem 2rem 2rem;
}

/* ── Editorial typography ── */
.ed-mag-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700; color: #2a2f3a;
  line-height: 1.1; letter-spacing: -0.025em;
}
.ed-mag-h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px; font-weight: 700; color: #2a2f3a;
  line-height: 1.25;
}
.ed-mag-h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; font-weight: 600; color: #2a2f3a;
  line-height: 1.35;
}
.ed-mag-p {
  font-size: 14px; line-height: 1.7; color: #374151;
  max-width: 65ch;
}
.ed-mag-p + .ed-mag-p { margin-top: 0.75rem; }

/* Drop cap */
.ed-drop-cap::first-letter {
  float: left; font-family: 'Playfair Display', serif;
  font-size: 4em; line-height: 0.75; font-weight: 700;
  color: #2a2f3a; padding-right: 0.1em; padding-top: 0.05em;
}

.ed-eyebrow {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: #9aa2ac; display: block;
}
.ed-eyebrow-accent {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; display: block;
}
.ed-chapter[data-chapter="1"] .ed-eyebrow-accent { color: var(--ch1); }
.ed-chapter[data-chapter="2"] .ed-eyebrow-accent { color: var(--ch2); }
.ed-chapter[data-chapter="3"] .ed-eyebrow-accent { color: var(--ch3); }
.ed-chapter[data-chapter="4"] .ed-eyebrow-accent { color: var(--ch4); }
.ed-chapter[data-chapter="5"] .ed-eyebrow-accent { color: var(--ch5); }
.ed-chapter[data-chapter="6"] .ed-eyebrow-accent { color: var(--ch6); }
.ed-chapter[data-chapter="7"] .ed-eyebrow-accent { color: var(--ch7); }
.ed-chapter[data-chapter="8"] .ed-eyebrow-accent { color: var(--ch8); }
.ed-chapter[data-chapter="9"] .ed-eyebrow-accent { color: var(--ch9); }

/* ── Stat strip ── */
.ed-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
}
.ed-stat-item {
  padding: 1.25rem 1.5rem;
  text-align: center;
  border-right: 1px solid #f3f4f6;
}
.ed-stat-item:last-child { border-right: none; }
.ed-stat-number {
  font-family: 'DM Sans', sans-serif;
  font-size: 28px; font-weight: 700; color: #2a2f3a;
  line-height: 1; margin-bottom: 0.25rem;
}
.ed-stat-label {
  font-size: 10px; color: #9aa2ac; text-transform: uppercase;
  letter-spacing: 0.08em; font-weight: 500;
}
.ed-stat-context {
  font-size: 11px; color: #6b7280; margin-top: 0.15rem;
}

/* ── Article grid with margin notes ── */
.ed-article-grid {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 220px);
  gap: 0 2rem;
  padding: 1.5rem 0 0;
}
.ed-article-grid > * { grid-column: 1; }
.ed-margin-note {
  grid-column: 2;
  font-size: 12px; line-height: 1.5;
  color: #6b7280;
  border-left: 2px solid #f3f4f6;
  padding-left: 0.875rem;
  align-self: start;
}
.ed-margin-note .ed-mn-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: #9aa2ac; display: block;
  margin-bottom: 0.25rem;
}

/* ── Split layout ── */
.ed-layout-split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; align-items: stretch;
}
.ed-layout-split.reverse { direction: rtl; }
.ed-layout-split.reverse > * { direction: ltr; }
.ed-split-image { overflow: hidden; background: #f4f6f8; }
.ed-split-image img {
  width: 100%; height: 100%; min-height: 340px;
  object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.ed-split-image:hover img { transform: scale(1.02); }
.ed-split-text {
  padding: 2.5rem 2.25rem;
  display: flex; flex-direction: column; justify-content: center; gap: 0.75rem;
}

/* ── Text inset layout ── */
.ed-layout-text-inset {
  display: grid; grid-template-columns: 1fr 340px;
  gap: 2rem; align-items: start; padding: 1.5rem 0;
}

/* ── 3-up and 2-up grids ── */
.ed-layout-3up {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: start;
}
.ed-layout-2up {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-items: start;
}
.ed-gallery-item {
  border: 1px solid #dbe0e5; border-radius: 4px;
  overflow: hidden; background: #f4f6f8;
  /* Hold a consistent aspect ratio so the Site Background book/render
     triptych sits on the same baseline. Without this, each item's
     height is driven by its image's intrinsic ratio which made the
     middle cell drop ~8px below its neighbours. */
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: stretch;
}
.ed-gallery-item > img,
.ed-gallery-item > picture,
.ed-gallery-item > a {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ed-gallery-item img {
  width: 100%; height: 200px; object-fit: cover;
  transition: transform 0.3s;
}
.ed-gallery-item:hover img { transform: scale(1.02); }
.ed-img-caption {
  padding: 0.5rem 0.75rem 0.625rem; font-size: 11px;
  color: #6b7280; line-height: 1.4;
}
.ed-img-eyebrow {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: #9aa2ac;
}

/* ── Horizontal scroll gallery ── */
.ed-h-scroll-gallery {
  display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding: 2rem; padding: 1rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ed-h-scroll-gallery::-webkit-scrollbar { display: none; }
.ed-h-scroll-card {
  flex: 0 0 min(75vw, 340px);
  scroll-snap-align: start;
  border: 1px solid #dbe0e5; border-radius: 4px;
  overflow: hidden; background: #ffffff;
  transition: box-shadow 0.2s;
}
.ed-h-scroll-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.ed-h-scroll-card img {
  width: 100%; height: 200px; object-fit: cover;
  transition: transform 0.3s;
}
.ed-h-scroll-card:hover img { transform: scale(1.02); }
.ed-h-scroll-card .ed-card-body { padding: 0.75rem 1rem; }
.ed-h-scroll-card .ed-card-body p {
  font-size: 12px; color: #374151; line-height: 1.45;
  /* Long research-card titles ("Little London Workable Residential
     Micro-Urbanism") previously wrapped onto 3-4 lines and pushed
     the neighbouring cards out of rhythm. Clamp the body paragraph
     to 4 lines with ellipsis so every card has the same visual
     weight regardless of title length. */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ed-h-scroll-card .ed-card-body p strong {
  /* Keep titles on two lines max so the summary below is never
     orphaned into a single ellipsised line. */
  display: block;
  margin-bottom: 0.25rem;
}
.ed-card-detail {
  display: none; border-top: 1px solid #f3f4f6;
  padding: 0.625rem 1rem 0.75rem;
  font-size: 11px; color: #6b7280; line-height: 1.5;
}
.ed-card-detail.open { display: block; }
.ed-card-detail-grid {
  display: grid; grid-template-columns: auto 1fr;
  gap: 0.15rem 0.75rem; margin-bottom: 0.5rem;
}
.ed-card-detail-grid dt {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #9aa2ac; padding-top: 1px;
}
.ed-card-detail-grid dd { font-size: 12px; color: #374151; }
.ed-card-expand-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 0.3rem; width: 100%; padding: 0.35rem 0;
  border: none; border-top: 1px solid #f3f4f6;
  background: #f4f6f8; cursor: pointer;
  font-size: 10px; font-weight: 600; color: #9aa2ac;
  text-transform: uppercase; letter-spacing: 0.06em;
  transition: color 0.15s, background 0.15s;
}
.ed-card-expand-btn:hover { color: #374151; background: #f3f4f6; }
.ed-card-expand-btn .ed-expand-icon { transition: transform 0.2s; font-size: 12px; }
.ed-card-expand-btn.open .ed-expand-icon { transform: rotate(180deg); }
.ed-h-scroll-hint {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.25rem;
}
.ed-scroll-arrows { display: flex; gap: 0.4rem; }
.ed-scroll-arrow {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid #dbe0e5; background: #ffffff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #6b7280; font-size: 14px;
  transition: border-color 0.15s;
}
.ed-scroll-arrow:hover { border-color: #6b7280; }

/* ── Pull quote ── */
.ed-pull-quote {
  padding: 2rem 2.5rem;
  text-align: center;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
  margin: 0.5rem 0;
}
.ed-pull-quote-text {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: 20px;
  color: #2a2f3a; line-height: 1.4;
  letter-spacing: -0.01em;
  max-width: 720px; margin: 0 auto 0.75rem;
}
.ed-pull-quote-attr {
  font-size: 11px; color: #9aa2ac; font-style: normal;
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* ── Person cards ── */
.ed-person-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px; padding: 0.75rem 0;
}
.ed-person-card {
  border: 1px solid #dbe0e5; border-radius: 6px;
  overflow: hidden; background: #ffffff;
  transition: box-shadow 0.2s;
}
.ed-person-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.ed-person-portrait {
  width: 100%; height: 200px; overflow: hidden;
  background: #f3f4f6;
}
.ed-person-portrait img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform 0.3s ease;
}
.ed-person-card:hover .ed-person-portrait img { transform: scale(1.03); }
.site-map-error-body {
  padding: 1rem 1.25rem;
  background: #fdf2f2;
  border: 1px solid #f5c2c7;
  border-radius: 6px;
}
.site-map-error-msg {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: #8b2a2a;
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}
.site-map-error-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}
.site-map-error-osm {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: #4b5563;
  text-decoration: underline;
}
.site-map-error-osm:hover { color: #111827; }

.ed-person-portrait-fallback {
  width: 100%; height: 200px;
  display: flex; align-items: center; justify-content: center;
  background: #eef0f2;
  background-image: linear-gradient(135deg, #eef0f2 0%, #e5e7eb 100%);
}
.ed-person-portrait-fallback-initials {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem; font-weight: 600; color: #9ca3af;
  letter-spacing: 0.05em;
}
.ed-person-card-header {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
}
.ed-person-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 2px solid #f3f4f6;
}
.ed-person-card.has-portrait .ed-person-avatar { display: none; }
.ed-person-info { min-width: 0; }
.ed-person-name {
  font-size: 14px; font-weight: 600; color: #2a2f3a;
  line-height: 1.35;
}
.ed-person-role {
  font-size: 12px; color: #6b7280; line-height: 1.35;
  margin-top: 1px;
}
.ed-person-country {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: #9aa2ac; margin-top: 3px;
}
.ed-person-detail {
  display: block; padding: 0.875rem 1.25rem 1rem;
  font-size: 13px; color: #374151; line-height: 1.6;
  border-top: 1px solid #f3f4f6;
}
.ed-person-detail p { margin-bottom: 0.5rem; }
.ed-person-relevance {
  font-style: italic; color: #6b7280; margin-top: 0.4rem !important;
}
.ed-person-name-link {
  font-size: 14px; font-weight: 600; color: #2a2f3a;
  line-height: 1.35; text-decoration: none;
  transition: color 0.15s;
}
.ed-person-name-link:hover { color: #0EA5E9; text-decoration: none; }
.ed-person-ext-icon { font-size: 11px; color: #9aa2ac; }
.ed-person-profile-link {
  display: inline-block; margin-top: 0.5rem;
  font-size: 11px; font-weight: 600; color: #0EA5E9;
  text-transform: uppercase; letter-spacing: 0.06em;
  text-decoration: none; transition: opacity 0.15s;
}
.ed-person-profile-link:hover { opacity: 0.75; text-decoration: none; }
.ed-person-expand-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 0.3rem; width: 100%; padding: 0.45rem 0;
  border: none; border-top: 1px solid #f3f4f6;
  background: #f4f6f8; cursor: pointer;
  font-size: 10px; font-weight: 600; color: #9aa2ac;
  text-transform: uppercase; letter-spacing: 0.06em;
  transition: color 0.15s, background 0.15s;
}
.ed-person-expand-btn:hover { color: #374151; background: #f3f4f6; }
.ed-person-expand-btn .ed-expand-icon { transition: transform 0.2s; font-size: 12px; }
.ed-person-expand-btn.open .ed-expand-icon { transform: rotate(180deg); }

/* ── Highlight / Key finding block ── */
.ed-highlight-block {
  background: #f4f6f8; border-left: 3px solid #0EA5E9;
  padding: 1rem 1.25rem; border-radius: 0 4px 4px 0;
  margin: 0.75rem 0;
}
.ed-highlight-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: #0EA5E9; display: block;
  margin-bottom: 0.35rem;
}
.ed-highlight-block p {
  font-size: 13px; color: #374151; line-height: 1.6;
}
/* Chapter-colored highlights */
.ed-chapter[data-chapter="1"] .ed-highlight-block { border-left-color: var(--ch1); }
.ed-chapter[data-chapter="1"] .ed-highlight-label { color: var(--ch1); }
.ed-chapter[data-chapter="2"] .ed-highlight-block { border-left-color: var(--ch2); }
.ed-chapter[data-chapter="2"] .ed-highlight-label { color: var(--ch2); }
.ed-chapter[data-chapter="3"] .ed-highlight-block { border-left-color: var(--ch3); }
.ed-chapter[data-chapter="3"] .ed-highlight-label { color: var(--ch3); }
.ed-chapter[data-chapter="4"] .ed-highlight-block { border-left-color: var(--ch4); }
.ed-chapter[data-chapter="4"] .ed-highlight-label { color: var(--ch4); }
.ed-chapter[data-chapter="5"] .ed-highlight-block { border-left-color: var(--ch5); }
.ed-chapter[data-chapter="5"] .ed-highlight-label { color: var(--ch5); }
.ed-chapter[data-chapter="6"] .ed-highlight-block { border-left-color: var(--ch6); }
.ed-chapter[data-chapter="6"] .ed-highlight-label { color: var(--ch6); }
.ed-chapter[data-chapter="7"] .ed-highlight-block { border-left-color: var(--ch7); }
.ed-chapter[data-chapter="7"] .ed-highlight-label { color: var(--ch7); }
.ed-chapter[data-chapter="8"] .ed-highlight-block { border-left-color: var(--ch8); }
.ed-chapter[data-chapter="8"] .ed-highlight-label { color: var(--ch8); }
.ed-chapter[data-chapter="9"] .ed-highlight-block { border-left-color: var(--ch9); }
.ed-chapter[data-chapter="9"] .ed-highlight-label { color: var(--ch9); }

/* ── Deep-dive expandable sections ── */
.ed-deep-dive {
  margin: 1rem 0; border: 1px solid #dbe0e5;
  border-radius: 4px; overflow: hidden;
}
.ed-deep-dive summary {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1rem; cursor: pointer;
  font-size: 12px; font-weight: 600; color: #2a2f3a;
  background: #f4f6f8;
  list-style: none;
  transition: background 0.15s;
}
.ed-deep-dive summary:hover { background: #f3f4f6; }
.ed-deep-dive summary::-webkit-details-marker { display: none; }
.ed-deep-dive summary::before {
  content: '+'; font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 500; color: #0EA5E9;
  width: 20px; height: 20px; display: flex; align-items: center;
  justify-content: center; border-radius: 3px;
  background: #e0f2fe; transition: transform 0.2s;
}
.ed-deep-dive[open] summary::before { content: '\2212'; }
.ed-deep-dive .ed-deep-dive-content {
  padding: 1rem 1.25rem;
  font-size: 13px; line-height: 1.6; color: #374151;
  border-top: 1px solid #f3f4f6;
}
.ed-deep-dive .ed-deep-dive-content p + p { margin-top: 0.5rem; }

/* ── Finding block (synthesis items with image) ── */
.ed-finding-block {
  display: grid; grid-template-columns: 1fr 280px;
  gap: 1.75rem; align-items: start;
  padding: 1.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.ed-finding-block:last-of-type { border-bottom: none; }
.ed-finding-text { display: flex; flex-direction: column; gap: 0.625rem; }
.ed-finding-image img {
  width: 100%; height: 200px; object-fit: cover;
  border: 1px solid #dbe0e5; border-radius: 4px;
}

/* ── Source links ── */
.ed-source-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  font-size: 11px; color: #9aa2ac;
}
.ed-source-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: #0EA5E9;
  padding: 2px 8px; background: #e0f2fe;
  border-radius: 3px; transition: background 0.15s;
  text-decoration: none;
}
a.ed-source-link { cursor: pointer; }
.ed-source-link:hover {
  background: #bae6fd; text-decoration: none;
}

/* ── Cross reference links ── */
.ed-cross-ref {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 11px; font-weight: 600; color: #0EA5E9;
  padding: 3px 10px; background: #e0f2fe;
  border-radius: 100px; text-decoration: none;
  transition: background 0.15s;
}
.ed-cross-ref:hover { background: #bae6fd; text-decoration: none; }
.ed-cross-ref::before { content: '\2197'; font-size: 10px; }

/* ── Chapter bridge (transition between chapters) ── */
.ed-chapter-bridge {
  padding: 2rem; text-align: center;
}
.ed-bridge-line {
  width: 40px; height: 2px; margin: 0 auto 1rem;
  background: #dbe0e5;
}
.ed-bridge-text {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: 15px; color: #6b7280; max-width: 50ch;
  margin: 0 auto; line-height: 1.5;
}

/* ── Divider label ── */
.ed-divider-label {
  display: flex; align-items: center; gap: 1rem;
  margin: 1rem 0;
}
.ed-divider-label::before,
.ed-divider-label::after {
  content: ''; flex: 1; height: 1px; background: #f3f4f6;
}
.ed-divider-label span {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: #9aa2ac; white-space: nowrap;
}

/* ── Badges (provenance) ── */
.ed-badge {
  display: inline-block; font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 3px;
}
.ed-badge-brief { background: #dbeafe; color: #1e40af; }
.ed-badge-web   { background: #ccfbf1; color: #0f766e; }
.ed-badge-ai    { background: #ede9fe; color: #6d28d9; }

/* ── Spacers ── */
.ed-v-gap-sm { height: 1rem; }
.ed-v-gap-md { height: 1.5rem; }
.ed-v-gap-lg { height: 2.5rem; }

/* ── Scroll reveal system ── */
.ed-reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.ed-reveal.visible {
  opacity: 1; transform: translateY(0);
}
.ed-reveal-left {
  opacity: 0; transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.ed-reveal-left.visible { opacity: 1; transform: translateX(0); }
.ed-reveal-right {
  opacity: 0; transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.ed-reveal-right.visible { opacity: 1; transform: translateX(0); }
.ed-reveal-scale {
  opacity: 0; transform: scale(0.96);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.ed-reveal-scale.visible { opacity: 1; transform: scale(1); }
/* Stagger children */
.ed-stagger > *:nth-child(1) { transition-delay: 0s; }
.ed-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.ed-stagger > *:nth-child(3) { transition-delay: 0.15s; }
.ed-stagger > *:nth-child(4) { transition-delay: 0.2s; }
.ed-stagger > *:nth-child(5) { transition-delay: 0.25s; }

/* ── Caution notice (editorial styled) ── */
.ed-caution-notice {
  background: #fffbeb; border-left: 3px solid #d6a048;
  padding: 0.75rem 1rem; border-radius: 0 4px 4px 0;
  font-size: 12px; color: #92400e; line-height: 1.5;
  margin-bottom: 1rem;
}

/* ── Empty state (editorial) ── */
.ed-empty-msg {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: 15px;
  color: #9aa2ac; text-align: center;
  padding: 3rem 2rem;
}

/* ── Progress indicator inside chapters ── */
.ed-progress {
  padding: 1.5rem 2rem;
  text-align: center;
}
.ed-progress .progress-line {
  margin-bottom: 0.75rem;
}
.ed-progress p {
  font-size: 13px; color: #6b7280;
}

/* ── Data table ── */
.ed-data-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.ed-data-table th {
  text-align: left; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #9aa2ac; padding: 0 0 0.5rem;
  border-bottom: 1px solid #dbe0e5;
}
.ed-data-table td {
  padding: 0.5rem 0; color: #374151;
  border-bottom: 1px solid #f3f4f6; vertical-align: top;
}
.ed-data-table td:first-child { font-weight: 500; color: #2a2f3a; }

/* ── Editorial responsive ── */
@media (max-width: 1100px) {
  .ed-article-grid {
    grid-template-columns: 1fr;
  }
  .ed-margin-note {
    grid-column: 1;
    border-left: none; padding-left: 0;
    background: #f4f6f8; padding: 0.75rem 1rem;
    border-radius: 4px; margin: 0.5rem 0;
  }
}

@media (max-width: 900px) {
  .ed-layout-split { grid-template-columns: 1fr; }
  .ed-layout-split.reverse { direction: ltr; }
  .ed-layout-text-inset { grid-template-columns: 1fr; }
  .ed-layout-3up { grid-template-columns: repeat(2, 1fr); }
  .ed-finding-block { grid-template-columns: 1fr; }
  .ed-finding-image { order: -1; }
  .ed-stat-strip { grid-template-columns: repeat(2, 1fr); }
  .ed-stat-item { border-bottom: 1px solid #f3f4f6; }
  .ed-chapter-nav { display: none; }
  .ed-chapter-actions { display: none; }
  .ed-chapter-hero.has-content .ed-chapter-hero-inner { padding: 2rem 1.5rem 1.5rem; }
}

@media (max-width: 600px) {
  .ed-layout-3up { grid-template-columns: 1fr; }
  .ed-layout-2up { grid-template-columns: 1fr; }
  .ed-stat-strip { grid-template-columns: 1fr; }
  .ed-content { padding: 1rem; }
  .ed-chapter-hero.has-content .ed-chapter-hero-inner { padding: 1.5rem 1rem 1.25rem; }
  .ed-controls { padding: 0.5rem 1rem; }
}


/* ═══════════════════════════════════════════════════════════════════
   EDITORIAL OVERRIDES — Restyle existing rendered content in chapters
   ═══════════════════════════════════════════════════════════════════ */

/* ── Project Background cards inside editorial chapter ── */
.ed-chapter .pb-overview {
  font-size: 15px; line-height: 1.7; color: #374151;
  max-width: 65ch; margin-bottom: 1.25rem;
}
.ed-chapter .pb-overview::first-letter {
  float: left; font-family: 'Playfair Display', serif;
  font-size: 3.5em; line-height: 0.75; font-weight: 700;
  color: #2a2f3a; padding-right: 0.08em; padding-top: 0.05em;
}
.ed-chapter .pb-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.ed-chapter .pb-card {
  border-radius: 4px; overflow: hidden;
  border: 1px solid #dbe0e5; background: #fff;
  transition: box-shadow 0.2s;
}
.ed-chapter .pb-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.ed-chapter .pb-card-headline {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700; color: #2a2f3a;
}
.ed-chapter .pb-card-summary {
  font-size: 13px; line-height: 1.55; color: #374151;
}
.ed-chapter .pb-source-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; color: #0EA5E9;
  padding: 2px 6px; background: #e0f2fe;
  border-radius: 3px;
}

/* ── Site Background inside editorial chapter ── */
.ed-chapter .site-bg-exec-brief {
  font-size: 15px; line-height: 1.7; color: #374151;
  max-width: 65ch; margin-bottom: 1rem;
}
.ed-chapter .site-bg-exec-brief p::first-letter {
  float: left; font-family: 'Playfair Display', serif;
  font-size: 3.5em; line-height: 0.75; font-weight: 700;
  color: #2a2f3a; padding-right: 0.08em; padding-top: 0.05em;
}
.ed-chapter .site-bg-signal-banner {
  border-radius: 0; border-left-width: 3px;
}
.ed-chapter .site-bg-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; font-weight: 700; color: #2a2f3a;
  margin-bottom: 0.75rem;
}
.ed-chapter .site-bg-constraint-text,
.ed-chapter .site-bg-opportunity-text {
  font-size: 14px; color: #374151; line-height: 1.6;
}
.ed-chapter .site-bg-implication {
  font-style: italic; color: #6b7280;
}
.ed-chapter .site-bg-policy-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700; color: #2a2f3a;
}
.ed-chapter .bg-card-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.ed-chapter .bg-card {
  border-radius: 4px; border: 1px solid #dbe0e5;
  overflow: hidden; transition: box-shadow 0.2s;
}
.ed-chapter .bg-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.ed-chapter .bg-card-headline {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 700; color: #2a2f3a;
}
.ed-chapter .bg-card-summary {
  font-size: 13px; line-height: 1.55; color: #374151;
}

/* ── Client Profile inside editorial chapter ── */
.ed-chapter .client-profile-header {
  gap: 1.25rem; padding: 0 0 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 1.25rem;
}
.ed-chapter .client-profile-name {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; color: #2a2f3a;
}
.ed-chapter .client-profile-desc {
  font-size: 14px; line-height: 1.7; color: #374151;
  max-width: 65ch;
}
.ed-chapter .cb-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; font-weight: 700; color: #2a2f3a;
  margin-bottom: 0.75rem;
}
.ed-chapter .cb-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0; border: 1px solid #f3f4f6; border-radius: 0;
  margin-bottom: 1rem;
}
.ed-chapter .cb-stat {
  text-align: center; padding: 1rem;
  border-right: 1px solid #f3f4f6;
}
.ed-chapter .cb-stat:last-child { border-right: none; }
.ed-chapter .cb-stat-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 24px; font-weight: 700; color: #2a2f3a;
}
.ed-chapter .cb-stat-label {
  font-size: 10px; color: #9aa2ac; text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ed-chapter .cb-narrative {
  font-size: 14px; line-height: 1.7; color: #374151;
  max-width: 65ch;
}
.ed-chapter .cb-people-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.ed-chapter .cb-person-card {
  border: 1px solid #dbe0e5; border-radius: 6px;
  padding: 1rem 1.25rem; background: #fff;
  transition: box-shadow 0.2s;
}
.ed-chapter .cb-person-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.ed-chapter .cb-person-name {
  font-size: 14px; font-weight: 600; color: #2a2f3a;
}
.ed-chapter .cb-person-role {
  font-size: 12px; color: #6b7280;
}
.ed-chapter .cb-risk-banner {
  border-left-width: 3px; border-radius: 0 4px 4px 0;
}
.ed-chapter .cb-comps-table table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.ed-chapter .cb-comps-table th {
  text-align: left; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: #9aa2ac; padding: 0.5rem; border-bottom: 1px solid #dbe0e5;
}
.ed-chapter .cb-comps-table td {
  padding: 0.5rem; color: #374151;
  border-bottom: 1px solid #f3f4f6;
}

/* ── Jury cards inside editorial chapter ── */
.ed-chapter .jury-v2-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.ed-chapter .jury-v2-card {
  border: 1px solid #dbe0e5; border-radius: 6px;
  overflow: hidden; background: #fff;
  transition: box-shadow 0.2s;
}
.ed-chapter .jury-v2-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.07); }
.ed-chapter .jury-v2-collapsed-name {
  font-size: 14px; font-weight: 600; color: #2a2f3a;
}
.ed-chapter .jury-v2-collapsed-role {
  font-size: 12px; color: #6b7280;
}
.ed-chapter .jury-v2-collapsed-org {
  font-size: 11px; color: #9aa2ac;
}
.ed-chapter .jury-v2-exp-name {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700; color: #2a2f3a;
}
.ed-chapter .jury-v2-bio {
  font-size: 14px; line-height: 1.7; color: #374151;
}

/* ── Research report inside editorial chapter ── */
.ed-chapter .research-narrative-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700; color: #2a2f3a;
  line-height: 1.2; margin-bottom: 0.5rem;
}
.ed-chapter .research-narrative-summary {
  font-size: 15px; line-height: 1.7; color: #374151;
  max-width: 65ch;
}
.ed-chapter .research-tab-bar {
  border-bottom: 1px solid #dbe0e5;
}
.ed-chapter .research-tab {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.ed-chapter .research-editorial-intro p {
  font-size: 14px; line-height: 1.7; color: #374151;
  max-width: 65ch;
}
.ed-chapter .research-editorial-intro p::first-letter {
  float: left; font-family: 'Playfair Display', serif;
  font-size: 3em; line-height: 0.8; font-weight: 700;
  color: #2a2f3a; padding-right: 0.06em; padding-top: 0.04em;
}

/* ── Condensed views inside editorial chapters ── */
.ed-chapter .bg-condensed-wrapper {
  background: transparent; border: 1px solid #dbe0e5;
  border-radius: 4px; padding: 1.5rem 2rem;
  text-align: center;
}
.ed-chapter .bg-condensed-summary {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: 16px;
  color: #6b7280; line-height: 1.5;
  max-width: 50ch; margin: 0 auto 0.75rem;
}
.ed-chapter .bg-condensed-expand-hint {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #0EA5E9;
}
.ed-chapter .bg-article-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
}
.ed-chapter .bg-condensed-name {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700; color: #2a2f3a;
  margin-bottom: 0.25rem;
}

/* ── Collapse toggle bar editorial style ── */
.ed-chapter .pd-toggle-bar {
  text-align: center; padding: 1rem 0 0.5rem;
  border-top: 1px solid #f3f4f6; margin-top: 1rem;
}
.ed-chapter .pd-collapse-btn {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #9aa2ac; background: none; border: none;
  cursor: pointer; padding: 0.4rem 1rem;
  transition: color 0.15s;
}
.ed-chapter .pd-collapse-btn:hover { color: #2a2f3a; }

/* ── Missing data / empty messages override ── */
.ed-chapter .missing-data-notice {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: 15px;
  color: #9aa2ac; text-align: center;
  padding: 2rem;
}

/* ── Jury condensed view inside editorial ── */
.ed-chapter .jury-condensed-grid {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: center; padding: 1rem 0;
}

/* ════════════════════════════════════════════════════════════════
   ENVIRONMENT CHAPTER — Climate data display (Open-Meteo)
   ════════════════════════════════════════════════════════════════ */

/* Narrative summary */
.climate-narrative {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid #edf0f3;
  background: #f9fafb;
}
.climate-narrative-text {
  font-size: 0.875rem; line-height: 1.75;
  color: #374151; margin: 0;
  max-width: 95ch;
}
.climate-narrative-text strong { color: #1a1f2e; font-weight: 600; }

/* Stat strip */
.climate-stat-strip {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid #edf0f3;
}
.climate-stat {
  flex: 1 1 110px;
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.85rem 1.1rem;
  border-right: 1px solid #edf0f3;
}
.climate-stat:last-child { border-right: none; }
.climate-stat-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #9aa2ac;
}
.climate-stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700;
  color: #1a1f2e; line-height: 1.1;
}
.climate-stat-sub {
  font-size: 0.68rem; color: #6b7280; line-height: 1.3;
}

/* 3-column chart grid */
.climate-chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
.climate-chart-cell {
  padding: 1.1rem 1.4rem 1.35rem;
  border-right: 1px solid #edf0f3;
  border-bottom: 1px solid #edf0f3;
}
.climate-chart-cell.span-2 { grid-column: span 2; }
.climate-chart-cell.no-border-right  { border-right: none; }
.climate-chart-cell.no-border-bottom { border-bottom: none; }

.climate-chart-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem; font-weight: 700;
  color: #2a2f3a; margin: 0 0 0.15rem;
  letter-spacing: -0.015em;
}
.climate-chart-desc {
  font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #9aa2ac; margin: 0 0 0.7rem; line-height: 1.3;
}
.climate-chart-cell canvas { max-height: 175px; }

/* Wind rose: fixed-height wrapper so polar area chart stays square */
.climate-wind-rose-wrap {
  position: relative; height: 210px;
}
.climate-wind-rose-wrap canvas {
  max-height: none !important;
}

/* Responsive: collapse to single column on mobile */
@media (max-width: 760px) {
  .climate-chart-grid { grid-template-columns: 1fr; }
  .climate-chart-cell.span-2 { grid-column: span 1; }
  .climate-chart-cell { border-right: none; }
  .climate-stat { padding: 0.7rem 0.85rem; }
  .climate-stat-value { font-size: 1.1rem; }
  .climate-narrative { padding: 1rem; }
}
