/* ==========================================================================
   SoCal Fix It — brand system
   Ported from the approved Claude Design homepage. Dark mode ONLY.
   Palette sampled from the logo. Red is a spark, not a flood.
   ========================================================================== */

/* --- Self-hosted fonts ---------------------------------------------------- */
/* Files live in /assets/fonts (see fonts.css, imported below). */
@import url("../fonts/fonts.css");

/* --- Design tokens -------------------------------------------------------- */
:root {
  --red:        #E22129;  /* primary accent — the medical-cross red */
  --red-hover:  #ff3b42;
  --white:      #FFFFFF;
  --bg:         #000000;  /* true black base */
  --bg-lift:    #1B2529;  /* cool lifted tone — top-center radial glow */
  --card:       #0D0E11;  /* off-black panels/cards */
  --text:       #E8E8EA;  /* body text */
  --text-muted: #9AA0A4;  /* secondary text, captions, meta */
  --text-soft:  #C7CCCF;  /* between text and muted */
  --line:       #232A2E;  /* hairline borders / dividers */
  --line-hover: #2f383d;  /* card border on hover */

  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --container: 1180px;
  --radius:    7px;
  --radius-sm: 5px;

  --shadow-red: 0 0 24px rgba(226, 33, 41, 0.3);
  --glow-red:   0 0 20px rgba(226, 33, 41, 0.25);
}

/* --- Reset / base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: var(--red); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--red-hover); }

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

::selection { background: var(--red); color: #fff; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; color: #fff; margin: 0; }

/* --- Radial glow background ----------------------------------------------- */
/* Fixed so it stays anchored top-center while the page scrolls. */
.bg-glow {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 1300px; max-width: 120vw; height: 720px;
  background: radial-gradient(ellipse 60% 100% at 50% 0%,
              var(--bg-lift) 0%, rgba(27, 37, 41, 0.45) 34%, rgba(0, 0, 0, 0) 68%);
  pointer-events: none;
  z-index: 0;
}

.page { position: relative; z-index: 1; }

/* --- Layout --------------------------------------------------------------- */
.container-scfi {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}
.section { padding-top: 24px; padding-bottom: 88px; }

/* --- Typography accents --------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.mono { font-family: var(--font-mono); }
.text-accent { color: var(--red); }
.text-muted-scfi { color: var(--text-muted); }

/* --- Node dot (list bullets, section markers) ----------------------------- */
.node-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px var(--red);
  flex: none;
}
.node-dot--sm { width: 5px; height: 5px; box-shadow: none; }
.node-dot--pulse { animation: nodePulse 3.4s ease-in-out infinite; }

/* --- Section header (eyebrow + trace line) -------------------------------- */
.section-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 34px;
}
.section-head .line {
  flex: 1; height: 1px; background: var(--line);
}
.section-head .head-link {
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  color: var(--text);
}
.section-head .head-link:hover { color: #fff; }

/* --- Trace divider (standalone) ------------------------------------------- */
.trace-divider {
  display: flex; align-items: center;
  margin: 48px 0;
}
.trace-divider .line { flex: 1; height: 1px; background: var(--line); }
.trace-divider .node {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); margin: 0 -1px;
  box-shadow: 0 0 10px var(--red);
}

/* --- Buttons -------------------------------------------------------------- */
.btn-scfi {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 15px 28px; border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, gap .2s ease;
}
.btn-scfi .arrow { font-family: var(--font-mono); }
.btn-primary-scfi {
  color: #fff; background: var(--red);
  box-shadow: var(--shadow-red);
}
.btn-primary-scfi:hover { color: #fff; transform: translateY(-1px); }
.btn-ghost-scfi {
  color: var(--text); background: transparent; border-color: var(--line);
}
.btn-ghost-scfi:hover { color: #fff; border-color: var(--line-hover); }
.btn-sm-scfi { padding: 13px 24px; font-size: 14px; }

/* --- Cards ---------------------------------------------------------------- */
.card-scfi {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s ease, border-color .3s ease;
}
.card-scfi:hover { transform: translateY(-4px); border-color: var(--line-hover); }

/* --- Circuit-trace hover on pillar cards ---------------------------------- */
/* The red rect draws around the border on hover via stroke-dashoffset. */
.trace-card { position: relative; }
.trace-card .trace-border {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; overflow: visible; z-index: 0;
}
.trace-card .trace-border rect {
  fill: none; stroke: var(--red); stroke-width: 1.4;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  transition: stroke-dashoffset .8s ease;
  filter: drop-shadow(0 0 4px rgba(226, 33, 41, 0.5));
}
.trace-card:hover .trace-border rect { stroke-dashoffset: 0; }
.trace-card > .trace-inner { position: relative; z-index: 1; }

/* --- Pillar card internals ------------------------------------------------ */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 20px;
}
.pillar-card { padding: 30px 28px 28px; }
.pillar-card .pillar-top {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
}
.pillar-card .pillar-num {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.14em; color: var(--red);
}
.pillar-card .pillar-tag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.pillar-card h3 { font-size: 27px; letter-spacing: -0.01em; }
.pillar-card .pillar-desc {
  font-size: 15px; line-height: 1.62; color: var(--text-muted); margin: 14px 0 0;
}
.feat-list { display: flex; flex-direction: column; gap: 11px; margin: 24px 0 26px; }
.feat-list .feat {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.03em; color: var(--text-soft);
}
.card-cta {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 600; font-size: 14px; color: #fff;
  transition: gap .2s ease;
}
.card-cta:hover { color: #fff; gap: 14px; }
.card-cta .arrow { color: var(--red); font-family: var(--font-mono); }

/* --- Post cards (workbench strip / hubs) ---------------------------------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.post-card { display: flex; flex-direction: column; }
.post-card .thumb {
  position: relative; aspect-ratio: 16 / 10; border-bottom: 1px solid var(--line);
  background-size: cover; background-position: center;
  background-color: var(--card);
}
.post-card .thumb .cat {
  position: absolute; left: 12px; bottom: 11px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em;
  color: #fff; background: var(--red); padding: 3px 8px; border-radius: 3px;
  text-transform: uppercase;
}
.post-card .body { padding: 20px 22px 22px; }
.post-card h4 {
  font-size: 18px; line-height: 1.3; letter-spacing: -0.005em;
}
.post-card .meta {
  display: flex; align-items: center; gap: 12px; margin-top: 16px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted);
}

/* --- Topic icons ---------------------------------------------------------- */
.topic-icons { display: inline-flex; align-items: center; gap: 6px; }
.topic-icons img { width: 26px; height: 26px; object-fit: contain; display: block; }
.topic-icons.in-header img { width: 26px; height: 26px; }
/* On a card thumbnail: a small glass badge in the top-right corner. */
.post-card .thumb .topic-icons.on-thumb {
  position: absolute; top: 10px; right: 10px; gap: 5px;
  padding: 5px 7px; background: rgba(0,0,0,0.55); border: 1px solid var(--line);
  border-radius: 7px; backdrop-filter: blur(4px);
}
.post-card .thumb .topic-icons.on-thumb img { width: 22px; height: 22px; }

/* --- Placeholder skin (before real images exist) -------------------------- */
.skin-hatch {
  background-image: repeating-linear-gradient(135deg,
    rgba(255, 255, 255, 0.022) 0 11px, transparent 11px 22px);
}

/* --- Header / nav --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(0, 0, 0, 0.72);
  border-bottom: 1px solid var(--line);
}
.site-header nav {
  max-width: var(--container); margin: 0 auto;
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup img { height: 30px; width: auto; }
.brand-wordmark {
  font-family: var(--font-head); font-weight: 600; font-size: 17px;
  letter-spacing: 0.01em; color: #fff;
}
.nav-links {
  display: flex; align-items: center; gap: 26px;
  font-size: 14px; font-weight: 500;
}
.nav-links a { color: var(--text); }
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after {
  content: ""; display: block; height: 2px; margin-top: 4px;
  background: var(--red); border-radius: 2px; box-shadow: 0 0 8px var(--red);
}
.nav-cta {
  font-family: var(--font-body); font-weight: 600; font-size: 14px; color: #fff;
  background: var(--red); padding: 10px 20px; border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px rgba(226, 33, 41, 0.4), var(--glow-red);
}
.nav-cta:hover { color: #fff; }
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: transparent;
  border: 1px solid var(--line); border-radius: 6px; cursor: pointer; padding: 0 11px;
}
.nav-toggle span { height: 2px; width: 100%; background: #fff; border-radius: 2px; }
.nav-toggle span:nth-child(2) { background: var(--red); }

/* Mobile menu panel */
.nav-mobile {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.94);
  padding: 8px 28px 22px;
  flex-direction: column;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  display: flex; align-items: center; gap: 12px;
  color: var(--text); font-size: 16px; font-weight: 500;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.nav-mobile a::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red);
}
.nav-mobile .nav-cta {
  justify-content: center; text-align: center; margin-top: 18px; padding: 14px;
}
.nav-mobile .nav-cta::before { display: none; }

@media (max-width: 860px) {
  .nav-links, .nav-desktop-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  max-width: var(--container); margin: 0 auto;
  padding: 96px 28px 88px;
}
.hero-circuit {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero-mark {
  height: 104px; width: auto;
  filter: drop-shadow(0 0 40px rgba(226, 33, 41, 0.18));
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 12px; margin-top: 34px;
}
.hero-eyebrow .eyebrow { letter-spacing: 0.28em; font-size: 12px; }
.hero h1 {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(46px, 7.2vw, 86px); line-height: 1.0;
  letter-spacing: -0.025em; color: #fff; margin: 24px 0 0;
}
.hero .subhead {
  max-width: 600px; font-size: 19px; line-height: 1.6;
  color: var(--text-muted); margin: 26px 0 0;
}
.hero .cta-row {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 40px;
}

/* --- Latest video block --------------------------------------------------- */
.video-grid {
  display: grid; gap: 36px; align-items: center;
  grid-template-columns: 1.55fr 1fr;
}
@media (max-width: 860px) { .video-grid { grid-template-columns: 1fr; } }
.video-thumb {
  position: relative; display: block; aspect-ratio: 16 / 9;
  border-radius: 8px; border: 1px solid var(--line); overflow: hidden;
  background-color: var(--card);
}
.video-thumb .play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.video-thumb .play span {
  width: 76px; height: 76px; border-radius: 50%;
  background: rgba(226, 33, 41, 0.14); border: 1.5px solid var(--red);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 30px rgba(226, 33, 41, 0.35);
}
.video-thumb .play i {
  display: block; width: 0; height: 0; margin-left: 5px;
  border-left: 19px solid #fff; border-top: 12px solid transparent; border-bottom: 12px solid transparent;
}
.video-thumb .badge {
  position: absolute; right: 14px; bottom: 14px;
  font-family: var(--font-mono); font-size: 12px; color: #fff;
  background: rgba(0, 0, 0, 0.8); border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 4px;
}

/* --- Newsletter band ------------------------------------------------------ */
.newsletter {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--card);
  background-image: repeating-linear-gradient(90deg,
    rgba(226, 33, 41, 0.03) 0 1px, transparent 1px 46px);
}
.newsletter .inner {
  max-width: var(--container); margin: 0 auto; padding: 60px 28px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 36px;
}
.newsletter h2 { font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; }
.newsletter p { font-size: 16px; line-height: 1.6; color: var(--text-muted); margin: 14px 0 0; }
.newsletter form { display: flex; gap: 12px; flex-wrap: wrap; }
.input-scfi {
  font-family: var(--font-mono); font-size: 14px; color: #fff;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  padding: 15px 18px; width: 280px; outline: none;
  transition: border-color .2s ease;
}
.input-scfi:focus { border-color: var(--red); }
.input-scfi::placeholder { color: var(--text-muted); }
.input-scfi.has-error { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.input-error { margin: 0; font-size: 13px; color: #FFB4B7; display: flex; align-items: center; gap: 7px; }
.input-error[hidden] { display: none; }   /* the class rule must not override the hidden attribute */
.input-error::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--font-mono); font-size: 11px; font-weight: 600; flex: none; }

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  max-width: var(--container); margin: 0 auto; padding: 56px 28px 40px;
}
.footer-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 36px;
}
.footer-brand p {
  font-size: 14px; line-height: 1.6; color: var(--text-muted); max-width: 280px; margin: 0;
}
.footer-col .col-head {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px;
}
.footer-col .links { display: flex; flex-direction: column; gap: 11px; font-size: 14px; }
.footer-col .links a { color: var(--text); }
.footer-col .links a:hover { color: #fff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
}
.footer-disclosure {
  font-family: var(--font-body); font-size: 12.5px; line-height: 1.6;
  color: var(--text-muted); margin-top: 20px; max-width: 720px;
}
.footer-disclosure a { color: var(--text-soft); text-decoration: underline; }

/* --- Back-to-top ---------------------------------------------------------- */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--red); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 1px rgba(226, 33, 41, 0.4), 0 6px 24px rgba(226, 33, 41, 0.35);
  transition: transform .25s ease, opacity .25s ease;
  opacity: 0; pointer-events: none;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }
.to-top i {
  display: block; width: 0; height: 0; margin-top: 3px;
  border-bottom: 12px solid #fff; border-left: 8px solid transparent; border-right: 8px solid transparent;
}

/* ==========================================================================
   PRIMITIVES — reusable content atoms used across posts, hubs, reviews.
   Added in Phase 2; the style-reference page (/styleguide) exercises them.
   ========================================================================== */

/* --- Breadcrumb (BreadcrumbList schema pairs with this in Phase 9) -------- */
.breadcrumb-scfi {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 22px;
}
.breadcrumb-scfi a { color: var(--text-muted); }
.breadcrumb-scfi a:hover { color: #fff; }
.breadcrumb-scfi .sep { color: var(--line); }
.breadcrumb-scfi .current { color: var(--text-soft); }

/* --- Tag chips (post tags) ------------------------------------------------ */
.tag-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--text-soft); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; transition: border-color .2s ease, color .2s ease;
}
.tag-chip:hover { border-color: var(--line-hover); color: #fff; }
.tag-chip::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); flex: none;
}

/* --- Pillar badge (category label on cards / hero of a post) -------------- */
.badge-scfi {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em;
  text-transform: uppercase; color: #fff;
  background: var(--red); padding: 3px 9px; border-radius: 3px;
}
.badge-outline {
  color: var(--text-soft); background: transparent;
  border: 1px solid var(--line);
}

/* --- Spec table (parts lists, review specs; JetBrains Mono) --------------- */
.spec-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-mono); font-size: 13px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.spec-table caption {
  text-align: left; padding: 14px 18px; color: var(--text-muted);
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
.spec-table th, .spec-table td {
  text-align: left; padding: 12px 18px; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table thead th {
  color: var(--text-muted); font-weight: 500; font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.spec-table tbody tr:last-child th, .spec-table tbody tr:last-child td { border-bottom: none; }
.spec-table td.key { color: var(--text-muted); white-space: nowrap; }
.spec-table td.val { color: var(--text); }
.spec-table td.price { color: #fff; text-align: right; white-space: nowrap; }
.spec-table tbody tr:hover td { background: rgba(255, 255, 255, 0.015); }

/* --- Rating rows (review block: longevity / repairability / value) -------- */
.rating-block {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 26px;
}
.rating-row {
  display: grid; grid-template-columns: 150px 1fr auto; align-items: center;
  gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.rating-row:last-of-type { border-bottom: none; }
.rating-row .label {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
}
.rating-row .bar {
  position: relative; height: 6px; border-radius: 3px;
  background: var(--line); overflow: hidden;
}
.rating-row .bar > span {
  position: absolute; inset: 0 auto 0 0; height: 100%;
  background: var(--red); border-radius: 3px; box-shadow: 0 0 8px rgba(226, 33, 41, 0.5);
}
.rating-row .score {
  font-family: var(--font-mono); font-size: 13px; color: #fff; min-width: 42px; text-align: right;
}

/* --- Verdict callout (the honest, buy-independent verdict) ---------------- */
.verdict {
  position: relative; background: var(--card);
  border: 1px solid var(--line); border-left: 3px solid var(--red);
  border-radius: var(--radius); padding: 22px 26px;
}
.verdict .verdict-label {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--red);
}
.verdict h3 { font-size: 22px; letter-spacing: -0.01em; margin-bottom: 8px; }
.verdict p { margin: 0; color: var(--text-soft); font-size: 15.5px; line-height: 1.6; }

/* --- Inline affiliate disclosure (compact, sits near affiliate blocks) ---- */
.disclosure-inline {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12.5px; line-height: 1.55; color: var(--text-muted);
  background: rgba(226, 33, 41, 0.04); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.disclosure-inline .node-dot { margin-top: 6px; }
.disclosure-inline a { color: var(--text-soft); text-decoration: underline; }

/* --- Prose (rendered post body) ------------------------------------------- */
.prose { font-size: 17px; line-height: 1.75; color: var(--text); }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: 28px; letter-spacing: -0.015em; margin-top: 1.8em; }
.prose h3 { font-size: 21px; letter-spacing: -0.01em; margin-top: 1.6em; }
.prose a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
/* CTA button rendered from Markdown `[label](url){button}` — not a text link */
.prose a.cta-inline { color: #fff; text-decoration: none; margin: 6px 0; }
.prose a.cta-inline:hover { color: #fff; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-top: 0.4em; }
.prose blockquote {
  border-left: 3px solid var(--red); padding: 4px 0 4px 20px;
  color: var(--text-soft); font-style: italic;
}
.prose code {
  font-family: var(--font-mono); font-size: 0.9em;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 4px; padding: 2px 6px;
}
.prose img { border-radius: var(--radius); border: 1px solid var(--line); }
/* Markdown pipe tables — spec-table look in JetBrains Mono */
.table-wrap { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--line); border-radius: var(--radius); }
.md-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 13.5px; background: var(--card); }
.md-table th, .md-table td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.md-table thead th { color: var(--text-muted); font-weight: 500; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; background: rgba(255,255,255,0.02); }
.md-table tbody tr:last-child td { border-bottom: none; }
.md-table tbody tr:hover td { background: rgba(255,255,255,0.015); }
.md-table td { color: var(--text-soft); }
.md-table td:first-child { color: #fff; white-space: nowrap; }
.prose figure figcaption {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
  margin-top: 8px; text-align: center;
}

/* --- Color swatches (styleguide only) ------------------------------------- */
.swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.swatch { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.swatch .chip { height: 72px; }
.swatch .meta { padding: 10px 12px; font-family: var(--font-mono); font-size: 11.5px; }
.swatch .meta .name { color: #fff; }
.swatch .meta .hex { color: var(--text-muted); text-transform: uppercase; }

/* --- Utility spacing ------------------------------------------------------ */
.stack-sm > * + * { margin-top: 12px; }
.stack-md > * + * { margin-top: 20px; }
.stack-lg > * + * { margin-top: 40px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ==========================================================================
   PUBLIC POST + HUB (Phase 5)
   ========================================================================== */

/* --- Hub ------------------------------------------------------------------ */
.hub-intro { border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.hub-filter { display: inline-flex; gap: 4px; margin-top: 22px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.hub-filter a { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.04em; color: var(--text-muted); padding: 7px 16px; border-radius: 999px; }
.hub-filter a:hover { color: #fff; }
.hub-filter a.active { color: #fff; background: rgba(226,33,41,0.12); box-shadow: inset 0 0 0 1px rgba(226,33,41,0.4); }

/* --- Post header ---------------------------------------------------------- */
.post-header { padding-bottom: 8px; }
.post-dek { font-size: 19px; line-height: 1.55; color: var(--text-muted); margin: 18px 0 22px; max-width: 700px; }
.post-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12.5px; color: var(--text-muted); }
.post-byline .sep { color: var(--line); }
.post-hero { margin: 28px 0 8px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.post-hero img { width: 100%; height: auto; display: block; }
.post-video { margin: 32px 0; }
.post-body { margin-top: 34px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }

/* Key takeaways (TL;DR) */
.key-takeaways {
  margin: 32px 0 8px; padding: 22px 26px;
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--red); border-radius: var(--radius);
}
.key-takeaways .kt-label {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--red);
}
.key-takeaways ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.key-takeaways li {
  position: relative; padding-left: 24px;
  font-size: 16px; line-height: 1.5; color: var(--text);
}
.key-takeaways li::before {
  content: ""; position: absolute; left: 4px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
}

/* FAQ accordion */
.faq-section { margin: 48px 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 0;
  font-family: var(--font-head); font-weight: 600; font-size: 17px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-family: var(--font-mono); font-size: 20px; color: var(--red);
  flex: none; transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { color: var(--red); }
.faq-answer { padding: 0 0 20px; font-size: 15.5px; line-height: 1.7; color: var(--text-muted); max-width: 68ch; }

.parts-block { margin: 40px 0; }
.parts-block .disclosure-inline { margin-bottom: 14px; }
.post-disclosure { margin: 26px 0 8px; }

.review-block { margin: 44px 0; }
.review-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }

/* --- Author box ----------------------------------------------------------- */
.author-box { display: flex; gap: 18px; align-items: flex-start; margin: 44px 0 8px; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.author-avatar { width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--bg) center/cover no-repeat; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.author-name { font-family: var(--font-head); font-weight: 600; font-size: 16px; color: #fff; margin-bottom: 6px; }
.author-role { color: var(--text-muted); font-weight: 400; font-size: 14px; }
.author-box p { font-size: 14.5px; line-height: 1.6; color: var(--text-muted); margin: 0 0 10px; }

/* --- YouTube lite embed --------------------------------------------------- */
.yt-lite { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--card) center/cover no-repeat; cursor: pointer; }
.yt-lite::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.28); transition: background .2s ease; }
.yt-lite:hover::before { background: rgba(0,0,0,0.12); }
.yt-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.yt-play span.yt-tri, .yt-tri { width: 0; height: 0; margin-left: 6px; border-left: 22px solid #fff; border-top: 14px solid transparent; border-bottom: 14px solid transparent; }
.yt-lite .yt-play { z-index: 1; }
.yt-lite .yt-play::before { content: ""; position: absolute; width: 84px; height: 84px; border-radius: 50%; background: rgba(226,33,41,0.18); border: 1.5px solid var(--red); box-shadow: 0 0 30px rgba(226,33,41,0.4); }
.yt-lite iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Gallery + lightbox --------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.gallery-item { margin: 0; border-radius: 6px; border: 1px solid var(--line); overflow: hidden; background: var(--card); transition: border-color .2s ease, transform .2s ease; }
.gallery-item > a { position: relative; display: block; aspect-ratio: 4/3; background: var(--card) center/cover no-repeat; }
.gallery-item .gallery-zoom { position: absolute; right: 10px; bottom: 8px; color: #fff; opacity: 0; transition: opacity .2s ease; font-size: 16px; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.gallery-item:hover { border-color: var(--red); transform: translateY(-2px); }
.gallery-item:hover .gallery-zoom { opacity: 1; }
.gallery-cap { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--text-soft); padding: 11px 13px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 9px; }
.gallery-cap::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); flex: none; box-shadow: 0 0 8px var(--red); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.92); display: flex; align-items: center; justify-content: center; padding: 40px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 6px; }
.lightbox-cap { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 13px; color: var(--text-soft); padding: 0 20px; }
.lightbox-btn { position: absolute; background: rgba(255,255,255,0.08); border: 1px solid var(--line); color: #fff; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 20px; display: flex; align-items: center; justify-content: center; }
.lightbox-btn:hover { background: rgba(226,33,41,0.2); border-color: var(--red); }
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
@media (max-width: 620px) { .lightbox-prev { left: 10px; } .lightbox-next { right: 10px; } }

/* --- Cookie consent ------------------------------------------------------- */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  background: rgba(13, 14, 17, 0.97); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.consent-banner[hidden] { display: none; }
.consent-inner {
  max-width: var(--container); margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: space-between;
}
.consent-copy { font-size: 13.5px; line-height: 1.55; color: var(--text-muted); max-width: 640px; }
.consent-copy strong { color: #fff; }
.consent-copy a { color: var(--text-soft); text-decoration: underline; }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.consent-actions .btn-scfi { padding: 10px 18px; font-size: 13.5px; }

.consent-modal { position: fixed; inset: 0; z-index: 130; background: rgba(0,0,0,0.72); display: flex; align-items: center; justify-content: center; padding: 22px; }
.consent-modal[hidden] { display: none; }
.consent-modal-card { width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); max-height: 86vh; display: flex; flex-direction: column; }
.consent-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); color: #fff; }
.consent-modal-body { padding: 8px 22px; overflow-y: auto; }
.consent-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.consent-row:last-child { border-bottom: none; }
.consent-row-title { font-family: var(--font-head); font-weight: 600; font-size: 15px; color: #fff; margin-bottom: 4px; }
.consent-row p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); max-width: 360px; }
.consent-gpc { font-size: 12.5px; color: #E0C97C; padding: 12px 0 4px; }
.consent-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-top: 1px solid var(--line); }

/* Toggle switch */
.consent-toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.consent-toggle input { opacity: 0; width: 0; height: 0; }
.consent-toggle span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .2s ease; cursor: pointer; }
.consent-toggle span::before { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.consent-toggle input:checked + span { background: var(--red); }
.consent-toggle input:checked + span::before { transform: translateX(20px); }
.consent-toggle.is-locked span { opacity: 0.6; cursor: not-allowed; }

/* --- Keyframes (circuit motif) -------------------------------------------- */
@keyframes nodePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--red); }
  50%      { opacity: .55; box-shadow: 0 0 3px var(--red); }
}
@keyframes dashmove { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }

/* Respect reduced-motion: kill the animated traces/pulses. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
