/* ═══════════════════════════════════════════════════════════════════════════
   THE OUTPOST — Shared Design System
   Light & Dark mode · Mobile-first · Markdown prose typography
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── DARK MODE (default) ─── */
:root {
  --bg-deep:       #14180f;
  --bg-canvas:     #1a2419;
  --bg-surface:    #1e2419;
  --bg-panel:      #191e14;
  --rule:          #2a3327;
  --sand:          #C9A020;
  --sand-dim:      #8A6C14;
  --bone:          #ece8df;
  --bone-dim:      #a8a094;
  --olive:         #4A6229;
  --olive-bright:  #6B8C3E;
  --signal:        #a62828;
  --airport:       #3a6080;

  /* topbar glass: dark tinted */
  --topbar-bg:     rgba(20, 24, 15, 0.96);

  /* film grain opacity */
  --grain-opacity: 0.04;

  /* theme toggle icons */
  --icon-sun: "☀";
  --icon-moon: "☾";

  --serif: 'Fraunces', 'DM Serif Display', Georgia, serif;
  --sans:  'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono:  'Space Mono', 'Courier New', monospace;

  --topbar-h: 112px;
  --max:      1280px;

  /* Backward-compat aliases — pages that used --bg or --bg-card pre-refactor */
  --bg:      var(--bg-deep);
  --bg-card: var(--bg-surface);
  /* Blog-page aliases — blog files use --canvas, --panel, --body */
  --canvas:  var(--bg-canvas);
  --panel:   var(--bg-panel);
  --body:    var(--sans);
}

/* ─── LIGHT MODE ─── */
[data-theme="light"] {
  --bg-deep:       #f4f0e4;
  --bg-canvas:     #ede7d3;
  --bg-surface:    #e4dcc8;
  --bg-panel:      #f0ead8;
  --rule:          #c4b89a;
  --sand:          #8A6C14;
  --sand-dim:      #6B6010;
  --bone:          #1c180e;
  --bone-dim:      #5a4e3a;
  --olive:         #3A5020;
  --olive-bright:  #4A6229;
  --signal:        #8a1f1f;
  --airport:       #2a5070;
  --topbar-bg:     rgba(244, 240, 228, 0.96);
  --grain-opacity: 0.02;
  --bg:      var(--bg-deep);
  --bg-card: var(--bg-surface);
}

/* ─── SYSTEM PREFERENCE — auto light if no stored preference ─── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-deep:       #f4f0e4;
    --bg-canvas:     #ede7d3;
    --bg-surface:    #e4dcc8;
    --bg-panel:      #f0ead8;
    --rule:          #c4b89a;
    --sand:          #8A6C14;
    --sand-dim:      #6B6010;
    --bone:          #1c180e;
    --bone-dim:      #5a4e3a;
    --olive:         #3A5020;
    --olive-bright:  #4A6229;
    --signal:        #8a1f1f;
    --airport:       #2a5070;
    --topbar-bg:     rgba(244, 240, 228, 0.96);
    --grain-opacity: 0.02;
    --bg:      var(--bg-deep);
    --bg-card: var(--bg-surface);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET + BASE
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-deep);
  color: var(--bone);
  font-family: var(--mono);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.25s ease, color 0.25s ease;
}

/* Film grain texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: var(--grain-opacity);
  z-index: 9999;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.mono   { font-family: var(--mono); }
.serif  { font-family: var(--serif); }

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand);
}

.rule-line {
  height: 1px;
  background: var(--rule);
  border: 0;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOP BAR — shared across all pages
   ═══════════════════════════════════════════════════════════════════════════ */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 500;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s ease, border-color 0.25s ease;
}

/* Index page topbar variant — uses container inside */
.topbar.topbar--index {
  position: sticky;
  height: auto;
  padding: 0;
  display: block;
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.topbar-brand {
  color: var(--bone);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.25s;
}

.topbar-brand span { color: var(--sand); }

/* Inner pages: left side */
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--bone-dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.15s;
}
.back-link:hover { color: var(--sand); }
.back-link svg { width: 14px; height: 14px; flex-shrink: 0; }

.topbar-divider {
  width: 1px;
  height: 18px;
  background: var(--rule);
  flex-shrink: 0;
}

.topbar-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.topbar-title span { color: var(--sand); margin-right: 6px; }

/* Right side nav — shared */
.topbar-right,
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-meta {
  color: var(--bone-dim);
  display: flex;
  gap: 20px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Nav links — both topbar variants */
.topbar-nav a,
.topbar-right a:not(.cta-pill),
.topbar-nav-links a,
.nav-link {
  color: var(--bone-dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.topbar-nav a:hover,
.topbar-right a:not(.cta-pill):hover,
.topbar-nav-links a:hover,
.nav-link:hover {
  color: var(--sand);
  border-bottom-color: var(--sand);
}

.topbar-nav a.active,
.topbar-right a.active,
.nav-link.active {
  color: var(--sand);
  border-bottom-color: var(--sand);
}

/* ─── CTA pill ─── */
.cta-pill {
  display: inline-block;
  padding: 7px 16px;
  background: var(--olive);
  color: var(--bone) !important;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: none !important;
  transition: background 0.15s;
  white-space: nowrap;
}
.cta-pill:hover { background: var(--olive-bright) !important; }

/* ─── Live indicator (index) ─── */
.blink { color: var(--olive-bright); }
.blink-dot {
  display: inline-block;
  width: 7px; height: 7px;
  background: var(--olive-bright);
  border-radius: 50%;
  margin-right: 5px;
  animation: blink 2s infinite;
  vertical-align: middle;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   THEME TOGGLE BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--bone-dim);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
  padding: 0;
  position: relative;
}
.theme-toggle:hover { border-color: var(--sand); }

/* Hide emoji spans — replaced by SVG ::after */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none !important; }

/* Dark mode default → show moon */
.theme-toggle::after {
  content: '';
  display: block;
  width: 17px; height: 17px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a094' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
}
.theme-toggle:hover::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c19a6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'/%3E%3C/svg%3E");
}

/* Light mode → show sun */
[data-theme="light"] .theme-toggle::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a4e3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E");
}
[data-theme="light"] .theme-toggle:hover::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a5c30' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a4e3a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cline x1='12' y1='1' x2='12' y2='3'/%3E%3Cline x1='12' y1='21' x2='12' y2='23'/%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'/%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'/%3E%3Cline x1='1' y1='12' x2='3' y2='12'/%3E%3Cline x1='21' y1='12' x2='23' y2='12'/%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'/%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'/%3E%3C/svg%3E");
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HAMBURGER MENU — mobile nav
   ═══════════════════════════════════════════════════════════════════════════ */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--bone-dim);
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  transition: border-color 0.15s;
}
.hamburger:hover { border-color: var(--sand); }

.hamburger span {
  display: block;
  height: 2px;
  border-radius: 1px;
  background: var(--bone);
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.15s;
}
.hamburger:hover span { background: var(--sand); }

/* Hamburger → X animation */
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--topbar-h);
  left: 0; right: 0;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--rule);
  z-index: 490;
  flex-direction: column;
  padding: 0;
  transition: background 0.25s ease;
}

.mobile-nav.open { display: flex; }

.mobile-nav a {
  display: block;
  padding: 14px 24px;
  color: var(--bone-dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule);
  transition: background 0.12s, color 0.12s;
}

.mobile-nav a:hover {
  background: var(--bg-surface);
  color: var(--sand);
}

.mobile-nav a.active { color: var(--sand); }

.mobile-nav a.cta-pill {
  margin: 14px 24px;
  display: inline-block;
  border-bottom: none;
  text-align: center;
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  /* Hide desktop nav links on mobile */
.topbar-nav-links,
  .topbar-right .nav-links,
  .desktop-nav {
    display: none !important;
  }

  /* Index page: hide meta spans (except .always) — direct children only */
  .topbar-meta > span:not(.always):not(.blink-dot-wrap) { display: none; }
  .topbar-meta > span .blink-span { display: none; }

  /* Ensure hamburger lines are never suppressed */
  .hamburger span { display: block !important; width: 100%; }
}

@media (min-width: 769px) {
  .mobile-nav { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROSE / MARKDOWN ARTICLE TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

.prose {
  max-width: 680px;
  margin: 0 auto;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.78;
  color: var(--bone);
  transition: color 0.25s ease;
}

/* Headings */
.prose h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  color: var(--bone);
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

.prose h2 {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  color: var(--sand);
  line-height: 1.2;
  margin: 2.4em 0 0.7em;
  letter-spacing: -0.01em;
}

.prose h2:first-of-type { margin-top: 1.8em; }

.prose h3 {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sand);
  margin: 2em 0 0.6em;
}

.prose h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin: 1.5em 0 0.4em;
}

/* Body copy */
.prose p { margin-bottom: 1.5em; }
.prose p:last-child { margin-bottom: 0; }

/* Strong / em */
.prose strong { color: var(--bone); font-weight: 600; }
.prose em { font-style: italic; color: var(--sand); }

/* Links */
.prose a {
  color: var(--sand);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.prose a:hover { color: var(--bone); }

/* Blockquote — pull quote */
.prose blockquote {
  border-left: 3px solid var(--sand);
  background: var(--bg-panel);
  padding: 16px 20px 16px 20px;
  margin: 2em 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--bone);
  transition: background 0.25s ease;
}

.prose blockquote p { margin-bottom: 0; }
.prose blockquote strong { color: var(--sand); }

/* Unordered list */
.prose ul {
  list-style: none;
  padding: 0;
  margin: 1.2em 0 1.8em;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prose ul li {
  padding-left: 20px;
  position: relative;
  font-size: 16px;
  line-height: 1.6;
  color: var(--bone);
}

.prose ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--sand);
  font-family: var(--mono);
  font-size: 13px;
}

/* Ordered list */
.prose ol {
  list-style: none;
  padding: 0;
  margin: 1.2em 0 1.8em;
  counter-reset: prose-counter;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prose ol li {
  padding-left: 28px;
  position: relative;
  font-size: 16px;
  line-height: 1.6;
  counter-increment: prose-counter;
}

.prose ol li::before {
  content: counter(prose-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  color: var(--sand);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  top: 3px;
}

/* Inline code */
.prose code {
  font-family: var(--mono);
  font-size: 14px;
  background: var(--bg-surface);
  color: var(--sand);
  padding: 2px 6px;
  border: 1px solid var(--rule);
}

/* Code block */
.prose pre {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 1.5em 0 2em;
  transition: background 0.25s ease;
}

.prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--bone-dim);
  line-height: 1.7;
}

/* Horizontal rule */
.prose hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5em 0;
}

/* Table */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0 2em;
  font-family: var(--mono);
  font-size: 13px;
}

.prose th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-surface);
  color: var(--sand);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 10px;
  border-bottom: 1px solid var(--rule);
  font-weight: 700;
}

.prose td {
  padding: 10px 12px;
  color: var(--bone-dim);
  border-bottom: 1px solid var(--rule);
  line-height: 1.5;
}

.prose tr:last-child td { border-bottom: none; }
.prose td strong { color: var(--bone); }

/* ─── Callout box (used in blog articles) ─── */
.callout {
  border-left: 3px solid var(--sand);
  background: var(--bg-panel);
  padding: 16px 20px;
  margin: 2em 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--bone);
  transition: background 0.25s ease;
}

.callout strong { color: var(--sand); font-weight: 600; }

.callout-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 8px;
  display: block;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
.stat-line:last-child { border-bottom: none; }
.stat-rank { color: var(--bone-dim); font-size: 14px; }
.stat-val  { color: var(--sand); font-family: var(--mono); font-weight: 700; font-size: 15px; }

/* ─── Checklist (used in blog articles) ─── */
.checklist {
  list-style: none;
  margin: 1.2em 0 1.8em;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--bone);
}

.check-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border: 1px solid var(--sand);
  background: rgba(193,154,107,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="light"] .check-box {
  background: rgba(122, 92, 48, 0.06);
}

.checklist li strong { color: var(--sand); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE HERO BAND
   ═══════════════════════════════════════════════════════════════════════════ */

.article-hero {
  margin-top: var(--topbar-h);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--rule);
  padding: 56px 32px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: background 0.25s ease;
}

.article-tag-pill {
  display: inline-block;
  padding: 5px 14px;
  background: #0a0e07;
  border: 1px solid rgba(226,183,61,0.35);
  color: #e2b73d;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 20px;
  border-radius: 2px;
}

[data-theme="light"] .article-tag-pill {
  background: #0a0e07;
  border-color: rgba(226,183,61,0.4);
  color: #e2b73d;
}

.article-h1 {
  font-family: var(--serif);
  font-size: clamp(26px, 4.5vw, 52px);
  font-weight: 400;
  color: var(--bone);
  line-height: 1.15;
  max-width: 780px;
  margin-bottom: 20px;
}

.article-byline {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.article-byline span { color: var(--sand); margin: 0 4px; }

/* ─── Article body ─── */
.article-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 52px 24px 72px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RELATED ARTICLES ROW
   ═══════════════════════════════════════════════════════════════════════════ */

.related-section {
  background: var(--bg-panel);
  border-top: 1px solid var(--rule);
  padding: 48px 32px;
  transition: background 0.25s ease;
}

.related-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.related-card {
  background: var(--bg-surface);
  border: 1px solid var(--rule);
  padding: 20px;
  text-decoration: none;
  display: block;
  transition: border-color 0.15s, background 0.25s ease;
}
.related-card:hover { border-color: var(--sand); }

.related-card-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e2b73d;
  margin-bottom: 8px;
}

.related-card h3 {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  color: var(--bone);
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BLOG INDEX — card grid
   ═══════════════════════════════════════════════════════════════════════════ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
  background: var(--rule);
  margin: 32px 0;
}

.blog-card {
  background: var(--bg-surface);
  padding: 28px 24px;
  transition: background 0.25s ease;
}

.blog-card:hover { background: var(--bg-canvas); }

.blog-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand);
  display: block;
  margin-bottom: 10px;
}

.blog-card h3 {
  font-family: var(--serif);
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 400;
  color: var(--bone);
  line-height: 1.25;
  margin-bottom: 12px;
}

.blog-card p {
  font-size: 14px;
  color: var(--bone-dim);
  line-height: 1.65;
  margin-bottom: 16px;
}

.blog-read {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sand);
  text-decoration: none;
  border-bottom: 1px solid var(--sand);
  padding-bottom: 1px;
  transition: color 0.15s;
}
.blog-read:hover { color: var(--bone); border-bottom-color: var(--bone); }

/* ═══════════════════════════════════════════════════════════════════════════
   CTA SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.cta-section {
  background: var(--bg-panel);
  border-top: 1px solid var(--rule);
  padding: 56px 32px;
  text-align: center;
  transition: background 0.25s ease;
}

.cta-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 16px;
}

.cta-section h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 400;
  color: var(--bone);
  line-height: 1.2;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 15px;
  color: var(--bone-dim);
  max-width: 440px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

footer,
.site-footer {
  background: var(--bg-panel);
  border-top: 1px solid var(--rule);
  padding: 32px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-dim);
  text-align: center;
  transition: background 0.25s ease, border-color 0.25s ease;
}

footer a, .site-footer a {
  color: var(--sand);
  text-decoration: none;
}
footer a:hover, .site-footer a:hover { color: var(--bone); }

/* ═══════════════════════════════════════════════════════════════════════════
   DEMO BANNER
   ═══════════════════════════════════════════════════════════════════════════ */

.demo-banner {
  background: var(--signal);
  color: #fff;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 12px;
  position: relative;
  z-index: 600;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .topbar { padding: 0 16px; }

  .article-hero { padding: 40px 20px 36px; }

  .article-body { padding: 36px 20px 56px; }

  .prose { font-size: 16px; }

  .related-section { padding: 36px 20px; }

  .blog-grid { grid-template-columns: 1fr; gap: 1px; }

  .cta-section { padding: 44px 20px; }
}

@media (max-width: 480px) {
  .topbar-brand { font-size: 11px; }

  .prose h2 { margin-top: 1.8em; }
}

/* Nav links row — flex with gap at desktop */
.topbar-nav-links { display: inline-flex; align-items: center; gap: 18px; }

/* ═══════════════════════════════════════════════════════════════════════════
   BLOG FIXES — 2026-05-06
   Issue 1: Article body inline links → gold
   Issue 2: .card-tag badge → black bg + gold text
   Issue 3: Related card titles/arrows → gold (not browser-default blue)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Issue 1: Links inside article body ─── */
.article-body a {
  color: #e2b73d;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(226,183,61,0.4);
  transition: color 0.15s;
}
.article-body a:hover {
  color: #f0cd5a;
}

/* ─── Issue 2: Blog index card-tag badges ─── */
.card-tag {
  display: inline-block;
  padding: 4px 10px;
  background: #0a0e07;
  color: #e2b73d;
  border: 1px solid rgba(226,183,61,0.35);
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ─── Issue 3: Related card text color (anchors) ─── */
.related-card-title {
  color: var(--bone);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 12px;
}

.related-card-arrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #e2b73d;
  margin-top: 12px;
  display: block;
}
