/* THE BASELINE WIRE — STYLESHEET */
:root {
  --bg-dark: #07090c;
  --bg-card: rgba(16, 22, 32, 0.75);
  --bg-card-hover: rgba(22, 30, 44, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(212, 175, 55, 0.4);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --gold: #d4af37;
  --gold-glow: rgba(212, 175, 55, 0.15);
  --crimson: #e04545;
  --crimson-glow: rgba(224, 69, 69, 0.2);
  --cyan: #38bdf8;
  --green: #10b981;
  --purple: #a855f7;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background Atmosphere */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 15% 15%, rgba(212, 175, 55, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(56, 189, 248, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(224, 69, 69, 0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: -2;
}

.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

/* Typography Utilities */
.font-mono { font-family: var(--font-mono); }
.text-gold { color: var(--gold); }
.text-crimson { color: var(--crimson); }
.text-green { color: var(--green); }
.text-cyan { color: var(--cyan); }

/* Header */
.wire-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(7, 9, 12, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand-zone {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pulse-indicator {
  position: relative;
  width: 14px;
  height: 14px;
}

.pulse-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: var(--crimson);
  border-radius: 50%;
  top: 3px;
  left: 3px;
}

.pulse-ring {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1px solid var(--crimson);
  border-radius: 50%;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.5); opacity: 0; }
  50% { opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.brand-title .site-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--gold);
  letter-spacing: 0.15em;
  font-weight: 600;
  display: block;
}

.brand-title h1 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  text-transform: uppercase;
}

/* Telemetry Bar */
.telemetry-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(16, 22, 32, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.9rem;
}

.telemetry-item {
  display: flex;
  flex-direction: column;
}

.telemetry-item .label {
  font-size: 0.58rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.telemetry-item .val {
  font-size: 0.82rem;
  font-weight: 600;
}

.telemetry-item .highlight {
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 0.75rem;
}

.nav-pill {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

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

.nav-pill.gold {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-glow);
}

.nav-pill.gold:hover {
  background: rgba(212, 175, 55, 0.25);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* Breaking Ticker Banner */
.breaking-banner {
  background: linear-gradient(90deg, #1f0b0e, #0e131d 60%);
  border-bottom: 1px solid rgba(224, 69, 69, 0.3);
  padding: 0.45rem 1.5rem;
  overflow: hidden;
}

.banner-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.badge-breaking {
  background: var(--crimson);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.ticker-content {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.ticker-content .sep {
  color: var(--crimson);
}

/* Main Layout */
.main-layout {
  padding: 1.5rem 0 3rem;
}

.layout-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Controls Panel */
.controls-panel {
  margin-bottom: 1.5rem;
}

.search-box {
  position: relative;
  margin-bottom: 1rem;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.8rem;
  background: rgba(16, 22, 32, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

.clear-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Desk Filter Carousel / Pills */
.desks-carousel {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-subtle) transparent;
}

.desk-pill {
  background: rgba(16, 22, 32, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.desk-pill:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.desk-pill.active {
  background: var(--gold-glow);
  color: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
}

.desk-pill .count {
  font-size: 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
}

/* Feed Grid */
.feed-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 1.5rem;
}

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

/* Stream Header */
.stream-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.6rem;
  margin-bottom: 1.25rem;
}

.stream-header h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.feed-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Dispatch Cards */
.dispatches-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.dispatch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(8px);
}

.dispatch-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

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

.card-tags {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.disp-id {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.desk-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
}

.desk-badge[data-desk="ATMOSPHERIC"] { color: var(--cyan); border: 1px solid rgba(56, 189, 248, 0.3); }
.desk-badge[data-desk="ENFORCEMENT"] { color: var(--crimson); border: 1px solid rgba(224, 69, 69, 0.3); }
.desk-badge[data-desk="ANATOMY/CRYPTID"] { color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.desk-badge[data-desk="BEDROCK/INFRA"] { color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.3); }
.desk-badge[data-desk="BIOLOGICAL/FOOD"] { color: #84cc16; border: 1px solid rgba(132, 204, 22, 0.3); }
.desk-badge[data-desk="CURRENCY/LEDGER"] { color: var(--gold); border: 1px solid rgba(212, 175, 55, 0.4); }
.desk-badge[data-desk="FREQUENCIES/GRID"] { color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.desk-badge[data-desk="CELESTIAL/SKY"] { color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.3); }
.desk-badge[data-desk="ARCHIVE/HISTORY"] { color: #e2e8f0; border: 1px solid rgba(226, 232, 240, 0.3); }
.desk-badge[data-desk="THE_UNINDEXED"] { color: var(--green); border: 1px solid rgba(16, 185, 129, 0.3); }

.disp-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
}

.dispatch-headline {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 0.6rem;
}

.dispatch-headline-link {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dispatch-headline-link:hover {
  color: var(--gold);
}

.dispatch-origin {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 0.5rem;
}

.dispatch-section {
  margin-bottom: 0.9rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.25rem;
  display: block;
}

.label-event { color: var(--cyan); }
.label-cover { color: var(--crimson); }
.label-breakdown { color: var(--gold); }
.label-evidence { color: var(--green); }

.dispatch-text {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.dispatch-cover {
  font-size: 0.85rem;
  color: #94a3b8;
  font-style: italic;
  padding-left: 0.75rem;
  border-left: 2px solid var(--crimson);
}

.dispatch-breakdown {
  font-size: 0.88rem;
  color: #e2e8f0;
  padding-left: 0.75rem;
  border-left: 2px solid var(--gold);
}

/* Evidence Ledger Accordion */
.evidence-container {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.75rem;
}

.evidence-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0;
  transition: color 0.2s;
}

.evidence-toggle:hover {
  color: var(--green);
}

.evidence-list {
  list-style: none;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.evidence-item {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--green);
}

/* Sidebar Rail */
.sidebar-rail {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
}

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

.rail-card h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #fff;
}

.tag-sovereign {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

.tag-btc {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #f59e0b;
  border: 1px solid #f59e0b;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

.tag-archive {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #cbd5e1;
  border: 1px solid #94a3b8;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

.tag-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #ff6719;
  border: 1px solid #ff6719;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

.doctrine-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.doctrine-card .highlight-text {
  color: var(--gold);
  font-weight: 500;
}

/* Metric Rows */
.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

.metric-row .lbl {
  color: var(--text-muted);
}

.metric-row .val {
  color: #fff;
  font-weight: 600;
}

.metric-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  line-height: 1.4;
}

/* Book Spotlight */
.book-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.book-author {
  font-size: 0.78rem;
  color: var(--gold);
  font-family: var(--font-mono);
  margin-bottom: 0.6rem;
}

.book-summary {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.book-ref {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 0.25rem 0.5rem;
  border-radius: 2px;
  display: inline-block;
}

/* Newsletter Card */
.newsletter-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.newsletter-form input {
  padding: 0.6rem 0.8rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.82rem;
  font-family: var(--font-mono);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--gold);
}

.submit-btn {
  padding: 0.6rem;
  background: var(--gold);
  color: #07090c;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover {
  background: #e6c555;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

/* Footer */
.wire-footer {
  border-top: 1px solid var(--border-subtle);
  background: rgba(7, 9, 12, 0.95);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.25rem;
}

.footer-left p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-left .copyright {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.footer-right {
  display: flex;
  gap: 1.5rem;
}

.footer-right a {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-right a:hover {
  color: var(--gold);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  background: var(--bg-card);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Featured Investigations Grid */
.featured-section {
  margin-bottom: 2rem;
}

.investigations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.investigation-card {
  background: linear-gradient(145deg, rgba(16, 22, 32, 0.95), rgba(9, 13, 20, 0.95));
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.investigation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--crimson));
  opacity: 0.8;
}

.investigation-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.15);
}

.inv-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
}

.inv-desk {
  color: var(--gold);
  font-weight: 600;
  background: var(--gold-glow);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.inv-time {
  color: var(--text-muted);
}

.inv-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 0.6rem;
}

.inv-title-link {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.inv-title-link:hover {
  color: var(--gold);
}

.inv-summary {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.inv-actions-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.inv-read-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #07090c;
  background: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
}

.inv-read-btn:hover {
  background: #f1cf68;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.inv-popup-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.inv-popup-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

/* Dispatch Card Action Footer */
.dispatch-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dispatch-action-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-read-page {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--gold);
  color: #07090c;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-read-page:hover {
  background: #f1cf68;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
  transform: translateY(-1px);
}

.btn-open-popup {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-open-popup:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

.dispatch-tab-link {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-decoration: none;
  transition: color 0.2s;
}

.dispatch-tab-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* Interactive Modal / Popup */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 9, 0.88);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeInModal 0.2s ease;
}

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

.modal-dialog {
  max-width: 900px;
  width: 100%;
  max-height: 88vh;
  background: linear-gradient(165deg, #0d131d 0%, #06080c 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 30px rgba(212, 175, 55, 0.1);
  overflow: hidden;
  animation: scaleUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 22, 32, 0.95);
}

.modal-meta-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-action-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
}

.modal-action-btn:hover {
  background: var(--gold);
  color: #07090c;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 2.25rem;
  overflow-y: auto;
  color: #cbd5e1;
  font-size: 1.05rem;
  line-height: 1.8;
}

.modal-body h1 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 1.25rem;
}

.modal-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.4rem;
}

.modal-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.modal-body p {
  margin-bottom: 1.2rem;
}

.modal-body blockquote {
  border-left: 3px solid var(--gold);
  background: rgba(212, 175, 55, 0.05);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #e2e8f0;
}

.modal-body ul, .modal-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.88rem;
}

.modal-body th, .modal-body td {
  border: 1px solid var(--border-subtle);
  padding: 0.65rem 0.9rem;
}

.modal-body th {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-family: var(--font-mono);
}

.modal-body td {
  background: rgba(0, 0, 0, 0.2);
}

.modal-body pre {
  background: #040507;
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin: 1.5rem 0;
}
