/* ═══════════════════════════════════════════════════════════════
   Captain Landseed Terminal — Design System
   The Bloomberg Terminal of Climate & Conservation Finance
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* ── Backgrounds (Landseed dark) ── */
  --bg: #0a0a0a;
  --bg-primary: #000000;
  --surface: #0f0f0f;
  --elevated: #171717;
  --bg-hover: rgba(20,130,255,0.08);

  /* ── Borders ── */
  --border: #252525;
  --border-light: #333333;

  /* ── Text ── */
  --text: #e8e8e8;
  --text-secondary: #a0a0a0;
  --muted: #707070;

  /* ── Accent Colors (Landseed brand palette) ── */
  --accent-blue: #1482FF;     /* Landseed Blue */
  --accent-green: #00BE5A;    /* Landseed Green */
  --accent-red: #e53e3e;
  --accent-yellow: #FFC800;   /* Landseed Yellow */
  --accent-purple: #E682E6;   /* Landseed Pink */
  --accent-gold: #FFC800;     /* Landseed Yellow */
  --accent-teal: #32C8FF;     /* Landseed Aqua */
  --accent-orange: #dd6b20;
  --accent-pink: #E682E6;     /* Landseed Pink */
  --accent-cyan: #32C8FF;     /* Landseed Aqua */
  --accent-lime: #00BE5A;     /* Landseed Green */

  /* ── Alpha backgrounds ── */
  --gold-d: rgba(255,200,0,0.12);
  --blue-d: rgba(20,130,255,0.12);
  --purple-d: rgba(230,130,230,0.12);
  --teal-d: rgba(50,200,255,0.12);
  --green-d: rgba(0,190,90,0.12);
  --red-d: rgba(229,62,62,0.12);

  /* ── Radii ── */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* ── Shadows ── */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);

  /* ── Typography (Landseed: Inter 700 as web fallback for Neue Haas Grotesk) ── */
  --font-mono: 'SF Mono','Cascadia Code','JetBrains Mono','Fira Code','Consolas',monospace;
  --font-sans: 'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;

  /* ── Chart colors (Landseed palette) ── */
  --chart-1: #1482FF;
  --chart-2: #00BE5A;
  --chart-3: #FFC800;
  --chart-4: #E682E6;
  --chart-5: #e53e3e;
  --chart-6: #32C8FF;
  --chart-7: #dd6b20;
  --chart-8: #E682E6;
}

/* ── Reset ── */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { font-size: 14px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
::selection { background: var(--accent-blue); color: #fff; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Skip Link (A11y) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--accent-blue);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
}
.skip-link:focus {
  top: 8px;
}

/* ── Terminal Shell ── */
.terminal-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  grid-template-rows: 52px 1fr auto;
  grid-template-areas:
    "header header"
    "nav    main"
    "footer footer";
  min-height: 100vh;
}

/* ── Header ── */
.terminal-header {
  grid-area: header;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-brand h1 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent-blue);
  letter-spacing: -0.3px;
}
.header-brand .tagline {
  font-size: 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.header-spacer { flex: 1; }
.header-clock {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.header-badge {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-live { background: var(--green-d); color: var(--accent-green); }
.badge-sandbox { background: var(--gold-d); color: var(--accent-gold); }
.badge-stale { background: var(--red-d); color: var(--accent-red); }

.data-freshness {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
}

/* ── Mobile Menu Button ── */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: all 0.25s ease;
}
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Navigation ── */
.terminal-nav {
  grid-area: nav;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 12px 0;
  overflow-y: auto;
}
.nav-section {
  padding: 0 12px;
  margin-bottom: 16px;
}
.nav-section-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  padding: 0 8px;
  margin-bottom: 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text);
  text-decoration: none;
}
.nav-item.active {
  background: var(--blue-d);
  color: var(--accent-blue);
  font-weight: 600;
}
.nav-item .nav-icon {
  width: 18px;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.8;
}
.nav-item .nav-shortcut {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--muted);
  background: var(--bg-primary);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border);
}

/* ── Main Content ── */
.terminal-main {
  grid-area: main;
  overflow-y: auto;
  padding: 20px;
}
.page-header {
  margin-bottom: 20px;
}
.page-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.page-header p {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: var(--border-light); }
.stat-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}
.stat-value.blue { color: var(--accent-blue); }
.stat-value.green { color: var(--accent-green); }
.stat-value.gold { color: var(--accent-gold); }
.stat-value.purple { color: var(--accent-purple); }
.stat-value.teal { color: var(--accent-teal); }
.stat-value.red { color: var(--accent-red); }
.stat-label {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
}
.stat-delta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-top: 4px;
}
.stat-delta.up { color: var(--accent-green); }
.stat-delta.down { color: var(--accent-red); }
.stat-delta.flat { color: var(--muted); }
.stat-sparkline {
  margin-top: 8px;
  height: 24px;
}
.stat-sparkline svg { width: 100%; height: 24px; }

/* ── Cards ── */
.card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.card-header h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  font-weight: 600;
}
.card-body { padding: 16px; }
.card-body.no-pad { padding: 0; }

/* ── Data Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.data-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  user-select: none;
}
.data-table th[onclick] {
  cursor: pointer;
}
.data-table th[onclick]:hover {
  color: var(--text);
}
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-secondary);
}
.data-table tr:hover td { background: var(--bg-hover); }
.data-table .mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.data-table .price { color: var(--accent-green); font-weight: 600; }
.data-table .negative { color: var(--accent-red); }
.data-table .positive { color: var(--accent-green); }

/* ── Chart Containers ── */
.chart-container {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 12px;
  min-height: 200px;
  position: relative;
}
.chart-container svg { width: 100%; }
.chart-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 8px;
}
.chart-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* ── Sandbox Mode ── */
.sandbox-banner {
  background: linear-gradient(135deg, var(--gold-d), var(--surface));
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sandbox-banner .icon { font-size: 1.5rem; }
.sandbox-banner .text h3 {
  color: var(--accent-gold);
  font-size: 0.85rem;
  margin-bottom: 2px;
}
.sandbox-banner .text p {
  color: var(--text-secondary);
  font-size: 0.8rem;
}
.sandbox-post {
  border: 2px dashed var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
  background: var(--gold-d);
}
.sandbox-post .post-thread {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.6;
}
.sandbox-post .post-meta {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 8px;
  font-family: var(--font-mono);
}
.sandbox-controls {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn:hover { opacity: 0.85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent-blue); color: #fff; }
.btn-success { background: var(--accent-green); color: #000; }
.btn-gold { background: var(--accent-gold); color: #000; }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 5px 10px; font-size: 0.75rem; }

/* ── Knowledge Graph ── */
.claim-card {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.claim-card:last-child { border-bottom: none; }
.claim-text { font-size: 0.85rem; color: var(--text); line-height: 1.5; margin-bottom: 6px; }
.claim-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.65rem;
}
.claim-tag {
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}
.tag-supports { background: var(--green-d); color: var(--accent-green); }
.tag-contradicts { background: var(--red-d); color: var(--accent-red); }
.tag-extends { background: var(--blue-d); color: var(--accent-blue); }

/* ── Consensus Indicator ── */
.consensus-bar {
  height: 6px;
  background: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
  margin: 4px 0;
}
.consensus-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

/* ── Loading & Empty States ── */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}
.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}
.empty-state .icon { font-size: 2rem; margin-bottom: 12px; display: block; opacity: 0.4; }
.empty-state p { font-size: 0.85rem; }

/* ── Grid Layouts ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── Ticker Strip ── */
.ticker-strip {
  display: flex;
  gap: 16px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 16px;
  white-space: nowrap;
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.ticker-symbol { color: var(--text); font-weight: 600; }
.ticker-price { color: var(--accent-green); }
.ticker-change.up { color: var(--accent-green); }
.ticker-change.down { color: var(--accent-red); }

/* ── Search ── */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.search-bar input {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  outline: none;
}
.search-bar input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(66,153,225,0.2); }

/* ── Nav Section Dividers (mid-loop labels) ── */
.nav-section .nav-section-label:not(:first-child) {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── Command Palette / Global Search ── */
.cmd-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}
.cmd-overlay.open { display: flex; justify-content: center; padding-top: 80px; }
.cmd-dialog {
  width: 480px;
  max-width: 92vw;
  max-height: 420px;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cmd-input {
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
  width: 100%;
}
.cmd-input::placeholder { color: var(--muted); }
.cmd-results {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.cmd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s;
}
.cmd-item:hover, .cmd-item.active {
  background: var(--bg-hover);
  color: var(--text);
  text-decoration: none;
}
.cmd-item .cmd-icon { width: 20px; text-align: center; font-size: 0.9rem; }
.cmd-item .cmd-shortcut {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  background: var(--bg-primary);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--border);
}
.cmd-empty {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}
.cmd-hint {
  padding: 8px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.65rem;
  color: var(--muted);
  display: flex;
  gap: 12px;
}
.cmd-hint kbd {
  font-family: var(--font-mono);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.6rem;
}

/* ── Export Button ── */
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-export:hover { border-color: var(--accent-blue); color: var(--accent-blue); }

/* ── Footer ── */
.terminal-footer {
  grid-area: footer;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.65rem;
  color: var(--muted);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .terminal-shell {
    grid-template-columns: 1fr;
    grid-template-rows: 52px 1fr auto;
    grid-template-areas:
      "header"
      "main"
      "footer";
  }
  .terminal-nav {
    display: none;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    background: var(--surface);
    border-right: none;
    padding-top: 8px;
    overflow-y: auto;
  }
  .terminal-nav.nav-open {
    display: block;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .header-badge, .data-freshness { display: none; }
}

/* === Decision Chain (Transparency page) === */
.decision-chain { display: flex; flex-direction: column; gap: 0; }
.chain-stage { display: flex; gap: 12px; }
.chain-marker { display: flex; flex-direction: column; align-items: center; min-width: 20px; }
.chain-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--blue); border: 2px solid var(--border-light); flex-shrink: 0; }
.chain-stage--final .chain-dot { background: var(--green); }
.chain-line { width: 2px; flex: 1; background: var(--border); min-height: 16px; }
.chain-content { flex: 1; padding-bottom: 16px; }
.chain-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.chain-detail { color: var(--text-secondary); font-size: 0.85rem; }

/* Factor bars */
.factor-row { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.factor-label { width: 200px; font-size: 0.75rem; color: var(--text-secondary); text-align: right; flex-shrink: 0; }
.factor-bar-track { flex: 1; height: 14px; background: var(--bg); border-radius: var(--radius-sm); overflow: hidden; }
.factor-bar-fill { height: 100%; background: var(--blue); border-radius: var(--radius-sm); transition: width 0.3s; }
.factor-bar-negative { background: var(--red); }
.factor-value { width: 60px; font-size: 0.75rem; text-align: right; flex-shrink: 0; }

/* Metric bars (reusable) */
.metric-list { display: flex; flex-direction: column; gap: 10px; }
.metric-row { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; }
.metric-row > span:first-child { width: 180px; color: var(--text-secondary); flex-shrink: 0; }
.metric-bar-track { flex: 1; height: 10px; background: var(--bg); border-radius: var(--radius-sm); overflow: hidden; min-width: 40px; }
.metric-bar-fill { height: 100%; border-radius: var(--radius-sm); transition: width 0.3s; }

/* Pipeline Funnel */
.pipeline-funnel { display: flex; flex-direction: column; gap: 4px; }
.funnel-stage { margin-bottom: 8px; }
.funnel-bar-container { width: 100%; background: var(--bg); border-radius: var(--radius-sm); overflow: hidden; }
.funnel-bar { background: var(--blue); padding: 8px 12px; border-radius: var(--radius-sm); min-width: 60px; transition: width 0.5s; }
.funnel-count { color: #fff; font-weight: 700; }
.funnel-label { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 0.85rem; }
.funnel-icon { font-size: 1.1rem; }
.funnel-desc { color: var(--muted); font-size: 0.75rem; }
.funnel-conversion { text-align: center; color: var(--muted); font-size: 0.75rem; margin: 4px 0; }

/* Altmetric badges */
.altmetric-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 0.75rem; font-weight: 700; font-family: var(--font-mono); }
.altmetric-high { background: rgba(229,62,62,0.2); color: var(--red); }
.altmetric-med { background: rgba(214,158,46,0.2); color: var(--gold); }
.altmetric-low { background: rgba(66,153,225,0.15); color: var(--blue); }

/* Preprint cards */
.preprint-card { padding: 12px; border-bottom: 1px solid var(--border); }
.preprint-card:last-child { border-bottom: none; }

/* Positive/negative text */
.positive { color: var(--green); }
.negative { color: var(--red); }

@media (max-width: 480px) {
  .terminal-header { padding: 0 12px; height: 44px; }
  .header-brand h1 { font-size: 0.85rem; }
  .header-brand .tagline { display: none; }
  .terminal-main { padding: 12px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 10px; }
  .stat-value { font-size: 1.3rem; }
  .btn { min-height: 44px; }
  .terminal-footer { flex-direction: column; gap: 4px; text-align: center; }
  .sandbox-banner { flex-direction: column; text-align: center; }
}
