/* ═══════════════════════════════════════════════════════════════
   TBOTE PROJECT — Editorial Investigative Design
   Aesthetic: ProPublica meets The Intercept
   High-contrast documentary gravitas, precision typography
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* Palette — ink & parchment with red evidence markers */
  --ink: #0d0d0d;
  --ink-90: #1a1a1a;
  --ink-80: #2d2d2d;
  --ink-60: #525252;
  --ink-40: #7a7a7a;
  --ink-20: #b0b0b0;
  --ink-10: #d4d4d4;
  --ink-05: #ededed;
  --ink-02: #f7f7f6;
  --parchment: #fcfcfb;
  --white: #ffffff;
  --evidence: #c22d2d;
  --evidence-dark: #a12323;
  --evidence-glow: rgba(194, 45, 45, 0.08);
  --evidence-glow-strong: rgba(194, 45, 45, 0.15);
  --alert-amber: #c77d1a;
  --alert-amber-bg: rgba(199, 125, 26, 0.06);
  --info-blue: #2563eb;
  --info-blue-bg: rgba(37, 99, 235, 0.05);

  /* Typography */
  --font-display: 'Libre Baskerville', 'Georgia', serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'DM Mono', 'Consolas', monospace;

  /* Spacing scale (modular, 4px base) */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem;
  --s5: 1.25rem; --s6: 1.5rem; --s8: 2rem; --s10: 2.5rem;
  --s12: 3rem; --s16: 4rem; --s20: 5rem; --s24: 6rem;

  /* Layout */
  --measure: 68ch;
  --page-max: 1180px;
  --page-wide: 1400px;
  --nav-h: 56px;
  --radius: 4px;
  --radius-lg: 8px;

  /* Shadows — layered for depth */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 4px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 8px rgba(0,0,0,0.04), 0 8px 32px rgba(0,0,0,0.08);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.06);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration: 200ms;
  --duration-slow: 400ms;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-90);
  background: var(--parchment);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--evidence);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--duration) var(--ease-out);
}
a:hover { color: var(--evidence-dark); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--evidence); outline-offset: 3px; border-radius: 2px; }

/* ─── SKIP LINK ─── */
.skip-link {
  position: absolute; top: -100%; left: var(--s4);
  background: var(--evidence); color: #fff;
  padding: var(--s2) var(--s4);
  border-radius: var(--radius); z-index: 9999;
  font-weight: 600; font-size: 0.875rem;
}
.skip-link:focus { top: var(--s4); color: #fff; text-decoration: none; }

/* ─── NAVIGATION ─── */
.nav {
  background: var(--ink);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 3px solid var(--evidence);
}

.nav-inner {
  max-width: var(--page-wide);
  margin: 0 auto;
  padding: 0 var(--s4);
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--nav-h);
}

.nav-brand {
  font-family: var(--font-body);
  font-weight: 700; font-size: 0.95rem;
  color: #fff; text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-brand:hover { color: #fff; text-decoration: none; }
.nav-brand span { color: var(--evidence); font-weight: 300; }

.nav-links {
  display: none; list-style: none; gap: 0;
}

.nav-links a {
  color: rgba(255,255,255,0.65);
  padding: var(--s2) var(--s2);
  font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all var(--duration) var(--ease-out);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-links a:hover {
  color: rgba(255,255,255,0.95);
  text-decoration: none;
  border-bottom-color: var(--evidence);
}
.nav-links a.active {
  color: #fff;
  border-bottom-color: var(--evidence);
}

.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: var(--s2);
}
.nav-toggle span { width: 20px; height: 1.5px; background: #fff; transition: all var(--duration); }

.nav.open .nav-links {
  display: flex; flex-direction: column;
  position: absolute; top: var(--nav-h); left: 0; right: 0;
  background: var(--ink);
  padding: var(--s4) var(--s6) var(--s6);
  border-bottom: 3px solid var(--evidence);
}
.nav.open .nav-links a { padding: var(--s3) 0; border-bottom: none; }

@media (min-width: 768px) {
  .nav-links { display: flex; flex-wrap: wrap; justify-content: center; }
  .nav-toggle { display: none; }
}

/* ─── LAYOUT ─── */
.container { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--s6); }
.container-prose { max-width: var(--measure); margin: 0 auto; padding: 0 var(--s6); }

/* ─── HERO ─── */
.hero {
  background: var(--ink);
  color: #fff;
  padding: var(--s20) 0 var(--s16);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent, transparent 59px, rgba(255,255,255,0.02) 59px, rgba(255,255,255,0.02) 60px),
    repeating-linear-gradient(0deg, transparent, transparent 59px, rgba(255,255,255,0.02) 59px, rgba(255,255,255,0.02) 60px);
  pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex; align-items: center; gap: var(--s2);
  background: var(--evidence);
  color: #fff;
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  padding: var(--s1) var(--s4);
  margin-bottom: var(--s8);
}

.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  max-width: 800px;
  margin-bottom: var(--s6);
  letter-spacing: -0.01em;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: rgba(255,255,255,0.85);
  max-width: 620px;
  line-height: 1.7;
  font-weight: 300;
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.1);
  margin-top: var(--s12);
  max-width: 720px;
}

@media (min-width: 640px) {
  .stats-bar { grid-template-columns: repeat(4, 1fr); }
}

.stat {
  background: var(--ink);
  padding: var(--s6) var(--s5);
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 1.85rem);
  font-weight: 700;
  color: var(--evidence);
  line-height: 1;
  margin-bottom: var(--s1);
}

.stat-label {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

/* ─── SECTIONS ─── */
.section {
  padding: var(--s16) 0;
}

.section-alt {
  background: var(--white);
  border-top: 1px solid var(--ink-05);
  border-bottom: 1px solid var(--ink-05);
}

.section-header {
  margin-bottom: var(--s10);
}

.section-header h1,
.section-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-header h1 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
.section-header h2 { font-size: clamp(1.35rem, 3vw, 1.85rem); }

.section-header p {
  color: var(--ink-60);
  font-size: 1rem;
  max-width: 560px;
  margin-top: var(--s3);
  line-height: 1.7;
}

.section-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--evidence);
  margin-bottom: var(--s3);
  padding-bottom: var(--s1);
  border-bottom: 2px solid var(--evidence);
}

/* ─── CARDS ─── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5);
}

@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--s8) var(--s6);
  box-shadow: var(--shadow-card);
  transition: all var(--duration-slow) var(--ease-out);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--evidence);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.card:hover::before { opacity: 1; }

.card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--s2);
  line-height: 1.35;
  color: var(--ink);
}

.card p {
  color: var(--ink-60);
  font-size: 0.875rem;
  line-height: 1.6;
}

.card-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--evidence);
  background: var(--evidence-glow);
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: var(--s3);
}

.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover { text-decoration: none; color: inherit; }

/* ─── CHANNEL TABS ─── */
.tabs {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-wrap: wrap; gap: 0;
  margin-bottom: var(--s8);
  border-bottom: 1px solid var(--ink-10);
}

.tab-btn {
  white-space: nowrap;
  background: none; border: none;
  padding: var(--s3) var(--s5);
  font-family: var(--font-body);
  font-size: 0.8rem; font-weight: 600;
  color: var(--ink-40);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all var(--duration) var(--ease-out);
  letter-spacing: 0.02em;
}
.tab-btn:hover { color: var(--ink-80); }
.tab-btn.active {
  color: var(--evidence);
  border-bottom-color: var(--evidence);
}

.tab-panel { display: none; }
.tab-panel.active {
  display: block;
  animation: fadeIn var(--duration-slow) var(--ease-out);
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ─── TIMELINE ─── */
.timeline {
  position: relative;
  padding-left: var(--s10);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--evidence), var(--ink-10));
}

.timeline-item {
  position: relative;
  padding-bottom: var(--s8);
  padding-left: var(--s4);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--s10) + 3px);
  top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--evidence);
  box-shadow: 0 0 0 3px var(--parchment), 0 0 0 4px var(--evidence);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--evidence);
  letter-spacing: 0.05em;
  margin-bottom: var(--s1);
}

.timeline-item h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--s1);
  color: var(--ink);
}

.timeline-item p {
  color: var(--ink-60);
  font-size: 0.875rem;
  line-height: 1.65;
}

.timeline-source {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-40);
  margin-top: var(--s2);
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.timeline-source span {
  display: block;
  padding-left: var(--s4);
  position: relative;
}
.timeline-source span::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--evidence);
  opacity: 0.6;
}

@media (min-width: 768px) {
  .timeline { padding-left: 0; max-width: 820px; margin: 0 auto; }
  .timeline::before { left: 50%; }
  .timeline-item { width: 46%; padding-left: 0; }
  .timeline-item:nth-child(odd) { margin-left: 0; text-align: right; padding-right: var(--s8); }
  .timeline-item:nth-child(even) { margin-left: 54%; padding-left: var(--s8); }
  .timeline-item:nth-child(odd)::before { left: auto; right: -5px; }
  .timeline-item:nth-child(even)::before { left: -5px; }
}

/* ─── FINDINGS ─── */
.finding {
  padding: var(--s6);
  background: var(--white);
  border-radius: var(--radius-lg);
  margin-bottom: var(--s4);
  box-shadow: var(--shadow-sm);
  border-left: 3px solid transparent;
  transition: all var(--duration) var(--ease-out);
}

.finding:hover {
  border-left-color: var(--evidence);
  box-shadow: var(--shadow-md);
}

.finding-number {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 30px; height: 30px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.finding-header {
  display: flex;
  align-items: flex-start;
  gap: var(--s4);
  margin-bottom: var(--s2);
}

.finding h3 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
}

.finding p {
  color: var(--ink-60);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-left: calc(30px + var(--s4));
}

.finding-source {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-40);
  margin-left: calc(30px + var(--s4));
  margin-top: var(--s2);
  padding-top: var(--s2);
  border-top: 1px solid var(--ink-05);
}
.finding-source a {
  color: var(--evidence);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
  transition: color var(--duration) var(--ease-out);
}
.finding-source a:hover {
  color: var(--evidence-dark);
  text-decoration: none;
  border-bottom-style: solid;
}

/* Filter bar */
.filter-bar {
  display: flex; flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s8);
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 600;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--ink-10);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-60);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  letter-spacing: 0.02em;
}
.filter-btn:hover { border-color: var(--ink-20); color: var(--ink-80); }
.filter-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* ─── PROSE ─── */
.prose {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-80);
}

.prose h1 {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700;
  margin: var(--s12) 0 var(--s4);
  color: var(--ink);
  line-height: 1.25;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 700;
  margin: var(--s12) 0 var(--s4);
  color: var(--ink);
  line-height: 1.3;
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--ink-05);
}

.prose h3 {
  font-family: var(--font-body);
  font-size: 1.1rem; font-weight: 700;
  margin: var(--s8) 0 var(--s3);
  color: var(--ink);
}

.prose h4 {
  font-family: var(--font-body);
  font-size: 0.95rem; font-weight: 700;
  margin: var(--s6) 0 var(--s2);
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prose p { margin-bottom: var(--s5); }
.prose strong { color: var(--ink); font-weight: 700; }

.prose ul, .prose ol {
  margin-bottom: var(--s5);
  padding-left: var(--s6);
}
.prose li {
  margin-bottom: var(--s2);
  padding-left: var(--s2);
}
.prose li::marker { color: var(--evidence); }

.prose blockquote {
  border-left: 3px solid var(--evidence);
  padding: var(--s5) var(--s6);
  margin: var(--s6) 0;
  background: var(--evidence-glow);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-style: italic;
  color: var(--ink-80);
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--ink-02);
  padding: 2px 7px;
  border-radius: 3px;
  border: 1px solid var(--ink-05);
  color: var(--ink-80);
}

.prose pre {
  background: #0d0d0d;
  color: #d4d4d4;
  padding: var(--s6);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: var(--s6) 0;
  font-size: 0.85rem;
  line-height: 1.6;
}
.prose pre code {
  background: none; border: none; padding: 0;
  color: inherit;
}
/* Never let .prose override terminal backgrounds */
.prose .term__body,
.prose .term__pre,
.prose .term pre {
  background: #1c1c28;
  color: #e4e4e4;
}

.prose table {
  width: 100%; border-collapse: collapse;
  margin: var(--s8) 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
}
.prose th, .prose td {
  padding: var(--s3) var(--s4);
  text-align: left;
  border-bottom: 1px solid var(--ink-05);
}
.prose th {
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--ink-10);
}
.prose tr:hover td { background: var(--ink-02); }

.prose img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin: var(--s8) 0;
}

/* ─── CALLOUT BOXES ─── */
.callout {
  padding: var(--s5) var(--s6);
  border-radius: var(--radius-lg);
  margin: var(--s6) 0;
  display: flex; gap: var(--s4);
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.6;
}

.callout::before {
  content: '';
  width: 20px; height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.callout-warning {
  background: var(--alert-amber-bg);
  border: 1px solid rgba(199, 125, 26, 0.2);
}
.callout-warning::before {
  background: var(--alert-amber);
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L1 21h22L12 2zm0 4l7.53 13H4.47L12 6zm-1 5v4h2v-4h-2zm0 6v2h2v-2h-2z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='currentColor' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L1 21h22L12 2zm0 4l7.53 13H4.47L12 6zm-1 5v4h2v-4h-2zm0 6v2h2v-2h-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.callout-info {
  background: var(--info-blue-bg);
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.callout-danger {
  background: var(--evidence-glow);
  border: 1px solid rgba(194, 45, 45, 0.2);
}

/* ─── FOOTER ─── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
  padding: var(--s10) 0;
  margin-top: auto;
  font-size: 0.8rem;
  border-top: 3px solid var(--evidence);
}

.footer a { color: rgba(255,255,255,0.85); }
.footer a:hover { color: #fff; }

.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--s6);
  display: flex; flex-direction: column;
  gap: var(--s4);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ─── UTILITIES ─── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.text-center { text-align: center; }
.text-muted { color: var(--ink-60); }
.mt-lg { margin-top: var(--s6); }
.mt-xl { margin-top: var(--s8); }
.mb-lg { margin-bottom: var(--s6); }
.mb-xl { margin-bottom: var(--s8); }

/* ─── DARK THEME (always applied) ─── */
:root {
  --ink: #e8e8e8;
  --ink-90: #d5d5d5;
  --ink-80: #bfbfbf;
  --ink-60: #9a9a9a;
  --ink-40: #777;
  --ink-20: #4a4a4a;
  --ink-10: #333;
  --ink-05: #252525;
  --ink-02: #1c1c1c;
  --parchment: #111111;
  --white: #1a1a1a;
  --evidence: #e85454;
  --evidence-dark: #f47070;
  --evidence-glow: rgba(232, 84, 84, 0.12);
  --evidence-glow-strong: rgba(232, 84, 84, 0.2);
  --alert-amber-bg: rgba(199, 125, 26, 0.12);
  --info-blue-bg: rgba(37, 99, 235, 0.12);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 2px 10px rgba(0,0,0,0.5);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.6);
  --shadow-card: 0 0 0 1px rgba(255,255,255,0.08), 0 1px 4px rgba(0,0,0,0.3);
  --shadow-card-hover: 0 0 0 1px rgba(255,255,255,0.14), 0 4px 20px rgba(0,0,0,0.5);
}

/* Nav legibility */
.nav { background: #050505; border-bottom-color: var(--evidence); }
.nav-brand { color: #fff; }
.nav-links a { color: rgba(255,255,255,0.8); }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }

/* Cards need visible borders in dark */
.card {
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
}
.card:hover {
  border-color: var(--evidence);
}
.card h3 { color: #e0e0e0; }
.card p { color: #999; }
.card-tag {
  background: rgba(232, 84, 84, 0.15);
  color: var(--evidence);
}

/* Tabs */
.tab-btn { color: #888; }
.tab-btn:hover { color: #ccc; }
.tab-btn.active { color: var(--evidence); }

/* Tab panel prose */
.tab-panel .prose { color: #bbb; }
.tab-panel .prose strong { color: #e0e0e0; }
.tab-panel .prose h3 { color: #ddd; }

/* Findings */
.finding {
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
}
.finding:hover {
  border-left-color: var(--evidence);
  border-color: var(--evidence);
}
.finding h3 { color: #ddd; }
.finding p { color: #999; }
.finding-number {
  background: var(--evidence);
  color: #fff;
}
.finding-source { color: #777; border-top-color: #2e2e2e; }

/* Filter buttons */
.filter-btn {
  background: #1e1e1e;
  border-color: #333;
  color: #999;
}
.filter-btn:hover { border-color: #555; color: #ccc; }
.filter-btn.active {
  background: var(--evidence);
  color: #fff;
  border-color: var(--evidence);
}

/* Stats bar */
.stat { background: #0a0a0a; }
.stat-value { color: var(--evidence); }
.stat-label { color: rgba(255,255,255,0.5); }

/* Hero */
.hero { background: #020202; }
.hero h1 { color: #ffffff; }
.hero-subtitle { color: rgba(255,255,255,0.75); }
.hero-badge { background: var(--evidence); color: #fff; }

/* Sections */
.section-alt {
  background: #141414;
  border-color: #252525;
}
.section-header h1,
.section-header h2 { color: #f0f0f0; }
.section-header p { color: #aaa; }
.section-label { color: var(--evidence); border-bottom-color: var(--evidence); }

/* Prose */
.prose { color: #ccc; }
.prose h1, .prose h2, .prose h3 { color: #f0f0f0; }
.prose strong { color: #f0f0f0; }
.prose blockquote { background: rgba(232, 84, 84, 0.08); color: #aaa; }
.prose code { background: #1a1a2e; border-color: #2a2a3e; color: #e4e4e4; }
.prose pre { background: #1c1c28; color: #e4e4e4; }
.prose th { color: #ddd; border-bottom-color: #333; }
.prose td { border-bottom-color: #252525; }
.prose tr:hover td { background: #1e1e1e; }
/* Never override terminal dark bg */
.prose .term__body { background: #1c1c28; }
.prose .term__pre { background: transparent; color: #e4e4e4; }

/* Footer */
.footer { background: #0a0a0a; }

/* Timeline */
.timeline::before { background: linear-gradient(180deg, var(--evidence), #333); }
.timeline-item p { color: #999; }
.timeline-item h3 { color: #ddd; }
.timeline-source { color: #666; }
.timeline-source span::before { color: var(--evidence); }
.nav.open .nav-links { background: #050505; }


/* ─── VERIFY BLOCKS ─── */
details.verify {
  margin: var(--s4) 0;
  border: 1px solid #333;
  border-radius: var(--radius-lg);
  background: #141414;
  overflow: hidden;
}
details.verify summary {
  padding: var(--s3) var(--s5);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--evidence);
  cursor: pointer;
  letter-spacing: 0.04em;
  user-select: none;
  list-style: none;
}
details.verify summary::-webkit-details-marker { display: none; }
details.verify summary::before {
  content: '\25B6\00a0';
  font-size: 0.6em;
  vertical-align: middle;
}
details[open].verify summary::before {
  content: '\25BC\00a0';
}
details.verify summary:hover {
  background: rgba(232, 84, 84, 0.06);
}
details.verify pre {
  margin: 0;
  padding: var(--s4) var(--s5);
  border-top: 1px solid #252525;
  background: #0d0d0d;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  color: #bbb;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border-radius: 0;
}
details.verify pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
details.verify .verify-note {
  padding: var(--s2) var(--s5);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #666;
  border-top: 1px solid #1e1e1e;
}
details.verify .verify-note a {
  color: var(--evidence);
  opacity: 0.7;
}
details.verify .verify-note a:hover {
  opacity: 1;
}

/* ═══ VERIFY PAGE (/verify/) ═══ */

.vf-hero {
  padding: var(--s16) 0 var(--s12);
  border-bottom: 1px solid #1e1e1e;
  position: relative;
  overflow: hidden;
}
.vf-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(232,84,84,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,84,84,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}
.vf-hero .container { position: relative; z-index: 1; }
.vf-hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: var(--s6);
}
.vf-hero h1 span {
  display: block;
  font-size: 0.3em;
  color: var(--evidence);
  letter-spacing: 0.2em;
  margin-top: var(--s2);
  font-weight: 400;
}
.vf-tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: #999;
  font-style: italic;
  margin-bottom: var(--s8);
  max-width: 520px;
}
.vf-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4) var(--s8);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #666;
  letter-spacing: 0.04em;
  padding-top: var(--s6);
  border-top: 1px solid #1e1e1e;
}
.vf-meta dt { color: #555; text-transform: uppercase; font-size: 0.6rem; letter-spacing: 0.1em; }
.vf-meta dd { color: #aaa; margin: 2px 0 0; }
.vf-meta .val-green { color: #4ade80; }

/* ─── Verify Intro ─── */
.vf-intro {
  padding: var(--s10) 0;
  border-bottom: 1px solid #1e1e1e;
}
.vf-intro p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.75;
  color: #888;
  max-width: 680px;
}
.vf-intro code {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.82em;
  color: #bbb;
}
.vf-intro .vf-warn {
  margin-top: var(--s6);
  padding: var(--s3) var(--s5);
  border-left: 2px solid var(--evidence);
  background: rgba(232, 84, 84, 0.04);
  color: #999;
  font-size: 0.78rem;
}

/* ─── Verify Entries ─── */
.vf-entries { padding: var(--s10) 0; }

/* Visible by default; JS adds .js to <html> to enable scroll reveal */
.vf-entry {
  padding: var(--s10) 0;
  border-bottom: 1px solid #1a1a1a;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.js .vf-entry {
  opacity: 0;
  transform: translateY(12px);
}
.js .vf-entry.visible,
.vf-entry.visible {
  opacity: 1;
  transform: none;
}
.vf-entry:last-child { border-bottom: none; }

.vf-entry-header {
  display: flex;
  align-items: flex-start;
  gap: var(--s5);
  margin-bottom: var(--s5);
}
.vf-exhibit {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--evidence);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  clip-path: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}
.vf-entry-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #e8e8e8;
  line-height: 1.3;
  margin: 0;
}
.vf-entry-ref {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #555;
  margin-top: 4px;
  letter-spacing: 0.04em;
}
.vf-entry-ref a {
  color: var(--evidence);
  opacity: 0.7;
  text-decoration: none;
  border-bottom: 1px dotted var(--evidence);
}
.vf-entry-ref a:hover { opacity: 1; }

.vf-claim {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: #999;
  margin-bottom: var(--s6);
  padding-left: calc(44px + var(--s5));
}

/* ─── Verify Terminal ─── */
.vf-terminal {
  background: #0a0a0a;
  border: 1px solid #252525;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: var(--s4);
}
.vf-terminal-bar {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #151515;
  border-bottom: 1px solid #252525;
  gap: 6px;
}
.vf-terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2a2a2a;
}
.vf-terminal-label {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #444;
  text-align: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.vf-copy {
  background: none;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #666;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.2s;
}
.vf-copy:hover {
  border-color: var(--evidence);
  color: var(--evidence);
}
.vf-copy.copied {
  border-color: #4ade80;
  color: #4ade80;
}
.vf-terminal pre {
  margin: 0;
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.65;
  color: #bbb;
  overflow-x: auto;
  background: transparent;
  border-radius: 0;
}
.vf-terminal pre .prompt { color: #f59e0b; }
.vf-terminal pre .comment { color: #555; }

/* ─── Verify Expected Output ─── */
.vf-output {
  background: rgba(34, 197, 94, 0.04);
  border: 1px solid rgba(34, 197, 94, 0.1);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: var(--s4);
}
.vf-output-label {
  display: block;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.04);
  border-bottom: 1px solid rgba(34, 197, 94, 0.08);
}
.vf-output pre {
  margin: 0;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(34, 197, 94, 0.75);
  overflow-x: auto;
  background: transparent;
  border-radius: 0;
}

/* ─── Verify Source ─── */
.vf-source {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #444;
  letter-spacing: 0.02em;
}
.vf-source a {
  color: var(--evidence);
  opacity: 0.6;
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.vf-source a:hover { opacity: 1; }

/* ─── Verify Notes ─── */
.vf-notes {
  padding: var(--s10) 0;
  border-top: 1px solid #1e1e1e;
}
.vf-notes h2 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #666;
  margin-bottom: var(--s6);
}
.vf-notes p,
.vf-notes li {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: #777;
}
.vf-notes ul {
  list-style: none;
  padding: 0;
}
.vf-notes li {
  padding-left: var(--s5);
  position: relative;
  margin-bottom: var(--s2);
}
.vf-notes li::before {
  content: '\203A';
  position: absolute;
  left: 0;
  color: var(--evidence);
  opacity: 0.5;
}

/* ─── Verify Responsive ─── */
@media (max-width: 640px) {
  .vf-claim { padding-left: 0; }
  .vf-entry-header { gap: var(--s3); }
  .vf-exhibit { width: 36px; height: 36px; font-size: 0.65rem; }
  .vf-meta { gap: var(--s3) var(--s6); }
}

/* ─── DONATE NAV BUTTON ─── */
.nav-links .nav-donate {
  color: #fff !important;
  background: var(--evidence);
  padding: 5px 14px !important;
  border-radius: 4px;
  border-bottom: none !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
}
.nav-links .nav-donate:hover {
  background: #ff4444;
  color: #fff !important;
  text-decoration: none;
  transform: translateY(-1px);
  border-bottom: none !important;
}
.nav-links .nav-donate .nav-donate-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ─── DONATE PAGE ─── */
.donate-qr-section {
  display: flex;
  align-items: flex-start;
  gap: var(--s8);
  margin: var(--s6) 0;
  flex-wrap: wrap;
}
.donate-qr {
  flex-shrink: 0;
  width: 180px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.donate-qr a {
  display: block;
  line-height: 0;
}
.donate-qr img {
  width: 160px;
  height: 160px;
  display: block;
  border-radius: 2px;
}
.donate-address-wrap {
  flex: 1;
  min-width: 280px;
}

/* Copy button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid #333;
  border-radius: 4px;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #888;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.2s;
  margin-top: var(--s3);
}
.copy-btn:hover {
  border-color: var(--evidence);
  color: var(--evidence);
}
.copy-btn.copied {
  border-color: #4ade80;
  color: #4ade80;
}

/* Donation tiers */
.donate-tiers {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s4);
  margin: var(--s8) 0;
}
@media (min-width: 640px) {
  .donate-tiers { grid-template-columns: repeat(3, 1fr); }
}
.donate-tier {
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
  border-radius: var(--radius-lg);
  padding: var(--s6);
  text-align: center;
  transition: all var(--duration) var(--ease-out);
  position: relative;
}
.donate-tier:hover {
  border-color: var(--evidence);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(232, 84, 84, 0.15);
}
.donate-tier-amount {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--evidence);
  margin-bottom: var(--s1);
  line-height: 1.2;
}
.donate-tier-usd {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--s2);
}
.donate-tier-unit {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--s3);
}
.donate-tier-desc {
  font-size: 0.82rem;
  color: #999;
  line-height: 1.55;
}

/* Quick donate prominent box */
.donate-quick {
  background: linear-gradient(135deg, #1a0f0f 0%, #1a1a1a 100%);
  border: 2px solid var(--evidence);
  border-radius: var(--radius-lg);
  padding: var(--s8);
  margin: var(--s8) 0;
  text-align: center;
}
.donate-quick h2 {
  font-family: var(--font-display);
  color: #fff;
  font-size: 1.3rem;
  margin: 0 0 var(--s2);
}
.donate-quick p {
  color: rgba(255,255,255,0.65);
  font-size: 0.88rem;
  margin: 0 0 var(--s6);
}
.donate-quick .donate-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--evidence);
  color: #fff;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.donate-quick .donate-quick-btn:hover {
  background: #e83c3c;
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}
.donate-quick .donate-quick-sub {
  display: block;
  margin-top: var(--s3);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
}

/* Mid-content donate callout for investigation pages */
.sf-donate-callout {
  background: linear-gradient(135deg, #1a0f0f 0%, #151515 100%);
  border: 1px solid rgba(194,45,45,0.4);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
  margin: 2.5rem 0;
  text-align: center;
}
.sf-donate-callout h3 {
  font-family: var(--font-display) !important;
  font-size: 1.1rem !important;
  color: #fff !important;
  margin: 0 0 0.5rem !important;
}
.sf-donate-callout p {
  color: rgba(255,255,255,0.6) !important;
  font-size: 0.85rem !important;
  margin: 0 0 1rem !important;
  max-width: 36rem;
  margin-inline: auto !important;
}
.sf-donate-callout .sf-donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--evidence);
  color: #fff;
  padding: 10px 24px;
  border-radius: 5px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.sf-donate-callout .sf-donate-btn:hover {
  background: #e83c3c;
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}
.sf-donate-callout .sf-donate-methods {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.3);
}
.sf-donate-callout .sf-donate-methods img {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

/* Inline donation CTA */
.inline-donate-cta {
  background: #1a0a0a;
  border: 1px solid rgba(232, 84, 84, 0.25);
  border-radius: var(--radius-lg);
  padding: var(--s6) var(--s8);
  margin: var(--s10) 0;
  display: flex;
  align-items: center;
  gap: var(--s5);
  flex-wrap: wrap;
}
.inline-donate-cta .cta-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.inline-donate-cta .cta-text {
  flex: 1;
  min-width: 200px;
}
.inline-donate-cta .cta-text p {
  color: rgba(255,255,255,0.8);
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0;
}
.inline-donate-cta .cta-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--evidence);
  color: #fff;
  padding: 8px 20px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background var(--duration), transform var(--duration);
  white-space: nowrap;
}
.inline-donate-cta .cta-link:hover {
  background: #ff4444;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* ─── FINDINGS POPUP ─── */
.findings-popup {
  position: fixed;
  bottom: var(--s6);
  right: var(--s6);
  z-index: 1000;
  max-width: 340px;
  width: calc(100% - 2rem);
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
  border-top: 3px solid var(--evidence);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  padding: var(--s6);
  font-family: var(--font-body);
  animation: popupSlideIn 0.4s ease-out;
}

@keyframes popupSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.findings-popup.popup-closing {
  animation: popupSlideOut 0.25s ease-in forwards;
}

@keyframes popupSlideOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(20px); }
}

.findings-popup-close {
  position: absolute;
  top: var(--s3);
  right: var(--s3);
  background: none;
  border: none;
  color: #888;
  font-size: 1.2rem;
  cursor: pointer;
  padding: var(--s1) var(--s2);
  line-height: 1;
}

.findings-popup-close:hover {
  color: #e0e0e0;
}

.findings-popup-tag {
  display: inline-block;
  color: var(--evidence);
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(232, 84, 84, 0.15);
  padding: 2px 6px;
  border-radius: 2px;
  margin-bottom: var(--s3);
}

.findings-popup-text {
  color: #e0e0e0;
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 var(--s5) 0;
}

.findings-popup-links {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.findings-popup-links a {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: var(--s2) var(--s3);
  border-radius: var(--radius);
  transition: background 0.15s;
  text-align: center;
}

.findings-popup-links a:first-child {
  background: var(--evidence);
  color: #fff;
}

.findings-popup-links a:first-child:hover {
  background: #e03535;
}

.findings-popup-links a:last-child {
  background: #292929;
  border: 1px solid #3a3a3a;
  color: #ccc;
}

.findings-popup-links a:last-child:hover {
  background: #333;
  border-color: #4a4a4a;
  color: #e0e0e0;
}

@media (max-width: 480px) {
  .findings-popup {
    bottom: var(--s3);
    right: var(--s3);
    left: var(--s3);
    width: auto;
    max-width: none;
  }
}

@media print {
  .findings-popup { display: none; }
}

/* ═══ GUIDES — ported from sami3, colors adapted to tboteproject ═══ */

/*
 * Color mapping (sami3 → tboteproject):
 *   --color-bg: #0a0a0a          → var(--parchment)  (#111111)
 *   --color-bg-raised: #111111   → #161616
 *   --color-bg-surface: #1a1a1a  → #1e1e1e
 *   --color-border: #2a2a2a      → #2a2a2a (same)
 *   --color-border-strong: #3a3a3a → #3a3a3a (same)
 *   --color-text: #e8e4df        → #e8e8e8
 *   --color-text-muted: #999891  → #999
 *   --color-text-faint: #666660  → #666
 *   --color-accent: #d4a017      → var(--evidence) (#e85454)
 *   --color-accent-hover: #e0b030 → #f47070
 *   --color-confidence-high: #4a9 → #4a9
 *   --font-heading: Zilla Slab   → var(--font-display) (Libre Baskerville)
 *   --font-body: Source Sans 3   → var(--font-body) (DM Sans)
 *   --font-mono: JetBrains Mono  → var(--font-mono) (DM Mono)
 */

/* ─── Guide Hero ─── */
.guide-hero { padding: var(--s16) 0 var(--s12); }

/* ─── Guide Listing ─── */
.guide-section { margin-bottom: 3rem; }
.guide-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700; color: #e8e8e8; margin-bottom: 0.5rem;
}

.guide-grid {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 640px) { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .guide-grid { grid-template-columns: repeat(3, 1fr); } }

/* ─── Guide Cards ─── */
.guide-card {
  background: #161616; border: 1px solid #2a2a2a; border-radius: 4px;
  padding: 1.5rem; transition: all 200ms ease; position: relative;
  display: flex; flex-direction: column; height: 100%;
}
.guide-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--evidence); border-radius: 4px 4px 0 0; opacity: 0; transition: opacity 200ms ease;
}
.guide-card:hover { border-color: var(--evidence); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.guide-card:hover::before { opacity: 1; }
.guide-card__meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.guide-card__title {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  color: #e8e8e8; line-height: 1.35; margin-bottom: 0.5rem;
}
.card-link:hover .guide-card__title { color: var(--evidence); }
.guide-card__summary { color: #999; font-size: 0.875rem; line-height: 1.6; flex: 1; }
.guide-card__footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid #2a2a2a;
  font-family: var(--font-mono); font-size: 0.75rem; color: #666; letter-spacing: 0.02em;
}
.guide-card__reading-time { color: var(--evidence); opacity: 0.7; }

/* ─── Guide Badges (sami3 badge style) ─── */
.guide-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.15em 0.5em; border-radius: 2px;
  border: 1px solid #3a3a3a; color: #999; background: transparent;
}
.guide-badge--guide { color: #4a9; border-color: #4a9; background: rgba(68, 170, 153, 0.1); }
.guide-badge--article { color: var(--evidence); border-color: var(--evidence); background: rgba(232, 84, 84, 0.1); }
.guide-badge--reference { color: #f59e0b; border-color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.guide-badge--featured { color: var(--evidence); border-color: var(--evidence); background: rgba(232, 84, 84, 0.1); }
.guide-badge--beginner { color: #4a9; border-color: #4a9; background: rgba(68, 170, 153, 0.08); }
.guide-badge--intermediate { color: #d4a017; border-color: #d4a017; background: rgba(212, 160, 23, 0.08); }
.guide-badge--advanced { color: #a44; border-color: #a44; background: rgba(170, 68, 68, 0.08); }

/* ─── Guide Featured Card ─── */
.guide-featured {
  background: #161616; border: 1px solid var(--evidence); border-radius: 4px;
  padding: 2rem 1.5rem; margin-bottom: 2.5rem; position: relative;
}
.guide-featured::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--evidence); border-radius: 4px 4px 0 0;
}
.guide-featured__meta { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.guide-featured__title {
  font-family: var(--font-display); font-size: clamp(1.2rem, 3vw, 1.5rem);
  font-weight: 700; color: #e8e8e8; margin-bottom: 0.75rem; line-height: 1.3;
}
.guide-featured__title a { color: inherit; }
.guide-featured__title a:hover { color: var(--evidence); text-decoration: none; }
.guide-featured__summary { color: #999; font-size: 1rem; line-height: 1.8; margin-bottom: 1.5rem; max-width: 60ch; }

/* ═══ GUIDE ARTICLE PAGE ═══ */

.guide-article { padding: 3rem 0 4rem; }

.guide-layout {
  max-width: 1400px; margin: 0 auto; padding: 0 1rem;
  display: grid; grid-template-columns: 1fr; gap: 2rem;
}
.guide-layout:not(.guide-layout--has-toc) .guide-article__body {
  max-width: 72ch; margin: 0 auto;
}

@media (min-width: 1024px) {
  .guide-layout { padding: 0 1rem; }
  .guide-layout--has-toc {
    grid-template-columns: 220px 1fr;
    gap: 2rem;
  }
}

.guide-article__body { min-width: 0; }

/* ─── Article Header ─── */
.guide-article__header {
  margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid #2a2a2a;
}
.guide-article__meta {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-bottom: 1rem;
}
.guide-article__header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  font-weight: 700; color: #e8e8e8; line-height: 1.2; margin-bottom: 1.5rem;
}
.guide-dateline {
  display: flex; align-items: center; gap: 1rem;
  font-size: 0.875rem; color: #999;
}
.guide-reading-time { color: #666; }
.guide-article__lead {
  font-size: 1.25rem; color: #999; max-width: 60ch;
  margin-top: 1rem; line-height: 1.8;
}

/* ═══ GUIDE PROSE — mirrors sami3 typography exactly ═══ */

.guide-prose {
  max-width: 75ch;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: #ccc;
}

/* Links in prose — underlined with accent, external link icon */
.guide-prose a {
  color: var(--evidence);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 84, 84, 0.3);
  padding-bottom: 1px;
  transition: color 120ms ease, border-color 120ms ease;
}
.guide-prose a:hover {
  color: var(--evidence-dark);
  border-bottom-color: var(--evidence);
  text-decoration: none;
}
.guide-prose a[href^="http"] {
  padding-right: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M9 6.5v3a1 1 0 01-1 1H2.5a1 1 0 01-1-1V4a1 1 0 011-1H5' stroke='%23e85454' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M7 1.5h3.5V5' stroke='%23e85454' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='5.5' y1='6.5' x2='10.5' y2='1.5' stroke='%23e85454' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1px top 50%;
  background-size: 11px;
}
.guide-prose a[href^="/"],
.guide-prose a[href^="#"],
.guide-prose a[href^="."] {
  padding-right: 0; background-image: none;
}

/* Headings */
.guide-prose h2 {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 700; color: #e8e8e8;
  margin-top: 3rem; padding-top: 2rem;
  border-top: 1px solid #2a2a2a;
  margin-bottom: 1rem; line-height: 1.2;
  border-bottom: none;
}
.guide-prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.guide-prose h3 {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700; color: #e8e8e8;
  margin-top: 2rem; margin-bottom: 0.75rem; line-height: 1.2;
}
.guide-prose h4 {
  font-family: var(--font-body);
  font-size: 1.125rem; font-weight: 700; color: #e8e8e8;
  margin-top: 1.5rem; margin-bottom: 0.5rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* Body text */
.guide-prose p { margin-bottom: 1rem; line-height: 1.8; max-width: 72ch; }
.guide-prose strong { color: #e8e8e8; font-weight: 700; }

/* Lists */
.guide-prose ul,
.guide-prose ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.guide-prose ol { list-style: decimal; }
.guide-prose li { margin-bottom: 0.5rem; padding-left: 0.5rem; line-height: 1.6; }
.guide-prose li::marker { color: var(--evidence); }

/* Blockquote */
.guide-prose blockquote {
  border-left: 3px solid var(--evidence);
  padding-left: 1.5rem; margin: 1.5rem 0;
  font-style: italic; color: #999;
}

/* Inline code */
.guide-prose code {
  font-family: var(--font-mono); font-size: 0.9em;
  background: #1a1a1a; padding: 0.15em 0.4em; border-radius: 3px;
  color: #ccc;
}

/* Code blocks */
.guide-prose pre {
  font-family: var(--font-mono);
  font-size: 0.875rem; line-height: 1.6;
  background: #1a1a1a; border: 1px solid #2a2a2a;
  padding: 1rem; overflow-x: auto;
  margin: 1.5rem 0; border-radius: 2px;
  max-width: 90ch;
}
.guide-prose pre code {
  background: none; padding: 0; font-size: inherit; color: #d3d7de;
}

/* Tables — sami3 separated border, accent headers, zebra stripes */
.guide-prose table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 1.5rem 0; font-size: 0.875rem; line-height: 1.5;
  border: 1px solid #3a3a3a; border-radius: 4px; overflow: hidden;
  max-width: none;
}
.guide-prose thead { background: #1a1a1a; }
.guide-prose th {
  padding: 10px 14px; text-align: left;
  font-family: var(--font-body); font-weight: 600;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--evidence); border-bottom: 2px solid #3a3a3a; white-space: nowrap;
}
.guide-prose td {
  padding: 9px 14px; border-bottom: 1px solid #2a2a2a; color: #ccc; vertical-align: top;
}
.guide-prose tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.guide-prose tbody tr:hover td { background: rgba(232, 84, 84, 0.03); }
.guide-prose tbody tr:last-child td { border-bottom: none; }

/* Images */
.guide-prose img { border-radius: 4px; margin: 2rem 0; }

/* Horizontal rule */
.guide-prose hr {
  border: none; border-top: 1px solid #2a2a2a; margin: 3rem 0;
}

/* ─── TOC Sidebar (sami3 layout) ─── */
.guide-toc { order: -1; }

@media (max-width: 1023px) {
  .guide-toc { margin-bottom: 1.5rem; }
  .toc__list { display: none; }
  .toc__list.toc--open { display: block; }
}

@media (min-width: 1024px) {
  .guide-toc { order: 0; }
  .guide-layout--has-toc .toc {
    position: sticky;
    top: calc(var(--nav-h) + 1rem);
    max-height: calc(100vh - var(--nav-h) - 2rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #3a3a3a transparent;
  }
  .guide-layout--has-toc .toc::-webkit-scrollbar { width: 4px; }
  .guide-layout--has-toc .toc::-webkit-scrollbar-track { background: transparent; }
  .guide-layout--has-toc .toc::-webkit-scrollbar-thumb { background: #3a3a3a; border-radius: 2px; }
  .toc__toggle svg { display: none; }
}

.toc { border: 1px solid #2a2a2a; border-radius: 4px; background: #111; }
.toc__toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 0.75rem 1rem; background: none; border: none;
  color: #e8e8e8; font-family: var(--font-display); font-size: 0.75rem; font-weight: 700;
  cursor: pointer; text-transform: uppercase; letter-spacing: 0.08em;
}
.toc__toggle:hover { color: var(--evidence); }
.toc__toggle svg { transition: transform 200ms ease; }
.toc__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

.toc__list { padding: 0 0.75rem 0.75rem; }
@media (min-width: 1024px) { .toc__list { display: block; } }

.toc__list ul { list-style: none; padding: 0; margin: 0; }
.toc__list li { margin-bottom: 0; }
.toc__list a {
  font-size: 12px; line-height: 1.4; color: #999; text-decoration: none;
  display: block; padding: 3px 0 3px 0.75rem;
  border-left: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
}
.toc__list a:hover { color: var(--evidence); border-left-color: var(--evidence); text-decoration: none; }
.toc__list a.active { color: var(--evidence); border-left-color: var(--evidence); }

/* h2-level TOC items */
.toc__list > ul > li > a { font-weight: 600; color: #e8e8e8; padding-top: 5px; padding-bottom: 3px; }
/* h3-level TOC items */
.toc__list .toc-h3 a { font-size: 11px; color: #666; padding-left: 1.5rem; }
.toc__list .toc-h3 a:hover { color: var(--evidence); }

/* ─── Breadcrumb ─── */
.breadcrumb {
  font-family: var(--font-mono); font-size: 0.75rem; color: #666;
  margin-bottom: 1.5rem; letter-spacing: 0.02em;
}
.breadcrumb a { color: #999; text-decoration: none; }
.breadcrumb a:hover { color: var(--evidence); text-decoration: none; }
.breadcrumb__sep { margin: 0 0.5rem; color: #444; }
.breadcrumb__current { color: #ccc; }

/* ─── Guide Related ─── */
.guide-related {
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #2a2a2a;
}
.guide-related h2 {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  color: #e8e8e8; margin-bottom: 1rem;
}
.guide-related ul { list-style: none; padding: 0; }
.guide-related li { padding: 0.5rem 0; border-bottom: 1px solid #2a2a2a; }
.guide-related li:last-child { border-bottom: none; }
.guide-related a { color: #e8e8e8; text-decoration: none; }
.guide-related a:hover { color: var(--evidence); }

/* ─── Filter Bar ─── */
.filter-bar {
  display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2rem;
  padding: 1.25rem 1.5rem; background: #111; border: 1px solid #2a2a2a; border-radius: 4px;
}
@media (min-width: 768px) { .filter-bar { flex-direction: row; gap: 2rem; align-items: center; } }
.filter-bar__group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.filter-bar__label {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em; color: #666; margin-right: 0.5rem;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem; border-radius: 2px;
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
  text-decoration: none; transition: all 200ms ease; cursor: pointer; border: none;
}
.btn--primary { background: var(--evidence); color: #fff; }
.btn--primary:hover { background: #ff4444; color: #fff; text-decoration: none; }
.btn--secondary { background: #1a1a1a; color: #ccc; border: 1px solid #3a3a3a; }
.btn--secondary:hover { background: #222; color: #fff; text-decoration: none; border-color: #555; }

/* ─── Utility ─── */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-muted { color: #999; }
.mb-4 { margin-bottom: 1rem; }
.mt-8 { margin-top: 2rem; }

/* Redacted text */
.redacted {
  background: var(--evidence); color: var(--evidence); padding: 1px 4px; border-radius: 2px;
  cursor: default; user-select: none; transition: color 200ms ease;
}
.redacted:hover { color: #fff; }

/* ═══ XFCE TERMINAL (sami3 exact port) ═══ */

.term {
  border: 1px solid #444c56; border-radius: 4px 4px 0 0;
  margin: 1.5rem 0; overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.04);
}
.term__titlebar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(180deg, #4c5566 0%, #3c4556 40%, #353e4e 100%);
  padding: 0 6px; border-bottom: 1px solid #2a3040;
  user-select: none; min-height: 30px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.term__controls { display: flex; gap: 0; align-items: center; order: 1; }
.term__ctrl {
  width: 24px; height: 22px; border: none; border-radius: 0;
  background: transparent; display: flex; align-items: center; justify-content: center; position: relative;
}
.term__ctrl::after { content: ''; display: block; }
.term__ctrl:hover { background: rgba(255,255,255,0.08); }
.term__ctrl--close::after {
  width: 10px; height: 10px; background: transparent; border: none;
  box-shadow: inset 4px 0 0 -1.5px #aab0ba, inset -4px 0 0 -1.5px #aab0ba;
  transform: rotate(45deg);
}
.term__ctrl--close:hover { background: #c0392b; }
.term__ctrl--close:hover::after { box-shadow: inset 4px 0 0 -1.5px #fff, inset -4px 0 0 -1.5px #fff; }
.term__ctrl--min::after { width: 10px; height: 2px; background: #aab0ba; }
.term__ctrl--max::after { width: 9px; height: 9px; border: 1.5px solid #aab0ba; background: transparent; }
.term__window-title {
  font-family: var(--font-body); font-size: 12px; font-weight: 600; color: #c8cdd5;
  flex: 1; text-align: center; letter-spacing: 0.01em; padding: 0 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.term__menubar {
  display: flex; gap: 0; background: #2e3440; border-bottom: 1px solid #252b36;
  padding: 0; user-select: none; font-family: var(--font-body); font-size: 12px; color: #a0a8b4; line-height: 1;
}
.term__menubar span { padding: 5px 10px; cursor: default; }
.term__menubar span:hover { background: #3b4252; color: #d8dee9; }
.term__menubar span:first-child { padding-left: 12px; }
.term__body {
  background: #1c1c28; padding: 1rem; overflow-x: auto; min-height: 60px; position: relative;
}
.term__body::before {
  content: ''; position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 4px);
  pointer-events: none; z-index: 1;
}
.term__pre {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: #d3d7de;
  margin: 0; padding: 0; background: none; border: none;
  white-space: pre-wrap; word-break: break-word; position: relative; z-index: 2;
}
.term__prompt { color: #a3be8c; font-weight: 700; }
.term__prompt--root { color: #bf616a; font-weight: 700; }
.term__host { color: #b48ead; font-weight: 700; }
.term__path { color: #a3be8c; font-weight: 700; }
.term__sep { color: #d8dee9; }
.term__dollar { color: #a3be8c; font-weight: 700; }
.term__cmd { color: #eceff4; }
.term__flag { color: #d4a017; }
.term__comment { color: #4c566a; font-style: italic; }
.term__output { color: #8891a5; }
.term__dir { color: #81a1c1; font-weight: 700; }
.term__file { color: #d3d7de; }
.term__exec { color: #a3be8c; font-weight: 700; }
.term__symlink { color: #88c0d0; }
.term__link { color: #81a1c1; text-decoration: none; }
.term__link:hover { color: #88c0d0; text-decoration: underline; }
.term__highlight { color: #d4a017; }
.term__success { color: #a3be8c; }
.term__error { color: #bf616a; }
.term__perms { color: #7b8394; }
.term__num { color: #a3be8c; }
.term__cursor {
  display: inline-block; width: 8px; height: 15px; background: #a3be8c;
  vertical-align: text-bottom; animation: term-blink 1s step-end infinite; margin-left: 2px;
}
@keyframes term-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@media (min-width: 640px) { .term__body { padding: 1rem 1.5rem; } .term__pre { font-size: 13.5px; } }
@media (min-width: 1024px) { .term__body { padding: 1.5rem 2rem; } .term__pre { font-size: 14px; } }

/* ═══ CALLOUT BOXES (sami3 exact port) ═══ */

.callout {
  position: relative; margin: 1.5rem 0;
  padding: 1rem 1rem 1rem 3rem;
  border-left: 3px solid #3a3a3a; background: #111;
  border-radius: 0 4px 4px 0; font-size: 0.875rem; line-height: 1.6;
}
.callout__icon {
  position: absolute; left: 0.75rem; top: 1rem;
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
}
.callout__icon svg { width: 18px; height: 18px; image-rendering: pixelated; }
.callout__title {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; display: block;
}
.callout p { margin: 0; }
.callout p + p { margin-top: 0.5rem; }
.callout code { font-size: 0.9em; padding: 0.15em 0.4em; background: rgba(255,255,255,0.06); border-radius: 3px; }
.callout--warning { border-left-color: #bf616a; background: rgba(191,97,106,0.06); box-shadow: -4px 0 12px rgba(139,37,0,0.2); }
.callout--warning .callout__icon { color: #bf616a; } .callout--warning .callout__title { color: #bf616a; }
.callout--critical { border-left-color: #c0392b; background: rgba(192,57,43,0.1); box-shadow: -4px 0 12px rgba(139,37,0,0.25); }
.callout--critical .callout__icon { color: #c0392b; } .callout--critical .callout__title { color: #c0392b; }
.callout--info { border-left-color: #81a1c1; background: rgba(129,161,193,0.06); box-shadow: -4px 0 12px rgba(129,161,193,0.15); }
.callout--info .callout__icon { color: #81a1c1; } .callout--info .callout__title { color: #81a1c1; }
.callout--tip { border-left-color: #a3be8c; background: rgba(163,190,140,0.06); }
.callout--tip .callout__icon { color: #a3be8c; } .callout--tip .callout__title { color: #a3be8c; }
.callout--finding { border-left-color: var(--evidence); background: rgba(232,84,84,0.06); box-shadow: -4px 0 12px rgba(232,84,84,0.15); }
.callout--finding .callout__icon { color: var(--evidence); } .callout--finding .callout__title { color: var(--evidence); }
.callout--command { border-left-color: #b48ead; background: rgba(180,142,173,0.06); }
.callout--command .callout__icon { color: #b48ead; } .callout--command .callout__title { color: #b48ead; }

/* ═══ INLINE ICONS (sami3 exact port) ═══ */

.ico {
  display: inline-block; width: 16px; height: 16px; vertical-align: -2px;
  margin-right: 4px; background-size: contain; background-repeat: no-repeat;
  background-position: center; image-rendering: pixelated;
}
.ico--sm { width: 12px; height: 12px; vertical-align: -1px; }
.ico--lg { width: 20px; height: 20px; vertical-align: -4px; }
.ico--lock { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3' y='7' width='10' height='8' rx='1' fill='%23a3be8c'/%3E%3Cpath d='M5 7V5a3 3 0 016 0v2' fill='none' stroke='%23a3be8c' stroke-width='1.5' stroke-linecap='round'/%3E%3Crect x='7' y='10' width='2' height='3' rx='0.5' fill='%231a2e1a'/%3E%3C/svg%3E"); }
.ico--shield { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1L2 4v4c0 3.5 2.5 6.5 6 7.5 3.5-1 6-4 6-7.5V4z' fill='%2381a1c1' opacity='0.9'/%3E%3Cpath d='M6 8l2 2 3-4' fill='none' stroke='%231a1e2e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico--eye { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 8s2.5-5 7-5 7 5 7 5-2.5 5-7 5-7-5-7-5z' fill='none' stroke='%23bf616a' stroke-width='1.2'/%3E%3Ccircle cx='8' cy='8' r='2.5' fill='%23bf616a'/%3E%3C/svg%3E"); }
.ico--eye-off { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 8s2.5-5 7-5 7 5 7 5-2.5 5-7 5-7-5-7-5z' fill='none' stroke='%23a3be8c' stroke-width='1.2'/%3E%3Ccircle cx='8' cy='8' r='2.5' fill='none' stroke='%23a3be8c' stroke-width='1.2'/%3E%3Cline x1='2' y1='2' x2='14' y2='14' stroke='%23a3be8c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--terminal { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='2' width='14' height='12' rx='1.5' fill='none' stroke='%23b48ead' stroke-width='1.2'/%3E%3Cpath d='M4 7l2.5 2L4 11' fill='none' stroke='%23b48ead' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='8' y1='11' x2='12' y2='11' stroke='%23b48ead' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--key { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='5' cy='8' r='3' fill='none' stroke='%23d4a017' stroke-width='1.3'/%3E%3Cline x1='8' y1='8' x2='14' y2='8' stroke='%23d4a017' stroke-width='1.3' stroke-linecap='round'/%3E%3Cline x1='12' y1='8' x2='12' y2='5.5' stroke='%23d4a017' stroke-width='1.3' stroke-linecap='round'/%3E%3Cline x1='14' y1='8' x2='14' y2='6' stroke='%23d4a017' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--globe { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='%2381a1c1' stroke-width='1.1'/%3E%3Cellipse cx='8' cy='8' rx='3' ry='6.5' fill='none' stroke='%2381a1c1' stroke-width='1.1'/%3E%3Cline x1='1.5' y1='8' x2='14.5' y2='8' stroke='%2381a1c1' stroke-width='1.1'/%3E%3C/svg%3E"); }
.ico--alert { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5L1 14h14z' fill='%23d4a017' opacity='0.15' stroke='%23d4a017' stroke-width='1'/%3E%3Cline x1='8' y1='6' x2='8' y2='10' stroke='%23d4a017' stroke-width='1.5' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='12' r='0.8' fill='%23d4a017'/%3E%3C/svg%3E"); }
.ico--danger { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='7' r='5.5' fill='none' stroke='%23c0392b' stroke-width='1.2'/%3E%3Ccircle cx='6' cy='6.5' r='1.2' fill='%23c0392b'/%3E%3Ccircle cx='10' cy='6.5' r='1.2' fill='%23c0392b'/%3E%3Cpath d='M6 10h4' stroke='%23c0392b' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--check { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='%23a3be8c' opacity='0.15'/%3E%3Cpath d='M5 8l2.5 2.5L11.5 5' fill='none' stroke='%23a3be8c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico--cross { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='%23bf616a' opacity='0.15'/%3E%3Cpath d='M5.5 5.5l5 5M10.5 5.5l-5 5' stroke='%23bf616a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--partial { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='%23d4a017' opacity='0.15'/%3E%3Cline x1='4.5' y1='8' x2='11.5' y2='8' stroke='%23d4a017' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--download { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 2v8M4.5 7.5L8 11l3.5-3.5' fill='none' stroke='%2381a1c1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='3' y1='13' x2='13' y2='13' stroke='%2381a1c1' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--link { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 9.5l3-3' stroke='%2388c0d0' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M9 7l1.5-1.5a2.1 2.1 0 00-3-3L6 4' fill='none' stroke='%2388c0d0' stroke-width='1.3' stroke-linecap='round'/%3E%3Cpath d='M7 9l-1.5 1.5a2.1 2.1 0 003 3L10 12' fill='none' stroke='%2388c0d0' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--search { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='4.5' fill='none' stroke='%23d4a017' stroke-width='1.3'/%3E%3Cline x1='10.5' y1='10.5' x2='14' y2='14' stroke='%23d4a017' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--doc { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 1.5h5.5L13 5v9.5a1 1 0 01-1 1H4a1 1 0 01-1-1v-13a1 1 0 011-1z' fill='none' stroke='%23e8e4df' stroke-width='1.1'/%3E%3Cpath d='M9.5 1.5V5H13' fill='none' stroke='%23e8e4df' stroke-width='1.1'/%3E%3C/svg%3E"); }
.ico--server { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='2' y='1.5' width='12' height='4' rx='1' fill='none' stroke='%23b48ead' stroke-width='1.1'/%3E%3Crect x='2' y='6' width='12' height='4' rx='1' fill='none' stroke='%23b48ead' stroke-width='1.1'/%3E%3Crect x='2' y='10.5' width='12' height='4' rx='1' fill='none' stroke='%23b48ead' stroke-width='1.1'/%3E%3Ccircle cx='11' cy='3.5' r='0.8' fill='%23a3be8c'/%3E%3Ccircle cx='11' cy='8' r='0.8' fill='%23a3be8c'/%3E%3Ccircle cx='11' cy='12.5' r='0.8' fill='%23d4a017'/%3E%3C/svg%3E"); }
.ico--book { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 2.5A1.5 1.5 0 013.5 1H6a2 2 0 012 2v10.5a.5.5 0 01-.5.5A2.5 2.5 0 005 11.5H3.5A1.5 1.5 0 012 10V2.5z' fill='none' stroke='%2388c0d0' stroke-width='1.1'/%3E%3Cpath d='M14 2.5A1.5 1.5 0 0012.5 1H10a2 2 0 00-2 2v10.5a.5.5 0 00.5.5 2.5 2.5 0 012.5-2.5h1.5A1.5 1.5 0 0014 10V2.5z' fill='none' stroke='%2388c0d0' stroke-width='1.1'/%3E%3C/svg%3E"); }
.ico--clipboard { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='3' y='3' width='10' height='12' rx='1' fill='none' stroke='%23e8e4df' stroke-width='1.1'/%3E%3Crect x='5.5' y='1' width='5' height='3' rx='0.8' fill='none' stroke='%23e8e4df' stroke-width='1.1'/%3E%3C/svg%3E"); }
.ico--wrench { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M12.5 3.5a4 4 0 00-5.3 4.8L3 12.5 3.5 13l4.2-4.2a4 4 0 004.8-5.3L10 6 9.5 5.5 10 3.5z' fill='none' stroke='%23d4a017' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico--fingerprint { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 11.5C4 8 5.5 5 8 5s4 3 4 6.5' fill='none' stroke='%23bf616a' stroke-width='1.1' stroke-linecap='round'/%3E%3Cpath d='M6 11.5C6 9 7 7 8 7s2 2 2 4.5' fill='none' stroke='%23bf616a' stroke-width='1.1' stroke-linecap='round'/%3E%3Cpath d='M8 11.5V9' fill='none' stroke='%23bf616a' stroke-width='1.1' stroke-linecap='round'/%3E%3Cpath d='M2.5 9C2.5 5 5 2 8 2s5.5 3 5.5 7' fill='none' stroke='%23bf616a' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--clock { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.5' fill='none' stroke='%23e8e4df' stroke-width='1.1'/%3E%3Cline x1='8' y1='4' x2='8' y2='8' stroke='%23e8e4df' stroke-width='1.3' stroke-linecap='round'/%3E%3Cline x1='8' y1='8' x2='11' y2='10' stroke='%23e8e4df' stroke-width='1.3' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--user { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='5' r='3' fill='none' stroke='%23e8e4df' stroke-width='1.1'/%3E%3Cpath d='M2.5 14.5a5.5 5.5 0 0111 0' fill='none' stroke='%23e8e4df' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--mail { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1.5' y='3.5' width='13' height='9' rx='1' fill='none' stroke='%2381a1c1' stroke-width='1.1'/%3E%3Cpath d='M1.5 4.5L8 9l6.5-4.5' fill='none' stroke='%2381a1c1' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico--wifi { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1 6a10 10 0 0114 0' fill='none' stroke='%23a3be8c' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M3.5 8.5a6.5 6.5 0 019 0' fill='none' stroke='%23a3be8c' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M6 11a3 3 0 014 0' fill='none' stroke='%23a3be8c' stroke-width='1.2' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='13' r='1' fill='%23a3be8c'/%3E%3C/svg%3E"); }
.ico--database { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cellipse cx='8' cy='3.5' rx='5.5' ry='2' fill='none' stroke='%23b48ead' stroke-width='1.1'/%3E%3Cpath d='M2.5 3.5v9c0 1.1 2.5 2 5.5 2s5.5-.9 5.5-2v-9' fill='none' stroke='%23b48ead' stroke-width='1.1'/%3E%3Cpath d='M2.5 8c0 1.1 2.5 2 5.5 2s5.5-.9 5.5-2' fill='none' stroke='%23b48ead' stroke-width='1.1'/%3E%3C/svg%3E"); }
.ico--pin { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 1.5A4.5 4.5 0 0112.5 6C12.5 9.5 8 14.5 8 14.5S3.5 9.5 3.5 6A4.5 4.5 0 018 1.5z' fill='none' stroke='%23c0392b' stroke-width='1.1'/%3E%3Ccircle cx='8' cy='6' r='1.5' fill='%23c0392b'/%3E%3C/svg%3E"); }
.ico--code { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 4L1.5 8 5 12' fill='none' stroke='%23a3be8c' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M11 4l3.5 4L11 12' fill='none' stroke='%23a3be8c' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='9' y1='2' x2='7' y2='14' stroke='%23a3be8c' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ico--flag { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cline x1='3' y1='1.5' x2='3' y2='14.5' stroke='%23e8e4df' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M3 2.5s2-1.5 4.5 0 4.5 0 4.5 0v6s-2 1.5-4.5 0-4.5 0-4.5 0z' fill='%23d4a017' opacity='0.25' stroke='%23d4a017' stroke-width='1'/%3E%3C/svg%3E"); }
.ico--zap { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M9 1L3 9h4.5l-1 6L13 7H8.5z' fill='%23d4a017' opacity='0.2' stroke='%23d4a017' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico--arrow { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cline x1='2' y1='8' x2='13' y2='8' stroke='%23d4a017' stroke-width='1.5' stroke-linecap='round'/%3E%3Cpath d='M10 4.5L13.5 8 10 11.5' fill='none' stroke='%23d4a017' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico--external { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M12 8.5v4a1.5 1.5 0 01-1.5 1.5h-7A1.5 1.5 0 012 12.5v-7A1.5 1.5 0 013.5 4H7' fill='none' stroke='%2388c0d0' stroke-width='1.1' stroke-linecap='round'/%3E%3Cline x1='7' y1='9' x2='14' y2='2' stroke='%2388c0d0' stroke-width='1.2' stroke-linecap='round'/%3E%3Cpath d='M10 2h4v4' fill='none' stroke='%2388c0d0' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ico--bookmark { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 1.5h10v13L8 11l-5 3.5z' fill='%23d4a017' opacity='0.15' stroke='%23d4a017' stroke-width='1.1' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* ═══ READING PROGRESS BAR (sami3 port) ═══ */

.reading-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 3px;
  background: transparent; z-index: 1100; pointer-events: none;
}
.reading-progress__bar {
  height: 100%; width: 0%;
  background: var(--evidence);
  transition: width 50ms linear;
  box-shadow: 0 0 8px rgba(232, 84, 84, 0.6), 0 0 2px rgba(232, 84, 84, 0.8);
}

/* ═══ HEADING SCROLL REVEAL (sami3 port, progressive enhancement) ═══ */

@supports (animation-timeline: view()) {
  .guide-prose h2,
  .guide-prose h3 {
    animation: guideHeadingReveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 30%;
  }
  @keyframes guideHeadingReveal {
    from { opacity: 0.3; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .guide-prose h2, .guide-prose h3 {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
}

/* ═══ STAGGERED CARD ENTRANCE ═══ */

.guide-card {
  opacity: 0;
  animation: guideCardFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes guideCardFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.guide-card:nth-child(1) { animation-delay: 0.05s; }
.guide-card:nth-child(2) { animation-delay: 0.10s; }
.guide-card:nth-child(3) { animation-delay: 0.15s; }
.guide-card:nth-child(4) { animation-delay: 0.20s; }
.guide-card:nth-child(5) { animation-delay: 0.25s; }
.guide-card:nth-child(6) { animation-delay: 0.30s; }
.guide-card:nth-child(7) { animation-delay: 0.35s; }
.guide-card:nth-child(8) { animation-delay: 0.40s; }
.guide-card:nth-child(9) { animation-delay: 0.45s; }
.guide-card:nth-child(n+10) { animation-delay: 0.50s; }

@media (prefers-reduced-motion: reduce) {
  .guide-card { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ═══ THREAT LEVEL INDICATOR ═══ */

.threat-level {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 0; margin: 1rem 0; flex-wrap: wrap;
}
.threat-level__label {
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: #999; white-space: nowrap;
}
.threat-level__scale { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.threat-level__item {
  display: flex; flex-direction: column; align-items: center; gap: 2px; opacity: 0.25;
  transition: opacity 200ms ease;
}
.threat-level__item--active { opacity: 1; }
.threat-level__pill {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 22px; border-radius: 3px; background: var(--level-color);
  color: #0a0a0a; font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; line-height: 1;
}
.threat-level__item:not(.threat-level__item--active) .threat-level__pill { background: #1a1a1a; color: #666; }
.threat-level__name { font-size: 10px; color: #666; white-space: nowrap; line-height: 1.2; }
.threat-level__item--active .threat-level__name { color: #999; }


/* ─── PRINT ─── */
@media print {
  .nav, .nav-toggle, .footer, .skip-link { display: none; }
  body { background: #fff; color: #000; font-size: 10pt; }
  .hero { background: #fff; color: #000; padding: 1rem 0; border-bottom: 2px solid #000; }
  .hero::before { display: none; }
  .stat-value { color: #000; }
  .card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  a { color: #000; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.75em; color: #666; }
  .vf-copy { display: none; }
  .vf-entry { opacity: 1 !important; transform: none !important; }
  .guide-toc { display: none; }
  .guide-card { break-inside: avoid; }
}
