/* ============================================================
   Mac-Andreas · GTA San Andreas car-culture theme
   Palette: asphalt + desert sand + olive + chrome + ember orange
   No actor / character silhouettes (copyright). Cars only.
   ============================================================ */
:root {
  --bg:        #0C0E0A;
  --bg-2:      #14170F;
  --panel:     #1A1E15;
  --panel-2:   #232818;
  --border:    #2F3623;
  --border-2:  #4A5532;
  --text:      #EDE3C8;        /* desert paper */
  --muted:     #98937A;
  --sand:      #C9A86B;        /* desert sand */
  --olive:     #6B7A3A;        /* army green */
  --olive-2:   #4A5524;
  --green:     #8FAA48;
  --chrome:    #D6D6D8;        /* car chrome */
  --chrome-2:  #9FA1A4;
  --ember:     #E8721C;        /* hot-rod orange */
  --ember-2:   #B0530F;
  --rust:      #8B3A1D;
  --good:      #B4D862;
  --bad:       #C9442B;
  --asphalt:   #0A0B08;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Helvetica Neue", sans-serif;
  min-height: 100vh;
  background-image:
    radial-gradient(1100px 600px at 85% -10%, rgba(232,114,28,0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(201,168,107,0.08), transparent 60%),
    /* tire-tread diagonal pattern */
    repeating-linear-gradient(45deg, rgba(255,255,255,0.012) 0 2px, transparent 2px 8px),
    linear-gradient(180deg, #0C0E0A 0%, #08090A 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' 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.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.32;
  mix-blend-mode: overlay;
}

/* ===== Hero — image banner (AI-generated GTA SA-style scene) =====
   Uses a single bitmap banner at assets/hero/banner.webp. The CSS gradient
   fallback below renders if the image fails to load. */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  min-height: 460px;
  background-color: #2A1820;
  background-image:
    /* bottom fade-to-page so text always has contrast against the banner */
    linear-gradient(180deg, rgba(12,14,10,0) 55%, rgba(12,14,10,0.85) 92%, var(--bg) 100%),
    /* main banner */
    url('../assets/hero/banner.webp'),
    /* fallback gradient if banner missing */
    linear-gradient(180deg,
      #3E1A3E 0%,
      #8B2A3A 30%,
      #E8721C 60%,
      #2A2418 88%,
      #0C0E0A 100%);
  background-size: cover, cover, cover;
  background-position: center top, center top, center top;
  background-repeat: no-repeat;
}
/* Left-side dark gradient so title block sits on darker pixels.
   Banner subject (car + figure + sign) lives on the right half — keep text
   on the left and fade the left third toward black for legibility. */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg,
      rgba(0,0,0,0.70) 0%,
      rgba(0,0,0,0.45) 30%,
      rgba(0,0,0,0.10) 55%,
      rgba(0,0,0,0) 75%),
    linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 30%, rgba(0,0,0,0.25) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  position: relative; z-index: 3;
  max-width: 1180px; margin: 0 auto;
  /* Eyebrow pinned to the top, brand block anchored to the bottom-left. */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 460px;
  padding: 32px 32px 36px;
}
.hero-eyebrow-top { margin-bottom: 0; }
/* Keep text on the left so the banner subject (car + figure) stays visible.
   Wider than the visual cap so the skewed title's right edge isn't clipped. */
.hero-brand { max-width: 64%; }
@media (max-width: 900px) {
  .hero-inner { min-height: 360px; }
  .hero-brand { max-width: 100%; }
}
.hero .eyebrow {
  display: inline-block;
  font-size: 12px; letter-spacing: 3px; text-transform: uppercase;
  background: rgba(0,0,0,0.55);
  color: var(--sand);
  border: 1px solid var(--border-2);
  padding: 6px 12px; border-radius: 2px;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: "Impact", "Oswald", "Anton", "Bebas Neue", sans-serif;
  font-size: clamp(44px, 5.5vw, 84px);
  line-height: 0.92;
  letter-spacing: -1px;
  margin: 0;
  padding-right: 0.3em;           /* room for skewed right edge */
  text-transform: uppercase;
  font-style: italic;
  color: var(--text);
  text-shadow:
    0 2px 0 #1A0E08,
    0 4px 0 #0A0604,
    0 6px 14px rgba(0,0,0,0.95),
    0 12px 32px rgba(0,0,0,0.9);
  transform: skewX(-6deg);
}
.hero h1 .accent {
  color: var(--ember);
  text-shadow:
    0 2px 0 #1A0E08,
    0 4px 0 #0A0604,
    0 6px 14px rgba(0,0,0,0.95),
    0 12px 32px rgba(0,0,0,0.9);
}
.hero .lede {
  max-width: 640px;
  margin: 22px 0 0;
  font-size: 17px;
  color: rgba(237,227,200,0.95);
  text-shadow:
    0 1px 2px rgba(0,0,0,0.95),
    0 2px 8px rgba(0,0,0,0.85);
  background: rgba(0,0,0,0.35);
  display: inline-block;
  padding: 8px 14px;
  border-left: 3px solid var(--ember);
}
.hero .badges {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 28px;
}
.hero .badge {
  background: rgba(0,0,0,0.55);
  border: 1px solid var(--border-2);
  color: var(--sand);
  padding: 8px 14px; border-radius: 2px;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
}
.hero .badge .dot { background: var(--good); box-shadow: 0 0 8px var(--good); }

.hero .stencil { display: none; }

/* ===== Back link ===== */
.back {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--sand); text-decoration: none;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 22px;
  border: 1px solid var(--border-2);
  padding: 8px 14px; border-radius: 2px;
  background: rgba(0,0,0,0.55);
}
.back:hover { color: var(--ember); border-color: var(--ember); }

/* ===== Main ===== */
main {
  position: relative; z-index: 2;
  max-width: 1180px; margin: 0 auto;
  padding: 20px 32px 80px;
}

/* ===== Page sections (single-file SPA) =====
   Only the section with data-active="true" renders. Others stay in the DOM
   so their data-loading scripts (dashboard charts, repos grid, etc.) can
   populate them in the background, but they're hidden from view. */
main > section[id] {
  display: none;
  padding-bottom: 24px;
  animation: section-in 220ms ease;
}
main > section[id][data-active="true"] { display: block; }
/* First heading in a section sits right under the nav — no big top gap. */
main > section[id] > .section-head:first-child { margin-top: 0; }
@keyframes section-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ===== Section headings ===== */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 40px 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-2);
}
.section-head h2 {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 26px; letter-spacing: 2px;
  text-transform: uppercase; font-style: italic;
  margin: 0;
  color: var(--text);
}
.section-head h2 .accent { color: var(--ember); }
.section-head .meta {
  color: var(--muted); font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase;
}

/* ===== Site nav ===== */
.site-nav {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 22px;
  padding: 6px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border);
  border-radius: 4px;
  width: max-content;
  max-width: 100%;
}
.site-nav-sticky {
  position: sticky; top: 0;
  z-index: 50;
  width: auto;
  max-width: 1180px;
  margin: 0 auto 0;
  border-radius: 0 0 6px 6px;
  background: rgba(10,11,8,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: none;
  padding: 8px 12px;
  justify-content: center;
}
.site-nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  border-radius: 2px;
  transition: background 120ms, color 120ms;
}
.site-nav-link:hover { color: var(--text); background: rgba(232,114,28,0.10); }
.site-nav-link.active { color: var(--bg); background: var(--ember); font-weight: 700; }
.site-nav-ext { color: var(--sand); }
.site-nav-ext:hover { color: var(--ember); }
.nav-ico {
  width: 16px; height: 16px;
  flex: 0 0 auto;
  color: currentColor;
}

/* Footer link icons */
.footer-links {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 18px;
  margin-top: 10px;
  font-size: 12px;
}
.footer-links a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ember);
  text-decoration: none;
}
.footer-links a:hover { color: var(--sand); }
.foot-ico { width: 14px; height: 14px; flex: 0 0 auto; }

/* ===== Legal page ===== */
.legal-intro {
  max-width: 760px;
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 28px;
  padding: 18px 22px;
  background: rgba(0,0,0,0.30);
  border-left: 3px solid var(--ember);
  border-radius: 0 4px 4px 0;
}
.legal-intro strong { color: var(--text); }

.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.legal-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px 24px 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--ember), var(--sand));
}
.legal-card-num {
  position: absolute;
  top: 14px; right: 16px;
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 64px; line-height: 1;
  font-style: italic;
  color: rgba(232,114,28,0.10);
  letter-spacing: -3px;
  pointer-events: none;
}
.legal-card-tag {
  display: inline-block; width: max-content;
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--ember);
  border: 1px solid var(--ember);
  padding: 4px 8px;
  border-radius: 2px;
}
.legal-card h2 {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 22px; letter-spacing: 1px;
  margin: 6px 0 4px;
  text-transform: uppercase;
  font-style: italic;
  color: var(--text);
  max-width: 90%;
}
.legal-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.legal-card p strong { color: var(--text); font-weight: 600; }
.legal-card p em { color: var(--sand); font-style: italic; }
.legal-card a {
  color: var(--ember);
  text-decoration: none;
  border-bottom: 1px dashed rgba(232,114,28,0.55);
}
.legal-card a:hover { color: var(--sand); border-bottom-color: var(--sand); }
.legal-card-foot {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
}
.legal-card-cta { grid-column: span 2; }
.legal-card-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 10px;
}
.legal-card-actions .dl-btn { margin: 0; }

@media (max-width: 760px) {
  .legal-card-cta { grid-column: auto; }
  .legal-card-num { font-size: 48px; }
}

/* ===== Tabs ===== */
.tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  border-bottom: 2px solid var(--border-2);
  margin-bottom: 28px;
  padding: 0;
}
.tab {
  appearance: none; border: 0; cursor: pointer;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  padding: 14px 22px;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  position: relative; top: 2px;
  transition: color 120ms, background 120ms;
}
.tab:hover { color: var(--text); background: rgba(232,114,28,0.07); }
.tab[aria-selected="true"] {
  color: var(--bg);
  background: var(--ember);
  border-color: var(--ember);
  font-weight: 700;
  text-shadow: none;
}
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; background: var(--ember);
}
.tab .tab-meta {
  display: inline-block; margin-left: 8px;
  font-size: 11px; opacity: 0.75; font-weight: 400;
  letter-spacing: 1px;
}

/* ===== Apps grid (landing) ===== */
#apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
  margin-top: 8px;
}
.app-card {
  position: relative;
  display: block; text-decoration: none; color: var(--text);
  background:
    linear-gradient(180deg, rgba(232,114,28,0.04), rgba(0,0,0,0.25)),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms, box-shadow 180ms;
}
.app-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--olive), var(--sand), var(--ember));
}
.app-card::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.015) 0 2px, transparent 2px 8px);
  pointer-events: none;
}
.app-card:hover {
  transform: translateY(-3px);
  border-color: var(--ember);
  box-shadow: 0 12px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(232,114,28,0.18);
}
.app-card h3 {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 26px; letter-spacing: 1px;
  margin: 4px 0 4px;
  text-transform: uppercase;
  font-style: italic;
  color: var(--text);
}
.app-card .platform {
  display: inline-block;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--sand);
  border: 1px solid var(--border-2);
  padding: 3px 8px; border-radius: 2px;
  margin-bottom: 14px;
}
.app-card .stat-row {
  display: flex; gap: 18px; color: var(--muted); font-size: 13px;
  margin-top: 16px;
}
.app-card .stat-row strong { color: var(--text); font-weight: 600; }
.app-card .meta { color: var(--muted); font-size: 12px; margin: 14px 0 0; }
.dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle; background: var(--muted);
}
.dot.live { background: var(--good); box-shadow: 0 0 10px var(--good); animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

/* ===== Repos grid ===== */
#repos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.repo-card {
  position: relative;
  display: block; text-decoration: none; color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px 20px;
  overflow: hidden;
  transition: transform 160ms, border-color 160ms, box-shadow 160ms;
}
.repo-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--sand);
}
.repo-card:hover {
  transform: translateY(-2px);
  border-color: var(--ember);
  box-shadow: 0 10px 28px rgba(0,0,0,0.55), 0 0 0 1px rgba(232,114,28,0.18);
}
.repo-card:hover::before { background: var(--ember); }
.repo-card h3 {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 20px; letter-spacing: 1px;
  margin: 0 0 6px;
  text-transform: uppercase;
  font-style: italic;
  color: var(--text);
}
.repo-card .desc {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.repo-card .stat-row {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
  letter-spacing: 1px; text-transform: uppercase;
}
.repo-card .stat-row .lang { color: var(--sand); }
.repo-card .stat-row .lang .lang-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--sand); margin-right: 6px; vertical-align: middle;
}
.repo-card .stat-row .star { color: var(--ember); }
.repo-card .stat-row .fork { color: var(--chrome-2); }
.repo-card .archived-tag {
  position: absolute; top: 12px; right: 12px;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ember); border: 1px solid var(--ember);
  padding: 2px 6px; border-radius: 2px;
}

/* ===== Section intro paragraph ===== */
.section-intro {
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 22px;
}
.section-intro code {
  background: rgba(0,0,0,0.4);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--sand);
  font-size: 12px;
}

/* ===== Home (featured mix) ===== */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.home-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: transform 140ms, border-color 140ms, box-shadow 140ms;
}
.home-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--ember);
}
.home-card-scripts::before { background: var(--sand);   }
.home-card-guides::before  { background: var(--chrome); }
.home-card-garage::before  { background: var(--olive);  }
.home-card-disc::before    { background: var(--good);   }
.home-card-dash::before    { background: var(--ember);  }
.home-card:hover {
  transform: translateY(-2px);
  border-color: var(--ember);
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
}
.home-tag {
  display: inline-block;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--sand);
  border: 1px solid var(--border-2);
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 10px;
}
.home-card h3 {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 22px; letter-spacing: 0.5px;
  margin: 4px 0 6px;
  text-transform: uppercase;
  font-style: italic;
  color: var(--text);
}
.home-summary {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
  min-height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-stat {
  display: inline-flex; align-items: baseline; gap: 8px;
  margin-bottom: 10px;
}
.home-stat strong {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 28px;
  letter-spacing: 0.5px;
  color: var(--ember);
}
.home-stat small {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}
.home-cta {
  display: block;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sand);
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

/* ===== Generic card grid (Scripts + Mods) ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--olive), var(--ember));
}
.card-tag {
  display: inline-block; width: max-content;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--sand);
  border: 1px solid var(--border-2);
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 6px;
}
.card h3 {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 22px; letter-spacing: 0.5px;
  margin: 0 0 4px;
  text-transform: uppercase;
  font-style: italic;
  color: var(--text);
}
.card-summary {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.card-fixes {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  padding: 10px 12px;
  background: rgba(0,0,0,0.30);
  border-left: 2px solid var(--ember);
  border-radius: 0 4px 4px 0;
}
.card-fixes strong { color: var(--text); }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.card-actions .dl-btn { margin: 0; padding: 10px 14px; }
.card-actions .dl-btn-text strong { font-size: 13px; }

.card-licence {
  display: inline-block;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--good);
  border: 1px solid var(--good);
  padding: 3px 8px;
  border-radius: 2px;
  text-decoration: none;
}
.card-licence:hover { color: var(--ember); border-color: var(--ember); }
.card-licence-missing { color: var(--bad); border-color: var(--bad); }

.lang-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
}

.empty-note {
  color: var(--muted);
  font-size: 14px;
  padding: 22px 24px;
  background: var(--panel);
  border: 1px dashed var(--border-2);
  border-radius: 6px;
}
.empty-note code {
  background: rgba(0,0,0,0.4);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--sand);
  font-size: 12px;
}

/* ===== Guide detail page ===== */
.guide-series-head {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 18px; letter-spacing: 2px;
  text-transform: uppercase; font-style: italic;
  color: var(--sand);
  margin: 18px 0 8px;
}
.guide-static-card {
  text-decoration: none;
  color: var(--text);
  transition: transform 140ms, border-color 140ms, box-shadow 140ms;
}
.guide-static-card:hover {
  transform: translateY(-2px);
  border-color: var(--ember);
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
}
.guide-static-card .card-cta {
  display: block;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--ember);
}

/* Markdown body inside guide.html */
.guide-body {
  line-height: 1.65;
  font-size: 15px;
}
.guide-body h1, .guide-body h2, .guide-body h3, .guide-body h4 {
  font-family: "Impact", "Oswald", sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-style: italic;
  color: var(--text);
  margin: 28px 0 12px;
}
.guide-body h1 { font-size: 28px; color: var(--ember); }
.guide-body h2 { font-size: 22px; color: var(--ember); }
.guide-body h3 { font-size: 18px; color: var(--sand); }
.guide-body h4 { font-size: 15px; color: var(--sand); letter-spacing: 2px; }
.guide-body p  { margin: 10px 0; color: var(--text); }
.guide-body strong { color: var(--ember); }
.guide-body em     { color: var(--sand); font-style: italic; }
.guide-body a {
  color: var(--ember);
  border-bottom: 1px dashed rgba(232,114,28,0.55);
  text-decoration: none;
}
.guide-body a:hover { color: var(--sand); border-bottom-color: var(--sand); }
.guide-body ul, .guide-body ol { padding-left: 22px; margin: 10px 0; }
.guide-body li { margin: 6px 0; }
.guide-body code {
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 13px;
  color: var(--sand);
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, monospace;
}
.guide-body pre {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ember);
  padding: 14px 18px;
  border-radius: 4px;
  overflow-x: auto;
  margin: 14px 0;
  font-size: 13px;
  line-height: 1.55;
}
.guide-body pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
}
.guide-body blockquote {
  border-left: 3px solid var(--sand);
  margin: 14px 0;
  padding: 6px 14px;
  color: var(--muted);
  background: rgba(0,0,0,0.25);
  border-radius: 0 4px 4px 0;
}
.guide-body hr {
  border: none;
  border-top: 1px dashed var(--border-2);
  margin: 22px 0;
}

.guide-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}
.guide-pager .dl-btn { margin: 0; padding: 10px 12px; }
.guide-pager .dl-btn-text strong { font-size: 13px; }
.guide-pager .dl-btn-text small { font-size: 10px; }

/* ===== Discussions list ===== */
#discussions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
.discussion-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: transform 140ms, border-color 140ms, box-shadow 140ms;
}
.discussion-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--sand);
}
.discussion-card:hover {
  transform: translateY(-2px);
  border-color: var(--ember);
  box-shadow: 0 10px 28px rgba(0,0,0,0.55);
}
.discussion-card:hover::before { background: var(--ember); }
.d-head {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.d-cat { color: var(--sand); }
.d-answered {
  color: var(--good);
  border: 1px solid var(--good);
  padding: 2px 6px;
  border-radius: 2px;
}
.d-when { margin-left: auto; }
.d-title {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 18px; letter-spacing: 0.5px;
  text-transform: none; font-style: normal;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--text);
  line-height: 1.25;
}
.d-body {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.d-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px;
}
.d-author {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted);
}
.d-author img {
  border-radius: 50%;
  border: 1px solid var(--border-2);
}
.d-stats {
  display: inline-flex; gap: 12px;
  color: var(--muted);
}
.discussion-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 22px;
  border-style: dashed;
}
.discussion-empty h3 {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 22px; letter-spacing: 1px;
  text-transform: uppercase; font-style: italic;
  margin: 0 0 8px;
}
.discussion-empty p {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 18px;
}
.discussion-empty .dl-btn {
  display: inline-flex;
  width: max-content;
  margin: 0 auto;
}

/* ===== Dashboard stat cards ===== */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin: 8px 0 28px;
}
.stat-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 18px 20px;
  overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ember);
}
.stat-card .stat-label {
  color: var(--muted); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase;
}
.stat-card .stat-value {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 34px; font-weight: 700; margin-top: 8px;
  letter-spacing: 0.5px;
  color: var(--text);
}

/* ===== Chart panels ===== */
.chart-block {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px;
  margin-bottom: 22px;
  position: relative;
}
.chart-block h2 {
  margin: 0 0 16px;
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 18px; letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 600;
}
.chart-block.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.chart-block.split > div { background: transparent; }

/* ===== Events table ===== */
#events-table, .events-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.events-table th, .events-table td {
  text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border);
}
.events-table th {
  color: var(--sand); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: 2px;
}
.events-table tbody tr:hover { background: rgba(232,114,28,0.05); }

/* ===== Footer ===== */
footer {
  text-align: center; color: var(--muted);
  padding: 32px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
  font-size: 13px;
}
footer a { color: var(--ember); text-decoration: none; }
footer a:hover { color: var(--sand); text-decoration: underline; }

/* ===== Errors / loading ===== */
.err {
  background: rgba(201,68,43,0.15);
  border: 1px solid var(--bad);
  color: #F4C2B5;
  padding: 14px 16px; border-radius: 4px;
}
/* Loading placeholder: dotted, rounded box with a pulsing "Loading" label. */
.skeleton {
  background: rgba(0,0,0,0.2);
  border: 2px dashed var(--border-2);
  border-radius: 14px;
  height: 130px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.skeleton::before {
  content: "Loading…";
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 13px; letter-spacing: 3px; text-transform: uppercase;
  font-style: italic;
  color: var(--muted);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(232,114,28,0.05), transparent);
  animation: sweep 1.6s infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes skeleton-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 0.9; } }

/* ===== Tab panels ===== */
.tab-panel { display: none; }
.tab-panel[data-active="true"] { display: block; animation: fade-in 220ms ease; }
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

/* ===== Content title header (inside the left content column) =====
   The hero banner is left untouched on every page. Page-specific titles
   for the app + guide detail pages live as a header block at the top of
   the main content column. */
.content-title-head {
  position: relative;
  background:
    linear-gradient(135deg, rgba(232,114,28,0.06), rgba(0,0,0,0.25)),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 22px 24px 24px;
  margin-bottom: 22px;
  overflow: hidden;
}
.content-title-head::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--olive), var(--sand), var(--ember));
}
.content-title-head .back { margin-bottom: 16px; }
.content-title-head .eyebrow {
  display: inline-block;
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--sand);
  border: 1px solid var(--border-2);
  background: rgba(0,0,0,0.4);
  padding: 5px 10px; border-radius: 2px;
  margin-bottom: 10px;
}
.content-title-head h1 {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: clamp(30px, 3.5vw, 44px);
  line-height: 0.98;
  letter-spacing: -0.5px;
  margin: 0;
  text-transform: uppercase;
  font-style: italic;
  color: var(--text);
}
.content-title-head h1 .accent { color: var(--ember); }
.page-tagline {
  color: var(--muted);
  font-size: 15px;
  margin: 12px 0 0;
  max-width: 70ch;
}

/* App detail: eyebrow on its own line, icon + title inline below it. */
.app-title-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: nowrap;
  margin: 0;
}
.app-title-row h1 { margin: 0; }
.app-hero-icon {
  flex: 0 0 auto;
  width: 60px; height: 60px;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.5));
}
.app-hero-icon svg { width: 100%; height: 100%; display: block; }
.content-title-head .page-tagline { margin-top: 12px; }
@media (max-width: 560px) {
  .app-hero-icon { width: 48px; height: 48px; }
}

@media (max-width: 760px) {
  .content-title-head { padding: 18px 18px 20px; }
  .app-hero-icon { width: 56px; height: 56px; }
}

.app-detail { margin-top: 8px; }

.app-hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}
.app-hero-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--olive), var(--sand), var(--ember));
  z-index: 2;
}
.app-hero-card-body {
  padding: 36px 36px 32px;
  position: relative; z-index: 1;
  background:
    linear-gradient(135deg, rgba(232,114,28,0.05), rgba(0,0,0,0.25)),
    var(--panel);
}
.app-hero-card-body h2 {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: 0; font-style: italic;
  text-transform: uppercase;
  margin: 8px 0 14px;
  line-height: 0.95;
}
.app-hero-card-body .hc-summary {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 22px;
  max-width: 46ch;
}
.hc-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.hc-chip {
  display: inline-block;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  background: rgba(0,0,0,0.45);
  color: var(--sand);
  border: 1px solid var(--border-2);
  padding: 5px 10px; border-radius: 2px;
}
.app-hero-card-art {
  position: relative;
  min-height: 220px;
  background: #1A1A0E;
}
.app-hero-card-art svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}

/* Detail two-col grid */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.detail-main { min-width: 0; }

.detail-sidebar { position: sticky; top: 24px; }
.sidebar-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.sidebar-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--ember);
}

/* Download buttons */
.dl-btn {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
  background: var(--ember);
  color: #0B0B0E;
  padding: 14px 18px;
  border-radius: 4px;
  margin-bottom: 10px;
  border: 1px solid var(--ember);
  transition: background 120ms, transform 120ms, box-shadow 120ms;
  font-weight: 700;
}
.dl-btn:hover {
  background: #FFA250;
  border-color: #FFA250;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232,114,28,0.35);
}
.dl-btn-icon {
  font-size: 20px; line-height: 1;
}
.dl-btn-ico {
  width: 20px; height: 20px; flex: 0 0 auto;
  color: currentColor;
}
.dl-btn-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.dl-btn-text strong {
  font-family: "Impact", "Oswald", sans-serif;
  font-size: 16px; letter-spacing: 2px; text-transform: uppercase;
}
.dl-btn-text small {
  font-size: 11px; opacity: 0.75;
  font-weight: 500; margin-top: 2px;
}
.dl-btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
  margin-bottom: 18px;
}
.dl-btn-ghost:hover {
  background: rgba(232,114,28,0.10);
  color: var(--ember);
  border-color: var(--ember);
  box-shadow: none;
}

/* Sidebar info list */
.info-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 14px;
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.info-list dt {
  color: var(--muted);
  font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase;
  align-self: center;
}
.info-list dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

/* Feature list + tags */
.feature-list {
  list-style: none;
  padding: 0; margin: 0;
}
.feature-list li {
  position: relative;
  padding: 8px 0 8px 22px;
  border-bottom: 1px dashed var(--border);
  color: var(--text);
  font-size: 14px;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: "▸";
  position: absolute; left: 0; top: 8px;
  color: var(--ember);
  font-size: 14px;
}
.feature-list li.muted-text::before { content: ""; }

.tag-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.tag {
  display: inline-block;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-2);
  color: var(--sand);
  padding: 6px 12px;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  border-radius: 2px;
}
.muted-text { color: var(--muted); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .detail-grid { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; }
  .app-hero-card { grid-template-columns: 1fr; }
  .app-hero-card-art { min-height: 140px; order: -1; }
}
@media (max-width: 760px) {
  .chart-block.split { grid-template-columns: 1fr; }
  .hero-inner { padding: 48px 20px 36px; }
  main { padding: 24px 20px 60px; }
  .tab { padding: 12px 14px; font-size: 12px; letter-spacing: 1px; }
  .hero .stencil { display: none; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .app-hero-card-body { padding: 24px 22px 22px; }
  .app-hero-card-body h2 { font-size: 30px; }
  .info-list dd { font-size: 12px; }
}
