/* ==========================================================================
   HUIT RESEARCH VAULT - STITCH ACADEMIC MONOLITH DESIGN SYSTEM
   Tailored for AFF Debate Season 4 (2026) • Team HUIT
   Philosophy: 'Less is More' & High Academic Rigor (Edward Tufte / Swiss Style)
   ========================================================================== */

:root {
  /* Stitch Academic Monolith Design Tokens */
  --bg-primary: #0A0E17;       /* Canvas Base: Matte Obsidian */
  --bg-secondary: #0F1420;     /* Surface 1: Recessed Panel / Card */
  --bg-tertiary: #161D2B;      /* Surface 2: Elevated / Math Box / Input */
  --bg-card: #0F1420;
  --bg-card-hover: #161D2B;
  
  --border-subtle: rgba(255, 255, 255, 0.08); /* Hairline 1px rules */
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-focus: #38BDF8;

  --text-main: #F8FAFC;        /* Primary Ink: Bone white */
  --text-muted: #94A3B8;       /* Secondary Ink: Muted slate */
  --text-dim: #475569;         /* Tertiary Ink: Subdued stone */

  /* Academic Accents */
  --accent-emerald: #34D399;   /* Scholarly Emerald (Verified, Tier 1, Theorems) */
  --accent-cyan: #38BDF8;      /* Indigo Sky (DOIs, Active tokens) */
  --accent-gold: #F59E0B;      /* Amber / Awards */
  --accent-red: #EF4444;       /* Errors */

  /* Tier-specific Brand Tokens */
  --tier1-color: #34D399;
  --tier1-border: rgba(52, 211, 153, 0.4);
  --tier1-glow: rgba(52, 211, 153, 0.1);

  --tier2-color: #38BDF8;
  --tier2-border: rgba(56, 189, 248, 0.4);
  --tier2-glow: rgba(56, 189, 248, 0.1);

  --tier3-color: #94A3B8;
  --tier3-border: rgba(148, 163, 184, 0.3);
  --tier3-glow: rgba(148, 163, 184, 0.08);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Elevation: Clean Hairline Tonal Layering, Zero Fuzzy Drop-Shadows */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.7);

  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.25s ease-out;
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  background-color: var(--bg-primary);
  color: var(--text-main);
  padding-bottom: 75px; /* Room for docked verification anchor bar */
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
  transition: var(--transition-normal);
}

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

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo-badge {
  background: var(--bg-tertiary);
  border: 1px solid var(--accent-emerald);
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}

.brand-text .brand-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Language Toggle */
.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 2px;
  gap: 2px;
}

.lang-btn {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.lang-btn.active {
  background: var(--accent-emerald);
  color: #0A0E17;
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.8rem;
  border-radius: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  transition: var(--transition-fast);
}

.nav-cta-btn:hover {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.nav-cta-text-short,
.dock-text-short,
.dock-label-short {
  display: none;
}

/* ==========================================================================
   ACADEMIC MONOGRAPH HEADER & TELEMETRY STRIP (Stitch Academic Monolith)
   ========================================================================== */
.monograph-section {
  max-width: 1380px;
  margin: 1.75rem auto 1.25rem;
  padding: 0 1.5rem;
}

.monograph-container {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
}

.monograph-meta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

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

.meta-tag {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--accent-emerald);
  padding: 0.2rem 0.5rem;
  font-weight: 600;
  border-radius: 3px;
}

.meta-series {
  color: var(--text-muted);
}

.meta-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
}

.meta-hash {
  color: var(--text-muted);
}

.meta-dot {
  color: var(--text-dim);
}

.meta-status {
  color: var(--accent-emerald);
  font-weight: 600;
}

.monograph-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.monograph-abstract {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 980px;
  margin-bottom: 1.5rem;
}

/* Telemetry Strip */
.telemetry-strip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.telemetry-item {
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--border-subtle);
}

.telemetry-item:last-child {
  border-right: none;
}

.telemetry-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.telemetry-value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  margin-bottom: 0.15rem;
}

.telemetry-sub {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
}

.text-emerald {
  color: var(--accent-emerald) !important;
}

.text-cyan {
  color: var(--accent-cyan) !important;
}

@media (max-width: 900px) {
  .telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .telemetry-item {
    border-bottom: 1px solid var(--border-subtle);
  }
}

/* ==========================================================================
   INTERACTIVE TOOLBAR & FILTERS
   ========================================================================== */
.toolbar-section {
  max-width: 1380px;
  margin: 0 auto 1.75rem;
  padding: 0 1.5rem;
}

.toolbar-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
}

/* Search Box */
.search-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  padding: 0.85rem 1rem 0.85rem 3rem;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.search-input::placeholder {
  color: var(--text-dim);
}

/* Tier Filter Tabs */
.tier-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0.85rem;
}

.tier-buttons-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tier-btn {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
}

.tier-btn:hover {
  color: var(--text-main);
  border-color: var(--border-medium);
}

.tier-btn.active[data-tier="0"] {
  background: #334155;
  color: #FFFFFF;
  border-color: #64748B;
}

.tier-btn.active[data-tier="1"] {
  background: var(--tier1-glow);
  color: var(--tier1-color);
  border-color: var(--tier1-color);
  box-shadow: 0 0 12px rgba(229, 169, 59, 0.25);
}

.tier-btn.active[data-tier="2"] {
  background: var(--tier2-glow);
  color: var(--tier2-color);
  border-color: var(--tier2-color);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.tier-btn.active[data-tier="3"] {
  background: var(--tier3-glow);
  color: var(--tier3-color);
  border-color: var(--tier3-color);
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.25);
}

/* View Mode Switcher */
.view-mode-group {
  display: flex;
  align-items: center;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 2px;
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: var(--transition-fast);
}

.view-btn.active {
  background: var(--bg-tertiary);
  color: var(--text-main);
}

/* Category Filter Tags */
.category-filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cat-label {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 0.25rem;
}

.category-tag-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: var(--transition-fast);
}

.category-tag-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.category-tag-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* Results Count Bar */
.results-bar {
  max-width: 1380px;
  margin: 0 auto 1.25rem;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ==========================================================================
   RESEARCH CARDS GRID (VAULT GRID)
   ========================================================================== */
.vault-section {
  max-width: 1380px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.vault-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1.5rem;
}

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-fast);
  position: relative;
}

.research-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Tier-specific Card Highlights */
.research-card.tier-1 {
  border-left: 3px solid var(--accent-emerald);
}
.research-card.tier-1:hover {
  border-left-color: #4ade80;
}

.research-card.tier-2 {
  border-left: 3px solid var(--accent-cyan);
}
.research-card.tier-2:hover {
  border-left-color: #7dd3fc;
}

.research-card.tier-3 {
  border-left: 3px solid var(--border-medium);
}
.research-card.tier-3:hover {
  border-left-color: var(--text-muted);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}

.card-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.badge-tier {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tier-badge-1 {
  background: rgba(229, 169, 59, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(229, 169, 59, 0.4);
}

.tier-badge-2 {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.tier-badge-3 {
  background: rgba(129, 140, 248, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(129, 140, 248, 0.4);
}

.badge-slide {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
  border: 1px solid var(--border-subtle);
}

.card-id {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-dim);
}

/* Citation Info */
.card-citation {
  margin-bottom: 1rem;
}

.paper-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.42;
  color: #FFFFFF;
  margin-bottom: 0.45rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.paper-authors {
  font-size: 0.85rem;
  color: #CBD5E1;
  margin-bottom: 0.2rem;
}

.paper-authors strong {
  color: var(--accent-cyan);
}

.paper-journal {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
}

/* Metric Highlight Box */
.card-metric-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
}

.metric-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.metric-value {
  font-size: 0.88rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.35;
}

/* Takeaway */
.card-takeaway {
  background: rgba(10, 14, 23, 0.65);
  border-left: 2px solid var(--accent-emerald);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  border-radius: 2px;
}

.takeaway-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-emerald);
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.takeaway-text {
  font-size: 0.86rem;
  color: #E2E8F0;
  line-height: 1.55;
}

/* Math Formula Box */
.card-math-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.9rem;
}

.math-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.math-code {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  word-break: break-all;
}

.math-rendered {
  font-size: 0.98rem;
  color: #F8FAFC;
  padding: 0.25rem 0;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
}

.math-rendered .katex {
  color: #F8FAFC !important;
}

.modal-math-code .katex-display {
  margin: 0.5rem 0;
  overflow-x: auto;
}

/* Card Action Footer */
.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-doi {
  background: var(--bg-tertiary);
  color: var(--accent-cyan);
  border-color: rgba(56, 189, 248, 0.3);
}

.btn-doi:hover {
  background: var(--bg-tertiary);
  color: #FFFFFF;
  border-color: var(--accent-cyan);
}

.btn-defense {
  background: var(--bg-tertiary);
  color: var(--accent-emerald);
  border-color: rgba(52, 211, 153, 0.4);
}

.btn-defense:hover {
  background: rgba(52, 211, 153, 0.15);
  color: #FFFFFF;
  border-color: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.25);
}

/* ==========================================================================
   ACADEMIC TABLE VIEW
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.academic-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  text-align: left;
}

.academic-table th {
  background: var(--bg-secondary);
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border-medium);
}

.academic-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.academic-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.col-id {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-dim);
  width: 45px;
}

.col-tier {
  width: 60px;
}

.col-title {
  min-width: 280px;
}

.tbl-title {
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
  line-height: 1.35;
}

.tbl-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.col-slide {
  width: 140px;
}

.col-takeaway {
  min-width: 320px;
}

.tbl-takeaway {
  font-size: 0.82rem;
  color: #94A3B8;
  line-height: 1.45;
}

.col-actions {
  width: 150px;
}

.tbl-btn-group {
  display: flex;
  gap: 0.3rem;
}

.tbl-btn {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.tbl-btn:hover {
  color: #FFFFFF;
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   SLIDE 6 MAPPING & TEAM ROLES SECTION
   ========================================================================== */
.slide6-mapping-section {
  max-width: 1380px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.section-header-box {
  text-align: center;
  margin-bottom: 2.25rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #FFFFFF 0%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 760px;
  margin: 0 auto;
}

.team-roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.team-role-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.team-role-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.role-avatar-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.role-1 .role-avatar-badge {
  background: rgba(229, 169, 59, 0.15);
  border: 1px solid rgba(229, 169, 59, 0.4);
}

.role-2 .role-avatar-badge {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.role-3 .role-avatar-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.member-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
}

.member-role {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.85rem;
}

.member-sources-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.82rem;
  color: #94A3B8;
  line-height: 1.45;
}

/* Slide 6 Visual Preview Comparison */
.slide6-preview-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}

.slide6-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.slide6-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.preview-col {
  background: rgba(19, 28, 49, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
}

.preview-col-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.preview-source-list {
  list-style: none;
}

.preview-source-list li {
  font-size: 0.82rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #CBD5E1;
}

.preview-source-list li strong {
  color: #FFFFFF;
}

/* ==========================================================================
   AI DISCLOSURE STATEMENT (MỤC 6 QUY CHẾ BTC)
   ========================================================================== */
.disclosure-section {
  max-width: 1380px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.disclosure-card {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(14px);
}

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

.disc-item {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 1.15rem;
}

.disc-question {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 0.4rem;
}

.disc-answer {
  font-size: 0.84rem;
  color: #CBD5E1;
  line-height: 1.55;
}

/* ==========================================================================
   QR CODE GENERATOR SECTION
   ========================================================================== */
.qr-section {
  max-width: 1380px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.qr-box-container {
  background: linear-gradient(135deg, rgba(19, 28, 49, 0.8) 0%, rgba(13, 19, 34, 0.9) 100%);
  border: 1px solid rgba(229, 169, 59, 0.3);
  border-radius: 20px;
  padding: 2.25rem;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2.5rem;
  align-items: center;
  box-shadow: var(--shadow-gold);
}

.qr-preview-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qr-preview-box {
  background: #FFFFFF;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  height: 280px;
}

.qr-preview-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-hint-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.85rem;
  text-align: center;
}

.qr-config-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.qr-url-input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #CBD5E1;
  margin-bottom: 0.5rem;
}

.qr-url-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  outline: none;
}

.qr-url-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.qr-download-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn-qr-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  transition: var(--transition-fast);
}

.btn-qr-svg {
  background: var(--accent-gold);
  color: #070B12;
  box-shadow: 0 4px 15px rgba(229, 169, 59, 0.3);
}

.btn-qr-svg:hover {
  background: #F59E0B;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229, 169, 59, 0.45);
}

.btn-qr-png {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.btn-qr-png:hover {
  background: var(--accent-cyan);
  color: #070B12;
  transform: translateY(-2px);
}

/* ==========================================================================
   DEFENSE MODAL (DRAWER)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
}

.modal-content-box {
  position: relative;
  z-index: 1001;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 18px;
  max-width: 680px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-content-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent-gold);
}

.modal-close-btn {
  font-size: 1.5rem;
  color: var(--text-dim);
  line-height: 1;
  transition: var(--transition-fast);
}

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

.modal-section {
  margin-bottom: 1.25rem;
}

.modal-section-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.modal-paper-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
}

.modal-paper-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.modal-defense-text {
  font-size: 0.92rem;
  color: #CBD5E1;
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--accent-gold);
}

.modal-math-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-cyan);
  background: rgba(0, 0, 0, 0.45);
  padding: 0.85rem;
  border-radius: 8px;
  word-break: break-all;
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  background: #1E293B;
  border: 1px solid var(--accent-emerald);
  color: #FFFFFF;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: all 0.25s ease;
}

.toast-notification.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-primary);
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.footer-container {
  max-width: 1380px;
  margin: 0 auto;
}

.footer-tagline {
  color: var(--accent-gold);
  font-weight: 700;
  margin-top: 0.35rem;
}

/* ==========================================================================
   MOBILE QUICK NAVIGATION BAR (Thumb Track)
   ========================================================================== */
.mobile-quick-nav {
  display: none;
}

/* ==========================================================================
   FLOATING BACK-TO-TOP BUTTON
   ========================================================================== */
.btn-back-to-top {
  position: fixed;
  bottom: 66px;
  right: 14px;
  z-index: 92;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.9);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  -webkit-tap-highlight-color: transparent;
}

.btn-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.btn-back-to-top:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  box-shadow: 0 6px 20px rgba(52, 211, 153, 0.25);
}

.btn-back-to-top:active {
  transform: scale(0.92);
}

/* Modal Drag Handle for Mobile Bottom Sheet */
.modal-drag-handle {
  display: none;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 1024px) {
  .team-roles-grid {
    grid-template-columns: 1fr;
  }
  .qr-box-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .qr-download-btn-group {
    justify-content: center;
  }
  .slide6-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Navigation & Quick Jump Header */
  .site-header {
    padding: 0.65rem 1rem;
  }
  .nav-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .brand-text h1 {
    font-size: 0.95rem;
  }
  .brand-text .brand-tagline {
    font-size: 0.64rem;
  }
  .nav-controls {
    gap: 0.45rem;
  }
  .nav-cta-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
  }
  .nav-cta-btn svg {
    width: 13px;
    height: 13px;
  }

  /* Mobile Quick Jump Bar (Sticky below header) */
  .mobile-quick-nav {
    display: block;
    position: sticky;
    top: 50px;
    z-index: 89;
    background: rgba(10, 14, 23, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.35rem 0.85rem;
  }

  .mobile-quick-nav-track {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-quick-nav-track::-webkit-scrollbar {
    display: none;
  }

  .quick-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.65rem;
    border-radius: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition-fast);
  }

  .quick-nav-pill.active,
  .quick-nav-pill:active {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
  }

  /* Monograph Header */
  .monograph-section {
    padding: 0 1rem;
    margin: 1.25rem auto 1rem;
  }
  .monograph-meta-strip {
    font-size: 0.68rem;
    gap: 0.45rem;
  }
  .monograph-title {
    font-size: clamp(1.3rem, 5.5vw, 1.75rem);
    line-height: 1.3;
    margin-bottom: 0.6rem;
  }
  .monograph-abstract {
    font-size: 0.86rem;
    line-height: 1.55;
    margin-bottom: 1.15rem;
  }

  /* Telemetry Strip */
  .telemetry-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .telemetry-item:nth-child(5) {
    grid-column: span 2;
    border-right: none;
  }
  .telemetry-item {
    padding: 0.65rem 0.75rem;
  }
  .telemetry-label {
    font-size: 0.62rem;
  }
  .telemetry-value {
    font-size: 0.95rem;
  }
  .telemetry-sub {
    font-size: 0.64rem;
  }

  /* Toolbar & Filter Cards */
  .toolbar-section {
    padding: 0 1rem;
    margin-bottom: 1.25rem;
  }
  .toolbar-card {
    padding: 1rem;
    border-radius: 12px;
  }
  .search-wrapper {
    margin-bottom: 0.85rem;
  }
  .search-input {
    font-size: 16px; /* Prevents auto-zoom in iOS Safari */
    padding: 0.75rem 0.85rem 0.75rem 2.6rem;
  }
  .search-icon {
    left: 0.85rem;
    width: 16px;
    height: 16px;
  }

  /* Horizontal Swipeable Tier Buttons */
  .tier-filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
  }
  .tier-buttons-group {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    gap: 0.4rem;
    padding-bottom: 3px;
  }
  .tier-buttons-group::-webkit-scrollbar {
    display: none;
  }
  .tier-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 6px;
  }
  .view-mode-group {
    display: none; /* Hide on mobile/tablet - card view is standard */
  }

  /* Horizontal Swipeable Category Tags */
  .category-filter-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    width: 100%;
  }
  .cat-label {
    font-size: 0.72rem;
    margin-bottom: 0.15rem;
  }
  #category-filters {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    gap: 0.35rem;
    padding-bottom: 3px;
  }
  #category-filters::-webkit-scrollbar {
    display: none;
  }
  .category-tag-btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.3rem 0.65rem;
    font-size: 0.74rem;
  }

  /* Results Bar */
  .results-bar {
    padding: 0 1rem;
    margin-bottom: 1rem;
    font-size: 0.78rem;
  }

  /* Research Cards Section */
  .vault-section {
    padding: 0 1rem;
    margin-bottom: 2.5rem;
  }
  .vault-grid-view {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .research-card {
    padding: 1rem;
    border-radius: 6px;
  }
  .paper-title {
    font-size: 0.98rem;
    line-height: 1.4;
    -webkit-line-clamp: 4;
  }
  .paper-authors {
    font-size: 0.8rem;
  }
  .paper-journal {
    font-size: 0.76rem;
  }
  .card-metric-box,
  .card-takeaway,
  .card-math-box {
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.75rem;
  }
  .metric-value,
  .takeaway-text {
    font-size: 0.82rem;
    line-height: 1.45;
  }
  .math-rendered {
    font-size: 0.92rem;
  }

  /* Card Actions: Row 1 prominent full-width Q&A, Row 2 three columns (DOI, APA, BIBTEX) */
  .card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    padding-top: 0.75rem;
  }
  .btn-action {
    justify-content: center;
    padding: 0.5rem 0.25rem;
    font-size: 0.7rem;
    min-height: 38px;
    border-radius: 4px;
    width: 100%;
    text-align: center;
    white-space: nowrap;
  }
  .btn-defense {
    grid-column: span 3;
    order: -1;
    min-height: 42px;
    font-weight: 700;
    font-size: 0.78rem;
  }

  /* Slide 6 Mapping & Roles Section */
  .slide6-mapping-section {
    padding: 0 1rem;
    margin: 2.5rem auto;
  }
  .section-title {
    font-size: 1.35rem;
    line-height: 1.3;
  }
  .section-subtitle {
    font-size: 0.84rem;
  }
  .team-roles-grid {
    gap: 1rem;
    margin-bottom: 1.75rem;
  }
  .team-role-card {
    padding: 1.15rem;
  }
  .member-name {
    font-size: 1.05rem;
  }
  .member-role {
    font-size: 0.78rem;
  }
  .member-sources-box {
    font-size: 0.78rem;
  }
  .slide6-preview-container {
    padding: 1.15rem;
  }

  /* AI Disclosure Section */
  .disclosure-section {
    padding: 0 1rem;
    margin: 2.5rem auto;
  }
  .disclosure-card {
    padding: 1.25rem;
  }
  .disclosure-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .disc-item {
    padding: 0.9rem;
  }
  .disc-question {
    font-size: 0.82rem;
  }
  .disc-answer {
    font-size: 0.8rem;
  }

  /* QR Generator Section */
  .qr-section {
    padding: 0 1rem;
    margin: 2.5rem auto;
  }
  .qr-box-container {
    padding: 1.25rem;
    gap: 1.25rem;
  }
  .qr-preview-box {
    width: 200px;
    height: 200px;
    padding: 10px;
  }
  .qr-download-btn-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .btn-qr-download {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.84rem;
  }

  /* Tufte Footnotes */
  .tufte-footnotes-section {
    padding: 1.25rem 1rem;
    margin: 2rem auto 1rem;
  }
  .tufte-footnotes-container {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    font-size: 0.72rem;
  }

  /* Bottom Sheet Drawer for Defense Modal */
  .modal-overlay {
    align-items: flex-end;
  }
  .modal-content-box {
    width: 100%;
    max-width: 100%;
    max-height: 86vh;
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    padding: 0.75rem 1.15rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
  }
  .modal-overlay.open .modal-content-box {
    transform: translateY(0);
  }
  .modal-drag-handle {
    display: block;
    width: 38px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.25);
    margin: 0 auto 0.75rem;
  }
  .modal-title {
    font-size: 0.95rem;
    line-height: 1.35;
  }
  .modal-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
  }
  .modal-defense-text {
    font-size: 0.86rem;
    padding: 0.85rem;
  }
  .modal-math-code {
    font-size: 0.82rem;
    padding: 0.75rem;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px));
  }

  /* Solid Background for Sticky Headers to Prevent Bleed */
  .site-header {
    background: #0A0E17;
    padding: 0.55rem 0.85rem;
  }
  .mobile-quick-nav {
    background: #0A0E17;
  }

  /* Compact Brand Group */
  .brand-group {
    gap: 0.5rem;
    min-width: 0;
  }
  .brand-text h1 {
    font-size: 0.86rem;
    white-space: nowrap;
  }
  .brand-text .brand-tagline {
    font-size: 0.58rem;
    white-space: nowrap;
  }

  /* Compact Controls & Short Labels */
  .lang-switcher {
    padding: 1px;
    gap: 1px;
  }
  .lang-btn {
    padding: 0.2rem 0.45rem;
    font-size: 0.7rem;
  }
  .nav-cta-text-full,
  .dock-text-full,
  .dock-label-full {
    display: none;
  }
  .nav-cta-text-short,
  .dock-text-short,
  .dock-label-short {
    display: inline;
  }

  /* Docked Anchor Bar on Mobile */
  .docked-anchor-bar {
    padding: 0.4rem 0.75rem calc(0.4rem + env(safe-area-inset-bottom, 0px));
  }
  .docked-anchor-container {
    justify-content: space-between;
    gap: 0.4rem;
  }
  .dock-left {
    min-width: 0;
    gap: 0.4rem;
  }
  .dock-label {
    font-size: 0.66rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 165px;
  }
  .dock-badge {
    display: none;
  }
  .dock-right {
    gap: 0.35rem;
    flex-shrink: 0;
  }
  .dock-btn {
    padding: 0.35rem 0.55rem;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  /* Toast Notification */
  .toast-notification {
    left: 1rem;
    right: 1rem;
    bottom: 5rem;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.65rem 1rem;
  }
}

@media (max-width: 380px) {
  .brand-text h1 {
    font-size: 0.85rem;
  }
  .dock-label {
    max-width: 90px;
    font-size: 0.62rem;
  }
  .dock-btn {
    padding: 0.3rem 0.45rem;
    font-size: 0.64rem;
  }
  .dock-btn svg {
    display: none;
  }
}

/* ==========================================================================
   ACADEMIC MATH DISPLAY STYLES (KaTeX & LaTeX)
   ========================================================================== */
.card-math-box {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.9rem;
  transition: var(--transition-fast);
}

.card-math-box:hover {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(15, 23, 42, 0.95);
}

.math-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  margin-bottom: 0.35rem;
}

.math-rendered {
  font-size: 1.02rem;
  color: #F8FAFC;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.25rem 0;
  line-height: 1.5;
}

.math-rendered .katex {
  font-size: 1.05em;
}

.math-code, .modal-math-code {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-cyan);
  background: rgba(15, 23, 42, 0.8);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   TUFTE MARGINALIA FOOTNOTES (Stitch Academic Monolith)
   ========================================================================== */
.tufte-footnotes-section {
  max-width: 1380px;
  margin: 3rem auto 1.5rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.tufte-footnotes-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footnote-item {
  display: flex;
  gap: 0.5rem;
}

.fn-num {
  color: var(--accent-emerald);
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .tufte-footnotes-container {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   DOCKED SLIDE 6 VERIFICATION ANCHOR BAR (Stitch Academic Monolith)
   ========================================================================== */
.docked-anchor-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 95;
  background: rgba(10, 14, 23, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  padding: 0.5rem 1.5rem;
}

.docked-anchor-container {
  max-width: 1380px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.dock-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dock-pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.dock-label {
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.04em;
}

.dock-badge {
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: var(--accent-emerald);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  font-size: 0.7rem;
  font-weight: 700;
}

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

.dock-hash {
  color: var(--text-muted);
}

.dock-auth {
  color: var(--accent-emerald);
  font-weight: 700;
}

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

.dock-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 3px;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dock-btn-primary {
  background: var(--accent-emerald);
  color: #0A0E17;
}

.dock-btn-primary:hover {
  background: #4ade80;
}

.dock-btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.dock-btn-secondary:hover {
  border-color: var(--border-medium);
  color: var(--text-main);
}

@media (max-width: 900px) {
  .dock-center {
    display: none;
  }
}



/* ==========================================================================
   PRINT STYLES (@media print)
   ========================================================================== */
@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .site-header, .toolbar-section, .qr-section, .btn-action, .toast-notification {
    display: none !important;
  }
  .research-card {
    background: #FFFFFF !important;
    border: 1px solid #CCCCCC !important;
    color: #000000 !important;
    break-inside: avoid;
    box-shadow: none !important;
  }
  .paper-title {
    color: #000000 !important;
  }
  .metric-value, .takeaway-text {
    color: #333333 !important;
  }
}
