/* ============================================================
   ALLELECTRIX ARCHIVE — Refined Stylesheet
   ============================================================ */

:root {
  color-scheme: light;
  --desktop: #bfbfbf;
  --surface: #c6c6c6;
  --surface-hi: #fff;
  --surface-mid: #ddd;
  --surface-lo: #707070;
  --title: #000080;
  --title-2: #0000a0;
  --title-text: #fff;
  --menu: #d8d8d8;
  --paper: #fff4c8;
  --paper-soft: #fff9df;
  --chip: #101010;
  --chip-2: #242424;
  --chip-label: #f2dfa7;
  --pcb: #123c2d;
  --pcb-dark: #061e18;
  --trace: #c7a046;
  --amber: #f0c400;
  --amber-soft: #fff0aa;
  --danger: #790000;
  --blue: #000080;
  --ink: #050505;
  --muted: #2b2b2b;
  --dos-bg: #00005c;
  --dos-fg: #f2f6ff;
  --dos-green: #b8ffd0;
  --focus: #ffd400;
  --page-pad: clamp(16px, 3vw, 56px);
  --gap: clamp(14px, 1.7vw, 26px);
  --system: "Segoe UI", "MS Sans Serif", Tahoma, Geneva, Verdana, sans-serif;
  --mono: "Space Mono", "Courier New", Courier, monospace;
  --display: "Archivo Black", "Arial Black", Impact, sans-serif;
  --bevel-out: inset -2px -2px 0 var(--surface-lo), inset 2px 2px 0 var(--surface-hi),
               inset -4px -4px 0 #4e4e4e, inset 4px 4px 0 #eee;
  --bevel-in:  inset 2px 2px 0 #4e4e4e, inset -2px -2px 0 var(--surface-hi),
               inset 4px 4px 0 #7a7a7a, inset -4px -4px 0 #eee;
  --hard-shadow: clamp(5px,.9vw,10px) clamp(5px,.9vw,10px) 0 rgba(0,0,0,.82);
}

/* — Reset & Base — */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #0a0a0a; font-size: 100%; }

body {
  margin: 0; min-height: 100vh; color: var(--ink);
  font-family: var(--system); font-size: 1rem; line-height: 1.55;
  background:
    linear-gradient(45deg, rgba(255,255,255,.18) 25%, transparent 25% 75%, rgba(255,255,255,.18) 75%),
    linear-gradient(45deg, rgba(0,0,0,.06) 25%, transparent 25% 75%, rgba(0,0,0,.06) 75%),
    linear-gradient(180deg, #c8c8c8, #b0b0b0);
  background-size: 4px 4px, 4px 4px, auto;
  background-position: 0 0, 2px 2px, 0 0;
  overflow-wrap: anywhere;
}

body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 15px, rgba(255,255,255,.1) 15px 16px),
    repeating-linear-gradient(90deg, transparent 0 15px, rgba(0,0,0,.04) 15px 16px);
  opacity: .22;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); font-weight: 800; text-decoration-thickness: .12em; text-underline-offset: .16em; }
a:hover { color: var(--danger); }
h1, h2, h3 { margin: 0; line-height: .98; }

:focus-visible { outline: 4px solid var(--focus); outline-offset: 4px; box-shadow: 0 0 0 8px #000; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.skip-link {
  position: absolute; top: 10px; left: 10px; z-index: 999;
  transform: translateY(-180%); padding: 12px 16px; min-height: 44px;
  color: #fff; background: #000; border: 3px solid var(--focus);
  font-family: var(--mono); font-weight: 900; text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* — Site Shell & Header — */
.site-shell { position: relative; z-index: 1; width: 100%; min-width: 0; }

.site-header {
  position: sticky; top: 0; z-index: 50; width: 100%;
  border-bottom: 3px solid #000; background: var(--surface);
  box-shadow: var(--bevel-out), 0 7px 0 rgba(0,0,0,.26);
}

.program-bar {
  min-height: 36px; display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: stretch; border: 3px solid #000; border-left: 0; border-right: 0;
  background: var(--title); color: var(--title-text); font-weight: 900;
}

.system-box, .window-buttons span {
  display: grid; place-items: center; min-width: 36px;
  border-right: 2px solid #000; background: var(--surface); color: #000;
  box-shadow: var(--bevel-out); font-family: var(--mono); font-weight: 900; line-height: 1;
}
.window-buttons { display: flex; border-left: 2px solid #000; }
.window-buttons span { border-right: 0; border-left: 2px solid #000; }

.program-title {
  display: flex; align-items: center; min-width: 0; padding: 5px 12px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; letter-spacing: .015em;
}

.menu-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(10px,2vw,24px);
  width: 100%; min-height: 100px; padding: 10px var(--page-pad); background: var(--menu);
}
.menu-row__actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

.brand {
  display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0;
  color: #000; text-decoration: none;
}
.brand:hover { color: #000; }

.brand-chip {
  position: relative; width: 62px; height: 38px; flex: 0 0 auto;
  background: linear-gradient(90deg, transparent 0 8px, rgba(255,255,255,.08) 8px 10px, transparent 10px),
              linear-gradient(180deg, var(--chip-2), var(--chip));
  border: 3px solid #000; box-shadow: 5px 5px 0 #000;
}
.brand-chip::before, .brand-chip::after {
  content: ""; position: absolute; top: 5px; bottom: 5px; width: 7px;
  background: repeating-linear-gradient(180deg, #cfcfcf 0 4px, transparent 4px 8px);
}
.brand-chip::before { left: -11px; }
.brand-chip::after  { right: -11px; }
.brand-chip span {
  position: absolute; inset: 8px 12px; display: grid; place-items: center;
  font-family: var(--mono); font-size: .7rem; font-weight: 900;
  background: var(--chip-label); color: #000; border: 1px solid #000;
}

.brand-text { display: grid; gap: 2px; min-width: 0; line-height: 1.05; text-transform: uppercase; }
.brand-text strong { font-family: var(--display); font-size: clamp(1rem,1.8vw,1.55rem); letter-spacing: .035em; }
.brand-text small { color: var(--muted); font-family: var(--mono); font-size: .78rem; font-weight: 900; }

.site-nav { flex: 1; display: flex; justify-content: center; flex-wrap: nowrap; gap: 8px; }

.site-nav a, .header-cta, .button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 9px 15px; color: #000; background: var(--surface);
  border: 2px solid #000; box-shadow: var(--bevel-out);
  text-decoration: none; font-family: var(--system); font-weight: 900;
  text-align: center; line-height: 1.2; transition: transform .1s;
  white-space: nowrap;
}
.site-nav a::first-letter { text-decoration: underline; }
.site-nav a:hover, .header-cta:hover, .button:hover {
  color: #000; background: #eee; transform: translate(-1px,-1px);
}
.site-nav a:active, .header-cta:active, .button:active {
  box-shadow: var(--bevel-in); transform: translate(1px,1px);
}
.header-cta { white-space: nowrap; background: #f2f2f2; }
.mobile-dl-cta {
  display: none; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 13px; color: #000; background: #f2f2f2;
  border: 2px solid #000; box-shadow: var(--bevel-out);
  text-decoration: none; font-family: var(--system); font-weight: 900;
  white-space: nowrap; transition: transform .1s;
}
.mobile-dl-cta:hover { background: #eee; transform: translate(-1px,-1px); }
.mobile-dl-cta:active { box-shadow: var(--bevel-in); transform: translate(1px,1px); }

/* — Hamburger button — */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 44px; height: 44px; padding: 0; margin-left: auto;
  background: var(--surface); border: 2px solid #000; box-shadow: var(--bevel-out);
  cursor: pointer; flex-shrink: 0;
}
.nav-toggle span {
  display: block; width: 20px; height: 3px; background: #000;
  transition: transform .18s ease, opacity .18s ease;
}
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* — Mobile nav drawer — */
.nav-drawer {
  display: none; flex-direction: column; gap: 8px;
  border-top: 3px solid #000; background: var(--menu);
  padding: 10px var(--page-pad) 14px;
}
.nav-drawer nav {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 6px;
}
.nav-drawer nav a {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 9px 10px; color: #000; background: var(--surface);
  border: 2px solid #000; box-shadow: var(--bevel-out);
  text-decoration: none; font-family: var(--system); font-weight: 900;
  text-align: center; white-space: nowrap; transition: transform .1s;
}
.nav-drawer nav a::first-letter { text-decoration: underline; }
.nav-drawer nav a:hover { background: #eee; transform: translate(-1px,-1px); }
.nav-drawer nav a:active { box-shadow: var(--bevel-in); transform: translate(1px,1px); }
.nav-drawer .header-cta { width: 100%; display: flex; justify-content: center; }
.site-header.nav-open .nav-drawer { display: flex; }

/* — Buttons — */
.button { min-height: 48px; padding: 12px 18px; font-size: 1rem; }
.button--primary {
  color: #fff; background: var(--title);
  box-shadow: inset -2px -2px 0 #00004d, inset 2px 2px 0 #7e8fff,
              inset -4px -4px 0 #000, inset 4px 4px 0 #aab6ff;
}
.button--primary:hover { color: #fff; background: var(--title-2); }
.button--amber { color: #000; background: var(--amber); }
.button--dark {
  color: #fff; background: #000;
  box-shadow: inset -2px -2px 0 #333, inset 2px 2px 0 #888,
              inset -4px -4px 0 #000, inset 4px 4px 0 #222;
}
.button--dark:hover { color: #fff; background: #222; }

/* — Window Frame Component — */
.window-frame {
  background: var(--surface); border: 3px solid #000;
  box-shadow: var(--bevel-out), var(--hard-shadow);
  transition: transform .25s, box-shadow .25s;
}

.window-title {
  display: grid; grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: stretch; min-height: 36px; color: #fff;
  background: linear-gradient(90deg, var(--title), var(--title-2));
  border-bottom: 3px solid #000; font-weight: 900;
}
.window-title .icon, .window-title .close {
  display: grid; place-items: center; background: var(--surface); color: #000;
  border-right: 2px solid #000; box-shadow: var(--bevel-out); font-family: var(--mono);
}
.window-title .close { border-right: 0; border-left: 2px solid #000; min-width: 36px; }
.window-title .label { padding: 6px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.menu-strip {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 8px;
  border-bottom: 2px solid #000; background: var(--surface-mid);
  font-size: .92rem; font-weight: 700;
}
.menu-strip span { padding: 4px 12px; border: 1px solid transparent; }
.menu-strip span::first-letter { text-decoration: underline; }
.menu-strip span:hover { border-color: #000; background: #fff; }

.status-bar, .app-status {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 8px;
  border-top: 3px solid #000; background: var(--surface);
}
.status-bar span, .app-status span {
  flex: 1 1 170px; min-height: 32px; padding: 6px 9px;
  background: #eee; box-shadow: var(--bevel-in);
  font-family: var(--mono); font-size: .86rem; font-weight: 900;
}

/* — Section Bands — */
.band { width: 100%; padding: clamp(48px,7vw,96px) var(--page-pad); position: relative; }

#top, #story, #programmers, #downloads,
#inspiration, #bench, #screenshots, #contact { scroll-margin-top: 172px; }

.section-heading {
  width: 100%; margin: 0 0 clamp(20px,3vw,36px);
  display: grid; grid-template-columns: minmax(0,auto) minmax(260px,1fr);
  gap: 16px; align-items: end;
}
.section-heading h2 {
  font-family: var(--display); font-size: clamp(2.2rem,5vw,6rem);
  letter-spacing: -.045em; text-transform: uppercase; text-wrap: balance;
  text-shadow: none;
}
.section-heading p {
  margin: 0 0 10px; max-width: 820px;
  font-family: var(--mono); font-weight: 900; color: var(--blue); text-transform: uppercase;
}

/* — Hero Band — */
.hero-band {
  min-height: calc(100vh - 110px); display: grid; align-items: stretch;
  padding-top: clamp(28px,3vw,46px); padding-bottom: clamp(28px,3vw,46px);
  background:
    radial-gradient(ellipse at 25% 40%, rgba(0,0,128,.12), transparent 55%),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    #0e0e0e;
  background-size: auto, 22px 22px, 22px 22px, auto;
}
.hero-band::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,.06) 2px 4px);
}

.hero-app {
  position: relative; z-index: 1;
  display: grid; grid-template-rows: 1fr auto;
  min-height: calc(100vh - 172px); overflow: hidden;
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s ease, transform .7s ease;
}
.brand-logo { display: block; flex-shrink: 0; height: 80px; width: auto; }
.hero-app.revealed { opacity: 1; transform: none; }

.hero-main {
  display: grid; grid-template-columns: minmax(0,1.08fr) minmax(340px,.92fr);
  gap: 0; min-height: 0; background: #e6e6e6;
}

.hero-copy {
  padding: clamp(22px,4vw,64px); border-right: 3px solid #000;
  display: grid; align-content: center; gap: clamp(18px,2vw,28px);
  background:
    linear-gradient(90deg, rgba(0,0,0,.052) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,.052) 1px, transparent 1px), var(--paper);
  background-size: 18px 18px;
}

.kicker {
  margin: 0; font-family: var(--mono); font-weight: 900;
  text-transform: uppercase; letter-spacing: .08em; color: var(--blue);
}

h1 {
  max-width: 1000px; font-family: var(--display);
  font-size: clamp(3rem,8.8vw,9rem); letter-spacing: -.05em;
  text-transform: uppercase; text-wrap: balance;
  text-shadow: none;
}

.hero-copy .lede {
  max-width: 890px; margin: 0;
  font-size: clamp(1.08rem,1.4vw,1.42rem); font-weight: 800;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* — Hero Side Panel — */
.hero-side {
  position: relative; overflow: hidden; min-width: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px),
    radial-gradient(circle at 18% 24%, rgba(240,196,0,.18), transparent 28%),
    linear-gradient(145deg, #2d2d2d, #111 70%);
  background-size: 22px 22px, 22px 22px, auto, auto;
}
.hero-side::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(255,255,255,.04) 10px 11px),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(240,196,0,.12) 34px 38px, transparent 38px 72px);
  opacity: .5;
}

.programmer-window {
  position: relative; z-index: 1; margin: clamp(14px,2vw,28px);
  min-height: calc(100% - clamp(28px,4vw,56px));
  display: grid; grid-template-rows: auto 1fr;
  background: var(--surface); border: 3px solid #000;
  box-shadow: var(--bevel-out), 10px 10px 0 rgba(0,0,0,.9);
}

.lab-body {
  display: grid; gap: 14px; padding: clamp(14px,1.8vw,24px);
  background:
    linear-gradient(90deg, rgba(0,0,0,.05) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,.05) 1px, transparent 1px), #d7d7d7;
  background-size: 18px 18px;
}

/* — Socket Board — */
.socket-board {
  position: relative; min-height: 340px; padding: clamp(16px,2vw,28px); overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(145deg, var(--pcb), var(--pcb-dark));
  background-size: 20px 20px;
  border: 3px solid #000;
  box-shadow: inset 4px 4px 0 rgba(255,255,255,.12), inset -4px -4px 0 rgba(0,0,0,.55), 7px 7px 0 rgba(0,0,0,.78);
}

.trace-line { position: absolute; background: var(--trace); box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.trace-a { left: 7%; top: 18%; width: 72%; height: 6px; }
.trace-b { left: 21%; top: 18%; width: 6px; height: 55%; }
.trace-c { right: 18%; top: 33%; width: 6px; height: 43%; }
.trace-d { left: 43%; bottom: 22%; width: 42%; height: 6px; }

.led-strip {
  position: relative; z-index: 2; display: grid;
  grid-template-columns: repeat(8,1fr); gap: 6px;
  margin-bottom: 18px; padding: 9px; background: #080808; border: 3px solid #000;
}
.led-strip span {
  min-height: 22px; border: 2px solid #000; background: #183922;
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.55);
  animation: ledPulse 2.8s steps(2,start) infinite;
}
.led-strip span:nth-child(2) { animation-delay: .25s; }
.led-strip span:nth-child(3) { animation-delay: .5s; }
.led-strip span:nth-child(4) { animation-delay: .75s; }
.led-strip span:nth-child(5) { animation-delay: 1s; }
.led-strip span:nth-child(6) { animation-delay: 1.25s; }
.led-strip span:nth-child(7) { animation-delay: 1.5s; }
.led-strip span:nth-child(8) { animation-delay: 1.75s; }

.socket-shell {
  position: relative; z-index: 2; margin: 0 auto;
  width: min(100%,420px); padding: clamp(20px,3vw,34px) clamp(28px,4vw,46px);
  background: #050505; border: 4px solid #000;
  box-shadow: inset 0 0 0 5px #252525, 9px 9px 0 rgba(0,0,0,.72);
}
.socket-shell::before, .socket-shell::after {
  content: ""; position: absolute; top: 18px; bottom: 18px; width: 14px;
  background: repeating-linear-gradient(180deg, #dcdcdc 0 8px, #383838 8px 13px); border: 2px solid #000;
}
.socket-shell::before { left: -18px; }
.socket-shell::after  { right: -18px; }

.eprom-insert {
  position: relative; min-height: clamp(180px,22vw,260px);
  display: grid; align-content: center; gap: 12px;
  padding: clamp(18px,2.2vw,28px); color: #000;
  background: repeating-linear-gradient(0deg, transparent 0 16px, rgba(0,0,0,.08) 16px 17px), var(--chip-label);
  border: 3px solid #000; text-align: center; transform: rotate(-1deg); overflow: hidden;
}
.eprom-insert::before {
  content: ""; position: absolute; top: 14px; left: 50%;
  width: min(56%,160px); height: 52px; transform: translateX(-50%);
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.8), rgba(180,216,255,.3) 30%, rgba(80,110,150,.65) 54%, rgba(10,10,10,.75));
  border: 3px solid #000; border-radius: 999px;
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.28); opacity: .9;
}
.eprom-insert::after {
  content: ""; position: absolute; left: -35%; top: 0; width: 26%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-12deg); animation: writeSweep 5.8s ease-in-out infinite;
}
.eprom-insert strong {
  position: relative; z-index: 1; display: block; margin-top: 54px;
  font-family: var(--display); font-size: clamp(1.8rem,3.8vw,3.8rem);
  line-height: .9; letter-spacing: -.06em; text-transform: uppercase; text-shadow: none;
}
.eprom-insert span {
  position: relative; z-index: 1; display: block;
  font-family: var(--mono); font-size: clamp(.78rem,.9vw,.92rem); font-weight: 900;
}

.bus-labels {
  position: relative; z-index: 2; display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; margin-top: 18px;
  font-family: var(--mono); font-weight: 900; font-size: .78rem; color: #000;
}
.bus-labels span { padding: 7px 5px; background: var(--amber-soft); border: 2px solid #000; text-align: center; }

/* — Diagnostic Window — */
.diagnostic-window {
  display: grid; grid-template-rows: auto 1fr auto;
  color: var(--dos-fg); background: var(--dos-bg); border: 3px solid #000;
  box-shadow: inset 0 0 0 4px #001060, 7px 7px 0 #000; font-family: var(--mono); overflow: hidden;
}
.diag-title {
  padding: 8px 10px; color: #000; background: var(--surface-mid);
  border-bottom: 3px solid #000; font-weight: 900;
}
.diag-body { min-width: 0; padding: 13px; overflow: hidden; }
.diag-body p { margin: 0 0 7px; }
.diag-body strong { color: var(--dos-green); }

.byte-lane {
  margin-top: 12px; padding: 10px; color: var(--dos-green);
  background: rgba(0,0,0,.34); border: 2px solid #8ea2ff;
  overflow: hidden; white-space: nowrap; font-size: clamp(.7rem,.78vw,.84rem);
}
.byte-lane span { display: inline-block; animation: byteCrawl 14s linear infinite; }

.program-meter { padding: 10px; color: #000; background: var(--surface-mid); border-top: 3px solid #000; font-weight: 900; }
.program-meter .bar {
  position: relative; height: 24px; margin-top: 6px;
  background: #fff; border: 2px solid #000; box-shadow: var(--bevel-in); overflow: hidden;
}
.program-meter .bar::before {
  content: ""; position: absolute; inset: 4px; width: 78%;
  background: repeating-linear-gradient(90deg, var(--dos-green) 0 10px, #75e899 10px 17px);
  animation: burnProgress 8s steps(9,end) infinite;
}

.cursor {
  display: inline-block; width: .7ch; height: 1.05em;
  vertical-align: text-bottom; background: var(--dos-green);
  animation: blink 1s steps(2,start) infinite;
}

/* — About Band — */
.about-band { background: var(--paper); }
.about-band .section-heading p { color: var(--muted); }

.story-grid {
  display: grid; grid-template-columns: minmax(0,1.08fr) minmax(320px,.92fr);
  gap: var(--gap); align-items: stretch;
}
.readme-body {
  padding: clamp(18px,2vw,30px); font-size: clamp(1rem,1.08vw,1.16rem);
  background: var(--paper-soft);
}
.readme-body p { margin: 0 0 1rem; }
.readme-body p:last-child { margin-bottom: 0; }

/* — EPROM Board (motif card) — */
.eprom-board {
  position: relative; min-height: 100%; padding: clamp(18px,2.5vw,36px);
  overflow: hidden; color: #fff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(145deg, var(--pcb), var(--pcb-dark));
  background-size: 22px 22px, 22px 22px, auto;
  border: 3px solid #000; box-shadow: var(--bevel-out), var(--hard-shadow);
}

.chip-diagram {
  position: relative; z-index: 1; max-width: 540px; margin: 0 auto;
  padding: 34px 40px; background: #111; border: 4px solid #000;
  box-shadow: 10px 10px 0 rgba(0,0,0,.66), inset 0 0 0 4px #2a2a2a;
}
.chip-diagram::before, .chip-diagram::after {
  content: ""; position: absolute; top: 14px; bottom: 14px; width: 14px;
  background: repeating-linear-gradient(180deg, #bebebe 0 9px, #333 9px 14px);
}
.chip-diagram::before { left: -19px; }
.chip-diagram::after  { right: -19px; }
.chip-notch {
  position: absolute; top: -4px; left: 50%; width: 64px; height: 28px;
  transform: translateX(-50%); background: var(--pcb);
  border: 4px solid #000; border-top: 0; border-radius: 0 0 999px 999px;
}
.chip-label {
  position: relative; z-index: 1; padding: 24px; color: #000;
  background: repeating-linear-gradient(0deg, transparent 0 18px, rgba(0,0,0,.08) 18px 19px), var(--chip-label);
  border: 3px solid #000; text-align: center; transform: rotate(-1.5deg);
}
.chip-label strong {
  display: block; font-family: var(--display);
  font-size: clamp(1.7rem,3.1vw,3.4rem); line-height: .98; letter-spacing: -.04em;
}
.chip-label span { display: block; margin-top: 8px; font-family: var(--mono); font-weight: 900; }

.meter-bank { position: relative; z-index: 1; margin-top: 28px; display: grid; gap: 12px; }
.meter {
  display: grid; grid-template-columns: minmax(105px,150px) 1fr 52px;
  gap: 10px; align-items: center; font-family: var(--mono); font-weight: 900; color: #fff;
}
.meter .track { height: 20px; border: 2px solid #000; background: #000; box-shadow: inset 0 0 0 3px rgba(255,255,255,.06); }
.meter .fill { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--dos-green) 0 8px, #75e899 8px 14px); }

/* — Devices Band — */
.devices-band {
  background:
    linear-gradient(45deg, rgba(255,255,255,.18) 25%, transparent 25% 75%, rgba(255,255,255,.18) 75%),
    linear-gradient(45deg, rgba(0,0,0,.06) 25%, transparent 25% 75%, rgba(0,0,0,.06) 75%),
    #c0c0c0;
  background-size: 4px 4px, 4px 4px, auto; background-position: 0 0, 2px 2px, 0 0;
}

.machine-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--gap); }
.machine-card { overflow: hidden; }
.machine-card:hover { transform: translateY(-3px); box-shadow: var(--bevel-out), 0 14px 20px rgba(0,0,0,.2), var(--hard-shadow); }
.machine-media {
  position: relative; padding: clamp(14px,1.5vw,22px); background: #111;
  border-bottom: 3px solid #000; min-height: 300px; display: grid; place-items: center;
}
.machine-media img {
  width: 100%; max-height: 420px; object-fit: contain;
  border: 3px solid #000; background: #000; box-shadow: 7px 7px 0 rgba(0,0,0,.75);
}
.machine-stamp {
  position: absolute; top: 18px; left: 18px; padding: 8px 12px;
  color: #000; background: var(--amber); border: 3px solid #000;
  font-family: var(--mono); font-weight: 900; transform: rotate(-2deg); box-shadow: 4px 4px 0 #000;
}
.machine-body { padding: clamp(18px,2vw,28px); background: #efefef; }
.machine-body h3 {
  font-family: var(--display); font-size: clamp(1.9rem,3.2vw,3.6rem);
  letter-spacing: -.04em; text-transform: uppercase; text-wrap: balance;
}
.machine-body p { font-size: 1.05rem; margin: 14px 0 0; }

.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag-row span {
  padding: 7px 9px; color: #fff; background: #000; border: 2px solid #000;
  font-family: var(--mono); font-size: .84rem; font-weight: 900;
}

/* — Downloads Band — */
.downloads-band {
  color: #fff;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0,0,128,.12), transparent 50%),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    #141414;
  background-size: auto, 24px 24px, 24px 24px, auto;
  border-top: 4px solid #000; border-bottom: 4px solid #000;
}
.downloads-band .section-heading h2 { color: #fff; text-shadow: none; }
.downloads-band .section-heading p { color: var(--amber-soft); }

.download-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--gap); }

.download-card {
  display: grid; grid-template-rows: auto 1fr auto; overflow: hidden;
  background: var(--surface); color: #000; border: 4px solid #000;
  box-shadow: var(--bevel-out), 10px 10px 0 rgba(0,0,0,.85);
  transition: transform .25s, box-shadow .25s;
}
.download-card:hover { transform: translateY(-4px); }

.download-card .window-title { border-bottom: 3px solid #000; }

.download-body {
  padding: clamp(20px,2.5vw,36px);
  background:
    linear-gradient(90deg, rgba(0,0,0,.06) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,.06) 1px, transparent 1px), #e4e4e4;
  background-size: 18px 18px;
}

.download-chip {
  position: relative; z-index: 1; margin: 10px auto 28px;
  width: min(100%,480px); padding: 28px 36px;
  background: #171717; border: 4px solid #000;
  box-shadow: inset 0 0 0 4px #2d2d2d, 8px 8px 0 rgba(0,0,0,.8);
}
.download-chip::before, .download-chip::after {
  content: ""; position: absolute; top: 14px; bottom: 14px; width: 14px;
  background: repeating-linear-gradient(180deg, #d8d8d8 0 10px, transparent 10px 16px);
}
.download-chip::before { left: -20px; }
.download-chip::after  { right: -20px; }

.download-label {
  padding: 20px; background: var(--chip-label); border: 3px solid #000;
  display: grid; align-content: center; gap: 8px; text-align: center; transform: rotate(-1deg);
}
.download-label h3 {
  font-family: var(--display); font-size: clamp(1.8rem,3.4vw,3.4rem);
  letter-spacing: -.05em; text-transform: uppercase; text-wrap: balance;
}
.download-label p { margin: 0; font-family: var(--mono); font-weight: 900; font-size: .9rem; }

.download-notes {
  position: relative; z-index: 1; display: grid; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none;
  font-family: var(--mono); font-weight: 900; font-size: .92rem;
}
.download-notes li {
  padding: 10px 11px; color: #000; background: var(--paper-soft);
  border: 2px solid #000; box-shadow: var(--bevel-in);
}

.download-foot { position: relative; z-index: 1; }
.download-foot .button { width: 100%; }

/* — DNA / Hex Band — */
.dna-band { background: #eaeaea; }

.dna-grid {
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(320px,.9fr);
  gap: var(--gap);
}

.list-box { padding: clamp(16px,2vw,26px); background: #efefef; }
.inspo-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.inspo-list li {
  display: grid; grid-template-columns: 34px 1fr; gap: 10px;
  align-items: start; padding: 12px; background: #fff;
  box-shadow: var(--bevel-in); font-weight: 800;
}
.inspo-list b { display: block; margin-bottom: 2px; }
.inspo-list .mini-icon {
  display: grid; place-items: center; width: 30px; height: 30px;
  color: #fff; background: var(--title); border: 2px solid #000;
  font-family: var(--mono); font-weight: 900;
}

.hex-editor-window {
  min-height: 100%; display: grid; grid-template-rows: auto auto 1fr auto;
  background: #e6e6e6;
}
.hex-table {
  overflow: auto; padding: 14px; background: var(--dos-bg); color: var(--dos-fg);
  font-family: var(--mono); font-size: clamp(.72rem,.96vw,.92rem);
  line-height: 1.38; white-space: pre;
  border-top: 2px solid #000; border-bottom: 2px solid #000;
}
.hex-table .green { color: var(--dos-green); }
.hex-table .amber { color: var(--amber-soft); }

/* — Specs Band — */
.specs-band {
  background:
    linear-gradient(45deg, rgba(255,255,255,.18) 25%, transparent 25% 75%, rgba(255,255,255,.18) 75%),
    linear-gradient(45deg, rgba(0,0,0,.06) 25%, transparent 25% 75%, rgba(0,0,0,.06) 75%),
    #c8c8c8;
  background-size: 4px 4px, 4px 4px, auto; background-position: 0 0, 2px 2px, 0 0;
}
.spec-table-wrap { overflow-x: auto; padding-bottom: 10px; }
table {
  width: 100%; min-width: 760px; border-collapse: collapse;
  background: #efefef; border: 3px solid #000; box-shadow: var(--bevel-out), var(--hard-shadow);
}
th, td { padding: 14px; border: 2px solid #000; text-align: left; vertical-align: top; }
th { color: #fff; background: var(--title); font-family: var(--mono); text-transform: uppercase; }
td:first-child { font-family: var(--mono); font-weight: 900; }

/* — Gallery Band — */
.gallery-band {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), #1a1a1a;
  background-size: 22px 22px;
}
.gallery-band .section-heading h2 { text-shadow: none; }
.gallery-band .section-heading p { color: var(--amber-soft); }

.gallery-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--gap); }
.gallery-card {
  margin: 0; overflow: hidden; background: var(--surface);
  border: 3px solid #000; box-shadow: var(--bevel-out), 8px 8px 0 rgba(0,0,0,.9);
  transition: transform .25s;
}
.gallery-card:hover { transform: translateY(-4px) scale(1.02); }
.gallery-card img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  background: #000; border-bottom: 3px solid #000;
}
.gallery-card figcaption { padding: 11px 12px; font-family: var(--mono); font-weight: 900; background: #efefef; color: var(--ink); }

/* — Contact Band — */
.contact-band { background: var(--paper-soft); }

.contact-grid {
  display: grid; grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); gap: var(--gap);
}
.contact-body { padding: clamp(18px,2vw,30px); background: var(--paper); }
.contact-body h2 {
  font-family: var(--display); font-size: clamp(2.5rem,5vw,5.6rem);
  letter-spacing: -.05em; text-transform: uppercase;
  text-shadow: none;
}
.contact-body p { max-width: 760px; font-size: 1.12rem; font-weight: 800; }

.field-stack { display: grid; gap: 10px; margin: 22px 0; }
.fake-field {
  display: grid; grid-template-columns: 170px minmax(0,1fr);
  border: 2px solid #000; background: #fff; box-shadow: var(--bevel-in);
  font-family: var(--mono); font-weight: 900;
}
.fake-field span { padding: 10px; }
.fake-field span:first-child { background: var(--surface-mid); border-right: 2px solid #000; }

.small-terminal {
  min-height: 100%; color: var(--dos-green); background: #000;
  border: 3px solid #000; box-shadow: var(--bevel-out), var(--hard-shadow);
  font-family: var(--mono); display: grid; grid-template-rows: auto 1fr;
}
.small-terminal .term-title { padding: 8px 10px; color: #fff; background: var(--title); border-bottom: 3px solid #000; font-weight: 900; }
.small-terminal .term-body { padding: 16px; }
.small-terminal p { margin: 0 0 12px; }

/* — Footer — */
.footer {
  width: 100%; padding: 18px var(--page-pad); display: flex; flex-wrap: wrap;
  gap: 12px; justify-content: space-between; align-items: center;
  color: #000; background: var(--surface); border-top: 3px solid #000;
  box-shadow: var(--bevel-in); font-family: var(--mono); font-weight: 900;
}
.footer-leds { flex: 1 1 280px; max-width: 520px; margin-left: auto; }

/* — LED Components — */
.led-rail {
  width: 100%; display: grid;
  grid-template-columns: auto minmax(160px,1fr) auto;
  align-items: center; gap: 12px; padding: 9px 10px;
  color: var(--dos-green); background: #050505; border: 3px solid #000;
  box-shadow: inset 0 0 0 3px #151515, 6px 6px 0 rgba(0,0,0,.72);
  font-family: var(--mono); font-size: clamp(.72rem,.85vw,.88rem);
  font-weight: 900; text-transform: uppercase; letter-spacing: .03em;
  margin-bottom: clamp(18px,2.5vw,32px);
}
.led-rail__label, .led-rail__readout {
  padding: 4px 8px; background: #111; border: 2px solid #2d2d2d; white-space: nowrap;
}
.led-rail__bank {
  display: grid; grid-template-columns: repeat(16,minmax(10px,1fr));
  gap: 5px; min-width: 0;
}
.led-rail__bank i, .mini-led-row i {
  display: block; min-height: 18px; background: #14311e; border: 2px solid #000;
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.55);
  animation: ledPulse 3.4s steps(2,start) infinite;
}
.led-rail__bank i:nth-child(2)  { animation-delay: .18s; }
.led-rail__bank i:nth-child(3)  { animation-delay: .36s; }
.led-rail__bank i:nth-child(4)  { animation-delay: .54s; }
.led-rail__bank i:nth-child(5)  { animation-delay: .72s; }
.led-rail__bank i:nth-child(6)  { animation-delay: .9s; }
.led-rail__bank i:nth-child(7)  { animation-delay: 1.08s; }
.led-rail__bank i:nth-child(8)  { animation-delay: 1.26s; }
.led-rail__bank i:nth-child(9)  { animation-delay: 1.44s; }
.led-rail__bank i:nth-child(10) { animation-delay: 1.62s; }
.led-rail__bank i:nth-child(11) { animation-delay: 1.8s; }
.led-rail__bank i:nth-child(12) { animation-delay: 1.98s; }
.led-rail__bank i:nth-child(13) { animation-delay: 2.16s; }
.led-rail__bank i:nth-child(14) { animation-delay: 2.34s; }
.led-rail__bank i:nth-child(15) { animation-delay: 2.52s; }
.led-rail__bank i:nth-child(16) { animation-delay: 2.7s; }

.mini-led-row {
  display: grid; grid-template-columns: repeat(8,minmax(16px,1fr));
  gap: 5px; padding: 7px; margin-top: 16px;
  background: #060606; border: 3px solid #000; box-shadow: inset 0 0 0 3px #151515;
}
.mini-led-row i { min-height: 16px; }

/* — Boot Overlay — */
.boot-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: #000; font-family: var(--mono); color: var(--dos-green);
  transition: opacity .6s ease-out, visibility .6s;
}
.boot-overlay.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-overlay::after {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,255,65,.025) 2px 4px);
}
.boot-screen { width: min(90%,700px); padding: 40px; position: relative; z-index: 1; }
.boot-output {
  font-size: clamp(.88rem,1.1vw,1.05rem); line-height: 1.7; margin: 0; white-space: pre-wrap;
}
.boot-cursor-block { animation: blink 1s step-start infinite; }

/* — Image Placeholder — */
.img-placeholder {
  display: grid; place-items: center; min-height: 280px; padding: 40px;
  background: repeating-linear-gradient(-45deg, #1a1a1a 0 8px, #222 8px 16px);
  font-family: var(--mono); color: #666; text-align: center;
  font-weight: 700; font-size: .88rem; text-transform: uppercase; letter-spacing: .05em;
}

/* — Scroll Reveals — */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }

/* — Keyframe Animations — */
@keyframes ledPulse {
  0%, 38%, 100% { background: #14311e; box-shadow: inset 0 0 0 3px rgba(0,0,0,.55); }
  39%, 62% { background: var(--dos-green); box-shadow: 0 0 12px rgba(184,255,208,.72), inset 0 0 0 2px #fff; }
}
@keyframes writeSweep {
  0%, 30% { left: -35%; opacity: 0; }
  42%, 68% { opacity: .9; }
  86%, 100% { left: 110%; opacity: 0; }
}
@keyframes byteCrawl { 0% { transform: translateX(0); } 100% { transform: translateX(-48%); } }
@keyframes burnProgress {
  0% { width: 8%; } 12% { width: 18%; } 25% { width: 32%; } 38% { width: 44%; }
  50% { width: 57%; } 64% { width: 69%; } 78%, 100% { width: 86%; }
}
@keyframes blink { 50% { opacity: 0; } }

/* — Reduced Motion — */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .led-strip span:nth-child(1), .led-strip span:nth-child(4), .led-strip span:nth-child(7) { background: var(--dos-green); }
  .program-meter .bar::before { width: 86%; }
  .led-rail__bank i:nth-child(1), .led-rail__bank i:nth-child(4),
  .led-rail__bank i:nth-child(8), .led-rail__bank i:nth-child(12) {
    background: var(--dos-green); box-shadow: 0 0 10px rgba(184,255,208,.6), inset 0 0 0 2px #fff;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-app { opacity: 1; transform: none; }
}

/* — Responsive — */

/* Tighten nav padding at wide-mid viewports so the logo stays visible */
@media (max-width: 1380px) {
  .site-nav a, .header-cta { padding: 8px 11px; }
}
@media (max-width: 1260px) {
  .site-nav a, .header-cta { padding: 7px 8px; font-size: .88rem; }
}

@media (max-width: 1180px) {
  .hero-main, .story-grid, .dna-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-copy { border-right: 0; border-bottom: 3px solid #000; }
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .led-rail { grid-template-columns: 1fr; }
  .led-rail__label, .led-rail__readout { white-space: normal; }
  .led-rail__bank { grid-template-columns: repeat(8,minmax(12px,1fr)); }
}

/* Hamburger takes over */
@media (max-width: 1150px) {
  .site-nav, .header-cta { display: none; }
  .mobile-dl-cta { display: inline-flex; }
  .nav-toggle { display: flex; }
  .menu-row { min-height: 0; padding-top: 8px; padding-bottom: 8px; }
  .brand-logo { height: 52px; }
  #top, #story, #programmers, #downloads,
  #inspiration, #bench, #screenshots, #contact { scroll-margin-top: 90px; }
}

@media (max-width: 860px) {
  .download-grid, .machine-grid { grid-template-columns: 1fr; }
  .hero-app { min-height: 0; }
  .hero-band { min-height: auto; }
  .section-heading { grid-template-columns: 1fr; }
  .section-heading p { margin-bottom: 0; }
}

@media (max-width: 680px) {
  :root { --page-pad: 12px; --gap: 14px; }
  .program-title { font-size: .86rem; }
  .system-box, .window-buttons span { min-width: 30px; }
  .brand-logo { height: 44px; }
  .nav-drawer nav { grid-template-columns: repeat(2,1fr); }
  h1 { font-size: clamp(2.6rem,15vw,4.8rem); text-shadow: none; }
  .section-heading h2, .contact-body h2 { text-shadow: none; }
  .downloads-band .section-heading h2 { text-shadow: none; }
  .gallery-grid { grid-template-columns: 1fr; }
  .fake-field { grid-template-columns: 1fr; }
  .fake-field span:first-child { border-right: 0; border-bottom: 2px solid #000; }
  .window-title { grid-template-columns: 30px minmax(0,1fr) 30px; }
  .download-chip { padding: 22px 28px; }
  .download-foot .button { width: 100%; }
  .meter { grid-template-columns: 1fr; gap: 6px; }
  .meter .track { width: 100%; }
  .led-rail__bank { grid-template-columns: repeat(4,minmax(12px,1fr)); }
  .led-rail__bank i { min-height: 16px; }
  .footer-leds { max-width: none; margin-left: 0; }
  .socket-board { min-height: 280px; }
}

@media (max-width: 430px) {
  .brand-logo { height: 36px; }
  .program-bar { min-height: 32px; }
  .program-title { padding: 5px 8px; }
  .window-buttons span:last-child { display: none; }
  .nav-drawer nav { grid-template-columns: 1fr; }
  .mobile-dl-cta { padding: 8px 9px; font-size: .82rem; }
  .band { padding-top: 36px; padding-bottom: 36px; }
  .hero-copy { padding: 18px; }
  .chip-diagram { padding: 28px 30px; }
  .led-strip { grid-template-columns: repeat(4,1fr); }
  .bus-labels { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* ============================================================
   HERO V2 — archive-hero-v2
   ============================================================ */

.archive-hero-v2 {
  --ah2-black: #000000;
  --ah2-ink: #101112;
  --ah2-panel: #050505;
  --ah2-grey: #d9d9d9;
  --ah2-grey-dark: #8f8f8f;
  --ah2-cream: #fff8d2;
  --ah2-paper: #f3e8b2;
  --ah2-green: #9cffb4;
  --ah2-green-dark: #071009;
  --ah2-green-board: #062a1b;
  --ah2-shadow: 8px 8px 0 #000000;
  --ah2-display: "Archivo Black", "Arial Black", Impact, system-ui, sans-serif;
  --ah2-mono: "Space Mono", "Courier New", ui-monospace, monospace;

  position: relative; overflow: hidden;
  min-height: calc(100vh - 84px); min-height: calc(100svh - 84px);
  padding: clamp(18px,3vw,42px) clamp(10px,1.8vw,24px);
  color: var(--ah2-cream);
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 1px, transparent 1px 4px),
    #101112;
  background-size: 18px 18px, 18px 18px, auto, auto;
}

.archive-hero-v2::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 76% 26%, rgba(156,255,180,.08), transparent 30%),
    radial-gradient(circle at 18% 14%, rgba(255,248,210,.04), transparent 24%);
}

.archive-hero-v2__inner { position: relative; z-index: 1; width: 100%; }

.archive-hero-v2__layout {
  display: grid;
  grid-template-columns: minmax(0,1.02fr) minmax(400px,.98fr);
  gap: clamp(18px,2.6vw,36px); align-items: stretch;
  min-height: min(760px, calc(100vh - 160px));
  min-height: min(760px, calc(100svh - 160px));
}

.archive-hero-v2__copy,
.archive-hero-v2__device-shell,
.archive-hero-v2__status-rail { border: 3px solid var(--ah2-black); }

.archive-hero-v2__copy {
  display: flex; flex-direction: column; justify-content: center;
  min-width: 0; padding: clamp(24px,5vw,72px);
  background: linear-gradient(180deg, rgba(255,255,255,.055), transparent 44%), rgba(5,5,5,.94);
  box-shadow: var(--ah2-shadow), inset 0 0 0 1px rgba(255,255,255,.14);
}

.archive-hero-v2__eyebrow {
  width: fit-content; max-width: 100%; margin: 0 0 18px; padding: 7px 10px;
  color: var(--ah2-black); background: var(--ah2-grey);
  border: 3px solid var(--ah2-black); box-shadow: 4px 4px 0 var(--ah2-black);
  font-family: var(--ah2-mono); font-size: clamp(.72rem,.9vw,.9rem);
  font-weight: 700; line-height: 1.25; letter-spacing: .06em; text-transform: uppercase;
}

.archive-hero-v2__title {
  margin: 0; color: var(--ah2-cream); font-family: var(--ah2-display);
  font-size: clamp(2.2rem,3.6vw,4rem); line-height: .88;
  letter-spacing: -.04em; text-transform: uppercase; text-wrap: balance;
  text-shadow: none;
}
.archive-hero-v2__title span { display: block; }

.archive-hero-v2__lede {
  max-width: 66ch; margin: 18px 0 0; color: #f4f0df;
  font-size: clamp(1rem,1.15vw,1.2rem); line-height: 1.62; font-weight: 800;
}

.archive-hero-v2__terminal-note {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px;
  font-family: var(--ah2-mono); font-size: .8rem; font-weight: 700;
  line-height: 1.2; text-transform: uppercase;
}
.archive-hero-v2__terminal-note span {
  display: inline-flex; align-items: center; min-height: 32px; padding: 6px 9px;
  color: var(--ah2-green); background: var(--ah2-green-dark);
  border: 2px solid rgba(156,255,180,.55); box-shadow: 3px 3px 0 var(--ah2-black);
}

.archive-hero-v2__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.archive-hero-v2__button {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 16px; color: var(--ah2-black); background: var(--ah2-grey);
  border: 3px solid var(--ah2-black); box-shadow: 4px 4px 0 var(--ah2-black);
  font-family: var(--ah2-mono); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.archive-hero-v2__button:hover { color: var(--ah2-black); transform: translate(-1px,-1px); box-shadow: 5px 5px 0 var(--ah2-black); }
.archive-hero-v2__button:focus-visible { outline: 4px solid var(--ah2-green); outline-offset: 4px; }
.archive-hero-v2__button--primary { background: var(--ah2-paper); color: var(--ah2-black); }
.archive-hero-v2__button--dark { background: var(--ah2-panel); color: var(--ah2-green); border-color: var(--ah2-grey); }
.archive-hero-v2__button--dark:hover { color: var(--ah2-green); }

.archive-hero-v2__visual { display: flex; min-width: 0; }

.archive-hero-v2__device-shell {
  width: 100%; display: flex; flex-direction: column;
  background: var(--ah2-grey); box-shadow: var(--ah2-shadow); overflow: hidden;
}

.archive-hero-v2__device-topbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  min-height: 44px; padding: 8px 10px; background: var(--ah2-grey);
  border-bottom: 3px solid var(--ah2-black);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--ah2-grey-dark);
}
.archive-hero-v2__topbar-tag {
  min-height: 28px; display: inline-flex; align-items: center; padding: 4px 8px;
  color: var(--ah2-black); background: #f1f1f1; border: 2px solid var(--ah2-black);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #7b7b7b;
  font-family: var(--ah2-mono); font-size: .72rem; font-weight: 700; text-transform: uppercase;
}

.archive-hero-v2__board {
  position: relative; min-height: clamp(300px,42vw,470px); padding: clamp(18px,3vw,40px);
  background:
    linear-gradient(rgba(112,255,154,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(112,255,154,.08) 1px, transparent 1px),
    var(--ah2-green-board);
  background-size: 22px 22px; border-bottom: 3px solid var(--ah2-black); overflow: hidden;
}

.archive-hero-v2__trace {
  position: absolute; left: 8%; right: 8%; height: 4px;
  background: rgba(156,255,180,.44); box-shadow: 0 0 14px rgba(78,255,128,.22);
}
.archive-hero-v2__trace--a { top: 22%; }
.archive-hero-v2__trace--b { top: 35%; }
.archive-hero-v2__trace--c { bottom: 34%; }
.archive-hero-v2__trace--d { bottom: 20%; }

.archive-hero-v2__led-strip {
  position: absolute; top: clamp(14px,2vw,26px); left: 50%; transform: translateX(-50%);
  width: min(84%,540px); display: grid; grid-template-columns: repeat(8,minmax(18px,1fr));
  gap: 8px; padding: 8px; background: #030403; border: 3px solid var(--ah2-black);
  box-shadow: 4px 4px 0 var(--ah2-black);
}
.archive-hero-v2__led-strip span {
  display: block; aspect-ratio: 3/1; background: #0d2817; border: 2px solid var(--ah2-black);
}
.archive-hero-v2__led-strip span:nth-child(6),
.archive-hero-v2__led-strip span:nth-child(7),
.archive-hero-v2__led-strip span:nth-child(8) {
  background: #baffc8; box-shadow: 0 0 14px rgba(156,255,180,.65);
  animation: archiveHeroLedPulse 1.4s steps(2,end) infinite;
}

.archive-hero-v2__chip-frame {
  position: relative; z-index: 2; width: min(82%,520px);
  margin: clamp(40px,4vw,70px) auto 0; padding: clamp(18px,2.6vw,34px);
  background: #050505; border: 4px solid var(--ah2-black);
  box-shadow: 8px 8px 0 var(--ah2-black), inset 0 0 0 2px rgba(255,255,255,.08);
}
.archive-hero-v2__chip-frame::before, .archive-hero-v2__chip-frame::after {
  content: ""; position: absolute; top: 20px; bottom: 20px; width: 18px;
  background: repeating-linear-gradient(180deg, var(--ah2-grey) 0 8px, #6e6e6e 8px 12px);
  border: 2px solid var(--ah2-black);
}
.archive-hero-v2__chip-frame::before { left: -22px; }
.archive-hero-v2__chip-frame::after  { right: -22px; }

.archive-hero-v2__chip {
  display: grid; gap: 8px; place-items: center;
  min-height: clamp(150px,20vw,240px); padding: clamp(20px,3vw,42px);
  color: var(--ah2-black);
  background: linear-gradient(rgba(0,0,0,.055) 1px, transparent 1px), var(--ah2-paper);
  background-size: 100% 14px;
  border: 4px solid var(--ah2-black);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), 0 0 0 8px rgba(0,0,0,.22);
  text-align: center;
}
.archive-hero-v2__chip strong {
  font-family: var(--ah2-display); font-size: clamp(2.8rem,6vw,6.4rem);
  line-height: .85; letter-spacing: -.02em;
}
.archive-hero-v2__chip span {
  font-family: var(--ah2-mono); font-size: clamp(.68rem,.9vw,.96rem);
  font-weight: 700; line-height: 1.2; text-transform: uppercase;
}

.archive-hero-v2__bus {
  position: relative; z-index: 3; width: min(82%,520px);
  margin: 18px auto 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px;
}
.archive-hero-v2__bus span {
  min-width: 0; padding: 9px 6px; color: var(--ah2-black); background: var(--ah2-paper);
  border: 2px solid var(--ah2-black); font-family: var(--ah2-mono);
  font-size: clamp(.68rem,.8vw,.82rem); font-weight: 700; text-align: center; text-transform: uppercase;
}

.archive-hero-v2__console { display: flex; flex-direction: column; background: var(--ah2-panel); color: var(--ah2-green); }
.archive-hero-v2__console-title {
  padding: 8px 10px; color: var(--ah2-black); background: var(--ah2-grey);
  border-top: 3px solid var(--ah2-black); border-bottom: 3px solid var(--ah2-black);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--ah2-grey-dark);
  font-family: var(--ah2-mono); font-size: .8rem; font-weight: 700; text-transform: uppercase;
}
.archive-hero-v2__console-body { padding: 12px 14px; font-family: var(--ah2-mono); font-size: clamp(.76rem,.95vw,.92rem); line-height: 1.5; }
.archive-hero-v2__console-body p { margin: 0 0 5px; }
.archive-hero-v2__console-body strong { color: var(--ah2-paper); }

.archive-hero-v2__cursor {
  display: inline-block; width: .7em; height: 1em; margin-left: 4px;
  vertical-align: -2px; background: var(--ah2-green);
  animation: archiveHeroCursorBlink 1s steps(2,end) infinite;
}

.archive-hero-v2__byte-lane {
  overflow: hidden; margin-top: 8px; padding-top: 8px;
  border-top: 2px solid rgba(156,255,180,.32); white-space: nowrap; color: var(--ah2-green);
}
.archive-hero-v2__byte-lane span { display: inline-block; min-width: 200%; animation: archiveHeroByteScroll 18s linear infinite; }

.archive-hero-v2__meter {
  display: grid; gap: 6px; padding: 8px 10px 10px; color: var(--ah2-black); background: var(--ah2-grey);
  border-top: 3px solid var(--ah2-black); box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--ah2-grey-dark);
  font-family: var(--ah2-mono); font-size: .78rem; font-weight: 700;
}
.archive-hero-v2__meter-bar { height: 12px; background: linear-gradient(90deg, var(--ah2-green) 0 86%, #111 86% 100%); border: 2px solid var(--ah2-black); }

.archive-hero-v2__status-rail {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: clamp(14px,2vw,22px); min-height: 44px; padding: 8px 10px;
  color: var(--ah2-black); background: var(--ah2-grey);
  box-shadow: 7px 7px 0 var(--ah2-black), inset 1px 1px 0 #fff, inset -1px -1px 0 var(--ah2-grey-dark);
  font-family: var(--ah2-mono); font-size: .76rem; font-weight: 700; text-transform: uppercase;
}
.archive-hero-v2__status-rail span {
  display: inline-flex; align-items: center; min-height: 28px; padding: 4px 8px;
  background: #efefef; border: 2px solid var(--ah2-black);
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #7b7b7b;
}

/* Hero V2 Responsive */
@media (max-width: 1180px) {
  .archive-hero-v2__layout { grid-template-columns: minmax(0,.96fr) minmax(340px,1.04fr); gap: 22px; }
  .archive-hero-v2__copy { padding: clamp(22px,4vw,48px); }
  .archive-hero-v2__title { font-size: clamp(2rem,3.2vw,3.6rem); }
}
@media (max-width: 980px) {
  .archive-hero-v2 { min-height: auto; padding-top: 22px; padding-bottom: 30px; }
  .archive-hero-v2__layout { grid-template-columns: 1fr; min-height: auto; }
  .archive-hero-v2__copy { padding: 24px; }
  .archive-hero-v2__board { min-height: 360px; }
}
@media (max-width: 680px) {
  .archive-hero-v2 { padding-inline: 10px; }
  .archive-hero-v2__copy,
  .archive-hero-v2__device-shell,
  .archive-hero-v2__status-rail { box-shadow: 5px 5px 0 var(--ah2-black); }
  .archive-hero-v2__copy { padding: 20px; }
  .archive-hero-v2__title { font-size: clamp(2.55rem,14vw,4.4rem); line-height: .86; text-shadow: none; }
  .archive-hero-v2__lede { font-size: 1rem; line-height: 1.55; }
  .archive-hero-v2__actions { display: grid; grid-template-columns: 1fr; }
  .archive-hero-v2__button { width: 100%; }
  .archive-hero-v2__terminal-note { display: grid; grid-template-columns: 1fr; }
  .archive-hero-v2__device-topbar { padding: 8px; }
  .archive-hero-v2__board { min-height: 310px; padding: 16px; }
  .archive-hero-v2__led-strip { width: 92%; gap: 5px; padding: 6px; }
  .archive-hero-v2__chip-frame, .archive-hero-v2__bus { width: 88%; }
  .archive-hero-v2__chip-frame::before, .archive-hero-v2__chip-frame::after { width: 12px; }
  .archive-hero-v2__chip-frame::before { left: -15px; }
  .archive-hero-v2__chip-frame::after  { right: -15px; }
  .archive-hero-v2__chip { min-height: 150px; padding: 18px 12px; }
  .archive-hero-v2__bus { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .archive-hero-v2__byte-lane { display: none; }
  .archive-hero-v2__status-rail { display: grid; grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .archive-hero-v2__title { font-size: clamp(2.25rem,16vw,3.55rem); }
  .archive-hero-v2__board { min-height: 280px; }
  .archive-hero-v2__console-body { font-size: .72rem; }
  .archive-hero-v2__chip strong { font-size: clamp(2.4rem,18vw,4.2rem); }
}

/* Hero V2 Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .archive-hero-v2__led-strip span,
  .archive-hero-v2__cursor,
  .archive-hero-v2__byte-lane span { animation: none !important; }
  .archive-hero-v2__led-strip span:nth-child(6),
  .archive-hero-v2__led-strip span:nth-child(7),
  .archive-hero-v2__led-strip span:nth-child(8) { opacity: 1; }
}

/* Hero V2 Keyframes */
@keyframes archiveHeroLedPulse { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes archiveHeroCursorBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes archiveHeroByteScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   DOWNLOAD DIALOG
   ============================================================ */

.dl-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.52);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.dl-dialog {
  width: min(480px,100%);
  background: var(--surface);
  border: 2px solid #000;
  box-shadow: var(--bevel-out), 8px 8px 0 rgba(0,0,0,.7);
  font-family: var(--system);
}

.dl-titlebar {
  display: grid; grid-template-columns: 24px 1fr auto;
  align-items: center; gap: 6px;
  min-height: 28px; padding: 4px 6px;
  background: var(--title); color: var(--title-text);
  font-size: .84rem; font-weight: 700;
}
.dl-titlebar__icon { font-size: .78rem; }
.dl-titlebar__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-titlebar__btns { display: flex; gap: 2px; }
.dl-titlebar__btns span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 14px;
  background: var(--surface); color: #000;
  border: 2px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--surface-lo);
  font-size: .7rem; font-weight: 900; line-height: 1; cursor: default;
}

.dl-body { padding: 16px 18px 10px; }

.dl-status-row {
  display: flex; gap: 8px; align-items: baseline;
  font-size: .82rem; font-weight: 700; margin-bottom: 5px;
}
.dl-label { color: var(--muted); min-width: 48px; }

.dl-progress-track {
  height: 24px; margin: 10px 0 4px;
  background: #fff; border: 2px solid #000; box-shadow: var(--bevel-in); overflow: hidden;
}
.dl-progress-fill { height: 100%; width: 0%; background: var(--title); transition: width .1s linear; }

.dl-progress-pct {
  font-family: var(--mono); font-size: .78rem; font-weight: 700;
  text-align: right; margin-bottom: 10px;
}

.dl-log {
  height: 90px; overflow-y: auto;
  background: var(--dos-bg);
  border: 2px solid #000; box-shadow: var(--bevel-in);
  padding: 8px 10px;
  font-family: var(--mono); font-size: .76rem; line-height: 1.5; color: #4dff91;
}
.dl-log p { margin: 0; }
.dl-log p:last-child { color: #fff; }

.dl-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 10px 18px 14px;
  border-top: 2px solid #000;
}
.dl-ok-btn, .dl-cancel-btn {
  min-width: 80px; min-height: 32px; padding: 5px 16px;
  background: var(--surface); color: #000;
  border: 2px solid #000; box-shadow: var(--bevel-out);
  font-family: var(--system); font-size: .84rem; font-weight: 700;
  cursor: pointer;
}
.dl-ok-btn:hover:not(:disabled), .dl-cancel-btn:hover { background: #d0d0d0; transform: translate(-1px,-1px); }
.dl-ok-btn:active:not(:disabled), .dl-cancel-btn:active { box-shadow: var(--bevel-in); transform: translate(1px,1px); }
.dl-ok-btn:disabled { color: var(--surface-lo); cursor: default; box-shadow: none; }
.dl-ok-btn:focus-visible, .dl-cancel-btn:focus-visible { outline: 2px dotted #000; outline-offset: 2px; }

/* Download counters */
.dl-count-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; margin-bottom: 12px;
  background: var(--chip); color: var(--chip-label);
  border: 2px solid #000; box-shadow: var(--bevel-in);
  font-family: var(--mono); font-size: .8rem;
}
.dl-count-num {
  font-size: 1.1rem; font-weight: 700; letter-spacing: .04em; color: var(--amber);
}
.dl-count-label {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(242,223,167,.5);
}


/* ============================================================
   BLOG — Archive & Single Post
   ============================================================ */

/* Secondary button — inherits base .button; explicit for intent */
.button--secondary { color: var(--ink); background: var(--surface); }

/* ── Blog archive header band ── */
.blog-header-band {
  background: var(--chip);
  border-bottom: 3px solid #000;
  padding: clamp(48px,7vw,96px) var(--page-pad);
}
.blog-header-band .window-title {
  margin-bottom: clamp(16px,2.5vw,28px);
}
.blog-archive-title {
  font-family: var(--display);
  font-size: clamp(1.8rem,5vw,3.6rem);
  letter-spacing: -.02em;
  color: var(--chip-label);
  margin: 0;
}
.blog-archive-sub {
  font-family: var(--mono);
  font-size: .9rem;
  color: rgba(242,223,167,.7);
  margin: 0;
  max-width: 640px;
  line-height: 1.6;
}

/* ── Blog archive breadcrumb (archive page) ── */
.blog-archive-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: .76rem;
  color: rgba(242,223,167,.55);
  margin-bottom: clamp(20px,3vw,36px);
}
.blog-archive-breadcrumb a {
  color: rgba(242,223,167,.7);
  text-decoration: none;
  font-weight: 700;
}
.blog-archive-breadcrumb a:hover { color: var(--amber); text-decoration: underline; }
.blog-archive-breadcrumb [aria-hidden] { color: rgba(242,223,167,.35); }

/* ── Posts grid band ── */
.blog-grid-band {
  padding: clamp(48px,7vw,96px) var(--page-pad);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px,2.5vw,32px);
}

/* ── Post card ── */
.post-card {
  background: var(--surface);
  border: 3px solid #000;
  box-shadow: var(--bevel-out), var(--hard-shadow);
  display: flex;
  flex-direction: column;
}
.post-card__titlebar {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: stretch;
  min-height: 36px;
  background: linear-gradient(90deg, var(--title), var(--title-2));
  color: var(--title-text);
  font-size: .82rem;
  font-weight: 900;
  font-family: var(--system);
  border-bottom: 3px solid #000;
}
.post-card__titlebar .system-box {
  border-right: 2px solid #000;
  min-width: 34px;
  font-size: .8rem;
}
.post-card__titlebar-text {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-card__titlebar .window-buttons { border-left: 2px solid #000; }
.post-card__titlebar .window-buttons span {
  min-width: 30px;
  font-size: .74rem;
  color: #000;
  background: var(--surface);
  border-right: 0;
  border-left: 2px solid #000;
  box-shadow: var(--bevel-out);
}
.post-card__thumb-wrap {
  display: block;
  overflow: hidden;
  border-bottom: 3px solid #000;
  max-height: 200px;
}
.post-card__thumb {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform .2s ease;
}
.post-card__thumb-wrap:focus-within .post-card__thumb,
.post-card__thumb-wrap:hover .post-card__thumb { transform: scale(1.03); }

.post-card__body {
  flex: 1;
  padding: clamp(16px,2vw,24px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.post-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
}
.post-card__date { color: var(--muted); }
.post-card__cat {
  background: var(--title);
  color: var(--title-text);
  padding: 2px 8px;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.post-card__title {
  font-family: var(--display);
  font-size: clamp(1rem,2.2vw,1.3rem);
  margin: 0;
  line-height: 1.2;
}
.post-card__title a {
  color: var(--ink);
  text-decoration: none;
}
.post-card__title a:hover { text-decoration: underline; color: var(--title); }
.post-card__excerpt {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}
.post-card__foot {
  padding: clamp(12px,1.5vw,16px) clamp(16px,2vw,24px) clamp(16px,2vw,24px);
  border-top: 3px solid #000;
}
.post-card__read { min-height: 44px; font-size: .84rem; }

/* ── Empty state ── */
.blog-empty-state {
  background: var(--surface);
  border: 3px solid #000;
  box-shadow: var(--bevel-out), var(--hard-shadow);
  max-width: 540px;
}
.blog-empty-body {
  padding: clamp(24px,4vw,40px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.blog-empty-body p {
  font-family: var(--mono);
  font-size: .9rem;
  color: var(--muted);
  margin: 0;
}

/* ── Pagination ── */
.blog-pagination {
  margin-top: clamp(32px,5vw,56px);
}
.blog-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 4px 12px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid #000;
  box-shadow: var(--bevel-out);
  font-family: var(--mono);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .1s;
}
.blog-pagination .page-numbers:hover { background: #eee; transform: translate(-1px,-1px); }
.blog-pagination .page-numbers:active { box-shadow: var(--bevel-in); transform: translate(1px,1px); }
.blog-pagination .page-numbers.current {
  background: var(--title);
  color: var(--title-text);
  box-shadow: var(--bevel-in);
}
.blog-pagination .page-numbers.dots {
  background: none;
  border: none;
  box-shadow: none;
  color: var(--muted);
}

/* ── Single post ── */
.post-band {
  padding: clamp(48px,7vw,96px) var(--page-pad);
}
.post-single {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(24px,4vw,40px);
}

/* ── Breadcrumb ── */
.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
  padding: 10px 14px;
  background: var(--surface);
  border: 2px solid #000;
  box-shadow: var(--bevel-in);
}
.post-breadcrumb a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.post-breadcrumb a:hover { color: var(--amber); text-decoration: underline; }
.post-breadcrumb [aria-hidden] { color: var(--surface-lo); }
.post-breadcrumb [aria-current] { color: var(--muted); }

/* ── Post window ── */
.post-window {
  background: var(--surface);
  border: 3px solid #000;
  box-shadow: var(--bevel-out), var(--hard-shadow);
}
.post-window__titlebar {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: stretch;
  min-height: 36px;
  background: linear-gradient(90deg, var(--title), var(--title-2));
  color: var(--title-text);
  font-size: .9rem;
  font-weight: 900;
  font-family: var(--system);
  border-bottom: 3px solid #000;
}
.post-window__titlebar .system-box {
  border-right: 2px solid #000;
  min-width: 34px;
  font-size: .8rem;
}
.post-window__title {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-window__titlebar .window-buttons { border-left: 2px solid #000; }
.post-window__titlebar .window-buttons span {
  min-width: 30px;
  color: #000;
  background: var(--surface);
  border-right: 0;
  border-left: 2px solid #000;
  box-shadow: var(--bevel-out);
}

.post-window__menubar {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 8px 16px;
  background: var(--menu);
  border-bottom: 2px solid #000;
}
.post-meta-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--muted);
  min-height: 24px;
}
.post-meta-cat {
  background: var(--title);
  color: var(--title-text);
  padding: 2px 8px;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.post-window__hero-img {
  border-bottom: 3px solid #000;
  overflow: hidden;
  max-height: 380px;
}
.post-hero-img {
  display: block;
  width: 100%;
  height: 380px;
  object-fit: cover;
}
.post-window__body {
  padding: clamp(24px,4vw,48px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Post content typography ── */
.post-content { line-height: 1.75; color: var(--ink); }
.post-content h2 {
  font-family: var(--display);
  font-size: clamp(1.3rem,3vw,1.8rem);
  margin: 1.6em 0 .5em;
  border-bottom: 3px solid #000;
  padding-bottom: 6px;
  letter-spacing: -.02em;
}
.post-content h3 {
  font-family: var(--display);
  font-size: clamp(1.05rem,2.2vw,1.3rem);
  margin: 1.4em 0 .4em;
}
.post-content p { margin: 0 0 1.2em; }
.post-content ul, .post-content ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.post-content li { margin-bottom: .4em; }
.post-content a { color: var(--title); text-decoration: underline; }
.post-content a:hover { color: var(--title-2); }
.post-content img {
  max-width: 100%;
  height: auto;
  border: 3px solid #000;
  box-shadow: var(--bevel-out);
  display: block;
  margin: 1.2em auto;
}
.post-content pre, .post-content code {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--chip);
  color: var(--chip-label);
  border: 2px solid #000;
}
.post-content code { padding: 1px 6px; display: inline; }
.post-content pre {
  padding: 16px 20px;
  overflow-x: auto;
  line-height: 1.55;
  margin: 0 0 1.2em;
  box-shadow: var(--bevel-in);
}
.post-content pre code { background: none; border: none; padding: 0; }
.post-content blockquote {
  border-left: 4px solid var(--title);
  background: var(--paper);
  margin: 0 0 1.2em;
  padding: 12px 20px;
  font-style: italic;
}
.post-content hr { border: 0; border-top: 3px solid #000; margin: 2em 0; }
.post-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 1.2em;
  font-size: .9rem;
}
.post-content th, .post-content td {
  border: 2px solid #000;
  padding: 8px 12px;
  text-align: left;
}
.post-content th {
  background: var(--chip);
  color: var(--chip-label);
  font-family: var(--mono);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.post-content tr:nth-child(even) td { background: var(--surface-mid); }

/* ── Post tags ── */
.post-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 2px solid #000;
}
.post-tags__label {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.post-tag {
  background: var(--surface);
  color: var(--ink);
  border: 2px solid #000;
  box-shadow: var(--bevel-out);
  padding: 3px 10px;
  font-family: var(--mono);
  font-size: .72rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .04em;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.post-tag:hover { background: #eee; transform: translate(-1px,-1px); }

/* ── Prev/Next nav ── */
.post-window__nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-top: 3px solid #000;
  background: var(--menu);
}
.post-nav-prev { text-align: left; }
.post-nav-next { text-align: right; }
.post-nav-link {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: .78rem;
}
.post-nav-link--right { align-items: flex-end; }
.post-nav-dir {
  font-weight: 700;
  font-size: .72rem;
  color: var(--title);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.post-nav-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.post-nav-link:hover .post-nav-label { text-decoration: underline; }
.post-nav-back { font-size: .8rem; white-space: nowrap; min-height: 44px; }

/* ── Download CTA box ── */
.post-dl-cta {
  background: var(--chip);
  border: 3px solid #000;
  box-shadow: var(--bevel-out), var(--hard-shadow);
}
.post-dl-cta > .window-title {
  background: linear-gradient(90deg, var(--title), var(--title-2));
  border-bottom: 3px solid #000;
}
.post-dl-cta__body {
  padding: clamp(20px,3vw,32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.post-dl-cta__body p {
  font-family: var(--mono);
  font-size: .88rem;
  color: var(--chip-label);
  margin: 0;
  flex: 1;
  min-width: 200px;
  line-height: 1.55;
}

/* ── Blog responsive ── */
@media (max-width: 860px) {
  .blog-grid { grid-template-columns: 1fr; }
  .post-window__nav {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .post-nav-prev { grid-column: 1; }
  .post-nav-next { grid-column: 2; text-align: right; }
  .post-nav-back { grid-column: 1 / -1; text-align: center; justify-content: center; }
}
@media (max-width: 540px) {
  .post-window__hero-img, .post-hero-img { max-height: 200px; height: 200px; }
  .post-dl-cta__body { flex-direction: column; align-items: flex-start; }
  .post-window__nav { grid-template-columns: 1fr; }
  .post-nav-prev, .post-nav-next { grid-column: 1; text-align: left; }
  .post-nav-link--right { align-items: flex-start; }
  .post-nav-back { grid-column: 1; }
}

/* ============================================================
   BLOG HERO — Animated archive header (home.php)
   ============================================================ */

/* Force full-width on blog pages — override any theme container */
body.allelectrix-blog-page,
body.allelectrix-single-page {
  margin: 0;
  padding: 0;
}
body.allelectrix-blog-page .site-shell,
body.allelectrix-single-page .site-shell {
  width: 100%;
  max-width: none;
}
body.allelectrix-blog-page .site-header,
body.allelectrix-single-page .site-header {
  width: 100%;
  max-width: none;
  left: 0;
  right: 0;
}

/* ── Hero band ── */
.blog-hero {
  background: var(--chip);
  border-bottom: 3px solid #000;
  padding: clamp(48px,7vw,96px) var(--page-pad);
  position: relative;
  overflow: hidden;
}

/* CRT scanline overlay */
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,.06) 3px,
    rgba(0,0,0,.06) 4px
  );
  pointer-events: none;
  z-index: 0;
}

/* Moving scan beam */
.blog-hero__scan {
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  top: 0;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(242,223,167,.14) 30%,
    rgba(242,223,167,.22) 50%,
    rgba(242,223,167,.14) 70%,
    transparent 100%);
  animation: blog-scan 5s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes blog-scan {
  0%   { top: -4px; }
  100% { top: 100%; }
}

/* Stack all inner content above scan overlays */
.blog-hero__inner { position: relative; z-index: 2; }

/* Window title in hero — full row */
.blog-hero__win {
  margin-bottom: clamp(20px,3vw,36px);
}

/* Two-column layout */
.blog-hero__layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: clamp(24px,4vw,56px);
  align-items: start;
  margin-top: clamp(20px,3vw,36px);
}

/* ── Left copy ── */
.blog-hero__title {
  font-family: var(--display);
  font-size: clamp(2rem,6vw,4.2rem);
  letter-spacing: -.03em;
  color: var(--chip-label);
  margin: 0 0 clamp(10px,1.8vw,18px);
  line-height: 1.02;
  animation: blog-fade-up .55s ease both;
}
.blog-hero__title em {
  font-style: normal;
  color: var(--amber);
}

.blog-hero__sub {
  font-family: var(--mono);
  font-size: clamp(.8rem,1.4vw,.92rem);
  color: rgba(242,223,167,.72);
  margin: 0 0 clamp(20px,3vw,32px);
  max-width: 58ch;
  line-height: 1.65;
  animation: blog-fade-up .55s .1s ease both;
}
.blog-hero__sub strong { color: var(--chip-label); }

/* Terminal block */
.blog-hero__terminal {
  background: #00004a;
  border: 2px solid #000;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.07), var(--bevel-in);
  padding: 14px 18px;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.75;
  max-width: 440px;
  animation: blog-fade-up .55s .18s ease both;
}

.blog-hero__term-line {
  display: block;
  color: #4dff91;
}
.blog-hero__term-prompt { color: rgba(77,255,145,.6); }
.blog-hero__term-out    { color: #4dff91; padding-left: 1em; }
.blog-hero__term-dim    { color: rgba(77,255,145,.4); padding-left: 1em; }

/* Blinking cursor */
.blog-hero__term-cursor {
  display: inline-block;
  animation: blog-cursor 1.1s step-start infinite;
}
@keyframes blog-cursor {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* LED row */
.blog-hero__leds {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(16px,2.5vw,28px);
  animation: blog-fade-up .55s .28s ease both;
}
.blog-hero__led {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,.45); flex-shrink: 0;
}
.blog-hero__led--green {
  background: #00cc44;
  box-shadow: 0 0 7px #00cc44;
  animation: led-pulse-g 2.2s ease-in-out infinite;
}
.blog-hero__led--amber {
  background: #f0c400;
  box-shadow: 0 0 7px #f0c400;
  animation: led-pulse-a 2.2s .8s ease-in-out infinite;
}
.blog-hero__led--red {
  background: #cc2200;
  box-shadow: 0 0 7px #cc2200;
  opacity: .32;
}
.blog-hero__led-label {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  color: rgba(242,223,167,.5);
  letter-spacing: .07em;
  margin-left: 4px;
}

@keyframes led-pulse-g {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}
@keyframes led-pulse-a {
  0%,100% { opacity: .55; }
  50%      { opacity: 1; }
}

/* ── Right stats column ── */
.blog-hero__stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: blog-fade-up .55s .25s ease both;
}

.blog-hero__stat {
  background: var(--surface);
  border: 3px solid #000;
  box-shadow: var(--bevel-out), var(--hard-shadow);
  display: flex;
  flex-direction: column;
}

.blog-hero__stat-win {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) auto;
  align-items: stretch;
  min-height: 28px;
  background: linear-gradient(90deg, var(--title), var(--title-2));
  color: var(--title-text);
  font-family: var(--system);
  font-size: .7rem;
  font-weight: 900;
  border-bottom: 2px solid #000;
}
.blog-hero__stat-win .icon,
.blog-hero__stat-win .close {
  display: grid;
  place-items: center;
  min-width: 28px;
  background: var(--surface);
  color: #000;
  box-shadow: var(--bevel-out);
  font-size: .7rem;
}
.blog-hero__stat-win .icon { border-right: 2px solid #000; }
.blog-hero__stat-win .close { border-left: 2px solid #000; }
.blog-hero__stat-win .label {
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.blog-hero__stat-num {
  display: block;
  font-family: var(--display);
  font-size: 2.6rem;
  letter-spacing: -.05em;
  line-height: 1;
  color: #000;
  text-align: center;
  padding: 10px 16px 4px;
}

.blog-hero__stat-label {
  display: block;
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 700;
  color: rgba(0,0,0,.55);
  text-transform: uppercase;
  letter-spacing: .06em;
  text-align: center;
  padding-bottom: 10px;
}

/* Shared fade-up animation */
@keyframes blog-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .blog-hero__layout {
    grid-template-columns: 1fr;
  }
  .blog-hero__stats {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .blog-hero__stat {
    flex: 1;
    min-width: 110px;
  }
  .blog-hero__terminal {
    max-width: 100%;
  }
}

@media (max-width: 540px) {
  .blog-hero__stat-num { font-size: 2rem; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .blog-hero__scan,
  .blog-hero__term-cursor,
  .blog-hero__led,
  .blog-hero__led--green,
  .blog-hero__led--amber { animation: none; }
  .blog-hero__title,
  .blog-hero__sub,
  .blog-hero__terminal,
  .blog-hero__stats,
  .blog-hero__leds { animation: none; opacity: 1; transform: none; }
}
/* ============================================================
   BLOG SIDEBAR & LAYOUT — Allelectrix Win95 retro theme
   Append to allelectrix.css
   ============================================================ */

/* ── 70/30 Blog layout ──────────────────────────────────── */
.blog-layout-band { /* outer band — padding inherited from .band */ }

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(240px, 28vw, 320px);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: start;
}

.blog-main { min-width: 0; }

/* Sidebar — sticky, offset by header height ~136px */
.blog-sidebar {
  position: sticky;
  top: 152px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 168px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #000 var(--surface);
}

.blog-sidebar::-webkit-scrollbar { width: 6px; }
.blog-sidebar::-webkit-scrollbar-track { background: var(--surface); }
.blog-sidebar::-webkit-scrollbar-thumb { background: #000; }

/* ── Widget base (Win95 chrome) ─────────────────────────── */
.widget {
  background: var(--surface);
  border: 3px solid #000;
  box-shadow: var(--bevel-out), 3px 3px 0 #000;
}

.widget__titlebar {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: stretch;
  min-height: 36px;
  background: linear-gradient(90deg, var(--title), var(--title-2));
  color: var(--title-text);
  font-size: .8rem;
  font-weight: 900;
  font-family: var(--system);
  border-bottom: 3px solid #000;
  letter-spacing: .02em;
}

.widget__titlebar .icon,
.widget__titlebar .close {
  display: grid;
  place-items: center;
  background: var(--surface);
  color: #000;
  box-shadow: var(--bevel-out);
  font-size: .8rem;
  line-height: 1;
}

.widget__titlebar .icon { border-right: 2px solid #000; }
.widget__titlebar .close { border-left: 2px solid #000; }

.widget__titlebar .label {
  display: flex;
  align-items: center;
  padding: 0 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.widget__body { padding: 14px 16px; }

/* ── Widget: Search ─────────────────────────────────────── */
.widget-search-form {
  display: flex;
}

.widget-search-input {
  flex: 1;
  min-width: 0;
  border: 2px solid #000;
  border-right: 0;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: .8rem;
  background: #fff;
  color: #000;
  min-height: 44px;
  box-shadow: var(--bevel-in);
}

.widget-search-input:focus {
  outline: none;
  box-shadow: var(--bevel-in), 0 0 0 2px var(--title);
}

.widget-search-btn {
  border: 2px solid #000;
  border-left: 0;
  padding: 0 12px;
  background: var(--title);
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  box-shadow: var(--bevel-out);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.widget-search-btn:hover { background: var(--title-2); }

.widget-search-btn:focus-visible {
  outline: 3px solid var(--title);
  outline-offset: 2px;
}

/* ── Widget: About ──────────────────────────────────────── */
.widget-about-text {
  font-family: var(--system);
  font-size: .82rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 10px;
}

.widget-about-link {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  min-height: 44px;
}

.widget-about-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ── Widget: Categories ─────────────────────────────────── */
.widget-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.widget-cat-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid transparent;
  min-height: 44px;
  box-shadow: var(--bevel-out);
}

.widget-cat-list li a:hover {
  border-color: #000;
  background: var(--surface);
}

.widget-cat-list li a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.widget-cat-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--chip);
  color: var(--chip-label);
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  min-width: 24px;
  border: 1px solid #000;
  letter-spacing: .03em;
}

/* ── Widget: Recent Posts ───────────────────────────────── */
.widget-posts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.widget-post-item {
  display: grid;
  grid-template-columns: 66px 1fr;
  gap: 10px;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, .12);
}

.widget-post-item:last-child { border-bottom: 0; padding-bottom: 0; }

.widget-post-thumb {
  display: block;
  width: 66px;
  height: 66px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid #000;
  box-shadow: var(--bevel-out);
}

.widget-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.widget-post-thumb-placeholder {
  width: 66px;
  height: 66px;
  background: var(--chip);
  border: 2px solid #000;
  box-shadow: var(--bevel-out);
  display: grid;
  place-items: center;
  color: var(--chip-label);
  font-size: 1.4rem;
  flex-shrink: 0;
}

.widget-post-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.widget-post-title-text {
  display: block;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.widget-post-title-text:hover { text-decoration: underline; }

.widget-post-title-text:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.widget-post-date {
  font-family: var(--mono);
  font-size: .7rem;
  color: rgba(0, 0, 0, .5);
  white-space: nowrap;
}

/* ── Widget: Downloads ──────────────────────────────────── */
.widget-dl-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.widget-dl-list a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: var(--chip);
  color: var(--chip-label);
  border: 2px solid #000;
  min-height: 44px;
  box-shadow: var(--bevel-out);
  transition: background .15s;
}

.widget-dl-list a:hover { background: #12123a; }

.widget-dl-list a:focus-visible {
  outline: 2px solid var(--chip-label);
  outline-offset: 2px;
}

.widget-dl-ext {
  margin-left: auto;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .05em;
  background: rgba(242, 223, 167, .15);
  border: 1px solid rgba(242, 223, 167, .3);
  color: var(--chip-label);
  padding: 2px 5px;
  font-family: var(--mono);
}

/* ── Widget: Tags ───────────────────────────────────────── */
.widget-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.widget-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  background: #fff;
  border: 2px solid #000;
  box-shadow: var(--bevel-out);
  min-height: 32px;
  letter-spacing: .03em;
}

.widget-tag:hover {
  background: var(--chip);
  color: var(--chip-label);
}

.widget-tag:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ── Social share — blog hero (archive) ─────────────────── */
.blog-hero__social {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(12px, 2vw, 18px);
  flex-wrap: wrap;
}

.blog-hero__social-label {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  color: rgba(242, 223, 167, .55);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.blog-hero__social-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border: 2px solid rgba(242, 223, 167, .3);
  color: var(--chip-label);
  text-decoration: none;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  background: transparent;
  min-height: 40px;
  min-width: 44px;
  cursor: pointer;
}

.blog-hero__social-link:hover {
  color: var(--amber);
  background: rgba(240, 196, 0, .16);
  border-color: var(--amber);
}

.blog-hero__social-link:focus-visible {
  outline: 2px solid var(--chip-label);
  outline-offset: 2px;
}

/* ── Social share — single post ─────────────────────────── */
.post-social-share {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: clamp(16px, 2.5vw, 24px);
}

.post-social-share__label {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  color: rgba(242, 223, 167, .6);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-right: 4px;
}

.post-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 2px solid rgba(242, 223, 167, .35);
  color: var(--chip-label);
  text-decoration: none;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  background: transparent;
  min-height: 40px;
  min-width: 44px;
  cursor: pointer;
}

.post-social-btn:hover {
  color: var(--amber);
  background: rgba(240, 196, 0, .16);
  border-color: var(--amber);
}

.post-social-btn:focus-visible {
  outline: 2px solid var(--chip-label);
  outline-offset: 2px;
}

.post-social-btn[data-copied="true"] {
  border-color: #4dff91;
  color: #4dff91;
}

/* ── Blog hero search ────────────────────────────────────── */
.blog-hero__search {
  display: flex;
  margin-top: clamp(16px, 2.5vw, 24px);
  max-width: 440px;
}

.blog-hero__search-input {
  flex: 1;
  min-width: 0;
  border: 3px solid #000;
  border-right: 0;
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: .85rem;
  background: rgba(255, 255, 255, .1);
  color: var(--chip-label);
  min-height: 48px;
  box-shadow: var(--bevel-in);
}

.blog-hero__search-input::placeholder { color: rgba(242, 223, 167, .4); }

.blog-hero__search-input:focus {
  outline: none;
  box-shadow: var(--bevel-in), 0 0 0 2px var(--chip-label);
}

.blog-hero__search-btn {
  border: 3px solid #000;
  border-left: 0;
  padding: 0 18px;
  background: var(--title);
  color: #fff;
  font-family: var(--mono);
  font-weight: 900;
  font-size: .85rem;
  cursor: pointer;
  min-height: 48px;
  min-width: 52px;
  box-shadow: var(--bevel-out);
}

.blog-hero__search-btn:hover { background: var(--title-2); }

.blog-hero__search-btn:focus-visible {
  outline: 3px solid var(--chip-label);
  outline-offset: 2px;
}

/* ── Post hero band (single.php) ────────────────────────── */
.post-hero-band {
  background: var(--chip);
  border-bottom: 3px solid #000;
  padding: clamp(40px, 6vw, 80px) var(--page-pad);
  position: relative;
  overflow: hidden;
}

.post-hero-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, .06) 3px,
    rgba(0, 0, 0, .06) 4px
  );
  pointer-events: none;
}

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

.post-hero-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  letter-spacing: -.03em;
  color: var(--chip-label);
  margin: clamp(10px, 1.8vw, 18px) 0 clamp(10px, 1.5vw, 16px);
  line-height: 1.06;
  max-width: 860px;
  text-shadow: none;
}

.post-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--mono);
  font-size: .8rem;
  color: rgba(242, 223, 167, .75);
}

.post-hero-meta i { color: rgba(242, 223, 167, .5); }

.post-hero-meta-cat {
  display: inline-flex;
  align-items: center;
  background: rgba(242, 223, 167, .1);
  border: 1px solid rgba(242, 223, 167, .3);
  color: var(--chip-label);
  padding: 3px 9px;
  font-size: .7rem;
  font-weight: 700;
  font-family: var(--mono);
  text-decoration: none;
  min-height: 28px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.post-hero-meta-cat:hover { background: rgba(242, 223, 167, .2); }

.post-hero-meta-cat:focus-visible {
  outline: 2px solid var(--chip-label);
  outline-offset: 2px;
}

.post-hero-read-time {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ── Post content band ───────────────────────────────────── */
.post-content-band { /* padding from .band */ }

/* ── Responsive ─────────────────────────────────────────── */

/* Collapse sidebar below 1020px */
@media (max-width: 1020px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 680px) {
  .blog-sidebar { grid-template-columns: 1fr; }
  .post-hero-title { font-size: clamp(1.4rem, 5.5vw, 2rem); }
}

@media (prefers-reduced-motion: reduce) {
  .post-hero-band::before { animation: none; }
}
