/* 
  NeuralNews: AI Alignment & Machine Psychology Explorer
  Premium Cyber-Dark Design System & Glassmorphic Styling
*/

/*
  Typefaces are served from this site, not from Google Fonts. A stylesheet
  @import would have made every visitor's browser call fonts.googleapis.com and
  disclose their IP address to Google before a single pixel rendered — which is
  the one thing the privacy notice in legal.html could not have promised away.
  Loading them locally keeps the page talking to exactly one host.

  Both files are variable fonts covering the whole weight range the design uses,
  so one file per subset replaces the five static weights each family used to
  request. Latin and latin-ext are included, which covers English and German;
  outside those ranges the browser falls back to the system stack below.

  Inter and Outfit are both SIL Open Font License 1.1 — see fonts/Inter-OFL.txt
  and fonts/Outfit-OFL.txt, which the licence requires to travel with the fonts.
*/
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* HSL tailored color palette */
  --bg-deep: hsl(245, 55%, 4%);
  --bg-core: hsl(245, 40%, 8%);
  --bg-panel: hsla(245, 30%, 12%, 0.4);
  --bg-panel-hover: hsla(245, 30%, 18%, 0.6);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-color-hover: rgba(255, 255, 255, 0.15);
  
  --primary: hsl(245, 75%, 65%);
  --primary-glow: hsla(245, 75%, 65%, 0.35);
  --accent: hsl(275, 85%, 65%);
  --accent-glow: hsla(275, 85%, 65%, 0.35);
  
  --text-primary: hsl(0, 0%, 94%);
  --text-secondary: hsl(245, 15%, 70%);
  --text-muted: hsl(245, 10%, 50%);
  
  /* Semantic Node Colors (Glowing) */
  --color-tech: hsl(150, 75%, 55%);
  --color-psych: hsl(195, 80%, 60%);
  --color-method: hsl(275, 80%, 65%);
  --color-metric: hsl(330, 80%, 60%);
  --color-risk: hsl(25, 90%, 55%);
  --color-org: hsl(205, 80%, 65%);
  
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --shadow-premium: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
  --glass-glow: 0 0 15px rgba(124, 58, 237, 0.05);
}

/* Reset & Core Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 10% 20%, hsla(245, 80%, 12%, 0.3) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, hsla(275, 80%, 10%, 0.2) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, var(--bg-core) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden; /* App container handles scrolling internally */
}

/* Scrollbar customizations */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color-hover);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Main Layout Grid */
.app-container {
  display: grid;
  grid-template-rows: 70px 1fr auto;
  height: 100vh;
  width: 100vw;
}

/* Footer Styling */
.footer {
  grid-row: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.65rem 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  background: rgba(8, 7, 18, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 100;
}

.footer-divider {
  color: var(--text-muted);
  opacity: 0.6;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-link:hover {
  color: var(--primary);
}

/* Glassmorphism Styles */
.glass {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-premium), var(--glass-glow);
  border-radius: 14px;
  transition: var(--transition-smooth);
}

.glass:hover {
  border-color: var(--border-color-hover);
}

/* Header Styling */
.header {
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(8, 7, 18, 0.6);
  backdrop-filter: blur(20px);
  z-index: 100;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: #fff;
  box-shadow: 0 0 15px var(--primary-glow);
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #ffffff 30%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
  font-size: 0.75rem;
  color: var(--primary);
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: -3px;
}

.stats-bar {
  display: flex;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* App Main Panels */
.panels-layout {
  grid-row: 2;
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 0;
  overflow: hidden;
}

/* Side Panel (Search + Feed) */
.side-panel {
  grid-column: 1;
  border-right: 1px solid var(--border-color);
  background: rgba(8, 7, 20, 0.4);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  height: 100%;
}

/* Search Section inside side panel */
.search-card {
  padding: 1.25rem;
}

.search-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box {
  position: relative;
  display: flex;
  gap: 8px;
}

.input-cyber {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.input-cyber:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.btn-cyber {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-cyber:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.55);
}

.btn-cyber:active {
  transform: translateY(0);
}

/* Toggle & preset options */
.toggle-group {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.pill-cyber {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.pill-cyber:hover, .pill-cyber.active {
  background: rgba(124, 58, 237, 0.15);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 8px rgba(124, 58, 237, 0.2);
}

.presets-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.preset-btn {
  background: transparent;
  border: 1px dashed var(--border-color);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.preset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 255, 255, 0.01);
}

/* Dynamic Filter Tabs */
.time-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 4px;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 8px 4px;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
  transition: var(--transition-smooth);
  text-align: center;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  background: var(--bg-panel-hover);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-premium);
}

/* Synthesis card */
.synthesis-card {
  padding: 1.25rem;
  border-left: 3px solid var(--accent);
  background: linear-gradient(to right, rgba(124, 58, 237, 0.08), transparent);
}

.synthesis-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.synthesis-text {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

/* Feed Section */
.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feed-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.feed-count {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--text-muted);
}

.news-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

/* News Cards */
.news-card {
  padding: 1rem;
  cursor: pointer;
}

.news-card:hover, .news-card.active {
  background: var(--bg-panel-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.news-source {
  background: rgba(124, 58, 237, 0.12);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.news-lang-badge {
  font-size: 0.6rem;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 4px;
  border-radius: 2px;
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.news-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.news-desc {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Visual Canvas Pane (Force Directed Graph) */
.canvas-panel {
  grid-column: 2;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.graph-canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
}

.graph-canvas:active {
  cursor: grabbing;
}

/* Floating controls inside canvas */
.canvas-controls {
  position: absolute;
  bottom: 20px;
  left: 20px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.btn-floating {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: var(--transition-smooth);
}

.btn-floating:hover {
  background: var(--bg-panel-hover);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.legend-card {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 12px;
  z-index: 10;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 5px currentColor;
}

/* Interaction Side-Drawer (Conceptual Analysis) */
.detail-drawer {
  position: absolute;
  top: 20px;
  right: 20px;
  bottom: 20px;
  width: 380px;
  z-index: 20;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transform: translateX(calc(100% + 40px));
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow-y: auto;
}

.detail-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
}

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition-smooth);
}

.drawer-close:hover {
  color: #fff;
}

.drawer-node-badge {
  font-size: 0.65rem;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 8px;
}

.drawer-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.drawer-desc-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.drawer-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 1px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.drawer-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-link-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.drawer-link-card:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-color-hover);
}

.drawer-edge-explain {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.drawer-edge-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.3);
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  margin-bottom: 6px;
}

.edge-node-indicator {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
}

.edge-arrow {
  color: var(--accent);
  font-size: 0.9rem;
}

/* Loading Scanner Animations */
.scanner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 7, 18, 0.85);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: none; /* Controlled dynamically */
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
}

.scanner-overlay.active {
  display: flex;
}

.scanner-box {
  width: 250px;
  height: 150px;
  border: 1px solid var(--border-color-hover);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}

.scanner-laser {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--primary), var(--accent), var(--primary), transparent);
  box-shadow: 0 0 15px 3px var(--primary);
  animation: scan 2s linear infinite;
}

.scanner-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse 1.5s infinite;
}

.scanner-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

@keyframes scan {
  0% { top: 0%; }
  50% { top: 100%; }
  100% { top: 0%; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Empty UI / Placeholder states */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-muted);
  gap: 12px;
  text-align: center;
  font-size: 0.85rem;
  padding: 10px;
}

.empty-icon {
  font-size: 1.5rem;
  opacity: 0.5;
}

/* =====================================================================
   MULTI-PAGE: Navigation, document pages, Trend Radar
   ===================================================================== */

/* Logo as a link (used on every page header) */
.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

/* Primary top navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid var(--border-color);
}

.nav-link {
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: var(--transition-smooth);
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: #fff;
  background: rgba(124, 58, 237, 0.18);
  box-shadow: inset 0 0 0 1px var(--primary);
}

/* Scrolling document pages (Overview, Trend Radar) override the
   fixed app-shell behavior used by the Explorer. */
body.page-scroll {
  overflow-y: auto;
  overflow-x: hidden;
}

.doc-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.doc-shell .header {
  position: sticky;
  top: 0;
  height: 70px;
  flex-shrink: 0;
}

.doc-main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 3.25rem;
}

.doc-shell .footer {
  position: static;
}

/* Buttons used on document pages */
.btn-lg {
  padding: 13px 26px;
  font-size: 0.95rem;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 18px;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: #fff;
  background: rgba(124, 58, 237, 0.12);
}

.btn-ghost:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* HERO */
.hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  padding-top: 1.5rem;
}

.hero-compact { padding-top: 0.5rem; gap: 0.85rem; }

.hero-eyebrow {
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--primary);
}

.hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  max-width: 18ch;
  background: linear-gradient(120deg, #ffffff 25%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lede {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 68ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0.5rem;
}

.inline-link, .info-link, .footer-link.inline {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.inline-link:hover { color: var(--accent); }

/* Document sections */
.doc-section { display: flex; flex-direction: column; gap: 1.25rem; }

.section-heading {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
}
.section-heading.no-margin { margin: 0; }

.section-lede, .section-sub {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 72ch;
}
.section-sub { font-size: 0.85rem; color: var(--text-muted); }

.section-note {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
  font-style: italic;
  max-width: 72ch;
}

/* Two-up info cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.info-card { padding: 1.6rem; display: flex; flex-direction: column; gap: 0.8rem; }

.info-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: var(--glass-glow);
}

.info-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.info-text { font-size: 0.9rem; line-height: 1.55; color: var(--text-secondary); flex: 1; }
.info-link { font-size: 0.85rem; }

/* Pipeline steps */
.pipeline { list-style: none; display: flex; flex-direction: column; gap: 1rem; counter-reset: step; }

.pipeline-step {
  display: flex;
  gap: 1.1rem;
  padding: 1.3rem 1.5rem;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 12px var(--primary-glow);
}

.step-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}
.step-text { font-size: 0.88rem; line-height: 1.55; color: var(--text-secondary); }

/* Score metric weighting cards */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.metric-card { padding: 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; }

.metric-weight {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.metric-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.metric-desc { font-size: 0.85rem; line-height: 1.5; color: var(--text-secondary); }

/* Caveats */
.caveat-list { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.caveat {
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  border-left: 3px solid var(--color-metric);
}
.caveat strong { color: #fff; font-weight: 600; }

/* ---- Trend Radar: analyzer ---- */
.analyzer { padding: 1.75rem; display: flex; flex-direction: column; gap: 0.9rem; }

.analyzer-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}
.analyzer-sub { font-size: 0.88rem; color: var(--text-muted); margin-top: -4px; }
.analyzer-box { margin-top: 4px; }

.term-status {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 0.75rem 0;
}

.term-result {
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.term-result-head { display: flex; gap: 1.25rem; align-items: center; }

/* Conic-gradient score ring */
.term-score-ring {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(closest-side, var(--bg-core) 78%, transparent 80% 100%),
    conic-gradient(var(--ring) calc(var(--pct) * 1%), rgba(255,255,255,0.08) 0);
}

.term-score-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.term-score-cap { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 1px; }

.term-result-meta { display: flex; flex-direction: column; gap: 0.4rem; }
.term-result-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}
.term-result-drivers { font-size: 0.85rem; line-height: 1.5; color: var(--text-secondary); }

/* Trajectory badges */
.traj-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  padding: 3px 9px;
  border-radius: 20px;
  width: fit-content;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.03);
  color: var(--text-secondary);
}
.traj-surging { color: var(--color-risk); border-color: var(--color-risk); background: rgba(247,148,29,0.1); }
.traj-rising { color: var(--color-tech); border-color: var(--color-tech); background: rgba(60,220,150,0.08); }
.traj-cooling { color: var(--color-psych); border-color: var(--color-psych); }
.traj-dormant, .traj-unavailable { color: var(--text-muted); }

/* Sparkline */
.sparkline { width: 100%; height: 44px; display: block; }
.board-spark .sparkline { height: 36px; }
.spark-caption { font-size: 0.7rem; color: var(--text-muted); letter-spacing: 0.5px; margin-top: -6px; }

/* Latest articles under a term */
.trend-articles { display: flex; flex-direction: column; gap: 6px; margin-top: 0.3rem; }
.trend-article {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  text-decoration: none;
  transition: var(--transition-smooth);
}
.trend-article:hover { background: rgba(255,255,255,0.05); border-color: var(--border-color-hover); }
.trend-article-source { font-size: 0.65rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; }
.trend-article-title { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.35; }

/* ---- Trend Radar: top-ten board ---- */
.board-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.board-list { display: flex; flex-direction: column; gap: 0.75rem; }

.board-row {
  display: grid;
  grid-template-columns: 44px 1fr 230px 92px;
  align-items: center;
  gap: 1.1rem;
  padding: 1rem 1.25rem;
}

.board-rank {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-muted);
  text-align: center;
}

.board-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.board-row-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.board-term {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}
.board-stats { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: var(--text-muted); flex-wrap: wrap; }
.board-stats .dot { opacity: 0.5; }

.board-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  border-radius: 10px;
  padding: 8px 4px;
}
.board-score-val { font-family: 'Outfit', sans-serif; font-size: 1.45rem; font-weight: 800; line-height: 1; }
.board-score-cap { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

.board-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 3rem 1rem;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.88rem;
}
.scanner-box.mini { width: 160px; height: 70px; }

/* ============================================================
   Narrative Lens
   ============================================================ */

.section-tag {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--border-color-hover);
  border-radius: 20px;
  padding: 2px 10px;
  vertical-align: middle;
  margin-left: 6px;
}
.section-sub.no-margin { margin: 0; }

.lens-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}
.lens-meta { font-size: 0.8rem; color: var(--text-muted); }

/* Shared horizontal meter used by archetypes + agency + horizon */
.lens-bar {
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.lens-bar.split { height: 12px; }
.lens-bar-fill { height: 100%; border-radius: 6px; transition: width 0.6s cubic-bezier(0.25,0.8,0.25,1); }

.dot-sq {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 4px;
}

/* Dominant-archetype callout */
.lens-callout {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(255,255,255,0.04), transparent);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-c, var(--accent));
  margin-bottom: 1.1rem;
}
.lens-callout-icon { font-size: 2rem; line-height: 1; }
.lens-callout-kicker {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.lens-callout-value {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
}
.lens-callout-note { font-size: 0.82rem; color: var(--text-secondary); }

/* Archetype cards */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.arch-card {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  border-top: 2px solid var(--accent-c, var(--primary));
}
.arch-card-head { display: flex; align-items: center; gap: 0.7rem; }
.arch-icon { font-size: 1.4rem; line-height: 1; }
.arch-name { font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700; color: #fff; }
.arch-tag { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.arch-share {
  margin-left: auto;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}
.arch-blurb { font-size: 0.82rem; line-height: 1.5; color: var(--text-secondary); }
.arch-count { font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.4px; }

/* Agency attribution */
.agency-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.4fr);
  gap: 1rem;
}
.agency-split, .agency-shift { padding: 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.9rem; }
.agency-split-head { display: flex; justify-content: space-between; align-items: flex-start; }
.agency-big-right { text-align: right; }
.agency-big { display: block; font-family: 'Outfit', sans-serif; font-size: 2rem; font-weight: 800; line-height: 1; color: var(--text-secondary); }
.agency-big-cap { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.agency-legend { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.76rem; color: var(--text-secondary); flex-wrap: wrap; }

.agency-shift-head { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.agency-spark { width: 100%; height: 90px; display: block; }
.shift-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}
.shift-up { color: var(--color-tech); border-color: var(--color-tech); background: rgba(60,220,150,0.08); }
.shift-down { color: var(--color-psych); border-color: var(--color-psych); }
.shift-flat { color: var(--text-muted); }

/* Temporal horizon */
.horizon-ratiobar { padding: 1.2rem 1.4rem; display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 1rem; }
.horizon-ratiobar-head { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.horizon-bar {
  display: flex;
  width: 100%;
  height: 22px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255,255,255,0.05);
}
.horizon-seg { height: 100%; transition: width 0.6s cubic-bezier(0.25,0.8,0.25,1); }
.horizon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.horizon-card { padding: 1.15rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; border-top: 2px solid var(--accent-c, var(--primary)); }
.horizon-card-head { display: flex; align-items: center; gap: 0.5rem; }
.horizon-dot { width: 10px; height: 10px; border-radius: 50%; }
.horizon-name { font-family: 'Outfit', sans-serif; font-size: 0.98rem; font-weight: 700; color: #fff; }
.horizon-sub { margin-left: auto; font-size: 0.72rem; color: var(--text-muted); letter-spacing: 0.5px; }
.horizon-share { font-family: 'Outfit', sans-serif; font-size: 1.7rem; font-weight: 800; color: #fff; line-height: 1; }

/* Capability vs Control matrix */
.matrix-wrap {
  padding: 1.4rem;
  display: grid;
  grid-template-columns: minmax(300px, 460px) 1fr;
  gap: 1.6rem;
  align-items: center;
}
.matrix-canvas-wrap { position: relative; }
.matrix-svg { width: 100%; height: auto; display: block; }
.matrix-dot { transition: r 0.15s ease, fill-opacity 0.15s ease; cursor: pointer; }
.matrix-dot:hover { fill-opacity: 1; }
.matrix-dot-link { cursor: pointer; outline: none; }
.matrix-dot-link:hover .matrix-dot,
.matrix-dot-link:focus-visible .matrix-dot { r: 7.5; fill-opacity: 1; stroke: var(--accent, #fff); stroke-width: 1.5; }
.matrix-qlabel { font-family: 'Outfit', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.5px; opacity: 0.85; }
.axis-label {
  position: absolute;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}
.axis-x { bottom: 6px; left: 50%; transform: translateX(-50%); }
.axis-y { top: 50%; left: -14px; transform: rotate(-90deg) translateX(50%); transform-origin: left center; }

.matrix-side { display: flex; flex-direction: column; gap: 1rem; }
.matrix-quads { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.matrix-quad {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--accent-c, var(--primary));
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.matrix-quad-count { font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 800; color: #fff; line-height: 1; }
.matrix-quad-label { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); }
.matrix-quad-sub { font-size: 0.68rem; color: var(--text-muted); }
.matrix-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.76rem; color: var(--text-secondary); }

/* Responsive */
@media (max-width: 760px) {
  .stats-bar { display: none; }
  .main-nav { margin-left: 10px; padding-left: 10px; }
  .nav-link { padding: 6px 9px; font-size: 0.78rem; }
  .board-row { grid-template-columns: 34px 1fr 72px; }
  .board-spark { display: none; }
  .doc-main { padding: 1.75rem 1.1rem 3rem; }
  .agency-grid { grid-template-columns: 1fr; }
  .matrix-wrap { grid-template-columns: 1fr; }
  .main-nav { flex-wrap: wrap; }
}

/* ============================================================
   The Alignment Roundtable
   ============================================================ */

/* Topic gate notices (reusing the .term-status slot) */
.term-status.is-error,
.term-status.is-blocked {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-panel);
}
.term-status.is-error { border-color: hsla(25, 90%, 55%, 0.4); }
.term-status.is-blocked { border-color: hsla(25, 90%, 55%, 0.55); background: hsla(25, 90%, 18%, 0.18); }
.term-status.is-error span,
.term-status.is-blocked span { font-size: 1.05rem; line-height: 1.3; }
.term-status.is-error p,
.term-status.is-blocked p { margin: 0; color: var(--text-secondary); }

/* ---- Panel roster ---- */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}
.roster-card {
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  border-left: 2px solid var(--accent-c, var(--primary));
  transition: var(--transition-smooth);
}
.roster-card:hover { background: var(--bg-panel-hover); transform: translateY(-2px); }
.roster-card-head { display: flex; align-items: center; gap: 0.7rem; }
.roster-avatar {
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  color: #fff;
  box-shadow: 0 4px 14px -4px var(--accent-c, var(--primary));
}
.roster-name { font-family: 'Outfit', sans-serif; font-size: 0.97rem; font-weight: 600; line-height: 1.15; }
.roster-domain {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent-c, var(--text-muted));
}
.roster-q { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.5; }

/* ---- Debate header + progress ---- */
.debate-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 0.4rem;
}
#debate-topic-label { font-style: italic; color: var(--text-primary); }

.debate-progress {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.35rem; margin: 1rem 0 1.4rem;
}
.prog-step {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.03em;
  padding: 0.32rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--border-color);
  color: var(--text-muted); background: var(--bg-panel);
  transition: var(--transition-smooth);
}
.prog-active {
  color: #fff; border-color: var(--primary);
  background: var(--primary-glow);
  box-shadow: 0 0 0 1px var(--primary), 0 0 16px -4px var(--primary);
}
.prog-done { color: var(--color-tech); border-color: hsla(150, 75%, 55%, 0.4); }
.prog-done::before { content: '✓ '; }
.prog-sep { width: 14px; height: 1px; background: var(--border-color-hover); }

/* ---- Debate stream / speech bubbles ---- */
.debate-stream { display: flex; flex-direction: column; gap: 0.95rem; }

.round-divider {
  display: flex; align-items: center; gap: 0.9rem;
  margin: 0.9rem 0 0.2rem;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif; font-size: 0.82rem;
  font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
}
.round-divider::before, .round-divider::after {
  content: ''; height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, var(--border-color-hover), transparent);
}

.speech {
  display: flex; gap: 0.9rem;
  padding: 1.05rem 1.15rem;
  border-left: 2px solid var(--accent-c, var(--primary));
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.speech.in { opacity: 1; transform: none; }
.speech-avatar {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
  box-shadow: 0 4px 14px -4px var(--accent-c, var(--primary));
}
.speech-body { flex: 1; min-width: 0; }
.speech-head { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.speech-name { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.95rem; }
.bubble-domain {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent-c, var(--text-muted));
  border: 1px solid var(--border-color); border-radius: 999px;
  padding: 0.1rem 0.5rem;
}
.bubble-round {
  font-size: 0.68rem; font-weight: 700;
  color: var(--text-muted);
  margin-left: auto;
}
.speech-text { font-size: 0.92rem; line-height: 1.62; color: var(--text-secondary); }

/* ---- Facilitator closing card ---- */
.closing {
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--primary-glow);
  box-shadow: 0 0 28px -10px var(--primary);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.closing.in { opacity: 1; transform: none; }
.closing-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1rem; }
.closing-head .speech-name { font-size: 1.05rem; }
.closing-summary {
  font-size: 0.95rem; line-height: 1.65; color: var(--text-secondary);
  padding-bottom: 1rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}
.closing-block { margin-top: 1rem; }
.closing-label {
  font-family: 'Outfit', sans-serif; font-size: 0.78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--primary); margin-bottom: 0.6rem;
}
.closing-findings { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.closing-findings li {
  position: relative; padding-left: 1.4rem;
  font-size: 0.9rem; line-height: 1.55; color: var(--text-secondary);
}
.closing-findings li::before {
  content: '◆'; position: absolute; left: 0; top: 0;
  color: var(--accent); font-size: 0.7rem; line-height: 1.7;
}
.closing-block.final {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
}
.closing-final { font-size: 0.95rem; line-height: 1.66; color: var(--text-primary); }

@media (max-width: 760px) {
  .roster-grid { grid-template-columns: 1fr; }
  .bubble-round { margin-left: 0; }
}

/* ---- Facilitator readings (grounded "three to read next") ---- */
.readings-block { margin-top: 1.25rem; }
.readings-caption {
  font-size: 0.78rem; color: var(--text-muted); line-height: 1.5;
  margin: -0.25rem 0 0.75rem;
}
.closing-readings { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.reading {
  padding: 0.85rem 1rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-left: 2px solid var(--accent);
  border-radius: 12px;
  transition: var(--transition-smooth);
}
.reading:hover { border-color: var(--border-color-hover); background: var(--bg-panel-hover); }
.reading-title {
  display: inline-flex; align-items: baseline; gap: 0.35rem;
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.92rem;
  color: var(--text-primary); text-decoration: none; line-height: 1.4;
}
.reading-title:hover { color: var(--primary); }
.reading-ext { font-size: 0.72rem; color: var(--accent); }
.reading-meta {
  display: block; margin-top: 0.2rem;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted);
}
.reading-note { margin-top: 0.4rem; font-size: 0.85rem; line-height: 1.55; color: var(--text-secondary); }

/* ---- Save-to-gallery action ---- */
.closing-actions {
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  margin-top: 1.4rem; padding-top: 1.1rem;
  border-top: 1px solid var(--border-color);
}
.save-gallery-btn:disabled { opacity: 0.75; cursor: default; }
.save-gallery-note { font-size: 0.83rem; color: var(--text-secondary); }
.save-gallery-note.is-error { color: hsl(25, 90%, 62%); }

/* ---- The Salon gallery ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.gallery-card { padding: 0; overflow: hidden; transition: var(--transition-smooth); }
.gallery-card:hover { transform: translateY(-2px); }
.gallery-card.is-open { grid-column: 1 / -1; }
.gallery-card-head {
  display: block; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer;
  padding: 1.25rem 1.35rem;
  color: inherit; font: inherit;
}
.gallery-card-top { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.7rem; }
.gallery-badge {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.18rem 0.55rem; border-radius: 999px;
}
.gallery-badge-salon { color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.gallery-badge-reader { color: var(--accent); border: 1px solid var(--border-color-hover); }
.gallery-date { font-size: 0.74rem; color: var(--text-muted); margin-left: auto; }
.gallery-topic {
  font-family: 'Outfit', sans-serif; font-size: 1.02rem; font-weight: 600;
  line-height: 1.35; color: var(--text-primary); margin-bottom: 0.55rem;
}
.gallery-teaser {
  font-size: 0.88rem; line-height: 1.55; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.gallery-toggle {
  display: inline-flex; align-items: center; gap: 0.35rem;
  margin-top: 0.85rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--primary);
}
.gallery-toggle .chev { transition: transform 0.25s ease; }
.gallery-card.is-open .gallery-toggle .chev { transform: rotate(180deg); }
.gallery-card-body { padding: 0 1.35rem 1.4rem; }
.closing-summary.no-border { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }

.gallery-empty {
  grid-column: 1 / -1;
  text-align: center; padding: 2.6rem 1.5rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
}
.gallery-empty-icon { font-size: 2rem; }
.gallery-empty h4 { font-family: 'Outfit', sans-serif; font-size: 1.05rem; font-weight: 600; }
.gallery-empty p { font-size: 0.9rem; color: var(--text-secondary); max-width: 46ch; line-height: 1.6; }
.gallery-empty .btn-ghost { margin-top: 0.5rem; }

@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Grounded AI Innovation Index
   ============================================================ */
.idx-region-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-top: 1.4rem;
}
.idx-region {
  --region-color: var(--primary);
  padding: 1.3rem 1.3rem 1.4rem;
  border-radius: 14px;
  border-top: 3px solid var(--region-color);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.idx-region-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
}
.idx-region-name {
  font-family: 'Outfit', sans-serif; font-size: 1.05rem; font-weight: 600; color: var(--text-primary);
}
.idx-badge {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.2rem 0.55rem; border-radius: 999px; white-space: nowrap;
}
.idx-badge-grounded { color: var(--color-tech); background: hsla(150, 75%, 55%, 0.12); border: 1px solid hsla(150, 75%, 55%, 0.4); }
.idx-badge-ungrounded { color: var(--text-muted); background: rgba(255,255,255,0.04); border: 1px solid var(--border-color); }

.idx-score { display: flex; align-items: baseline; gap: 0.15rem; }
.idx-score-num { font-family: 'Outfit', sans-serif; font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--region-color); }
.idx-score-max { font-size: 0.95rem; color: var(--text-muted); }

.idx-bar { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.idx-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--region-color); transition: width 0.6s cubic-bezier(0.25,0.8,0.25,1); }

.idx-summary { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }

.idx-source-block { margin-top: auto; padding-top: 0.6rem; }
.idx-source-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.45rem;
}
.idx-sources { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.idx-source a {
  display: inline-flex; align-items: baseline; gap: 0.3rem;
  font-size: 0.82rem; color: var(--text-primary); text-decoration: none; line-height: 1.4;
  border-bottom: 1px dashed transparent; transition: var(--transition-smooth);
}
.idx-source a:hover { color: var(--accent); border-bottom-color: var(--accent-glow); }
.idx-nosrc { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

/* Timeline chart */
.idx-chart { padding: 1.2rem 1.3rem 1rem; border-radius: 14px; margin-top: 1.3rem; }
.idx-legend { display: flex; flex-wrap: wrap; gap: 1.1rem; margin-bottom: 0.6rem; }
.idx-legend-item { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--text-secondary); }
.idx-legend-item strong { color: var(--text-primary); font-family: 'Outfit', sans-serif; }
.idx-legend-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.idx-chart-canvas { width: 100%; }
.idx-svg { width: 100%; height: auto; display: block; }
.idx-grid { stroke: rgba(255,255,255,0.07); stroke-width: 1; }
.idx-axis-y { fill: var(--text-muted); font-size: 11px; text-anchor: end; }
.idx-axis-x { fill: var(--text-muted); font-size: 11px; text-anchor: middle; }
.idx-svg circle { transition: r 0.2s ease; }
.idx-svg circle:hover { r: 5; }

@media (max-width: 760px) {
  .idx-region-grid { grid-template-columns: 1fr; }
}
