
/* =============================================================== *
 * FORGE — Power Forge · Human Engine
 * =============================================================== */
:root {
  --iron-dark: #1a1c1e;
  --iron: #2a2c2e;
  --iron-light: #3a3c3e;
  --steel: #4a4c4e;
  --titanium: #888888;
  --titanium-hi: #cccccc;
  --furnace: #ff6a00;
  --furnace-deep: #c8400a;
  --ember: #ffae42;
  --hydraulic: #1e90ff;
  --hydraulic-deep: #0d4f8b;
  --carbon: #0a0a0a;
  --spark: #fff8e0;
  --brass: #b58a3a;
  --brass-hi: #e8c068;
  --rivet: #6a6c6e;
  --radio-green: #00ff66;
  --gauge-red: #e0301a;
  --ff-head: "Oswald", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --ff-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", "Consolas", "Courier New", monospace;
  --shadow-machine: 0 4px 0 #0a0a0a, 0 8px 20px rgba(0,0,0,0.5);
  --shadow-machine-lg: 0 6px 0 #0a0a0a, 0 12px 32px rgba(0,0,0,0.6);
  --metal-bg: linear-gradient(180deg, #2a2c2e, #1a1c1e);
  --brushed-metal: repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 3px);
  --brushed-h: repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 4px);
  --heat-fins: repeating-linear-gradient(90deg, transparent 0 4px, rgba(0,0,0,0.4) 4px 6px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--iron-dark); color: var(--spark);
  font-family: var(--ff-body); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* faint brushed-metal texture */
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 3px),
    radial-gradient(circle at 50% 50%, rgba(120,120,130,0.04) 1px, transparent 1.4px);
  background-size: auto, 6px 6px;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5 { font-family: var(--ff-head); font-weight: 700; letter-spacing: 0.06em; line-height: 1.15; margin: 0 0 .5em; text-transform: uppercase; }
h1 { font-size: clamp(28px, 4vw, 48px); }
h2 { font-size: clamp(22px, 2.6vw, 30px); }
h3 { font-size: clamp(17px, 1.8vw, 21px); }
a { color: var(--ember); text-decoration: none; }
a:hover { color: var(--furnace); }
img { max-width: 100%; display: block; }
p { margin: 0 0 1em; }
.mono { font-family: var(--ff-mono); }

/* ---------- ambient canvas ---------- */
#forge-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .75; }
#main, .site-header, .site-footer { position: relative; z-index: 1; }

/* ---------- custom scrollbar (a hydraulic piston rod) ---------- */
::-webkit-scrollbar { width: 16px; }
::-webkit-scrollbar-track { background: var(--carbon); border-left: 2px solid var(--iron-light); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--titanium-hi), var(--titanium), var(--steel));
  border-radius: 0;
  border: 2px solid var(--carbon);
  box-shadow: inset 0 0 4px rgba(0,0,0,0.6), inset 0 8px 0 rgba(0,0,0,0.25);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--ember), var(--furnace)); }

/* ---------- layout ---------- */
.layout-with-sidebar { display: grid; grid-template-columns: 1fr; max-width: 1340px; margin: 0 auto; gap: 28px; padding: 0 18px; }
@media (min-width: 1000px) { .layout-with-sidebar { grid-template-columns: 1fr 320px; } }
.layout-main { min-width: 0; }
.eyebrow { display:inline-block; font-family: var(--ff-head); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--furnace); background: var(--carbon); padding: 5px 14px; border: 2px solid var(--iron-light); box-shadow: var(--shadow-machine); }
.section-head { margin: 32px 0 18px; }
.section-head h2 { margin-top: 10px; color: var(--spark); }
.section-head p { color: var(--titanium-hi); max-width: 65ch; }
.muted { color: var(--titanium); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: linear-gradient(180deg, #2a2c2e, #1a1c1e); border-bottom: 2px solid var(--iron-light); box-shadow: 0 4px 0 #0a0a0a, 0 8px 20px rgba(0,0,0,0.5); }
.header-inner { display: flex; align-items: center; gap: 16px; max-width: 1340px; margin: 0 auto; padding: 12px 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 48px; height: 48px; filter: drop-shadow(0 3px 4px rgba(0,0,0,0.7)); }
.brand-name { font-family: var(--ff-head); font-weight: 700; font-size: 24px; letter-spacing: .26em; display:block; color: var(--spark); text-shadow: 0 2px 0 #0a0a0a; }
.brand-tag { font-size: 10px; letter-spacing: .26em; color: var(--furnace); text-transform: uppercase; font-family: var(--ff-head); }
.main-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.main-nav a {
  font-family: var(--ff-head); font-size: 12px; font-weight: 700; letter-spacing: .2em;
  padding: 9px 16px; color: var(--titanium-hi); border: 2px solid transparent;
  transition: all .2s; text-transform: uppercase;
}
.main-nav a:hover { background: var(--iron); color: var(--furnace); border-color: var(--iron-light); }
.main-nav a.active { background: var(--furnace); color: var(--carbon); border-color: var(--furnace-deep); box-shadow: 0 3px 0 #0a0a0a; }
.nav-toggle { display:none; font-family: var(--ff-head); font-weight:700; letter-spacing:.16em; background: var(--furnace); color: var(--carbon); border:2px solid var(--furnace-deep); padding:8px 14px; cursor:pointer; text-transform: uppercase; }
@media (max-width: 820px) {
  .nav-toggle { display: block; margin-left: auto; }
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: flex; }
}

/* ---------- V6 engine block (top hero) ---------- */
.engine-block {
  position: relative; margin: 24px 0; padding: 22px;
  background: linear-gradient(180deg, #2a2c2e, #1a1c1e);
  border: 2px solid var(--iron-light);
  box-shadow: var(--shadow-machine-lg);
  overflow: hidden;
}
/* heat-dispersing fins on the deck surface */
.engine-block::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .55;
  background:
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(0,0,0,0.45) 8px 10px),
    radial-gradient(circle at 18% 22%, rgba(255,106,0,0.18), transparent 36%),
    radial-gradient(circle at 82% 80%, rgba(30,144,255,0.14), transparent 36%);
}
/* rivet bolts at the corners */
.engine-block::after {
  content: ""; position: absolute; inset: 6px; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 0 0, var(--rivet) 3px, transparent 3.5px),
    radial-gradient(circle at 100% 0, var(--rivet) 3px, transparent 3.5px),
    radial-gradient(circle at 0 100%, var(--rivet) 3px, transparent 3.5px),
    radial-gradient(circle at 100% 100%, var(--rivet) 3px, transparent 3.5px);
}
.engine-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; max-width: 880px; margin: 0 auto;
}
@media (max-width: 700px) { .engine-grid { grid-template-columns: repeat(2, 1fr); } }

.cylinder-bore {
  position: relative; aspect-ratio: 3 / 4; cursor: pointer;
  background: var(--carbon);
  border: 2px solid var(--iron-light);
  border-radius: 8px;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.9), 0 4px 0 #0a0a0a;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.cylinder-bore:hover { transform: translateY(-2px); }
.cylinder-bore.combusting {
  box-shadow: inset 0 0 60px rgba(255,100,0,0.85), 0 0 24px rgba(255,106,0,0.6), 0 4px 0 #0a0a0a;
  border-color: var(--furnace);
}
/* the piston rod — a vertical metal bar that strokes up/down */
.cylinder-bore .piston-rod {
  position: absolute; left: 50%; top: 0; bottom: 0; transform: translateX(-50%);
  width: 30%;
  background: linear-gradient(90deg, #888, #ccc, #888);
  border-left: 1px solid #0a0a0a; border-right: 1px solid #0a0a0a;
  z-index: 1;
}
.piston-rod::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18px;
  background: linear-gradient(180deg, var(--titanium-hi), var(--steel));
  border-bottom: 2px solid var(--carbon);
}
/* the piston crown = content area on top of the rod */
.cylinder-bore .piston-crown {
  position: absolute; left: 8%; right: 8%; top: 10px; height: 60%;
  border-radius: 50% / 22%;
  background: radial-gradient(circle at 50% 35%, var(--cyl-accent, var(--furnace)), rgba(20,20,20,0.85));
  box-shadow: inset 0 0 22px rgba(0,0,0,0.7), 0 0 14px var(--cyl-accent, var(--furnace));
  z-index: 2; overflow: hidden; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--iron-light);
}
.piston-crown img {
  width: 100%; height: 100%; object-fit: cover;
  mix-blend-mode: luminosity; opacity: .85;
  filter: contrast(1.15) saturate(0.9);
}
.piston-crown .cyl-glow {
  position: absolute; inset: -2px; border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.18), transparent 65%);
  pointer-events: none;
}
/* spark-plug at the top of each cylinder */
.cylinder-bore .spark-plug {
  position: absolute; top: 4px; right: 6px; z-index: 3;
  width: 12px; height: 12px;
  background: var(--steel); border: 1px solid var(--carbon);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  box-shadow: 0 0 0 1px var(--iron-light);
}
.cylinder-bore .spark-plug.igniting {
  background: var(--hydraulic); box-shadow: 0 0 12px 4px rgba(30,144,255,0.85);
}
/* brass nameplate below the cylinder */
.cylinder-bore .cyl-plate {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  z-index: 4; background: linear-gradient(180deg, var(--brass-hi), var(--brass));
  padding: 3px 10px; font-family: var(--ff-head); font-size: 9px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--carbon);
  border: 1px solid #0a0a0a; box-shadow: 0 2px 0 #0a0a0a; white-space: nowrap; max-width: 92%;
  overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.cyl-plate b { display:block; font-size: 10px; }
.cyl-plate span { color: #4a3417; font-size: 8px; }

/* ---------- chamber strip ---------- */
.chamber-strip { display:flex; gap:8px; flex-wrap:wrap; margin: 22px 0; }
.chamber-strip a {
  font-family: var(--ff-head); font-size: 11px; font-weight: 700; letter-spacing: .18em;
  padding: 8px 14px; background: var(--iron); color: var(--titanium-hi);
  border: 2px solid var(--iron-light); transition: all .2s; text-transform: uppercase;
}
.chamber-strip a:hover, .chamber-strip a.active { background: var(--furnace); color: var(--carbon); border-color: var(--furnace-deep); }

/* ---------- bands ---------- */
.forge-band { margin: 36px 0; padding: 22px; background: rgba(42,44,46,0.7); border: 2px solid var(--iron-light); box-shadow: var(--shadow-machine); position: relative; }
.forge-band::before {
  content: ""; position: absolute; inset: 4px; pointer-events: none; opacity: 0.2;
  background-image: repeating-linear-gradient(90deg, transparent 0 6px, rgba(0,0,0,0.5) 6px 7px);
}
.stamped-tags-row { display:flex; flex-wrap:wrap; gap:8px; margin: 14px 0; position: relative; z-index: 1; }
.stamped-tag {
  display:inline-flex; align-items:center; gap:6px;
  background: var(--brass); color: var(--carbon);
  padding: 7px 14px; font-family: var(--ff-head); font-size: 12px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid #0a0a0a; box-shadow: 0 3px 0 #0a0a0a;
  transition: transform .15s;
}
.stamped-tag:hover { transform: translateY(-2px); }

/* ---------- gearbox (card grid) ---------- */
.gearbox {
  position: relative; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px; z-index: 1;
}
/* large semi-transparent gear silhouettes rotating slowly in the background */
.gearbox::before, .gearbox::after {
  content: ""; position: absolute; pointer-events: none; z-index: 0;
  background: no-repeat center / contain;
  opacity: 0.08;
}
.gearbox::before { width: 320px; height: 320px; top: -40px; right: -40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><g fill='%23cccccc'><circle cx='24' cy='24' r='13'/><rect x='22' y='2' width='4' height='7'/><rect x='22' y='2' width='4' height='7' transform='rotate(45 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(90 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(135 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(180 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(225 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(270 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(315 24 24)'/></g><circle cx='24' cy='24' r='5' fill='%231a1c1e'/></svg>");
  animation: gear-rotate 60s linear infinite;
}
.gearbox::after { width: 260px; height: 260px; bottom: -30px; left: -30px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><g fill='%23cccccc'><circle cx='24' cy='24' r='13'/><rect x='22' y='2' width='4' height='7'/><rect x='22' y='2' width='4' height='7' transform='rotate(45 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(90 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(135 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(180 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(225 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(270 24 24)'/><rect x='22' y='2' width='4' height='7' transform='rotate(315 24 24)'/></g><circle cx='24' cy='24' r='5' fill='%231a1c1e'/></svg>");
  animation: gear-rotate-reverse 80s linear infinite;
}
@keyframes gear-rotate { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes gear-rotate-reverse { from { transform: rotate(0); } to { transform: rotate(-360deg); } }
@keyframes piston-stroke { 0%,100% { transform: translateY(0); } 50% { transform: translateY(18px); } }
@keyframes chain-drive { from { transform: translateX(0); } to { transform: translateX(-180px); } }

/* gear card — a circular gear with the exercise image at its centre */
.gear-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 24px 18px 16px; min-height: 320px; cursor: pointer;
  background: radial-gradient(circle at 50% 38%, rgba(58,60,62,0.95), rgba(20,20,20,0.95));
  border: 2px solid var(--iron-light); box-shadow: var(--shadow-machine);
  transition: transform .25s, box-shadow .25s; z-index: 1;
}
.gear-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-machine-lg); border-color: var(--furnace); }
.gear-card .gear-body {
  width: 140px; height: 140px; position: relative;
  border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 40% 30%, var(--titanium-hi), var(--steel) 50%, var(--carbon));
  box-shadow: inset 0 0 18px rgba(0,0,0,0.7), 0 4px 8px rgba(0,0,0,0.5);
  border: 2px solid var(--iron-light);
}
/* gear teeth using clip-path */
.gear-card .gear-body::before {
  content: ""; position: absolute; inset: -8px;
  background: var(--steel);
  clip-path: polygon(
    50% 0%, 56% 8%, 64% 6%, 64% 0%, 72% 0%, 72% 8%, 80% 12%,
    88% 8%, 92% 14%, 100% 18%, 96% 26%, 100% 34%, 92% 40%, 96% 48%,
    100% 56%, 92% 60%, 96% 68%, 88% 78%, 80% 82%, 72% 88%, 64% 92%,
    64% 100%, 56% 100%, 50% 92%, 44% 100%, 36% 100%, 36% 92%, 28% 88%,
    20% 82%, 12% 78%, 8% 68%, 4% 60%, 0% 56%, 8% 48%, 4% 40%, 0% 34%,
    4% 26%, 0% 18%, 8% 14%, 12% 8%, 20% 12%, 28% 8%, 36% 0%, 36% 6%, 44% 8%
  );
  z-index: -1;
}
.gear-card .gear-body img {
  width: 80%; height: 80%; object-fit: cover; border-radius: 50%;
  position: absolute; top: 10%; left: 10%;
  filter: contrast(1.1) saturate(0.95);
  mix-blend-mode: luminosity; opacity: .9;
}
.gear-card .gear-body::after {
  content: ""; position: absolute; width: 22%; height: 22%; top: 39%; left: 39%;
  border-radius: 50%; background: var(--carbon); border: 2px solid var(--iron-light);
  box-shadow: inset 0 0 8px rgba(0,0,0,0.8);
}
.gear-card .gc-title { font-family: var(--ff-head); font-weight: 700; font-size: 16px; color: var(--spark); text-align: center; }
.gear-card .gc-meta { font-family: var(--ff-mono); font-size: 11px; color: var(--ember); text-align: center; letter-spacing: .04em; }
.gear-card .gc-excerpt { font-size: 12px; color: var(--titanium-hi); text-align: center; opacity: .85; }

/* chain-link topic card — a horizontal track of chain links */
.chain-link {
  position: relative; background: linear-gradient(180deg, var(--iron), var(--carbon));
  border: 2px solid var(--iron-light); box-shadow: var(--shadow-machine);
  padding: 18px; overflow: hidden; min-height: 240px;
}
.chain-link .cl-title { font-family: var(--ff-head); font-weight: 700; font-size: 17px; color: var(--spark); margin-bottom: 4px; }
.chain-link .cl-meta { font-family: var(--ff-mono); font-size: 11px; color: var(--ember); letter-spacing: .04em; margin-bottom: 12px; }
.chain-drive {
  position: relative; overflow: hidden; height: 92px;
  border-top: 2px solid var(--iron-light); border-bottom: 2px solid var(--iron-light);
  background: var(--carbon);
}
.chain-track {
  display: flex; gap: 8px; padding: 8px 0; width: max-content;
}
.chain-link .cl-node {
  position: relative; width: 110px; height: 76px; flex-shrink: 0;
  border-radius: 50% / 30%;
  background: linear-gradient(180deg, var(--steel), var(--iron));
  border: 2px solid var(--iron-light);
  overflow: hidden;
  box-shadow: 0 3px 0 #0a0a0a;
}
.chain-link .cl-node img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.chain-link .cl-node::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px;
  margin: -7px 0 0 -7px; background: var(--carbon); border: 1px solid var(--iron-light);
  border-radius: 50%; box-shadow: inset 0 0 4px rgba(0,0,0,0.7);
}

/* forge-spark quick-news card */
.forge-spark {
  position: relative; display: flex; align-items: center; gap: 14px;
  background: radial-gradient(circle at 16% 50%, rgba(255,174,66,0.25), transparent 40%),
              linear-gradient(90deg, var(--iron), var(--carbon));
  border: 2px solid var(--iron-light); padding: 14px 18px 14px 60px;
  box-shadow: var(--shadow-machine); transition: transform .2s;
  min-height: 70px; clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%);
}
.forge-spark:hover { transform: translateX(4px); }
.forge-spark .fs-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); }
.forge-spark .fs-thumb { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid var(--furnace); }
.forge-spark .fs-thumb img { width: 100%; height: 100%; object-fit: cover; }
.forge-spark .fs-title { font-family: var(--ff-head); font-weight: 700; font-size: 14px; color: var(--ember); }
.forge-spark .fs-meta { font-family: var(--ff-mono); font-size: 11px; color: var(--titanium); letter-spacing: .04em; }
.spark-particle { position: fixed; width: 5px; height: 5px; border-radius: 50%; pointer-events: none; z-index: 9999; box-shadow: 0 0 6px currentColor; }

/* wide feature card */
.wide-feature { display:grid; grid-template-columns: 1fr; border:2px solid var(--iron-light); background: linear-gradient(180deg, var(--iron), var(--carbon)); box-shadow: var(--shadow-machine); overflow:hidden; transition: transform .25s; }
.wide-feature:hover { transform: translateY(-3px); border-color: var(--furnace); box-shadow: var(--shadow-machine-lg); }
@media (min-width: 640px) { .wide-feature { grid-template-columns: 240px 1fr; } }
.wf-img { width:100%; height:100%; min-height: 180px; object-fit: cover; filter: contrast(1.1) saturate(0.9); }
.wf-body { padding: 18px; }
.wf-body h3 { color: var(--spark); }
.wf-excerpt { font-size: 14px; color: var(--titanium-hi); }
.wf-meta { font-family: var(--ff-mono); font-size: 12px; color: var(--ember); letter-spacing: .04em; }

/* ---------- sidebar (dashboard array) ---------- */
.layout-sidebar { display: flex; flex-direction: column; gap: 20px; }
.side-block { background: linear-gradient(180deg, var(--iron), var(--carbon)); border: 2px solid var(--iron-light); box-shadow: var(--shadow-machine); padding: 16px; }
.side-block h3, .side-block h4 { font-family: var(--ff-head); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--furnace); border-bottom: 2px solid var(--iron-light); padding-bottom: 8px; margin-bottom: 12px; }

/* turbo-gauge heat list */
.gauge-row { display: flex; flex-direction: column; gap: 14px; }
.turbo-gauge {
  position: relative; height: 80px; display: flex; align-items: center; gap: 12px;
  cursor: pointer;
}
.turbo-gauge .gauge-face {
  position: relative; width: 80px; height: 80px; flex-shrink: 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--carbon), #000);
  border: 2px solid var(--iron-light);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.8), 0 3px 0 #0a0a0a;
  overflow: hidden;
}
/* gauge tick marks */
.gauge-face::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  background:
    conic-gradient(from -120deg,
      var(--gauge-red) 0deg 60deg,
      var(--ember) 60deg 120deg,
      var(--hydraulic) 120deg 240deg);
  opacity: 0.2;
  -webkit-mask: radial-gradient(circle, transparent 60%, #000 62%);
          mask: radial-gradient(circle, transparent 60%, #000 62%);
}
.gauge-face::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px;
  margin: -3px 0 0 -3px; border-radius: 50%; background: var(--titanium-hi);
  box-shadow: 0 0 4px rgba(0,0,0,0.8); z-index: 3;
}
.gauge-needle {
  position: absolute; left: 50%; top: 50%; width: 2px; height: 30px;
  background: var(--gauge-red); transform-origin: 50% 100%;
  transform: translate(-50%, -100%) rotate(-120deg);
  z-index: 2; box-shadow: 0 0 6px var(--gauge-red);
}
.gauge-label { flex: 1; min-width: 0; }
.gauge-label b { display: block; font-family: var(--ff-head); font-size: 13px; color: var(--spark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gauge-label span { font-family: var(--ff-mono); font-size: 11px; color: var(--ember); }
.gauge-unit { font-family: var(--ff-mono); font-size: 9px; color: var(--titanium); letter-spacing: .12em; }

/* radio log */
.radio-log { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.radio-log li {
  background: var(--carbon); border: 1px solid var(--iron-light);
  padding: 8px 10px; font-family: var(--ff-mono); font-size: 12px;
  position: relative; overflow: hidden;
}
.radio-log li::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--radio-green), transparent);
  opacity: 0; transition: opacity .3s;
}
.radio-log li.active::before { opacity: 1; }
.radio-log .radio-meta { color: var(--radio-green); font-size: 10px; letter-spacing: .04em; display: block; }
.radio-log .radio-text { color: var(--titanium-hi); display: block; }

/* hydraulic vote */
.hydraulic-vote { position: relative; padding: 8px; }
.vote-row { display: flex; gap: 22px; justify-content: center; margin: 14px 0; }
.vote-cylinder {
  position: relative; width: 64px; height: 110px; cursor: pointer;
  background: var(--carbon); border: 2px solid var(--iron-light);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.8), 0 3px 0 #0a0a0a;
  overflow: hidden; transition: transform .15s;
}
.vote-cylinder:hover { transform: scale(1.04); }
.vote-cylinder .piston-rod {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 30%;
  background: linear-gradient(180deg, var(--hydraulic), var(--hydraulic-deep));
  box-shadow: inset 0 4px 6px rgba(255,255,255,0.3);
  transition: height .3s;
}
.vote-cylinder::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 4px;
  background: repeating-linear-gradient(180deg, var(--titanium-hi) 0 2px, transparent 2px 8px);
}
.vote-label { font-family: var(--ff-head); font-size: 11px; text-align: center; margin-top: 8px; color: var(--titanium-hi); letter-spacing: .12em; text-transform: uppercase; }
.hydraulic-cursor {
  position: absolute; width: 18px; height: 18px; pointer-events: none; z-index: 5;
  background: radial-gradient(circle at 35% 30%, var(--hydraulic), var(--hydraulic-deep));
  border-radius: 50%; box-shadow: 0 0 10px var(--hydraulic);
  transform: translate(-50%, -50%);
  border: 1px solid var(--spark);
}
.oil-splash { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--hydraulic); pointer-events: none; box-shadow: 0 0 4px var(--hydraulic); }

/* torque-curve calendar */
.torque-calendar {
  position: relative; height: 120px; margin: 8px 0;
  background: var(--carbon); border: 2px solid var(--iron-light);
  box-shadow: inset 0 0 14px rgba(0,0,0,0.8);
  overflow: hidden;
}
.torque-curve-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.torque-cursor {
  position: absolute; width: 14px; height: 14px; border-radius: 50%;
  background: var(--furnace); border: 2px solid var(--spark);
  box-shadow: 0 0 12px var(--furnace); z-index: 3;
  transform: translate(-50%, -50%);
}
.torque-today {
  position: absolute; width: 2px; top: 0; bottom: 0;
  background: var(--ember); z-index: 2;
}
.torque-axis-x { font-family: var(--ff-mono); font-size: 9px; color: var(--titanium); letter-spacing: .12em; text-transform: uppercase; text-align: center; margin-top: 6px; }
.scent-hint { font-size: 11px; color: var(--titanium); margin-top: 8px; font-style: italic; text-align: center; }

/* ---------- pagination ---------- */
.pagination { display:flex; gap: 6px; justify-content: center; margin: 28px 0; flex-wrap: wrap; }
.pagination a, .pagination span { font-family: var(--ff-head); font-weight: 700; padding: 8px 14px; border: 2px solid var(--iron-light); background: var(--iron); color: var(--titanium-hi); }
.pagination a:hover { background: var(--furnace); color: var(--carbon); border-color: var(--furnace-deep); }
.pagination .current { background: var(--furnace); color: var(--carbon); border-color: var(--furnace-deep); }

/* ---------- detail page ---------- */
.detail-breadcrumb { font-family: var(--ff-mono); font-size: 12px; color: var(--titanium); margin-bottom: 16px; display:flex; gap:8px; flex-wrap: wrap; align-items: center; letter-spacing: .08em; }
.detail-breadcrumb a { color: var(--ember); }
.detail-hero { display: grid; grid-template-columns: 1fr; gap: 22px; margin-bottom: 24px; }
@media (min-width: 760px) { .detail-hero { grid-template-columns: 340px 1fr; } }
.detail-hero-frame { position: relative; border: 2px solid var(--iron-light); box-shadow: var(--shadow-machine-lg); overflow: hidden; background: var(--carbon); }
.detail-hero-frame::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: var(--heat-fins); opacity: 0.3; }
.detail-hero-img { width: 100%; height: 380px; object-fit: cover; filter: contrast(1.15) saturate(0.9); }
.detail-hero-glow { position:absolute; inset:0; background: radial-gradient(circle at 30% 30%, rgba(255,106,0,0.25), transparent 60%); pointer-events: none; z-index: 3; }
.detail-shape { display:inline-block; font-family: var(--ff-head); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--carbon); background: var(--furnace); padding: 6px 14px; box-shadow: 0 3px 0 #0a0a0a; }
.detail-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.stat { background: var(--carbon); border: 2px solid var(--iron-light); padding: 8px 14px; font-family: var(--ff-mono); font-size: 11px; color: var(--titanium); box-shadow: 0 2px 0 #0a0a0a; }
.stat b { font-family: var(--ff-head); font-size: 16px; color: var(--ember); }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-tag { font-family: var(--ff-head); font-size: 10px; padding: 4px 10px; background: var(--brass); color: var(--carbon); border: 1px solid #0a0a0a; letter-spacing: .12em; text-transform: uppercase; }
.detail-body { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 1000px) { .detail-body { grid-template-columns: 1fr 320px; } }
.detail-content h2 { margin-top: 18px; color: var(--spark); }
.detail-desc { font-size: 16px; line-height: 1.75; color: var(--titanium-hi); }
.wax-note { background: linear-gradient(180deg, var(--iron), var(--carbon)); border: 2px solid var(--iron-light); box-shadow: var(--shadow-machine); padding: 18px; margin: 18px 0; }
.wax-coord { font-family: var(--ff-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--furnace); }
.wax-text { font-size: 14px; color: var(--titanium-hi); margin: 8px 0; font-style: italic; }
.wax-sign { font-family: var(--ff-mono); font-size: 11px; color: var(--titanium); letter-spacing: .08em; }
.detail-related h3 { font-family: var(--ff-head); margin: 24px 0 12px; color: var(--spark); }

/* ---------- static pages ---------- */
.static-hero { margin-bottom: 24px; }
.static-lede { font-size: 17px; color: var(--titanium-hi); max-width: 65ch; font-style: italic; }
.static-card { background: linear-gradient(180deg, var(--iron), var(--carbon)); border: 2px solid var(--iron-light); box-shadow: var(--shadow-machine); padding: 20px; margin-bottom: 16px; }
.static-card h2 { color: var(--spark); }
.layer-list { list-style: none; padding: 0; }
.layer-list li { padding: 8px 0; border-bottom: 1px dashed var(--iron-light); color: var(--titanium-hi); }
.spore-form, .wrench-form { display: flex; flex-direction: column; gap: 10px; }
.spore-form label, .wrench-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-family: var(--ff-head); letter-spacing: .14em; text-transform: uppercase; color: var(--titanium-hi); }
.spore-form input, .spore-form textarea, .wrench-form input { padding: 10px; border: 2px solid var(--iron-light); background: var(--carbon); color: var(--spark); font-family: var(--ff-mono); font-size: 14px; }
.spore-form input:focus, .wrench-form input:focus { outline: 2px solid var(--furnace); }
.spore-form button { align-self: flex-start; padding: 12px 22px; background: var(--furnace); color: var(--carbon); border: 2px solid var(--furnace-deep); font-family: var(--ff-head); font-weight: 700; letter-spacing: .14em; cursor: pointer; box-shadow: 0 3px 0 #0a0a0a; text-transform: uppercase; }
.spore-form button:hover { transform: translateY(-2px); box-shadow: var(--shadow-machine-lg); }
.static-aside { background: var(--iron); border: 2px solid var(--iron-light); padding: 18px; margin-top: 16px; }

/* ---------- search ---------- */
.search-box { display: flex; align-items: center; gap: 8px; background: var(--carbon); border: 2px solid var(--iron-light); box-shadow: var(--shadow-machine); padding: 8px 16px; }
.search-box input { flex: 1; border: none; background: transparent; font-family: var(--ff-mono); font-size: 14px; padding: 6px; outline: none; color: var(--radio-green); }
.search-count { font-family: var(--ff-mono); font-size: 11px; color: var(--titanium); }
.search-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 12px; margin-top: 16px; }
.search-cell { display: flex; gap: 10px; background: linear-gradient(180deg, var(--iron), var(--carbon)); border: 2px solid var(--iron-light); padding: 10px; box-shadow: var(--shadow-machine); }
.search-cell .sc-thumb { width: 56px; height: 64px; flex-shrink: 0; overflow: hidden; border: 1px solid var(--iron-light); }
.search-cell .sc-thumb img { width:100%; height:100%; object-fit: cover; }
.search-cell .sc-meta { display:block; font-family: var(--ff-mono); font-size: 11px; color: var(--ember); letter-spacing: .04em; }
.search-cell .sc-body b { color: var(--spark); font-family: var(--ff-head); }

/* ---------- footer (showroom & honor engine) ---------- */
.site-footer { position: relative; margin-top: 60px; background: linear-gradient(180deg, var(--iron-dark) 0%, var(--carbon) 100%); border-top: 2px solid var(--iron-light); overflow: hidden; }
.showroom-floor { position: relative; padding: 36px 18px 28px; overflow: hidden; background: var(--carbon); }
/* checker-plate industrial floor */
.showroom-floor::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0.35;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.04) 75%),
    linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.04) 75%);
  background-size: 28px 28px; background-position: 0 0, 14px 14px;
}
/* oil-stain blotches */
.showroom-floor::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.5;
  background:
    radial-gradient(circle at 14% 32%, rgba(0,0,0,0.45), transparent 22%),
    radial-gradient(circle at 78% 68%, rgba(0,0,0,0.4), transparent 18%),
    radial-gradient(circle at 42% 82%, rgba(0,0,0,0.35), transparent 14%);
}
.showroom-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; max-width: 1180px; margin: 0 auto; }

/* showcase engine — a CSS-built engine on a rotating platform */
.showcase-engine {
  position: relative; aspect-ratio: 1 / 1.1; cursor: pointer;
  background: radial-gradient(circle at 50% 60%, rgba(255,106,0,0.15), transparent 65%),
              linear-gradient(180deg, var(--iron), var(--carbon));
  border: 2px solid var(--iron-light); box-shadow: var(--shadow-machine);
  overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
  padding: 14px; perspective: 600px;
}
.showcase-engine .engine-platform {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 80%; height: 80%; transform-style: preserve-3d;
  display: flex; align-items: center; justify-content: center;
}
.showcase-engine .engine-body {
  width: 70%; height: 50%; background: linear-gradient(180deg, var(--titanium-hi), var(--steel));
  border: 2px solid var(--carbon); box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
  position: relative;
}
.showcase-engine .engine-body::before {
  /* three cylinder heads on top */
  content: ""; position: absolute; top: -8px; left: 8%; right: 8%; height: 12px;
  background: repeating-linear-gradient(90deg, var(--titanium-hi) 0 22%, var(--carbon) 22% 26%);
  border: 1px solid var(--carbon);
}
.showcase-engine .engine-hood {
  position: absolute; top: -22px; left: 8%; right: 8%; height: 22px;
  background: linear-gradient(180deg, var(--ember), var(--furnace-deep));
  border: 1px solid var(--carbon); transform-origin: 0 100%;
  transition: transform .3s; opacity: .85;
}
.showcase-engine.hood-open .engine-hood { transform: rotateX(70deg) translateY(-4px); }
.showcase-engine img {
  position: relative; z-index: 2; width: 86%; height: 86%; object-fit: cover;
  filter: contrast(1.1) saturate(0.95); opacity: .85;
  border: 2px solid var(--iron-light);
}
.showcase-engine .engine-title {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  font-family: var(--ff-head); font-size: 11px; color: var(--spark);
  text-align: center; z-index: 3; padding: 0 6px; letter-spacing: .14em; text-transform: uppercase;
}

/* torque-curve wall */
.torque-wall { position: relative; z-index: 1; max-width: 980px; margin: 32px auto 0; height: 120px; background: var(--carbon); border: 2px solid var(--iron-light); box-shadow: inset 0 0 14px rgba(0,0,0,0.8); }
.torque-wall svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.torque-peak { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--furnace); border: 1px solid var(--spark); box-shadow: 0 0 8px var(--furnace); transform: translate(-50%, -50%); z-index: 2; }
.torque-peak::after { content: attr(data-label); position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); font-family: var(--ff-mono); font-size: 9px; color: var(--ember); white-space: nowrap; letter-spacing: .08em; text-transform: uppercase; }

.footer-grid { display: grid; grid-template-columns: 1fr; gap: 22px; max-width: 1200px; margin: 0 auto; padding: 28px 18px; position: relative; z-index: 1; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.footer-col h4 { font-family: var(--ff-head); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--furnace); margin-bottom: 10px; border-bottom: 2px solid var(--iron-light); padding-bottom: 6px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 4px 0; }
.footer-col a { color: var(--titanium-hi); opacity: .9; }
.footer-col a:hover { opacity: 1; color: var(--furnace); }
.forge-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.forge-logo .brand-mark { width: 52px; height: 52px; }
.forge-name { font-family: var(--ff-head); font-weight: 700; font-size: 22px; letter-spacing: .26em; color: var(--spark); }
.forge-tag { font-size: 10px; letter-spacing: .22em; color: var(--furnace); text-transform: uppercase; font-family: var(--ff-head); }

/* calibrate wrench subscribe */
.wrench-cell {
  position: relative; background: linear-gradient(180deg, var(--iron), var(--carbon));
  border: 2px solid var(--iron-light); padding: 16px; margin-top: 12px;
  box-shadow: var(--shadow-machine);
}
.wrench-form input { width: 100%; padding: 10px; border: 2px solid var(--iron-light); background: var(--carbon); color: var(--radio-green); font-family: var(--ff-mono); margin: 8px 0; font-size: 14px; }
.wrench-handle {
  display: block; width: 100%; padding: 12px; background: var(--furnace); color: var(--carbon);
  border: 2px solid var(--furnace-deep); font-family: var(--ff-head); font-weight: 700; letter-spacing: .18em;
  cursor: pointer; box-shadow: 0 3px 0 #0a0a0a; text-transform: uppercase; transform-origin: 100% 50%;
}
.wrench-handle:hover { background: var(--ember); }
.calibrate-confirm { background: var(--hydraulic-deep); color: var(--spark); padding: 14px; margin-top: 8px; font-family: var(--ff-head); font-size: 13px; letter-spacing: .14em; border: 1px solid var(--hydraulic); text-align: center; }
.calibrate-confirm::before { content: "■ CALIBRATED "; color: var(--radio-green); }

.tagline-line { font-family: var(--ff-head); font-size: 13px; letter-spacing: .2em; text-align: center; padding: 20px; border-top: 2px solid var(--iron-light); border-bottom: 2px solid var(--iron-light); color: var(--spark); display: flex; align-items: center; justify-content: center; gap: 12px; text-transform: uppercase; background: var(--carbon); }
.footer-bottom { text-align: center; padding: 14px; font-family: var(--ff-mono); font-size: 11px; color: var(--titanium); letter-spacing: .14em; text-transform: uppercase; }

.exit-arrow { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; background: var(--furnace); color: var(--carbon); border: 2px solid var(--furnace-deep); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .3s; box-shadow: var(--shadow-machine-lg); z-index: 60; }
.exit-arrow.show { opacity: 1; pointer-events: auto; }
.exit-arrow svg { width: 22px; height: 22px; }

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s, transform .6s; }
[data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity:1; transform:none; } }

/* small screens */
@media (max-width: 600px) {
  .gearbox { grid-template-columns: 1fr; }
  .detail-hero-img { height: 260px; }
  .radio-log .radio-text { font-size: 11px; }
}
