/* Axiom Design System — v2.0 Accessibility + Light/Dark */
/* DarkWave Studios LLC — 2026 */

:root {
  /* ── Dark theme (default) ── */
  --void: #0c0c14; --primary: #12121e; --secondary: #1a1a2e; --tertiary: #222240;
  --cyan: #22d3ee; --teal: #2dd4bf; --purple: #c084fc; --rose: #fb7185;
  --glass-bg: rgba(26,26,46,0.80); --glass-border: rgba(255,255,255,0.12);
  --text-primary: #f0f0f8; --text-secondary: rgba(255,255,255,0.72);
  --text-dim: rgba(255,255,255,0.45); --font-mono: 'JetBrains Mono', monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --surface-hover: rgba(34,211,238,0.08);
  --active-bg: rgba(34,211,238,0.15); --active-border: rgba(34,211,238,0.5);
}

/* ── Light theme ── */
[data-theme="light"] {
  --void: #f0f2f5; --primary: #ffffff; --secondary: #f5f6f8; --tertiary: #e8eaee;
  --cyan: #0891b2; --teal: #0d9488; --purple: #9333ea; --rose: #e11d48;
  --glass-bg: rgba(255,255,255,0.90); --glass-border: rgba(0,0,0,0.10);
  --text-primary: #111827; --text-secondary: rgba(0,0,0,0.65);
  --text-dim: rgba(0,0,0,0.40);
  --surface-hover: rgba(8,145,178,0.06);
  --active-bg: rgba(8,145,178,0.12); --active-border: rgba(8,145,178,0.5);
}
[data-theme="light"] .ax-header h1 { -webkit-text-fill-color: unset; background: none; color: var(--cyan); }
[data-theme="light"] .manifesto-modal h2 { -webkit-text-fill-color: unset; background: none; color: var(--purple); }
[data-theme="light"] .manifesto-modal { border-color: rgba(147,51,234,0.2); box-shadow: 0 8px 40px rgba(0,0,0,0.12); }
[data-theme="light"] .manifesto-overlay { background: rgba(0,0,0,0.4); }
[data-theme="light"] .overlay { background: rgba(0,0,0,0.4); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: 'Inter', sans-serif; background: var(--void); color: var(--text-primary); line-height: 1.6; min-height: 100vh; min-height: 100dvh; transition: background 0.3s, color 0.3s; }
a { color: var(--text-secondary); text-decoration: none; }
a:hover { color: var(--cyan); }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(34,211,238,0.3); border-radius: 4px; }

/* ═══ Header ═══ */
.ax-header { padding: 0.6rem 1rem; background: var(--primary); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--glass-border); flex-wrap: wrap; gap: 0.5rem; }
.ax-header h1 { font-size: clamp(1rem, 2.5vw, 1.2rem); font-weight: 900; letter-spacing: 0.15em; background: linear-gradient(135deg, #22d3ee, #2dd4bf, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.ax-header .ver { font-size: 0.6rem; color: var(--text-dim); font-family: var(--font-mono); background: var(--secondary); padding: 0.1rem 0.4rem; border-radius: 0.25rem; border: 1px solid var(--glass-border); }

/* ═══ Nav Buttons — UNIFIED ═══ */
.ax-nav { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.nav-btn {
  padding: 0.35rem 0.7rem; border-radius: 0.4rem; font-size: 0.68rem; font-family: var(--font-mono);
  cursor: pointer; border: 1px solid var(--glass-border); background: var(--secondary);
  color: var(--text-secondary); transition: all 0.2s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.3rem; min-height: 34px; font-weight: 500;
}
.nav-btn:hover { border-color: var(--cyan); color: var(--cyan); background: var(--surface-hover); }
/* Active nav state — clear highlight */
.nav-btn.active {
  background: var(--active-bg) !important; border-color: var(--active-border) !important;
  color: var(--cyan) !important; font-weight: 700;
}
/* Remove the old accent class — all buttons same style now */
.nav-btn.accent { background: var(--secondary); border-color: var(--glass-border); color: var(--text-secondary); font-weight: 500; }

/* ═══ Theme Toggle ═══ */
.theme-toggle {
  padding: 0.3rem 0.5rem; border-radius: 0.4rem; font-size: 0.85rem;
  cursor: pointer; border: 1px solid var(--glass-border); background: var(--secondary);
  color: var(--text-secondary); transition: all 0.2s; min-height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { border-color: var(--cyan); color: var(--cyan); }

/* ═══ Footer ═══ */
.ax-footer {
  padding: 0.6rem 1rem; background: var(--secondary); display: flex; justify-content: space-between;
  align-items: center; font-size: 0.65rem; color: var(--text-dim); font-family: var(--font-mono);
  flex-wrap: wrap; gap: 0.5rem; padding-bottom: calc(0.6rem + var(--safe-b));
  border-top: 1px solid var(--glass-border);
}
.ax-footer a { color: var(--text-secondary); font-size: 0.65rem; transition: color 0.15s; }
.ax-footer a:hover { color: var(--cyan); }
.patent-notice { font-family: var(--font-mono); font-size: 0.55rem; color: var(--purple); letter-spacing: 0.05em; opacity: 0.8; }

/* ═══ Glass Cards ═══ */
.glass { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 0.75rem; backdrop-filter: blur(20px); }
.glass-sm { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 0.5rem; }

/* ═══ Buttons ═══ */
.btn { background: linear-gradient(135deg, var(--cyan), var(--teal)); border: none; color: #000; padding: 0.6rem 1.2rem; border-radius: 0.5rem; font-weight: 700; cursor: pointer; font-size: 0.8rem; transition: transform 0.15s, box-shadow 0.15s; letter-spacing: 0.03em; min-height: 44px; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(34,211,238,0.3); }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.65rem; min-height: 32px; border-radius: 0.3rem; }
.btn-ghost { background: transparent; border: 1px solid var(--glass-border); color: var(--text-secondary); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: none; box-shadow: none; }

/* ═══ Inputs ═══ */
.input { width: 100%; background: var(--secondary); border: 1px solid var(--glass-border); border-radius: 0.5rem; padding: 0.65rem 0.9rem; color: var(--text-primary); font-family: var(--font-mono); font-size: 0.85rem; outline: none; transition: border-color 0.2s; min-height: 44px; }
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 2px rgba(34,211,238,0.12); }
.input::placeholder { color: var(--text-dim); }

/* ═══ KPI Cards ═══ */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.6rem; }
.kpi-card { padding: 0.8rem; text-align: center; border-radius: 0.6rem; background: var(--glass-bg); border: 1px solid var(--glass-border); }
.kpi-card .kpi-icon { font-size: 1.2rem; margin-bottom: 0.3rem; }
.kpi-card .kpi-value { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 700; }
.kpi-card .kpi-label { font-size: 0.6rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; font-family: var(--font-mono); }

/* ═══ Chat Messages ═══ */
.msg { padding: 0.7rem 1rem; border-radius: 0.6rem; max-width: 92%; font-size: 0.88rem; line-height: 1.65; animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.msg.user { background: rgba(34,211,238,0.10); border: 1px solid rgba(34,211,238,0.20); align-self: flex-end; }
.msg.agent { background: var(--glass-bg); border: 1px solid var(--glass-border); align-self: flex-start; }
.msg .badge { display: inline-block; padding: 0.08rem 0.4rem; border-radius: 0.2rem; font-family: var(--font-mono); font-size: 0.55rem; font-weight: 600; margin-bottom: 0.4rem; letter-spacing: 0.05em; }
.msg .meta { margin-top: 0.4rem; font-size: 0.6rem; color: var(--text-dim); font-family: var(--font-mono); }
.msg img { max-width: 100%; border-radius: 0.5rem; margin-top: 0.4rem; }

/* ═══ Charts ═══ */
.chart-wrap { position: relative; height: 200px; border-radius: 0.5rem; overflow: hidden; }
.chart-wrap canvas { width: 100%; height: 100%; }
.chart-nav { display: flex; gap: 0.4rem; align-items: center; }
.chart-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.15); cursor: pointer; transition: background 0.2s; }
.chart-dot.active { background: var(--cyan); }

/* ═══ Overlays / Modals ═══ */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.80); z-index: 9999; display: none; align-items: center; justify-content: center; backdrop-filter: blur(8px); }
.overlay.show { display: flex; }
.modal { background: var(--glass-bg); border: 1px solid rgba(34,211,238,0.2); border-radius: 1rem; padding: 2rem; width: min(320px, 90vw); text-align: center; backdrop-filter: blur(24px); box-shadow: 0 0 60px rgba(34,211,238,0.08); position: relative; }
.modal h3 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--cyan); margin-bottom: 1rem; font-family: var(--font-mono); }
.pin-input { width: 140px; background: var(--secondary); border: 1px solid var(--glass-border); border-radius: 0.5rem; padding: 0.7rem; color: var(--text-primary); font-family: var(--font-mono); font-size: 1.5rem; text-align: center; letter-spacing: 0.4em; outline: none; }
.pin-input:focus { border-color: var(--cyan); }

/* ═══ Pipeline Module ═══ */
.pipe-module { display: flex; align-items: center; gap: 0.4rem; padding: 0.22rem 0.4rem; border-radius: 0.25rem; font-size: 0.62rem; font-family: var(--font-mono); transition: all 0.25s ease; }
.pipe-module .m-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--glass-border); transition: all 0.3s; }
.pipe-module span:not(.m-dot) { color: var(--text-secondary); }
.pipe-module.proceed .m-dot { background: var(--teal); box-shadow: 0 0 5px rgba(45,212,191,0.5); }
.pipe-module.halt .m-dot { background: var(--rose); box-shadow: 0 0 5px rgba(251,113,133,0.5); }
.layer-div { padding: 0.15rem 0.4rem; font-size: 0.55rem; color: var(--cyan); font-family: var(--font-mono); letter-spacing: 0.12em; opacity: 0.7; }

/* ═══ Code Mode ═══ */
.code-panel { display: grid; grid-template-columns: 220px 1fr 300px; height: calc(100vh - 100px); height: calc(100dvh - 100px); gap: 1px; background: var(--glass-border); }
.snippet-list { background: var(--primary); overflow-y: auto; padding: 0.5rem; }
.editor-area { background: var(--primary); display: flex; flex-direction: column; }
.voice-panel { background: var(--primary); padding: 1rem; overflow-y: auto; }

/* ═══ Auth ═══ */
.auth-container { max-width: 420px; width: 100%; padding: 0 1rem; }
.tab-bar { display: flex; margin-bottom: 1.5rem; border-radius: 0.5rem; overflow: hidden; border: 1px solid var(--glass-border); }
.tab { flex: 1; text-align: center; padding: 0.65rem; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; cursor: pointer; background: transparent; color: var(--text-dim); transition: all 0.2s; border: none; min-height: 44px; }
.tab.active { background: var(--active-bg); color: var(--cyan); }

/* ═══ Dashboard ═══ */
.dash-layout { display: grid; grid-template-columns: 220px 1fr; height: calc(100vh - 56px); height: calc(100dvh - 56px); }
.sidebar { background: var(--primary); border-right: 1px solid var(--glass-border); padding: 1rem; overflow-y: auto; }
.sidebar-nav a { display: flex; align-items: center; padding: 0.5rem 0.75rem; border-radius: 0.5rem; font-size: 0.78rem; color: var(--text-secondary); transition: all 0.2s; min-height: 40px; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: var(--active-bg); color: var(--cyan); }

/* ═══ Mobile ═══ */
@media (max-width: 768px) {
  .ax-header { padding: 0.5rem 0.75rem; }
  .ax-header .ver { display: none; }
  .ax-nav .nav-btn { font-size: 0.6rem; padding: 0.25rem 0.5rem; }
  .dash-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .code-panel { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; }
  .snippet-list { max-height: 120px; }
  .voice-panel { max-height: 200px; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .chart-wrap { height: 160px; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .msg { max-width: 98%; font-size: 0.82rem; }
  .ax-footer { font-size: 0.55rem; }
}

/* ═══ Bottom Nav (mobile) ═══ */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--primary); border-top: 1px solid var(--glass-border); padding: 0.4rem 0; padding-bottom: calc(0.4rem + var(--safe-b)); z-index: 100; }
.bottom-nav-items { display: flex; justify-content: space-around; }
.bottom-nav-items a { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; font-size: 0.55rem; color: var(--text-dim); font-family: var(--font-mono); padding: 0.3rem; min-width: 50px; min-height: 44px; justify-content: center; transition: color 0.2s; }
.bottom-nav-items a.active { color: var(--cyan); }
@media (max-width: 768px) {
  .bottom-nav { display: block; }
  body { padding-bottom: calc(60px + var(--safe-b)); }
}

/* ═══ Pulse animation ═══ */
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(251,113,133,0.3); } 50% { box-shadow: 0 0 0 6px rgba(251,113,133,0); } }
.recording { animation: pulse 1.2s infinite; }

/* ═══════════════════════════════════════════ */
/*  COCKPIT LAYOUT                            */
/* ═══════════════════════════════════════════ */
.cockpit { display: flex; flex-direction: column; height: calc(100vh - 100px); height: calc(100dvh - 100px); }

/* ── HUD Stats Bar ── */
.cockpit-hud { display: flex; gap: 0.8rem; padding: 0.4rem 0.75rem; background: var(--secondary); border-bottom: 1px solid var(--glass-border); flex-wrap: wrap; align-items: center; }
.hud-group { display: flex; align-items: center; gap: 0.3rem; }
.hud-label { font-family: var(--font-mono); font-size: 0.5rem; color: var(--text-dim); letter-spacing: 0.1em; text-transform: uppercase; }
.hud-val { font-family: var(--font-mono); font-size: 0.6rem; color: var(--cyan); font-weight: 600; }

/* ── Cockpit Grid ── */
.cockpit-grid { display: grid; grid-template-columns: 240px 1fr 220px; flex: 1; overflow: hidden; }

/* ── Instrument Panels ── */
.cockpit-panel { background: var(--primary); display: flex; flex-direction: column; overflow: hidden; }
.cockpit-left { border-right: 1px solid var(--glass-border); }
.cockpit-right { border-left: 1px solid var(--glass-border); }
.panel-header { padding: 0.45rem 0.6rem; font-family: var(--font-mono); font-size: 0.55rem; color: var(--cyan); letter-spacing: 0.12em; background: var(--secondary); border-bottom: 1px solid var(--glass-border); display: flex; align-items: center; gap: 0.4rem; }
.panel-icon { font-size: 0.5rem; opacity: 0.6; }
.panel-count { margin-left: auto; background: rgba(45,212,191,0.15); color: var(--teal); padding: 0.05rem 0.35rem; border-radius: 0.2rem; font-size: 0.5rem; }
.panel-scroll { flex: 1; overflow-y: auto; padding: 0.35rem; }

/* ── Viewscreen (center chat) ── */
.cockpit-viewscreen { display: flex; flex-direction: column; background: var(--void); position: relative; }
.viewscreen-header { padding: 0.35rem 0.75rem; font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-secondary); letter-spacing: 0.08em; border-bottom: 1px solid var(--glass-border); display: flex; align-items: center; gap: 0.5rem; }
.viewscreen-messages { flex: 1; overflow-y: auto; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.6rem; }

/* ── Command Console ── */
.cockpit-console { display: flex; align-items: stretch; gap: 0; border-top: 1px solid var(--glass-border); background: var(--secondary); }
.console-controls { display: flex; flex-direction: row; gap: 0; border-right: 1px solid var(--glass-border); }
.console-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; padding: 0.5rem 0.65rem; background: transparent; border: none; cursor: pointer; color: var(--text-dim); transition: all 0.2s; min-width: 52px; min-height: 48px; border-right: 1px solid rgba(255,255,255,0.04); }
.console-btn:hover { background: var(--surface-hover); color: var(--cyan); }
.console-btn.active { color: var(--teal); }
.console-btn.recording { color: var(--rose); background: rgba(251,113,133,0.08); animation: pulse 1.2s infinite; }
.console-icon { font-size: 1.1rem; }
.console-label { font-family: var(--font-mono); font-size: 0.45rem; letter-spacing: 0.08em; text-transform: uppercase; }
.console-input-wrap { flex: 1; display: flex; align-items: center; }
.console-input { border: none; border-radius: 0; background: transparent; font-size: 0.85rem; padding: 0.75rem; min-height: 48px; }
.console-input:focus { box-shadow: none; }
.console-send { border-radius: 0; min-height: 48px; padding: 0.5rem 1.2rem; font-size: 0.75rem; display: flex; align-items: center; gap: 0.3rem; }
.send-label { font-family: var(--font-mono); letter-spacing: 0.1em; font-size: 0.6rem; }

/* ── Voice Activity ── */
.voice-activity { border-top: 1px solid var(--glass-border); }
.voice-waveform { height: 20px; margin-top: 0.4rem; background: var(--glass-border); border-radius: 0.25rem; position: relative; overflow: hidden; }
.voice-waveform::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(34,211,238,0.15) 3px, rgba(34,211,238,0.15) 4px); }
.voice-waveform.speaking { animation: waveformPulse 0.5s ease infinite alternate; }
@keyframes waveformPulse { from { background: rgba(34,211,238,0.05); } to { background: rgba(34,211,238,0.15); } }
.voice-waveform.speaking::after { animation: waveformBars 0.3s ease infinite alternate; }
@keyframes waveformBars { from { opacity: 0.5; } to { opacity: 1; } }

/* ── Cockpit Mobile ── */
@media (max-width: 768px) {
  .cockpit { height: calc(100vh - 140px); height: calc(100dvh - 140px); }
  .cockpit-grid { grid-template-columns: 1fr; }
  .cockpit-left, .cockpit-right { display: none; }
  .cockpit-hud { gap: 0.4rem; padding: 0.25rem 0.5rem; overflow-x: auto; flex-wrap: nowrap; }
  .hud-group { flex-shrink: 0; }
  .console-btn { min-width: 44px; padding: 0.4rem; }
  .console-label { display: none; }
  .send-label { display: none; }
}

/* ═══ Manifesto Modal ═══ */
.manifesto-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.80); z-index: 9998; display: none; align-items: center; justify-content: center; backdrop-filter: blur(8px); }
.manifesto-overlay.show { display: flex; animation: fadeIn 0.3s ease; }
.manifesto-modal { background: var(--glass-bg); border: 1px solid rgba(192,132,252,0.3); border-radius: 1rem; padding: 3rem 4rem; width: 800px; max-width: 90vw; max-height: 85vh; text-align: left; backdrop-filter: blur(24px); box-shadow: 0 0 60px rgba(192,132,252,0.1); position: relative; overflow-y: auto; }
.manifesto-modal h2 { font-size: 1.5rem; letter-spacing: 0.1em; color: var(--purple); margin-bottom: 2rem; font-family: 'Inter', sans-serif; font-weight: 800; background: linear-gradient(135deg, #c084fc, #22d3ee); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.manifesto-content { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; font-family: 'Inter', sans-serif; }
.manifesto-content p { margin-bottom: 1.25rem; }
.manifesto-content strong { color: var(--text-primary); font-weight: 600; }
.manifesto-close { position: absolute; top: 1.5rem; right: 1.5rem; color: var(--text-dim); cursor: pointer; font-size: 1.8rem; background: none; border: none; line-height: 1; transition: color 0.2s; }
.manifesto-close:hover { color: var(--rose); }
.manifesto-modal::-webkit-scrollbar { width: 4px; }
.manifesto-modal::-webkit-scrollbar-thumb { background: rgba(192,132,252,0.3); border-radius: 4px; }

/* ═══ Markdown Rendering ═══ */
.md-content { line-height: 1.7; }
.md-content p, .md-p { margin-bottom: 0.5rem; }
.md-h2 { font-size: 1.1rem; font-weight: 700; color: var(--cyan); margin: 0.8rem 0 0.4rem; }
.md-h3 { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin: 0.6rem 0 0.3rem; }
.md-h4 { font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin: 0.5rem 0 0.3rem; }
.md-code-wrap { margin: 0.6rem 0; border-radius: 0.5rem; overflow: hidden; border: 1px solid var(--glass-border); }
.md-code-header { display: flex; justify-content: space-between; align-items: center; padding: 0.3rem 0.6rem; background: var(--tertiary); font-size: 0.6rem; font-family: var(--font-mono); }
.md-code-lang { color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.md-copy-btn { background: transparent; border: 1px solid var(--glass-border); color: var(--text-dim); font-family: var(--font-mono); font-size: 0.55rem; padding: 0.15rem 0.4rem; border-radius: 0.2rem; cursor: pointer; transition: all 0.15s; }
.md-copy-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.md-code { margin: 0; padding: 0.75rem; background: var(--secondary); overflow-x: auto; font-size: 0.78rem; line-height: 1.5; color: var(--text-primary); }
.md-code code { font-family: var(--font-mono); }
.md-inline-code { background: var(--tertiary); border: 1px solid var(--glass-border); padding: 0.1rem 0.35rem; border-radius: 0.25rem; font-family: var(--font-mono); font-size: 0.8em; color: var(--cyan); }
.md-ul, .md-ol { padding-left: 1.2rem; margin: 0.4rem 0; }
.md-li, .md-oli { margin-bottom: 0.25rem; color: var(--text-secondary); }
.md-table { width: 100%; border-collapse: collapse; margin: 0.6rem 0; font-size: 0.78rem; }
.md-table th { background: var(--tertiary); color: var(--cyan); font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.4rem 0.6rem; text-align: left; border-bottom: 1px solid var(--glass-border); }
.md-table td { padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--glass-border); color: var(--text-secondary); }
.md-link { color: var(--cyan); text-decoration: underline; text-underline-offset: 2px; }
.md-link:hover { color: var(--teal); }

/* ═══ Proof Certificate ═══ */
.md-cert { margin-top: 0.5rem; }
.md-cert summary { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-dim); cursor: pointer; padding: 0.25rem 0; transition: color 0.15s; user-select: none; }
.md-cert summary:hover { color: var(--cyan); }
.md-cert-body { display: grid; gap: 0.2rem; margin-top: 0.3rem; padding: 0.5rem; background: var(--secondary); border: 1px solid var(--glass-border); border-radius: 0.4rem; font-family: var(--font-mono); font-size: 0.58rem; }
.md-cert-body > div { display: flex; justify-content: space-between; align-items: center; padding: 0.1rem 0; }
.md-cert-label { color: var(--text-dim); }
.md-cert-val { color: var(--text-secondary); font-weight: 500; }

