/*
Theme Name: BuildaVan
Theme URI: https://buildavan.ca
Author: BuildaVan
Author URI: https://buildavan.ca
Description: Engineering-doc dark theme for BuildaVan — a family Transit conversion documented in full.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: buildavan
*/

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

/* ── DESIGN TOKENS ───────────────────────────────────────── */
:root {
  --bg:           #181b1f;
  --bg-surface:   #1e2228;
  --bg-raised:    #252b34;
  --accent:       #00c9a7;
  --accent-hover: #00dbb8;
  --accent-dim:   rgba(0,201,167,0.10);
  --text:         #dde1e8;
  --text-mid:     #9aa5b4;
  --text-dim:     #6e7987;
  --border:       #282f3a;
  --border-lit:   #313b4a;
  --sidebar-w:    180px;
  --ad-w:         300px;
  --header-h:     46px;
  --panel-w:      304px;
  --mono:         'JetBrains Mono', 'Courier New', monospace;
  --sans:         'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --grid-line:    rgba(255,255,255,0.035);
}

html { scroll-behavior: smooth; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

/* ── HEADER ──────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 14px;
  z-index: 100; gap: 8px;
}
.site-logo {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: var(--text); flex-shrink: 0;
}
.logo-box {
  width: 30px; height: 30px;
  border: 1.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px; color: var(--accent); letter-spacing: 0.5px;
}
.logo-words { display: flex; flex-direction: column; line-height: 1.2; }
.logo-main { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text); }
.logo-sub  { font-family: var(--mono); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); }

.header-nav {
  display: flex; align-items: center; gap: 1px; margin-left: 24px; flex: 1;
}
.header-nav a {
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.3px;
  color: var(--text-mid); text-decoration: none;
  padding: 5px 12px; border-radius: 2px; transition: color .12s, background .12s;
}
.header-nav a:hover,
.header-nav a.current { color: var(--text); background: var(--bg-raised); }
.header-nav a.current { color: var(--accent); background: transparent; }

.header-right {
  margin-left: auto; display: flex; align-items: center; gap: 16px;
  font-family: var(--mono); font-size: 9px; color: var(--text-dim); letter-spacing: .8px;
}

/* ── LAYOUT ──────────────────────────────────────────────── */
.site-wrapper {
  display: flex;
  padding-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}

/* ── SIDEBAR ─────────────────────────────────────────────── */
.site-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--bg-surface); border-right: 1px solid var(--border-lit);
  position: sticky; top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto; overflow-x: hidden; padding: 16px 0 24px;
}
.site-sidebar::-webkit-scrollbar { width: 3px; }
.site-sidebar::-webkit-scrollbar-thumb { background: var(--border-lit); border-radius: 2px; }

.sb-section { margin-bottom: 4px; }
.sb-section + .sb-section { border-top: 1px solid var(--border); }
.sb-label {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); padding: 14px 16px 8px;
}
.sb-num { opacity: 0.6; }
.site-sidebar a {
  display: block;
  padding: 7px 16px;
  font-size: 13px; line-height: 1.3;
  font-family: var(--mono); color: var(--text-dim); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .1s, background .1s; position: relative;
}
.site-sidebar a:hover { color: var(--text); background: var(--bg-raised); }
.site-sidebar a.current-menu-item { color: var(--text); font-weight: 700; background: var(--bg-raised); }
.site-sidebar a.current-menu-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--accent);
}
.site-sidebar a.ext::after { content: ''; }
/* Dead/coming-soon sidebar item */
.sb-dead {
  display: block; padding: 7px 16px;
  font-size: 13px; font-family: var(--mono);
  color: var(--border-lit); cursor: default;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sb-dead:hover { color: var(--text-dim); }
/* External brand link note */
.sb-ext-note {
  font-family: var(--mono); font-size: 9px;
  color: var(--text-dim); margin-left: 4px;
}
.sb-sid {
  font-family: var(--mono); font-size: 10px; color: var(--accent);
  margin-right: 6px; opacity: 0.8;
}

/* Sidebar flyout label-as-link */
.sb-label-link {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent); padding: 10px 14px 3px;
  text-decoration: none; transition: color .12s;
}
.sb-label-link em { color: var(--text-dim); font-style: normal; font-size: 8px; }
.sb-label-link:hover { color: var(--accent-hover); }
.sb-label-link.active { color: var(--text); }
.sb-flyout-data { display: none; }

/* Sidebar flyout panel */
.sb-flyout {
  position: fixed;
  top: 0; left: 178px; /* fallback; JS overrides top */
  width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  z-index: 200;
  display: none;
  padding: 6px 0;
}
.sb-flyout.visible { display: block; }
.sb-fly-item {
  display: flex; align-items: baseline; gap: 8px;
  padding: 6px 14px; text-decoration: none; color: var(--text-mid);
  font-size: 12px; transition: color .1s, background .1s;
}
.sb-fly-item:hover  { color: var(--text); background: var(--bg-raised); }
.sb-fly-item.current { color: var(--text); background: var(--bg-raised); border-left: 2px solid var(--accent); padding-left: 12px; }
.sb-fly-id {
  font-family: var(--mono); font-size: 8px; color: var(--accent);
  flex-shrink: 0; letter-spacing: .5px;
}
.sb-fly-title { line-height: 1.3; }
.sb-fly-empty {
  display: block; padding: 8px 14px;
  font-family: var(--mono); font-size: 9px; color: var(--text-dim); letter-spacing: .5px;
}

/* Sidebar story ID badge */
.sb-sid {
  font-family: var(--mono); font-size: 8px; color: var(--accent);
  letter-spacing: .5px; margin-right: 2px;
}

/* ── MAIN ────────────────────────────────────────────────── */
.site-main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  height: 100%;
  overflow-y: auto;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  background-attachment: local;
}
/* WordPress admin bar offset */
.admin-bar .site-header  { top: 32px; }
.admin-bar .site-sidebar { top: calc(var(--header-h) + 32px); height: calc(100vh - var(--header-h) - 32px); }
.admin-bar .site-wrapper { padding-top: calc(var(--header-h) + 32px); height: calc(100vh - var(--header-h) - 32px); }
.admin-bar .site-main    { height: 100%; }
.admin-bar .info-panel   { top: calc(var(--header-h) + 32px); }

/* ── HOME: VAN STAGE ─────────────────────────────────────── */
.van-stage {
  flex: 1;
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
}
.view-toggle {
  position: absolute; top: 12px; left: 12px;
  display: flex; gap: 1px; z-index: 10;
}
.vbtn {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 5px 13px;
  background: var(--bg-surface); border: 1px solid var(--border);
  color: var(--text-mid); cursor: pointer; transition: all .13s;
}
.vbtn:first-child { border-radius: 2px 0 0 2px; }
.vbtn:last-child  { border-radius: 0 2px 2px 0; }
.vbtn:hover { color: var(--text); background: var(--bg-raised); border-color: var(--border-lit); }
.vbtn.on    { color: var(--accent); background: var(--bg-raised); border-color: var(--accent); }
.stage-meta {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--mono); font-size: 8px; color: var(--text-dim); letter-spacing: .8px;
  z-index: 10; text-align: right; line-height: 1.7;
}

/* Van image container */
.van-view { display: none; }
.van-view.active { display: flex; align-items: center; justify-content: center; }
.van-wrap { position: relative; display: inline-block; }
.van-wrap img {
  display: block;
  max-height: calc(100vh - var(--header-h) - 46px - 100px);
  max-width: calc(100vw - var(--sidebar-w) - 120px);
  width: auto; height: auto;
}
.van-ph {
  width: 760px; max-width: calc(100vw - var(--sidebar-w) - 32px);
  aspect-ratio: 16/9;
  background: var(--bg-surface); border: 1px dashed var(--border-lit);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.van-ph p { font-family: var(--mono); font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }

/* Dots */
.dots-layer { position: absolute; inset: 0; pointer-events: none; }
.dot {
  position: absolute; width: 26px; height: 26px;
  transform: translate(-50%, -50%);
  cursor: pointer; pointer-events: auto;
}
.dot-ring {
  position: absolute; inset: -7px; border-radius: 50%;
  border: 1px solid var(--accent); opacity: 0;
  animation: ripple 2.8s ease-out infinite;
}
.dot-core {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-surface); border: 1.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 8px; font-weight: 500; color: var(--accent);
  transition: all .18s; position: relative; z-index: 1;
}
.dot:hover .dot-core, .dot.on .dot-core {
  background: var(--accent); color: var(--bg); transform: scale(1.18);
}
.dot-tip {
  position: absolute; bottom: calc(100% + 7px); left: 50%;
  transform: translateX(-50%);
  background: var(--bg-raised); border: 1px solid var(--border-lit);
  padding: 3px 8px; white-space: nowrap;
  font-family: var(--mono); font-size: 9px; color: var(--text-mid);
  opacity: 0; pointer-events: none; transition: opacity .13s; z-index: 30;
}
.dot:hover .dot-tip { opacity: 1; }
.dot.dim .dot-ring  { border-color: var(--border-lit); }
.dot.dim .dot-core  { border-color: var(--border-lit); color: var(--text-dim); }
.dot.dim:hover .dot-core, .dot.dim.on .dot-core {
  background: var(--bg-raised); color: var(--text); transform: scale(1.08);
}
@keyframes ripple {
  0%   { transform: scale(.7); opacity: .7; }
  100% { transform: scale(2.2); opacity: 0; }
}
.dot:nth-child(1) .dot-ring { animation-delay: 0s; }
.dot:nth-child(2) .dot-ring { animation-delay: .4s; }
.dot:nth-child(3) .dot-ring { animation-delay: .8s; }
.dot:nth-child(4) .dot-ring { animation-delay: 1.2s; }
.dot:nth-child(5) .dot-ring { animation-delay: 1.6s; }
.dot:nth-child(6) .dot-ring { animation-delay: 2.0s; }
.dot:nth-child(7) .dot-ring { animation-delay: 2.4s; }

/* Lead lines */
.dot-lead {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; pointer-events: none; z-index: 5;
}
.dot.lead-right .dot-lead { left: calc(100% + 2px); flex-direction: row; }
.dot.lead-left  .dot-lead { right: calc(100% + 2px); flex-direction: row-reverse; }
.dot-line {
  width: 36px; height: 1px; background: var(--accent); flex-shrink: 0;
}
.dot-tag {
  font-family: var(--mono); font-size: 8px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text); background: var(--bg-surface);
  border: 1px solid var(--border-lit); padding: 3px 7px; white-space: nowrap;
}
.dot.dim .dot-line { background: var(--border-lit); }
.dot.dim .dot-tag  { color: var(--text-dim); }

/* ── STATS BAR ───────────────────────────────────────────── */
.stats-bar {
  height: 46px; flex-shrink: 0;
  background: var(--bg-surface); border-top: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px;
}
.stat {
  display: flex; align-items: baseline; gap: 7px;
  padding: 0 18px; border-right: 1px solid var(--border);
}
.stat:first-child { padding-left: 0; }
.stat-val { font-family: var(--mono); font-size: 18px; font-weight: 500; color: var(--text); line-height: 1; }
.stat-lbl { font-family: var(--mono); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); line-height: 1.4; }
.stat-lbl span { display: block; }
.pulse-pill {
  margin-left: auto; display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 8px; letter-spacing: 1px; color: var(--accent);
}
.pulse-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ── INFO PANEL ──────────────────────────────────────────── */
.panel-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.28); opacity: 0; pointer-events: none;
  transition: opacity .22s; z-index: 40;
}
.panel-overlay.on { opacity: 1; pointer-events: auto; }
.info-panel {
  position: fixed; right: 0;
  top: var(--header-h); bottom: 0; width: var(--panel-w);
  background: var(--bg-surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.4,0,.2,1);
  z-index: 50;
}
.info-panel.on { transform: translateX(0); }
.panel-hdr {
  padding: 14px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.panel-id    { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--accent); margin-bottom: 4px; }
.panel-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }
.panel-x {
  width: 26px; height: 26px; flex-shrink: 0;
  background: none; border: 1px solid var(--border); border-radius: 2px;
  color: var(--text-dim); font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all .13s;
}
.panel-x:hover { border-color: var(--border-lit); color: var(--text); background: var(--bg-raised); }
.panel-body { flex: 1; padding: 14px; overflow-y: auto; }
.badge {
  display: inline-block; font-family: var(--mono); font-size: 8px;
  letter-spacing: 1px; text-transform: uppercase;
  padding: 3px 7px; border-radius: 2px; margin-bottom: 12px;
}
.badge.avail { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,201,167,.22); }
.badge.soon  { background: rgba(110,121,135,.1); color: var(--text-dim); border: 1px solid var(--border-lit); }
.badge.live  { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(0,201,167,.22); }
.res-card-link { text-decoration: none; transition: border-color .15s, background .15s; }
.res-card-link:hover { border-color: var(--accent); background: var(--bg-raised); }
.panel-excerpt { font-size: 12.5px; color: var(--text-mid); line-height: 1.65; margin-bottom: 14px; }
.panel-meta {
  font-family: var(--mono); font-size: 9px; color: var(--text-dim);
  line-height: 2; margin-bottom: 18px; border-top: 1px solid var(--border); padding-top: 12px;
}
.panel-meta span { display: block; }
.panel-actions { display: flex; flex-direction: column; gap: 8px; }
.btn-p {
  display: block; padding: 9px 14px; text-align: center;
  background: var(--accent); color: var(--bg);
  font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase;
  text-decoration: none; border-radius: 2px; border: none; cursor: pointer; transition: background .13s;
}
.btn-p:hover { background: var(--accent-hover); color: var(--bg); }
.btn-s {
  display: block; padding: 8px 14px; text-align: center;
  background: transparent; color: var(--text-mid);
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
  text-decoration: none; border-radius: 2px; border: 1px solid var(--border-lit); cursor: pointer; transition: all .13s;
}
.btn-s:hover { color: var(--text); background: var(--bg-raised); }

/* ── STORY PAGE ──────────────────────────────────────────── */
.story-wrap { display: flex; flex: 1; min-width: 0; }
.story-content { flex: 1; min-width: 0; padding: 40px 40px 80px; }

.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-mid); margin-bottom: 28px;
}
.breadcrumb a { color: var(--text-mid); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--border-lit); }

.story-tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px; max-width: 640px;
}
.story-tag::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.entry-title {
  font-size: 28px; font-weight: 600; color: var(--text);
  line-height: 1.25; margin-bottom: 10px; max-width: 640px;
}
.story-sub {
  font-size: 15px; color: var(--text-mid); font-style: italic;
  margin-bottom: 28px; max-width: 640px;
}

/* YouTube block */
.yt-block {
  max-width: 640px;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 3px;
  padding: 18px 20px; display: flex; align-items: center; gap: 14px;
  margin-bottom: 36px; text-decoration: none; color: var(--text); transition: border-color .15s;
}
.yt-block:hover { border-color: var(--border-lit); color: var(--text); }
.yt-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: #ff0000; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.yt-icon svg { width: 16px; height: 16px; fill: white; }
.yt-meta { flex: 1; }
.yt-label { font-family: var(--mono); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 3px; }
.yt-title { font-size: 13px; font-weight: 500; }
.yt-cta   { font-family: var(--mono); font-size: 9px; color: var(--accent); }

/* YouTube embed */
.yt-embed {
  max-width: 640px; margin-bottom: 36px;
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
  border: 1px solid var(--border); border-radius: 2px;
}
.yt-embed iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  display: block;
}

/* YouTube placeholder (no video yet) */
.yt-placeholder {
  max-width: 640px; margin-bottom: 36px;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 2px;
  padding: 18px 20px; display: flex; align-items: center; gap: 14px;
}
.yt-ph-icon {
  width: 40px; height: 40px; border-radius: 50%; background: var(--bg-raised);
  border: 1px solid var(--border-lit); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.yt-ph-icon svg { width: 14px; height: 14px; fill: var(--text-dim); }
.yt-ph-text { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.yt-ph-label { font-size: 13px; font-weight: 500; color: var(--text-mid); }
.yt-ph-sub   { font-family: var(--mono); font-size: 9px; color: var(--text-dim); letter-spacing: .5px; }
.yt-ph-cta   { font-family: var(--mono); font-size: 9px; color: var(--accent); letter-spacing: .8px; text-decoration: none; white-space: nowrap; }
.yt-ph-cta:hover { color: var(--accent-hover); }

/* Prose */
.entry-content { max-width: 640px; }
.entry-content h2 {
  font-size: 17px; font-weight: 600; color: var(--text);
  margin: 36px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.entry-content h3 {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent);
  margin: 28px 0 10px;
}
.entry-content p { margin-bottom: 16px; line-height: 1.75; color: var(--text); }
.entry-content strong { color: var(--text); font-weight: 600; }
.entry-content em { color: var(--text-mid); }

.story-img { margin: 28px 0; border: 1px solid var(--border); border-radius: 2px; overflow: hidden; }
.story-img img { width: 100%; }
.story-img figcaption {
  font-family: var(--mono); font-size: 9px; color: var(--text-dim);
  padding: 8px 12px; border-top: 1px solid var(--border);
}
.callout {
  border-left: 3px solid var(--accent); padding: 14px 18px;
  background: var(--accent-dim); border-radius: 0 2px 2px 0; margin: 24px 0;
}
.callout p { margin: 0; color: var(--text); }

/* In-content ad */
.ad-incontent {
  max-width: 640px; height: 90px; margin: 28px 0;
  background: var(--bg-surface); border: 1px dashed var(--border-lit); border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 8px; color: var(--border-lit); letter-spacing: 1px; text-transform: uppercase;
}

/* Ad sidebar */
.ad-sidebar { width: var(--ad-w); flex-shrink: 0; padding: 40px 20px 40px 0; }
.ad-sticky  { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; }
.ad-slot {
  background: var(--bg-surface); border: 1px dashed var(--border-lit); border-radius: 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.ad-slot.sz-300x250 { width: 300px; height: 250px; }
.ad-slot.sz-300x600 { width: 300px; height: 600px; }
.ad-slot span { font-family: var(--mono); font-size: 8px; color: var(--border-lit); letter-spacing: 1px; text-transform: uppercase; }

/* Related stories */
.story-divider { border: none; border-top: 1px solid var(--border); margin: 48px 0 36px; }
.related-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-mid); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px; max-width: 640px;
}
.related-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 640px; }
.related-card {
  background: var(--bg-surface); border: 1px solid var(--border); padding: 14px;
  text-decoration: none; border-radius: 2px; transition: border-color .13s, background .13s;
  display: flex; flex-direction: column; gap: 6px; color: var(--text);
}
.related-card:hover { border-color: var(--border-lit); background: var(--bg-raised); color: var(--text); }
.rc-id    { font-family: var(--mono); font-size: 8px; letter-spacing: 1px; color: var(--accent); }
.rc-title { font-size: 12px; font-weight: 500; line-height: 1.35; }
.rc-type  { font-family: var(--mono); font-size: 8px; color: var(--text-dim); margin-top: auto; }

.story-disclosure {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); max-width: 640px;
  font-family: var(--mono); font-size: 9px; color: var(--text-dim); line-height: 1.7;
}

/* Story hero image (single-story.php) */
.story-hero-img {
  max-width: 640px; margin-bottom: 32px;
  border: 1px solid var(--border); border-radius: 2px; overflow: hidden;
}
.story-hero-img img { width: 100%; height: auto; display: block; }

/* Stories archive grid (index.php) */
.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; max-width: 900px;
}
.story-card {
  display: flex; flex-direction: column;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 2px;
  text-decoration: none; color: var(--text);
  transition: border-color .13s, background .13s; overflow: hidden;
}
.story-card:hover { border-color: var(--border-lit); background: var(--bg-raised); color: var(--text); }
.sc-thumb {
  width: 100%; aspect-ratio: 3/2; overflow: hidden; background: var(--bg-raised);
}
.sc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.story-card:hover .sc-thumb img { transform: scale(1.03); }
.sc-thumb-empty {
  display: flex; align-items: center; justify-content: center;
  border-bottom: 2px solid var(--border-lit);
}
.sc-body { padding: 14px; display: flex; flex-direction: column; gap: 5px; }
.sc-id    { font-family: var(--mono); font-size: 8px; letter-spacing: 1px; color: var(--accent); }
.sc-title { font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--text); }
.sc-tag   { font-family: var(--mono); font-size: 8px; color: var(--text-dim); margin-top: 2px; }

/* ── LATEST STORIES STRIP (homepage) ────────────────────── */
.latest-strip {
  flex-shrink: 0;
  background: var(--bg-surface); border-top: 1px solid var(--border);
  padding: 14px 16px; display: flex; align-items: center; gap: 16px;
}
.latest-label {
  font-family: var(--mono); font-size: 8px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent); flex-shrink: 0;
}
.latest-cards {
  display: flex; gap: 8px; flex: 1; align-items: center; overflow: hidden;
}
.latest-card {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--bg-raised); border: 1px solid var(--border);
  padding: 8px 12px; border-radius: 2px; text-decoration: none; color: var(--text);
  flex: 1; min-width: 0; transition: border-color .12s;
}
.latest-card:hover { border-color: var(--border-lit); color: var(--text); }
.lc-id    { font-family: var(--mono); font-size: 7px; letter-spacing: 1px; color: var(--accent); }
.lc-title { font-size: 11px; font-weight: 500; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-tag   { font-family: var(--mono); font-size: 7px; color: var(--text-dim); }
.latest-all {
  font-family: var(--mono); font-size: 9px; letter-spacing: .8px; color: var(--accent);
  text-decoration: none; flex-shrink: 0; white-space: nowrap;
}
.latest-all:hover { color: var(--accent-hover); }

/* ── ARCHIVE / FILMS PAGE ────────────────────────────────── */
.archive-wrap { padding: 40px 40px 80px; }

.archive-hdr  { max-width: 900px; margin-bottom: 32px; }
.archive-tag  {
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px; max-width: 640px;
}
.archive-tag::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.archive-title { font-size: 28px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.archive-sub   { font-size: 14px; color: var(--text-mid); }
.archive-sub a { color: var(--accent); }

.archive-empty {
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  padding: 40px 0; line-height: 2;
}

/* Film grid */
.film-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  max-width: 960px;
}
.film-card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 2px;
  text-decoration: none; color: var(--text);
  display: flex; flex-direction: column;
  transition: border-color .13s, background .13s;
  overflow: hidden;
}
.film-card:hover { border-color: var(--border-lit); background: var(--bg-raised); color: var(--text); }

.film-thumb {
  position: relative; aspect-ratio: 16/9;
  background: var(--bg-raised); overflow: hidden;
}
.film-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-raised);
}
.film-thumb-ph svg { width: 32px; height: 32px; fill: var(--border-lit); }

.film-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.35); opacity: 0;
  transition: opacity .15s;
}
.film-card:hover .film-play { opacity: 1; }
.film-play svg {
  width: 44px; height: 44px; fill: white;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
}

.film-meta {
  padding: 14px; display: flex; flex-direction: column; gap: 5px; flex: 1;
}
.film-id {
  font-family: var(--mono); font-size: 8px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--accent);
}
.film-title  { font-size: 13px; font-weight: 500; line-height: 1.35; color: var(--text); }
.film-series { font-family: var(--mono); font-size: 8px; color: var(--text-dim); margin-top: auto; padding-top: 4px; }

/* ── RESOURCES PAGE ─────────────────────────────────────── */
.res-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px; max-width: 800px;
}
.res-card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: 2px;
  padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.res-card-hdr {
  display: flex; align-items: flex-start; gap: 12px;
}
.res-icon {
  font-size: 20px; color: var(--accent); flex-shrink: 0; margin-top: 2px;
}
.res-title { font-size: 15px; font-weight: 600; color: var(--text); }
.res-sub   { font-family: var(--mono); font-size: 9px; color: var(--text-dim); margin-top: 2px; letter-spacing: .5px; }
.res-card-hdr .badge { margin-left: auto; flex-shrink: 0; }
.res-desc  { font-size: 13px; color: var(--text-mid); line-height: 1.65; margin: 0; }

/* ── TIMELINE PAGE ───────────────────────────────────────── */
.tl-wrap { position: relative; padding-left: 24px; }
.tl-wrap::before {
  content: ''; position: absolute; left: 7px; top: 0; bottom: 0;
  width: 1px; background: var(--border);
}
.tl-phase {
  margin: 32px 0 12px; position: relative;
}
.tl-phase-label {
  font-family: var(--mono); font-size: 8px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--accent); padding-left: 16px;
}
.tl-item {
  display: flex; gap: 20px; margin-bottom: 28px; position: relative;
}
.tl-marker {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg);
  flex-shrink: 0; margin-top: 3px; position: relative; left: -30px;
}
.tl-item.done   .tl-marker { border-color: var(--accent); background: var(--accent); }
.tl-item.active .tl-marker { border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 3px rgba(0,201,167,0.2); }
.tl-item.upcoming .tl-marker { border-color: var(--border-lit); }
.tl-body { flex: 1; padding-left: 0; }
.tl-date {
  font-family: var(--mono); font-size: 9px; letter-spacing: .8px;
  color: var(--text-dim); text-transform: uppercase; margin-bottom: 4px;
}
.tl-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.tl-note  { font-size: 13px; color: var(--text-mid); line-height: 1.7; margin: 0 0 8px; }
.tl-link  {
  font-family: var(--mono); font-size: 10px; color: var(--accent);
  text-decoration: none; letter-spacing: .5px;
}
.tl-link:hover { color: var(--accent-hover); }
.tl-specs {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px;
}
.tl-specs span {
  font-family: var(--mono); font-size: 9px; color: var(--text-dim);
  background: var(--bg-raised); border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 2px;
}
.tl-status {
  display: inline-block; font-family: var(--mono); font-size: 8px;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent);
  padding: 2px 8px; border-radius: 2px; margin-top: 6px;
}

/* ── VAN BUYING GUIDE ────────────────────────────────────── */
.guide-disclaimer {
  background: rgba(110,121,135,0.08); border: 1px solid var(--border-lit);
  border-left: 3px solid var(--text-dim);
  padding: 14px 18px; margin: 24px 0 40px;
  font-size: 12px; color: var(--text-dim); line-height: 1.7;
}
.guide-disclaimer-label {
  display: block; font-family: var(--mono); font-size: 8px;
  letter-spacing: 2px; color: var(--text-dim); margin-bottom: 6px;
}
.guide-h2 {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin: 44px 0 14px;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.guide-compare { display: flex; flex-direction: column; gap: 16px; margin: 20px 0; }
.guide-platform {
  background: var(--bg-surface); border: 1px solid var(--border);
  padding: 18px 20px; border-radius: 2px;
}
.guide-platform-hdr {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.guide-platform-name {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--text); letter-spacing: .5px;
}
.guide-platform p { font-size: 13px; color: var(--text-mid); line-height: 1.7; margin: 0; }
.guide-specs { display: flex; flex-direction: column; margin: 20px 0; }
.guide-spec-row {
  display: flex; gap: 20px; padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.guide-spec-row:first-child { border-top: 1px solid var(--border); }
.guide-spec-key {
  width: 130px; flex-shrink: 0;
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  color: var(--accent); letter-spacing: .5px; padding-top: 2px;
}
.guide-spec-val { font-size: 13px; color: var(--text-mid); line-height: 1.7; flex: 1; }
.guide-spec-val strong { color: var(--text); font-weight: 600; }
.guide-callout {
  background: rgba(0,201,167,0.05); border: 1px solid rgba(0,201,167,0.2);
  border-left: 3px solid var(--accent);
  padding: 16px 20px; margin: 24px 0;
}
.guide-callout-label {
  display: block; font-family: var(--mono); font-size: 8px;
  letter-spacing: 2px; color: var(--accent); margin-bottom: 8px;
}
.guide-callout p { font-size: 13px; color: var(--text-mid); line-height: 1.7; margin: 0; }
.guide-list {
  margin: 16px 0 16px 20px; display: flex; flex-direction: column; gap: 10px;
}
.guide-list li { font-size: 13px; color: var(--text-mid); line-height: 1.65; }
.guide-list li strong { color: var(--text); }
.guide-closer {
  margin: 48px 0 0;
  background: var(--bg-surface); border: 1px solid var(--border-lit);
  border-top: 2px solid var(--accent);
  padding: 20px 24px;
}
.guide-closer-label {
  display: block; font-family: var(--mono); font-size: 8px;
  letter-spacing: 2px; color: var(--accent); margin-bottom: 10px;
}
.guide-closer p { font-size: 13px; color: var(--text-mid); line-height: 1.7; margin: 0 0 6px; }
.guide-closer a { color: var(--accent); }
.guide-h3 {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-mid); margin: 28px 0 10px;
}
.guide-callout-warn {
  border-left-color: var(--text-dim);
  background: rgba(110,121,135,0.07);
}
.guide-ranking {
  margin: 24px 0 40px;
  border: 1px solid var(--border); border-radius: 2px; overflow: hidden;
}
.guide-ranking-label {
  font-family: var(--mono); font-size: 8px; letter-spacing: 2px;
  color: var(--text-dim); padding: 10px 16px;
  background: var(--bg-surface); border-bottom: 1px solid var(--border);
}
.guide-ranking-item {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-mid);
}
.guide-ranking-item:last-of-type { border-bottom: none; }
.rank-num {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  width: 24px; flex-shrink: 0;
}
.rank-1 { background: rgba(0,201,167,0.08); color: var(--text); }
.rank-1 .rank-num { color: var(--accent); }
.rank-2 .rank-num { color: var(--accent); opacity: 0.7; }
.rank-3 .rank-num, .rank-4 .rank-num { color: var(--text-dim); }
.rank-5 .rank-num, .rank-6 .rank-num { color: var(--border-lit); }
.guide-ranking-note {
  font-family: var(--mono); font-size: 9px; color: var(--text-dim);
  padding: 8px 16px; background: var(--bg-surface);
  border-top: 1px solid var(--border);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .ad-sidebar { display: none; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .site-sidebar { display: none; }
  .header-nav { display: none; }
  .story-content { padding: 24px 20px 60px; }
  .entry-title { font-size: 22px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .stats-bar { overflow-x: auto; gap: 0; }
  .stat { padding: 0 12px; }
}
