/* ============================================================
   SUMNER LIFT FIELD MANUAL — STYLESHEET
   Industrial / technical-manual aesthetic
   ============================================================ */

:root {
  --steel-950: #0b1117;
  --steel-900: #111820;
  --steel-800: #1a232e;
  --steel-700: #243140;
  --steel-600: #34465a;
  --steel-500: #5b6e85;
  --steel-400: #8a9bb0;
  --steel-300: #b9c4d2;
  --steel-200: #dde3ec;
  --steel-100: #eef1f5;
  --steel-050: #f7f8fb;

  --safety-orange: #ff6b1a;
  --safety-orange-dim: #d35613;
  --hazard-yellow: #ffc419;
  --hazard-yellow-dim: #d99e00;
  --signal-red: #d23131;
  --signal-green: #2b9a4a;
  --signal-blue: #1f6feb;

  --ink: #0b1117;
  --ink-soft: #2a3441;
  --paper: #ffffff;
  --paper-warm: #fbfaf6;
  --paper-soft: #f7f8fb;

  --rule: #d8dee7;
  --rule-strong: #b3bdcb;

  --shadow-sm: 0 1px 2px rgba(11,17,23,.06), 0 1px 1px rgba(11,17,23,.04);
  --shadow-md: 0 4px 14px rgba(11,17,23,.08), 0 2px 4px rgba(11,17,23,.05);
  --shadow-lg: 0 18px 40px rgba(11,17,23,.18), 0 6px 14px rgba(11,17,23,.08);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;

  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--signal-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .9em; background: var(--steel-100); padding: 1px 6px; border-radius: 3px; }

.eyebrow {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--safety-orange);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 2px;
  background: var(--safety-orange);
}

.lead { font-size: 1.18rem; color: var(--ink-soft); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--dark { background: var(--steel-950); color: var(--steel-200); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--paper { background: var(--paper-warm); }
.section--steel { background: var(--steel-100); }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--steel-950);
  color: var(--steel-300);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  padding: 7px 0;
  border-bottom: 1px solid #000;
}
.topbar .wrap {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.topbar .blink {
  width: 8px; height: 8px; background: var(--signal-green); border-radius: 50%;
  display: inline-block; margin-right: 8px; box-shadow: 0 0 8px var(--signal-green);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .35; } }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  background: rgba(255,255,255,.92);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--hazard-yellow);
  border-radius: 6px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255,196,25,.1) 6px 12px);
  pointer-events: none;
}
.brand-name { font-weight: 700; font-size: 1.05rem; line-height: 1; }
.brand-sub  { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; color: var(--steel-500); text-transform: uppercase; }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 14px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .94rem;
  border-radius: 6px;
}
.nav a:hover { background: var(--steel-100); text-decoration: none; color: var(--ink); }
.nav a.active { color: var(--ink); background: var(--steel-100); }

.menu-toggle {
  display: none; border: 1px solid var(--rule-strong); background: transparent;
  padding: 8px 12px; border-radius: 6px; cursor: pointer; font-family: var(--mono);
}

@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    flex-direction: column; padding: 12px; gap: 2px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #000; box-shadow: var(--shadow-md); }
.btn--accent { background: var(--safety-orange); color: #fff; }
.btn--accent:hover { background: var(--safety-orange-dim); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { background: var(--steel-100); }
.btn--sm { padding: 8px 14px; font-size: .85rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(255,107,26,.18), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(31,111,235,.18), transparent 60%),
    linear-gradient(180deg, var(--steel-950), var(--steel-900));
  color: #fff;
  overflow: hidden;
  padding: 96px 0 88px;
  border-bottom: 1px solid #000;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(transparent 95%, rgba(255,255,255,.05) 95%),
    linear-gradient(90deg, transparent 95%, rgba(255,255,255,.05) 95%);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 50%, transparent 90%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.3fr .9fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5vw, 4rem); }
.hero .lead { color: var(--steel-300); max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 48px; padding-top: 24px;
  font-family: var(--mono);
}
.hero-stats div { padding-right: 20px; }
.hero-stats strong { font-size: 1.6rem; display: block; color: var(--hazard-yellow); }
.hero-stats span { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--steel-400); }

.hero-art {
  aspect-ratio: 1/1.1;
  background: linear-gradient(180deg, #1a232e, #0b1117);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-art::after {
  content: "MAST · CARRIAGE · BASE";
  position: absolute; bottom: 16px; left: 16px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em;
  color: var(--steel-500);
}
.hero-art-tag {
  position: absolute; top: 16px; left: 16px;
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em;
  color: var(--hazard-yellow); border: 1px solid rgba(255,196,25,.4);
  padding: 4px 10px; border-radius: 99px;
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 64px 0 56px; }
  .hero-art { max-width: 420px; margin: 0 auto; width: 100%; }
}

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: var(--rule-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card h3 { margin-top: 0; }
.card .meta {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--steel-500);
  display: flex; gap: 10px; align-items: center; margin-bottom: 12px;
}
.card .meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--safety-orange); }

.card--lift {
  display: flex; flex-direction: column; gap: 16px;
}
.card--lift .lift-svg {
  background: var(--steel-050);
  border-radius: 10px;
  border: 1px solid var(--rule);
  padding: 16px;
  height: 220px; display: grid; place-items: center;
}
.spec-list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.spec-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 7px 0; border-bottom: 1px dashed var(--rule);
}
.spec-list li:last-child { border-bottom: 0; }
.spec-list .k { color: var(--steel-500); font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; }
.spec-list .v { font-weight: 600; }

/* ---------- Schematic / SVG box ---------- */
.schematic {
  background:
    linear-gradient(rgba(35,49,64,.05), rgba(35,49,64,.05)),
    repeating-linear-gradient(0deg, var(--steel-100) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, var(--steel-100) 0 1px, transparent 1px 32px),
    var(--paper-warm);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
}
.schematic::before {
  content: "FIG. " attr(data-fig);
  position: absolute; top: 10px; right: 14px;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .14em;
  color: var(--steel-500);
}

/* ---------- Callouts ---------- */
.callout {
  border-left: 4px solid var(--steel-500);
  background: var(--steel-050);
  padding: 16px 18px;
  border-radius: 4px;
  margin: 24px 0;
  font-size: .95rem;
}
.callout strong { display: block; font-family: var(--mono); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.callout--danger  { border-color: var(--signal-red);     background: #fdecec; }
.callout--danger strong  { color: var(--signal-red); }
.callout--warning { border-color: var(--hazard-yellow-dim); background: #fff7da; }
.callout--warning strong { color: var(--hazard-yellow-dim); }
.callout--info    { border-color: var(--signal-blue);    background: #eef4ff; }
.callout--info strong    { color: var(--signal-blue); }
.callout--ok      { border-color: var(--signal-green);   background: #e6f5eb; }
.callout--ok strong      { color: var(--signal-green); }

/* ---------- Tables ---------- */
table.data {
  width: 100%; border-collapse: collapse; font-size: .92rem;
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-md); overflow: hidden;
}
table.data th, table.data td { padding: 12px 14px; text-align: left; }
table.data thead th {
  background: var(--steel-900); color: #fff;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 600;
}
table.data tbody tr { border-top: 1px solid var(--rule); }
table.data tbody tr:nth-child(even) { background: var(--steel-050); }

/* ---------- Page header ---------- */
.page-head {
  background: var(--steel-950); color: #fff;
  padding: 64px 0 56px;
  border-bottom: 1px solid #000;
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(700px 220px at 90% 50%, rgba(255,107,26,.15), transparent 60%),
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255,255,255,.03) 28px 29px);
}
.page-head .wrap { position: relative; }
.page-head h1 { color: #fff; max-width: 24ch; }
.page-head p { color: var(--steel-300); max-width: 70ch; }
.breadcrumb {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--steel-400); margin-bottom: 12px;
}
.breadcrumb a { color: var(--steel-300); }
.breadcrumb span { color: var(--hazard-yellow); }

/* ---------- Parts catalog ---------- */
.parts-toolbar {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  background: var(--paper); border: 1px solid var(--rule);
  padding: 12px; border-radius: var(--radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}
.parts-toolbar input[type="search"] {
  flex: 1 1 280px; min-width: 200px;
  border: 1px solid var(--rule-strong); background: var(--paper);
  padding: 10px 14px; border-radius: 8px;
  font: inherit; font-size: .95rem;
}
.parts-toolbar input[type="search"]:focus {
  outline: 2px solid var(--signal-blue); outline-offset: 1px;
}
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: .82rem;
  padding: 7px 12px; border-radius: 99px;
  border: 1px solid var(--rule-strong);
  background: var(--paper); cursor: pointer;
  font-family: var(--mono); letter-spacing: .04em;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--steel-700); }
.chip[aria-pressed="true"] {
  background: var(--ink); color: #fff; border-color: var(--ink);
}

.parts-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.part-card {
  border: 1px solid var(--rule); background: var(--paper);
  border-radius: var(--radius-md); padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s ease, transform .15s ease;
  cursor: pointer;
}
.part-card:hover { border-color: var(--steel-700); transform: translateY(-2px); }
.part-card .pn {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .08em;
  color: var(--safety-orange); font-weight: 600;
}
.part-card h4 { margin: 0; font-size: 1rem; }
.part-card .desc { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.part-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.tag {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .06em;
  background: var(--steel-100); color: var(--steel-700);
  padding: 3px 8px; border-radius: 4px; text-transform: uppercase;
}
.tag--wear { background: #fff3da; color: var(--hazard-yellow-dim); }
.tag--safety { background: #fdecec; color: var(--signal-red); }
.tag--cable { background: #eef4ff; color: var(--signal-blue); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(11,17,23,.65);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 24px; backdrop-filter: blur(4px);
}
.modal-backdrop.open { display: flex; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal {
  background: var(--paper); border-radius: var(--radius-lg);
  max-width: 720px; width: 100%; max-height: 88vh; overflow: auto;
  box-shadow: var(--shadow-lg);
}
.modal-head {
  padding: 20px 24px; border-bottom: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: 16px; align-items: start;
}
.modal-body { padding: 24px; }
.modal h3 { margin: 0; }
.close-btn {
  border: 1px solid var(--rule-strong); background: var(--paper);
  width: 36px; height: 36px; border-radius: 8px; cursor: pointer; font-size: 1.2rem;
}
.close-btn:hover { background: var(--steel-100); }

/* ---------- Diagram interactive hotspots ---------- */
.diagram-wrap {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px;
}
@media (max-width: 880px) { .diagram-wrap { grid-template-columns: 1fr; } }

.hotspot-list {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--rule); border-radius: var(--radius-md);
  background: var(--paper); overflow: hidden; max-height: 560px; overflow-y: auto;
}
.hotspot-list li {
  padding: 12px 16px; border-bottom: 1px solid var(--rule);
  cursor: pointer; transition: background .12s ease;
  display: flex; gap: 12px; align-items: start;
}
.hotspot-list li:last-child { border-bottom: 0; }
.hotspot-list li:hover, .hotspot-list li.active {
  background: var(--steel-050);
}
.hotspot-list .num {
  flex-shrink: 0; width: 26px; height: 26px;
  background: var(--ink); color: var(--hazard-yellow);
  border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: .8rem; font-weight: 700;
}
.hotspot-list strong { display: block; font-size: .95rem; }
.hotspot-list small { color: var(--steel-500); font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; }

.hotspot-circle {
  cursor: pointer; transition: transform .15s ease;
  transform-origin: center;
  transform-box: fill-box;
}
.hotspot-circle:hover, .hotspot-circle.active {
  transform: scale(1.25);
}
.hotspot-label {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  fill: var(--ink); pointer-events: none;
}

/* ---------- Steps / procedures ---------- */
.steps {
  list-style: none; margin: 0; padding: 0; counter-reset: step;
}
.steps > li {
  position: relative; padding: 0 0 28px 56px;
  counter-increment: step;
  border-left: 2px solid var(--rule);
  margin-left: 18px;
}
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: -19px; top: -4px;
  width: 36px; height: 36px;
  background: var(--ink); color: var(--hazard-yellow);
  border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-size: .82rem; font-weight: 700;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps h4 { margin: 0 0 6px; }
.steps .tools {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px;
}

/* ---------- Maintenance schedule ---------- */
.maint-grid {
  display: grid; grid-template-columns: 220px repeat(4, 1fr);
  border: 1px solid var(--rule); border-radius: var(--radius-md);
  overflow: hidden; background: var(--paper);
}
.maint-grid > * {
  padding: 12px 14px; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule);
  font-size: .9rem;
}
.maint-grid > *:nth-child(5n) { border-right: 0; }
.maint-grid .h {
  background: var(--steel-900); color: #fff;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
}
.maint-grid .check {
  text-align: center; font-family: var(--mono); color: var(--signal-green); font-size: 1.1rem;
}
.maint-grid .nope { color: var(--steel-300); }
.maint-grid .rowhead { font-weight: 600; background: var(--steel-050); }
@media (max-width: 760px) {
  .maint-grid { grid-template-columns: 1fr; }
  .maint-grid > * { border-right: 0; }
}

/* ---------- Troubleshooting flow ---------- */
.flow {
  display: grid; gap: 12px;
}
.flow-node {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-md); padding: 18px 20px;
  display: none;
}
.flow-node.active { display: block; animation: fade .2s ease; }
.flow-node h3 { margin-top: 0; }
.flow-node .options {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px;
}
.flow-node .options button {
  font: inherit; padding: 10px 16px;
  background: var(--ink); color: #fff; border: 0; border-radius: 8px; cursor: pointer;
}
.flow-node .options button.no { background: var(--paper); color: var(--ink); border: 1px solid var(--rule-strong); }
.flow-node .options button:hover { transform: translateY(-1px); }
.flow-node.terminal { border-left: 4px solid var(--signal-green); }
.flow-trail {
  font-family: var(--mono); font-size: .76rem; color: var(--steel-500);
  letter-spacing: .08em; margin-bottom: 16px;
}
.flow-trail span { background: var(--steel-100); padding: 3px 8px; border-radius: 4px; }
.reset-btn {
  background: transparent; border: 1px solid var(--rule-strong); padding: 8px 14px;
  border-radius: 6px; cursor: pointer; font-family: var(--mono); font-size: .8rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--steel-950); color: var(--steel-300);
  padding: 56px 0 32px;
  border-top: 1px solid #000;
}
.site-footer h4 {
  color: #fff; font-family: var(--mono); font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px;
}
.site-footer a { color: var(--steel-300); }
.site-footer a:hover { color: var(--hazard-yellow); text-decoration: none; }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: .76rem; color: var(--steel-500);
  letter-spacing: .06em;
}
.disclaimer {
  font-size: .78rem; color: var(--steel-500); max-width: 60ch;
}

/* ---------- Glossary ---------- */
.glossary { display: grid; gap: 8px; }
.glossary dt {
  font-weight: 700; font-size: 1.05rem;
  padding-top: 16px;
}
.glossary dd {
  margin: 0 0 8px; color: var(--ink-soft);
  border-bottom: 1px dashed var(--rule); padding-bottom: 16px;
}
.az-nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0 24px; }
.az-nav a {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: var(--steel-100); border-radius: 6px;
  font-family: var(--mono); font-size: .85rem; font-weight: 600; color: var(--ink);
}
.az-nav a:hover { background: var(--ink); color: var(--hazard-yellow); text-decoration: none; }
.az-nav a.empty { background: transparent; color: var(--steel-300); pointer-events: none; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.gap-2 { gap: 1rem; }
.wrap-flex { flex-wrap: wrap; }
.divider { height: 1px; background: var(--rule); margin: 32px 0; }

/* ---------- Search highlight ---------- */
mark {
  background: var(--hazard-yellow); color: var(--ink);
  padding: 0 2px; border-radius: 2px;
}

/* ---------- Print friendliness ---------- */
@media print {
  .topbar, .site-header, .site-footer, .hero-art, .menu-toggle, .parts-toolbar,
  .global-search, .theme-toggle, .nav, .breadcrumb, .reset-btn, .btn { display: none !important; }
  .section, .page-head { padding: 12px 0; background: white !important; color: black !important; }
  .schematic, .card { break-inside: avoid; box-shadow: none; }
  .printable .checklist-card { border: 2px solid #000; }
  body { font-size: 11pt; }
  h1 { font-size: 18pt; }
  h2 { font-size: 14pt; }
}

/* ============================================================
   DARK MODE — toggled via [data-theme="dark"] on <html>
   ============================================================ */
html[data-theme="dark"] {
  --ink: #e9eef5;
  --ink-soft: #b9c4d2;
  --paper: #0d1319;
  --paper-warm: #11181f;
  --paper-soft: #161e27;
  --rule: #243140;
  --rule-strong: #34465a;
  --steel-100: #1a232e;
  --steel-050: #11181f;
  --steel-200: #243140;
  --steel-300: #5b6e85;
  --shadow-md: 0 4px 14px rgba(0,0,0,.4);
  --shadow-lg: 0 18px 40px rgba(0,0,0,.6);
}
html[data-theme="dark"] body { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] .site-header { background: rgba(13,19,25,.92); border-bottom-color: var(--rule); }
html[data-theme="dark"] .nav a { color: var(--ink-soft); }
html[data-theme="dark"] .nav a:hover, html[data-theme="dark"] .nav a.active { background: var(--steel-100); color: #fff; }
html[data-theme="dark"] .brand { color: var(--ink); }
html[data-theme="dark"] .card,
html[data-theme="dark"] .part-card,
html[data-theme="dark"] .hotspot-list,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .flow-node,
html[data-theme="dark"] .parts-toolbar,
html[data-theme="dark"] table.data {
  background: var(--paper-warm); border-color: var(--rule);
}
html[data-theme="dark"] .section--paper { background: var(--paper-warm); }
html[data-theme="dark"] .section--steel { background: var(--paper-soft); }
html[data-theme="dark"] .schematic {
  background:
    repeating-linear-gradient(0deg, var(--rule) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 32px),
    var(--paper-soft);
}
html[data-theme="dark"] .schematic svg rect[fill="#243140"],
html[data-theme="dark"] .schematic svg rect[fill="#34465a"] { fill: #5b6e85; }
html[data-theme="dark"] .callout { background: rgba(255,255,255,.04); }
html[data-theme="dark"] .callout--danger  { background: rgba(210,49,49,.12); }
html[data-theme="dark"] .callout--warning { background: rgba(255,196,25,.10); }
html[data-theme="dark"] .callout--info    { background: rgba(31,111,235,.12); }
html[data-theme="dark"] .callout--ok      { background: rgba(43,154,74,.12); }
html[data-theme="dark"] .chip { background: var(--paper-warm); color: var(--ink); border-color: var(--rule-strong); }
html[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--hazard-yellow); color: var(--steel-950); border-color: var(--hazard-yellow); }
html[data-theme="dark"] .btn--ghost { color: var(--ink); border-color: var(--rule-strong); }
html[data-theme="dark"] .az-nav a { background: var(--paper-warm); color: var(--ink); }
html[data-theme="dark"] code, html[data-theme="dark"] kbd { background: var(--paper-soft); color: var(--ink); }
html[data-theme="dark"] .maint-grid { background: var(--paper-warm); }
html[data-theme="dark"] .maint-grid > * { border-color: var(--rule); }
html[data-theme="dark"] .maint-grid .rowhead { background: var(--paper-soft); }
html[data-theme="dark"] table.data tbody tr:nth-child(even) { background: var(--paper-soft); }
html[data-theme="dark"] .parts-toolbar input[type="search"],
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea {
  background: var(--paper-soft); color: var(--ink); border-color: var(--rule-strong);
}
html[data-theme="dark"] .modal-head { border-bottom-color: var(--rule); }
html[data-theme="dark"] .close-btn { background: var(--paper-soft); color: var(--ink); border-color: var(--rule-strong); }
html[data-theme="dark"] .flow-node .options button.no { background: var(--paper-soft); color: var(--ink); }
html[data-theme="dark"] .glossary dd { color: var(--ink-soft); border-bottom-color: var(--rule); }
html[data-theme="dark"] .hero { border-bottom-color: var(--rule); }

/* ---------- Theme toggle button ---------- */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--rule-strong);
  width: 38px; height: 38px;
  border-radius: 6px;
  cursor: pointer;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 1rem;
  color: var(--ink);
  transition: background .15s ease;
}
.theme-toggle:hover { background: var(--steel-100); }
.theme-toggle svg { width: 18px; height: 18px; }

/* ---------- Global search ---------- */
.global-search {
  position: relative;
}
.global-search input {
  width: 240px;
  padding: 8px 14px 8px 34px;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  border-radius: 6px;
  font: inherit;
  font-size: .88rem;
  color: var(--ink);
}
.global-search input:focus { outline: 2px solid var(--signal-blue); }
.global-search::before {
  content: "⌕";
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--steel-500); font-size: 1.1rem; pointer-events: none;
}
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 380px; max-width: 92vw; max-height: 70vh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: 8px; box-shadow: var(--shadow-lg);
  z-index: 60; padding: 8px;
  display: none;
}
.search-results.open { display: block; }
.search-results .result {
  display: block; padding: 10px 12px; border-radius: 6px;
  color: var(--ink); text-decoration: none;
}
.search-results .result:hover { background: var(--steel-100); text-decoration: none; }
.search-results .result strong { display: block; font-size: .94rem; }
.search-results .result .where {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em;
  color: var(--safety-orange); text-transform: uppercase;
}
.search-results .result p {
  margin: 4px 0 0; font-size: .82rem; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.search-results .empty { padding: 14px; color: var(--steel-500); text-align: center; font-size: .88rem; }
@media (max-width: 900px) {
  .global-search { display: none; }
}

/* ---------- "Related" cross-reference card ---------- */
.related {
  background: var(--paper-warm);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--safety-orange);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 24px 0;
}
.related h4 {
  margin: 0 0 8px;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--safety-orange);
}
.related ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 16px;
}
.related li::before {
  content: "→ "; color: var(--steel-500);
}

/* ---------- Cable damage gallery (visual inspection guide) ---------- */
.damage-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.damage-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-md); overflow: hidden;
  display: flex; flex-direction: column;
}
.damage-card .swatch {
  background: linear-gradient(180deg, var(--steel-050), #fff);
  height: 160px; display: grid; place-items: center;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.damage-card .body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.damage-card h4 { margin: 0; }
.damage-card .verdict {
  margin-top: auto; padding: 8px 12px; border-radius: 6px;
  font-family: var(--mono); font-size: .76rem; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
}
.verdict--service { background: #e6f5eb; color: var(--signal-green); }
.verdict--monitor { background: #fff7da; color: var(--hazard-yellow-dim); }
.verdict--remove  { background: #fdecec; color: var(--signal-red); }
html[data-theme="dark"] .verdict--service { background: rgba(43,154,74,.18); }
html[data-theme="dark"] .verdict--monitor { background: rgba(255,196,25,.18); }
html[data-theme="dark"] .verdict--remove  { background: rgba(210,49,49,.18); }
html[data-theme="dark"] .damage-card .swatch {
  background: linear-gradient(180deg, var(--paper-soft), var(--paper));
}

/* ---------- Calculator ---------- */
.calc-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); padding: 24px;
  display: grid; gap: 18px;
}
.calc-row {
  display: grid; grid-template-columns: 1fr 220px;
  gap: 16px; align-items: center;
}
@media (max-width: 640px) { .calc-row { grid-template-columns: 1fr; } }
.calc-row label { font-weight: 600; font-size: .95rem; }
.calc-row label small { display: block; color: var(--steel-500); font-weight: 400; font-size: .82rem; margin-top: 2px; }
.calc-row input[type="number"], .calc-row select {
  padding: 10px 12px; border: 1px solid var(--rule-strong); border-radius: 6px;
  font: inherit; font-size: 1rem; background: var(--paper); color: var(--ink);
  width: 100%;
}
.calc-row input[type="range"] { width: 100%; accent-color: var(--safety-orange); }
.calc-row .range-wrap { display: flex; flex-direction: column; gap: 4px; }
.calc-row .range-wrap output {
  font-family: var(--mono); font-size: .9rem; font-weight: 700; color: var(--ink);
}
.calc-result {
  background: var(--steel-950); color: #fff;
  border-radius: var(--radius-md); padding: 24px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
}
.calc-result .label {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .14em;
  color: var(--hazard-yellow); text-transform: uppercase;
}
.calc-result .value {
  font-family: var(--mono); font-size: 2rem; font-weight: 700; color: #fff;
  margin-top: 4px;
}
.calc-result .gauge {
  width: 110px; height: 110px;
}
.calc-result .verdict-tag {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .1em;
  padding: 4px 10px; border-radius: 99px; margin-top: 6px;
  display: inline-block; text-transform: uppercase; font-weight: 700;
}
.calc-result .verdict-tag.ok   { background: var(--signal-green); color: #fff; }
.calc-result .verdict-tag.warn { background: var(--hazard-yellow); color: var(--ink); }
.calc-result .verdict-tag.bad  { background: var(--signal-red); color: #fff; }

/* ---------- Tools list / torque table ---------- */
.tool-row {
  display: grid; grid-template-columns: 36px 1fr auto;
  gap: 14px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--rule);
  border-radius: var(--radius-md); background: var(--paper);
  margin-bottom: 8px;
}
.tool-row .icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--hazard-yellow);
  border-radius: 6px;
  font-family: var(--mono); font-weight: 700; font-size: .82rem;
}
.tool-row strong { display: block; font-size: .98rem; }
.tool-row small { color: var(--steel-500); font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.tool-row .status {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .12em;
  padding: 4px 10px; border-radius: 4px; text-transform: uppercase; font-weight: 600;
}
.status--need { background: var(--ink); color: var(--hazard-yellow); }
.status--nice { background: var(--steel-100); color: var(--steel-700); }

/* ---------- Pipe equipment / heritage ---------- */
.product-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.timeline {
  position: relative;
  padding-left: 36px;
  margin: 0;
}
.timeline::before {
  content: ""; position: absolute; left: 12px; top: 0; bottom: 0;
  width: 2px; background: var(--rule);
}
.timeline li {
  position: relative;
  padding: 0 0 28px;
  list-style: none;
}
.timeline li::before {
  content: ""; position: absolute; left: -29px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink); border: 3px solid var(--hazard-yellow);
}
.timeline .year {
  display: inline-block;
  font-family: var(--mono); font-size: .82rem; font-weight: 700;
  background: var(--ink); color: var(--hazard-yellow);
  padding: 3px 10px; border-radius: 4px; margin-bottom: 6px;
  letter-spacing: .04em;
}
.timeline h4 { margin: 0 0 4px; font-size: 1.08rem; }
.timeline p { margin: 0; color: var(--ink-soft); }

/* ---------- "What's new" badge ---------- */
.new-badge {
  display: inline-block;
  background: var(--safety-orange); color: #fff;
  font-family: var(--mono); font-size: .62rem; font-weight: 700;
  letter-spacing: .14em;
  padding: 2px 6px; border-radius: 3px;
  vertical-align: middle; margin-left: 8px;
  text-transform: uppercase;
}

/* ============================================================
   PROFESSIONAL UX SYSTEM (v2)
   Built for repair technicians: task-driven home, grouped nav,
   lift-context persistence, shop-floor typography, print-first.
   ============================================================ */

/* ---------- Refined typography ---------- */
.shop-text {
  font-size: 1.04rem;
  line-height: 1.65;
}
.shop-text p { margin-bottom: 1.2em; }
.steps > li h4 { font-size: 1.12rem; }
.steps > li p  { font-size: 1.0rem; line-height: 1.65; }

/* ---------- Action-tile grid (home page task launcher) ---------- */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.action-tile {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--safety-orange);
  border-radius: var(--radius-md);
  padding: 22px 20px 20px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, border-left-color .15s ease;
  min-height: 132px;
}
.action-tile:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-left-color: var(--ink);
}
.action-tile .verb {
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--safety-orange);
  font-weight: 700;
}
.action-tile h3 {
  margin: 6px 0 6px;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.action-tile p {
  margin: 0;
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.5;
}
.action-tile .arrow {
  position: absolute; top: 18px; right: 20px;
  color: var(--steel-300); font-size: 1.5rem; line-height: 1;
  transition: color .15s ease, transform .15s ease;
}
.action-tile:hover .arrow {
  color: var(--ink);
  transform: translate(2px, -2px);
}

/* ---------- Hero (task-launcher variant) ---------- */
.hero-pro {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 56px 0 24px;
  position: relative;
}
.hero-pro::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(800px 240px at 92% 0%, rgba(255,107,26,.06), transparent 70%);
  pointer-events: none;
}
.hero-pro .wrap { position: relative; }
.hero-pro h1 {
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  letter-spacing: -0.025em;
  max-width: 24ch;
  margin-bottom: .35em;
}
.hero-pro .lead {
  max-width: 60ch;
  font-size: 1.08rem;
  color: var(--ink-soft);
}
.hero-search {
  margin-top: 28px;
  display: flex; gap: 12px;
  max-width: 680px;
}
.hero-search input {
  flex: 1;
  padding: 16px 18px 16px 48px;
  border: 1.5px solid var(--rule-strong);
  background: var(--paper);
  border-radius: 10px;
  font: inherit;
  font-size: 1.02rem;
  color: var(--ink);
  position: relative;
}
.hero-search-wrap {
  position: relative; flex: 1;
}
.hero-search-wrap::before {
  content: "⌕"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--steel-500); pointer-events: none;
}
.hero-search input:focus {
  outline: 2px solid var(--signal-blue); outline-offset: 1px;
  border-color: var(--signal-blue);
}
.hero-search .btn {
  padding: 0 26px;
  font-size: 1rem;
}
.hero-tips {
  margin-top: 14px;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  color: var(--steel-500);
  font-size: .82rem;
}
.hero-tips strong { color: var(--ink-soft); font-family: var(--mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; }
.hero-tips a {
  background: var(--steel-100); color: var(--ink-soft);
  padding: 4px 10px; border-radius: 4px;
  font-family: var(--mono); font-size: .8rem;
}
.hero-tips a:hover { background: var(--ink); color: var(--hazard-yellow); text-decoration: none; }

/* ---------- Lift context bar ---------- */
.context-bar {
  background: var(--ink);
  color: #fff;
  padding: 10px 0;
  border-bottom: 1px solid #000;
  font-family: var(--mono);
  font-size: .82rem;
}
.context-bar .wrap {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  justify-content: space-between;
}
.context-bar .label {
  color: var(--steel-400);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .72rem;
}
.context-bar select {
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: .82rem;
  cursor: pointer;
}
.context-bar select:focus { outline: 2px solid var(--hazard-yellow); }
.context-bar .ctx-active {
  color: var(--hazard-yellow);
  font-weight: 700;
}
.context-bar .clear-ctx {
  background: transparent; color: var(--steel-300); border: 0;
  font-family: var(--mono); font-size: .76rem; cursor: pointer;
  padding: 0 6px;
}
.context-bar .clear-ctx:hover { color: var(--hazard-yellow); }

/* ---------- Grouped nav with dropdowns ---------- */
.nav-pro {
  display: flex; gap: 4px; align-items: center;
}
.nav-pro > a, .nav-pro > .dropdown > button {
  padding: 8px 14px;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .92rem;
  border-radius: 6px;
  background: transparent;
  border: 0; cursor: pointer;
  font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-pro > a:hover, .nav-pro > .dropdown > button:hover {
  background: var(--steel-100); text-decoration: none; color: var(--ink);
}
.nav-pro > a.active, .nav-pro > .dropdown.has-active > button {
  background: var(--steel-100); color: var(--ink);
}
.nav-pro .dropdown {
  position: relative;
}
.nav-pro .dropdown > button::after {
  content: "▾";
  font-size: .7rem;
  color: var(--steel-500);
}
.nav-pro .dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); left: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 220px;
  z-index: 70;
}
.nav-pro .dropdown.open .dropdown-menu { display: block; }
.nav-pro .dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 4px;
  color: var(--ink);
  font-size: .92rem;
}
.nav-pro .dropdown-menu a:hover { background: var(--steel-100); text-decoration: none; }
.nav-pro .dropdown-menu .group-label {
  font-family: var(--mono);
  font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--steel-500);
  padding: 8px 12px 4px;
}
.nav-pro .dropdown-menu hr {
  border: 0; border-top: 1px solid var(--rule); margin: 6px 0;
}
@media (max-width: 980px) {
  .nav-pro { display: none; }
  .nav-pro.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 12px; gap: 4px; max-height: 80vh; overflow-y: auto;
  }
  .nav-pro.open > a, .nav-pro.open .dropdown > button { padding: 12px; text-align: left; }
  .nav-pro.open .dropdown-menu {
    position: static; box-shadow: none; border: 0; padding-left: 16px;
    display: block;
  }
}

/* ---------- Recently viewed sidebar widget ---------- */
.recent-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 16px;
}
.recent-card h4 {
  font-family: var(--mono); font-size: .76rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--steel-500); margin: 0 0 12px;
}
.recent-card ul {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 6px;
}
.recent-card li a {
  display: block; padding: 8px 10px; border-radius: 4px;
  font-size: .9rem; color: var(--ink);
}
.recent-card li a:hover { background: var(--steel-100); text-decoration: none; }
.recent-card li a small {
  display: block; color: var(--steel-500); font-family: var(--mono); font-size: .72rem;
  letter-spacing: .04em; margin-top: 2px;
}
.recent-card .empty {
  color: var(--steel-500); font-size: .85rem; padding: 12px 8px;
}

/* ---------- Quick-status strip ---------- */
.status-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--paper);
}
.status-strip > div {
  padding: 16px 18px;
  border-right: 1px solid var(--rule);
}
.status-strip > div:last-child { border-right: 0; }
.status-strip strong {
  display: block;
  font-family: var(--mono); font-size: 1.4rem; font-weight: 700;
  color: var(--ink);
}
.status-strip span {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--steel-500);
}
@media (max-width: 720px) {
  .status-strip > div { border-right: 0; border-bottom: 1px solid var(--rule); }
  .status-strip > div:last-child { border-bottom: 0; }
}

/* ---------- Page-side rail (procedure-style content) ---------- */
.with-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: start;
}
.with-rail .rail { position: sticky; top: 96px; }
@media (max-width: 980px) {
  .with-rail { grid-template-columns: 1fr; }
  .with-rail .rail { position: static; }
}

/* ---------- Print-first: tear-out checklist ---------- */
.print-checklist {
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  background: var(--paper);
  page-break-inside: avoid;
}
.print-checklist h3 {
  margin: 0 0 8px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 8px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
}
.print-checklist .meta-line {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--steel-500);
  margin-bottom: 16px;
}
.print-checklist ol {
  list-style: none; margin: 0; padding: 0; counter-reset: pc;
}
.print-checklist ol li {
  counter-increment: pc;
  padding: 12px 0 12px 56px;
  position: relative;
  border-bottom: 1px dashed var(--rule);
  font-size: 1rem;
}
.print-checklist ol li:last-child { border-bottom: 0; }
.print-checklist ol li::before {
  content: "";
  position: absolute; left: 0; top: 12px;
  width: 22px; height: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
}
.print-checklist ol li::after {
  content: counter(pc, decimal-leading-zero);
  position: absolute; left: 30px; top: 12px;
  font-family: var(--mono); font-size: .78rem; font-weight: 700;
  color: var(--steel-500); letter-spacing: .04em;
}
.print-checklist .sign-row {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  font-family: var(--mono); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--steel-500);
}
.print-checklist .sign-row > div {
  border-top: 1px solid var(--ink);
  padding-top: 4px;
}
.print-button {
  background: var(--ink); color: #fff;
  border: 0; padding: 10px 18px; border-radius: 6px;
  font: inherit; font-size: .9rem; font-weight: 600;
  cursor: pointer;
}
.print-button:hover { background: #000; }
@media print {
  .print-checklist { border: 2px solid #000 !important; }
  .print-button { display: none !important; }
  .context-bar, .nav-pro, .menu-toggle, .theme-toggle, .global-search { display: none !important; }
}

/* ---------- Capacity bar visualization ---------- */
.cap-bar {
  height: 16px; border-radius: 8px;
  background: var(--steel-100); overflow: hidden;
  position: relative;
}
.cap-bar .fill {
  height: 100%; transition: width .25s ease, background .25s ease;
  background: linear-gradient(90deg, var(--signal-green), var(--hazard-yellow), var(--signal-red));
}
.cap-bar .marker {
  position: absolute; top: -2px; width: 2px; height: 20px;
  background: var(--ink);
}

/* ---------- Quiz (knowledge check) ---------- */
.quiz-card {
  background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--radius-md); padding: 20px 22px;
  margin-bottom: 16px;
}
.quiz-card .q {
  font-weight: 600; font-size: 1.02rem; margin-bottom: 12px;
}
.quiz-card .options {
  display: grid; gap: 8px;
}
.quiz-card .options button {
  text-align: left; padding: 10px 14px;
  background: var(--paper-soft); border: 1px solid var(--rule);
  border-radius: 6px; font: inherit; cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
}
.quiz-card .options button:hover { border-color: var(--steel-700); }
.quiz-card .options button.correct {
  background: rgba(43,154,74,.12); border-color: var(--signal-green);
}
.quiz-card .options button.wrong {
  background: rgba(210,49,49,.12); border-color: var(--signal-red);
}
.quiz-card .feedback {
  margin-top: 12px; padding: 10px 14px; border-radius: 6px;
  font-size: .92rem; display: none;
}
.quiz-card .feedback.show { display: block; }
.quiz-card .feedback.right { background: rgba(43,154,74,.12); color: var(--signal-green); }
.quiz-card .feedback.wrong { background: rgba(210,49,49,.12); color: var(--signal-red); }

/* ============================================================
   COMMERCE — Energized Engines parts CTAs
   This manual is published by Energized Engines as a free
   technical reference; parts links route to their store.
   ============================================================ */

/* Promo strip above the context bar */
.promo-strip {
  background: linear-gradient(90deg, var(--safety-orange) 0%, #ff8a3d 100%);
  color: #fff;
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .04em;
  padding: 9px 0;
  border-bottom: 1px solid rgba(0,0,0,.15);
}
.promo-strip .wrap {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  flex-wrap: wrap;
}
.promo-strip strong {
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(0,0,0,.18);
  padding: 3px 8px;
  border-radius: 3px;
}
.promo-strip a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}
.promo-strip a:hover { background: rgba(0,0,0,.18); padding: 2px 6px; border-radius: 3px; text-decoration: none; }
@media (max-width: 600px) {
  .promo-strip { font-size: .76rem; padding: 7px 0; }
}

/* "Order from Energized Engines" button in modals + inline */
.btn--buy {
  background: var(--safety-orange);
  color: #fff;
  border: 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .95rem;
  font-family: var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn--buy:hover {
  background: var(--safety-orange-dim);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: #fff;
}
.btn--buy svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn--buy.full { width: 100%; justify-content: center; }

/* Small "order" inline link on each part card */
.part-card .buy-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--safety-orange);
  text-decoration: none;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed var(--rule);
}
.part-card .buy-link:hover {
  color: var(--safety-orange-dim);
  text-decoration: none;
}
.part-card .buy-link::after { content: " →"; }

/* Vendor brand chip, small */
.vendor-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink); color: var(--hazard-yellow);
  padding: 3px 10px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Vendor banner inside the part modal */
.vendor-modal-row {
  margin-top: 18px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(255,107,26,.08), rgba(255,107,26,.04));
  border: 1px solid rgba(255,107,26,.25);
  border-radius: var(--radius-md);
  display: flex; gap: 16px; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.vendor-modal-row .copy strong {
  display: block;
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--safety-orange);
  margin-bottom: 2px;
}
.vendor-modal-row .copy small {
  color: var(--ink-soft);
  font-size: .82rem;
  display: block;
}
html[data-theme="dark"] .vendor-modal-row {
  background: rgba(255,107,26,.10);
  border-color: rgba(255,107,26,.35);
}

/* "Published by" footer block */
.publisher-block {
  background: var(--steel-900);
  color: #fff;
  padding: 24px 0;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}
.publisher-block .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.publisher-block .pb-copy strong {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hazard-yellow);
  display: block;
  margin-bottom: 4px;
}
.publisher-block .pb-copy {
  color: var(--steel-300);
  font-size: .92rem;
  max-width: 60ch;
}

/* ============================================================
   V3 — DESIGN PASS · Restraint, hierarchy, signature
   ------------------------------------------------------------
   Goals (a senior designer would do less, not more):
   1. Strip stacked bars at the top — collapse promo + context
      into a single quiet topline; let the content be the show.
   2. One signal color (hazard yellow). Orange survives ONLY for
      commerce CTAs, never decoration.
   3. Type with intent — display weight + tighter letter-spacing
      for headlines; mono only for technical data.
   4. Editorial spacing — sections breathe, padding is generous,
      cards used sparingly (not as default chrome).
   5. A signature home hero: the lift IS the navigation.
   ============================================================ */

/* ---- Tokens (additive; preserve existing) ---- */
:root {
  --v3-ink: #0a0e13;
  --v3-ink-2: #131820;
  --v3-paper: #fbfaf7;
  --v3-paper-2: #f3f2ed;
  --v3-rule: #e8eaef;
  --v3-rule-strong: #c8cdd6;
  --v3-text: #1c2230;
  --v3-text-soft: #5b6473;
  --v3-text-faint: #8a93a3;
  --v3-accent: #ffc419;
  --v3-accent-deep: #d49d00;
  --v3-commerce: #ff6b1a;
}
html[data-theme="dark"] {
  --v3-ink: #ffffff;
  --v3-ink-2: #f7f8fb;
  --v3-paper: #0a0e13;
  --v3-paper-2: #131820;
  --v3-rule: #1f2731;
  --v3-rule-strong: #2c3a4a;
  --v3-text: #e7eaf0;
  --v3-text-soft: #99a3b3;
  --v3-text-faint: #5b6473;
}

/* ---- Strip the orange promo strip everywhere; the publisher line
        moves into the header as a small text mention. The link is
        preserved so the SEO/commerce signal isn't lost. ---- */
.promo-strip { display: none !important; }

/* ---- Quieter context bar — same function, less shouting. ---- */
.context-bar {
  background: var(--v3-ink);
  padding: 7px 0;
  font-size: .74rem;
}
.context-bar .label {
  font-size: .66rem;
  letter-spacing: .16em;
  color: rgba(255,255,255,.5);
}
.context-bar select {
  font-size: .74rem;
  padding: 4px 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
.context-bar .ctx-active { color: var(--v3-accent); font-weight: 600; }
@media (max-width: 720px) {
  .context-bar { padding: 5px 0; }
  .context-bar .wrap { gap: 8px; }
  .context-bar .label { display: none; }
}

/* ---- Refined site header — confident, less bulky. ---- */
.site-header {
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--v3-rule);
  position: sticky;
  top: 0;
  z-index: 50;
}
html[data-theme="dark"] .site-header {
  background: rgba(10,14,19,.94);
  border-bottom-color: var(--v3-rule);
}
.site-header .wrap {
  padding-top: 14px;
  padding-bottom: 14px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}
.site-header .brand { grid-column: 1; }
.site-header .global-search { grid-column: 2; justify-self: end; max-width: 360px; width: 100%; }
.site-header .nav-pro,
.site-header .theme-toggle,
.site-header .menu-toggle { grid-column: 3; }
@media (min-width: 981px) {
  .site-header .nav-pro { display: flex; }
  .site-header .menu-toggle { display: none; }
}
@media (max-width: 980px) {
  .site-header .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .site-header .global-search { display: none; }
  .site-header .nav-pro { display: none; }
  .site-header .nav-pro.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--v3-rule);
    padding: 8px;
    gap: 2px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 60;
  }
  html[data-theme="dark"] .site-header .nav-pro.open { background: var(--v3-paper-2); }
  .site-header .nav-pro.open > a,
  .site-header .nav-pro.open > .dropdown > button {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
  }
  .site-header .nav-pro.open .dropdown-menu {
    position: static;
    box-shadow: none;
    border: 0;
    padding-left: 18px;
    display: block;
  }
  .site-header { position: relative; } /* anchor the drawer */
}

/* ============================================================
   GLOBAL OVERFLOW SAFEGUARDS — prevent any rogue element from
   creating horizontal scroll on small viewports.
   ============================================================ */
html, body { overflow-x: hidden; max-width: 100%; }
body * { max-width: 100%; }
.wrap { max-width: 100%; box-sizing: border-box; overflow-x: visible; }
img, svg, video, canvas { max-width: 100%; height: auto; }

/* Promo strip / context bar — collapse copy gracefully on mobile */
@media (max-width: 720px) {
  .promo-strip .wrap { gap: 8px; padding: 0 12px; }
  .promo-strip span { display: none; }   /* keep brand + CTA only */
  .promo-strip strong { font-size: .62rem; }
  .promo-strip a { font-size: .76rem; }

  .context-bar .wrap { padding: 0 12px; gap: 8px; }
  .context-bar select { font-size: .72rem; padding: 4px 6px; max-width: 60vw; }
  .context-bar .label { display: none; }
  .context-bar #lift-ctx-display { font-size: .72rem; }
}

/* App shell: ensure mobile sidebar drawer width is bounded */
@media (max-width: 880px) {
  .app-sidebar { width: min(280px, 86vw); }
  .app-topbar-inner {
    gap: 8px;
    /* CRITICAL: minmax(0,…) lets the search column actually shrink.
       Plain "1fr" treats min-content as the floor, which forces the
       row wider than the viewport when the brand + actions are
       already wide. */
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .app-search { min-width: 0; }
  .app-search input { font-size: .82rem; padding: 7px 12px 7px 32px; min-width: 0; }
  .app-search-kbd { display: none; }
  .app-topbar-actions { gap: 6px; }
  .app-shop-btn { padding: 7px 10px; font-size: .78rem; }
}

/* Below 600px: hide the brand wordmark entirely; just show the SL square. */
@media (max-width: 600px) {
  .app-brand-name { display: none; }
  .app-icon-btn { width: 32px; height: 32px; }
  .app-shop-btn { padding: 6px 9px; font-size: .76rem; }
}

/* Pin hard caps so a child can never make the page wider than the viewport. */
.app-shell, .app-main, .app-topbar, .app-topbar-inner { max-width: 100vw; min-width: 0; }
.app-main { width: auto; }

/* The spec matrix table can be intrinsically wider than mobile; let it
   scroll horizontally inside its rounded container instead of forcing
   the whole page wide. */
.app-spec-matrix { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.app-spec-matrix table { min-width: 560px; } /* enough for legibility */

/* Lift context: tame the long select option labels on mobile */
@media (max-width: 720px) {
  .app-ctx { padding: 10px 12px; gap: 10px; font-size: .82rem; }
  .app-ctx > strong { font-size: .62rem; }
  .app-ctx-active { font-size: .8rem; padding: 3px 8px; }
  .app-ctx select { max-width: 100%; min-width: 0; flex: 1 1 100%; font-size: .8rem; }
  .app-ctx > span { width: 100%; }
}

/* Quickref: force single column below 540px (was already there but
   kick stronger so cards don't stretch) */
@media (max-width: 540px) {
  .app-quickref { gap: 10px; }
  .app-card { min-height: 0; padding: 14px 16px; }
}

/* Page-head wrap and any other section wrap should not exceed viewport */
.page-head .wrap, .section .wrap, .section--tight .wrap,
.section--paper .wrap, .section--steel .wrap, .section--dark .wrap {
  max-width: 100%;
  box-sizing: border-box;
}
.brand-mark {
  width: 36px; height: 36px;
  background: var(--v3-ink);
  color: var(--v3-accent);
  font-size: .88rem;
}
html[data-theme="dark"] .brand-mark { background: var(--v3-accent); color: var(--v3-paper); }
.brand-name {
  font-size: .98rem;
  letter-spacing: -0.005em;
  font-weight: 700;
  color: var(--v3-text);
}
.brand-sub {
  font-size: .66rem;
  letter-spacing: .16em;
  color: var(--v3-text-faint);
  text-transform: uppercase;
}
.global-search input {
  border: 1px solid var(--v3-rule-strong);
  background: var(--v3-paper);
  color: var(--v3-text);
  font-size: .9rem;
  padding: 9px 14px 9px 36px;
  border-radius: 10px;
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.global-search input:focus {
  outline: 0;
  border-color: var(--v3-text);
  box-shadow: 0 0 0 3px rgba(10,14,19,.08);
}
html[data-theme="dark"] .global-search input {
  background: var(--v3-paper-2);
  color: var(--v3-text);
  border-color: var(--v3-rule);
}
html[data-theme="dark"] .global-search input:focus {
  border-color: var(--v3-accent);
  box-shadow: 0 0 0 3px rgba(255,196,25,.15);
}
.global-search::before { font-size: 1rem; color: var(--v3-text-faint); }
.kbd-hint {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: .66rem; font-weight: 600;
  color: var(--v3-text-faint);
  background: var(--v3-paper-2); border: 1px solid var(--v3-rule);
  padding: 2px 7px; border-radius: 4px;
  pointer-events: none;
}
.global-search:focus-within .kbd-hint { display: none; }
@media (max-width: 1100px) { .kbd-hint { display: none; } }

/* Nav: tighter, subtler */
.nav-pro > a,
.nav-pro > .dropdown > button {
  font-size: .88rem;
  padding: 7px 12px;
  font-weight: 500;
  color: var(--v3-text-soft);
  border-radius: 7px;
}
.nav-pro > a:hover,
.nav-pro > .dropdown > button:hover { color: var(--v3-text); background: var(--v3-paper-2); }
.nav-pro > a.active,
.nav-pro > .dropdown.has-active > button {
  color: var(--v3-text);
  background: transparent;
  position: relative;
}
.nav-pro > a.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 1px;
  height: 2px; background: var(--v3-accent);
}

/* Theme toggle and menu toggle: ghost style */
.theme-toggle {
  width: 36px; height: 36px;
  border: 1px solid var(--v3-rule);
  background: transparent;
  color: var(--v3-text-soft);
}
.theme-toggle:hover { background: var(--v3-paper-2); color: var(--v3-text); }
.menu-toggle {
  border: 1px solid var(--v3-rule);
  background: transparent;
  color: var(--v3-text);
  font-family: var(--mono);
  font-size: .76rem;
  letter-spacing: .12em;
  padding: 7px 12px;
  border-radius: 7px;
}

/* ============================================================
   V3 HERO — "Anatomy Theater"
   The lift is the navigation. Black canvas, magazine-grade type,
   one CTA, secondary text-link nav.
   ============================================================ */
.hero-theater {
  position: relative;
  background: var(--v3-ink);
  color: #fff;
  padding: 88px 0 56px;
  overflow: hidden;
  border-bottom: 1px solid #000;
}
.hero-theater::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 40% at 78% 18%, rgba(255,196,25,.08), transparent 60%),
    radial-gradient(40% 30% at 12% 92%, rgba(255,107,26,.06), transparent 60%);
  pointer-events: none;
}
.hero-theater::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(transparent 95%, rgba(255,255,255,.04) 95%),
    linear-gradient(90deg, transparent 95%, rgba(255,255,255,.04) 95%);
  background-size: 64px 64px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 50%, transparent 95%);
}
.hero-theater .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
  min-height: 540px;
}
@media (max-width: 980px) {
  .hero-theater { padding: 56px 0 40px; }
  .hero-theater .wrap { grid-template-columns: 1fr; gap: 32px; min-height: 0; }
}
.theater-stage {
  position: relative;
  aspect-ratio: 4/5;
  max-height: 640px;
  margin: 0 auto;
  width: 100%;
}
.theater-stage svg { width: 100%; height: 100%; display: block; }

.theater-marker {
  position: absolute;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--v3-ink);
  border: 2px solid var(--v3-accent);
  color: var(--v3-accent);
  font-family: var(--mono);
  font-weight: 700;
  font-size: .82rem;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
  z-index: 2;
}
.theater-marker::after {
  content: "";
  position: absolute; inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(255,196,25,.4);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: .8; }
  100% { transform: scale(1.8); opacity: 0; }
}
.theater-marker:hover {
  transform: translate(-50%, -50%) scale(1.15);
  background: var(--v3-accent);
  color: var(--v3-ink);
  box-shadow: 0 0 0 6px rgba(255,196,25,.18);
  text-decoration: none;
}
.theater-marker .tip {
  position: absolute;
  top: 50%;
  left: calc(100% + 12px);
  transform: translateY(-50%);
  background: var(--v3-accent);
  color: var(--v3-ink);
  font-family: var(--sans);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: 0;
  text-transform: none;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
.theater-marker:hover .tip {
  opacity: 1;
  transform: translateY(-50%) translateX(2px);
}
.theater-marker.left .tip { left: auto; right: calc(100% + 12px); }
.theater-marker.left:hover .tip { transform: translateY(-50%) translateX(-2px); }

.theater-copy {
  max-width: 30ch;
}
.theater-copy .kicker {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .22em;
  color: var(--v3-accent);
  text-transform: uppercase;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px;
}
.theater-copy .kicker::before {
  content: "";
  width: 28px; height: 1.5px; background: var(--v3-accent);
}
.theater-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 4.6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.038em;
  color: #fff;
}
.theater-copy h1 em {
  font-style: normal;
  background: linear-gradient(180deg, transparent 60%, rgba(255,196,25,.45) 60%);
}
.theater-copy p.lead {
  font-size: 1.08rem;
  line-height: 1.55;
  color: rgba(255,255,255,.78);
  max-width: 36ch;
  margin-bottom: 28px;
}
.theater-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  background: var(--v3-accent);
  color: var(--v3-ink);
  font-weight: 700;
  font-size: .98rem;
  border-radius: 10px;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.theater-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(255,196,25,.32);
  text-decoration: none;
  color: var(--v3-ink);
}
.theater-cta::after { content: "→"; font-weight: 600; }
.theater-jumpnav {
  margin-top: 24px;
  display: flex; gap: 0;
  flex-wrap: wrap;
  font-size: .86rem;
  color: rgba(255,255,255,.55);
}
.theater-jumpnav span { display: inline-flex; align-items: center; gap: 14px; }
.theater-jumpnav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.18);
  padding-bottom: 1px;
  transition: color .15s ease, border-color .15s ease;
}
.theater-jumpnav a:hover { color: var(--v3-accent); border-color: var(--v3-accent); }
.theater-jumpnav .sep {
  margin: 0 14px;
  color: rgba(255,255,255,.25);
}

.theater-meta {
  display: flex;
  gap: 32px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.10);
  font-family: var(--mono);
  font-size: .76rem;
  color: rgba(255,255,255,.55);
}
.theater-meta strong {
  display: block;
  font-size: 1.4rem;
  font-family: var(--sans);
  font-weight: 700;
  color: var(--v3-accent);
  margin-bottom: 4px;
}

/* ============================================================
   V3 — Editorial sections (replace card-walls on home)
   ============================================================ */
.section-intro {
  padding: 88px 0 48px;
}
.section-intro .lede {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 1.95rem);
  line-height: 1.35;
  font-weight: 400;
  max-width: 38ch;
  letter-spacing: -0.015em;
  color: var(--v3-text);
}
.section-intro .lede em {
  font-style: italic;
  color: var(--v3-text-soft);
}

/* Editorial 3-up: a row of refined columns, no cards */
.editorial-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  padding: 64px 0;
  border-top: 1px solid var(--v3-rule);
}
@media (max-width: 880px) {
  .editorial-row { grid-template-columns: 1fr; gap: 32px; padding: 40px 0; }
}
.editorial-col .num {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .14em;
  color: var(--v3-accent-deep);
  font-weight: 700;
  margin-bottom: 14px;
  display: flex; align-items: baseline; gap: 12px;
}
.editorial-col .num::before {
  content: ""; width: 18px; height: 2px; background: var(--v3-accent);
}
.editorial-col h3 {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
  color: var(--v3-text);
}
.editorial-col p {
  color: var(--v3-text-soft);
  font-size: .98rem;
  line-height: 1.65;
  margin-bottom: 14px;
}
.editorial-col .more {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--v3-text);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px solid var(--v3-text);
  padding-bottom: 1px;
}
.editorial-col .more:hover { color: var(--v3-accent-deep); border-color: var(--v3-accent); text-decoration: none; }

/* Series ribbon — horizontal scrolling tray, less card-y */
.series-ribbon {
  background: var(--v3-paper-2);
  padding: 56px 0;
  border-top: 1px solid var(--v3-rule);
  border-bottom: 1px solid var(--v3-rule);
}
html[data-theme="dark"] .series-ribbon { background: var(--v3-paper-2); }
.series-ribbon .header {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap; gap: 12px;
}
.series-ribbon h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.series-ribbon .header a {
  font-size: .86rem;
  color: var(--v3-text);
  font-weight: 600;
  border-bottom: 1.5px solid var(--v3-text);
  text-decoration: none;
  padding-bottom: 1px;
}
.series-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
@media (max-width: 980px) { .series-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .series-grid { grid-template-columns: repeat(2, 1fr); } }
.series-tile {
  background: var(--paper);
  border: 1px solid var(--v3-rule);
  border-radius: 10px;
  padding: 16px;
  text-decoration: none;
  color: var(--v3-text);
  display: flex; flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
  min-height: 130px;
}
.series-tile:hover {
  border-color: var(--v3-text);
  transform: translateY(-2px);
  text-decoration: none;
}
.series-tile .name {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .92rem;
  color: var(--v3-text);
  letter-spacing: -0.01em;
}
.series-tile .desc {
  font-size: .76rem;
  color: var(--v3-text-soft);
  margin-top: 4px;
  line-height: 1.4;
}
.series-tile .stat {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--v3-rule);
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--v3-text-faint);
  letter-spacing: .04em;
}
.series-tile .stat strong { color: var(--v3-accent-deep); font-weight: 700; }

/* Publisher line — subtle, replaces the orange promo strip */
.pub-line {
  background: var(--v3-paper-2);
  padding: 10px 0;
  font-size: .78rem;
  color: var(--v3-text-soft);
  border-bottom: 1px solid var(--v3-rule);
}
.pub-line .wrap {
  display: flex; gap: 12px; align-items: center; justify-content: center;
  flex-wrap: wrap;
}
.pub-line strong {
  color: var(--v3-text);
  font-weight: 700;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.pub-line a {
  color: var(--v3-text);
  font-weight: 600;
  border-bottom: 1.5px solid var(--v3-commerce);
  text-decoration: none;
  padding-bottom: 1px;
}
.pub-line a:hover { color: var(--v3-commerce); }
@media (max-width: 600px) { .pub-line { padding: 8px 0; font-size: .72rem; } }

/* Cmd-K palette — tactful affordance */
.cmdk-pulse {
  display: none;
}
@media (min-width: 1100px) { .cmdk-pulse { display: inline-block; } }

/* Refined modal: cleaner edges, larger close */
.modal {
  border-radius: 16px;
  box-shadow: 0 32px 80px rgba(0,0,0,.4);
}
.modal-head { padding: 22px 26px; }
.modal-body { padding: 22px 26px 26px; }
.close-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  border-color: var(--v3-rule);
}
.close-btn:hover { background: var(--v3-paper-2); }

/* Refined part cards: less ornament */
.part-card {
  border-radius: 10px;
  padding: 18px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.part-card:hover {
  border-color: var(--v3-text);
  transform: none;
  box-shadow: 0 6px 18px rgba(10,14,19,.06);
}
.part-card .pn {
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--v3-accent-deep);
  font-weight: 700;
}
.part-card h4 {
  font-size: 1.0rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.part-card .desc {
  font-size: .85rem;
  color: var(--v3-text-soft);
  line-height: 1.5;
}

/* Refined buttons */
.btn--primary {
  background: var(--v3-ink);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.btn--primary:hover { background: #000; }
html[data-theme="dark"] .btn--primary { background: var(--v3-accent); color: var(--v3-ink); }
.btn--accent { background: var(--v3-commerce); }
.btn--accent:hover { background: var(--v3-accent-deep); }

/* Section padding rhythm */
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
@media (max-width: 720px) { .section { padding: 56px 0; } .section--tight { padding: 36px 0; } }

/* Page-head refinement */
.page-head { padding: 72px 0 56px; }
.page-head h1 {
  font-size: clamp(2.2rem, 3.6vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: .35em;
}
.page-head p {
  font-size: 1.04rem;
  line-height: 1.55;
  color: rgba(255,255,255,.72);
  max-width: 64ch;
}
.breadcrumb {
  font-size: .68rem;
  letter-spacing: .18em;
  margin-bottom: 18px;
}

/* ============================================================
   V3.1 — PALETTE PASS · "Petrol on Black"
   ------------------------------------------------------------
   The orange was reading as promotional. Replaced with a
   deep petrol teal that signals "industrial / technical" without
   shouting. Hazard yellow stays as the safety-signal color.
   ============================================================ */

:root {
  /* New muted accent — used for commerce, links, outriggers in the
     hero SVG. Pairs cleanly with deep ink black and hazard yellow. */
  --accent-teal:       #0e7461;
  --accent-teal-deep:  #0a5447;
  --accent-teal-tint:  rgba(14,116,97,0.10);
  --accent-teal-glow:  rgba(14,116,97,0.32);
}
html[data-theme="dark"] {
  --accent-teal:       #2da592;
  --accent-teal-deep:  #4cc2af;
  --accent-teal-tint:  rgba(45,165,146,0.16);
  --accent-teal-glow:  rgba(45,165,146,0.30);
}

/* Override the legacy "safety orange" tokens used throughout the
   site without touching every component selector individually. */
:root {
  --safety-orange:     var(--accent-teal);
  --safety-orange-dim: var(--accent-teal-deep);
  --v3-commerce:       var(--accent-teal);
}

/* Commerce CTAs — petrol, not orange */
.btn--buy {
  background: var(--accent-teal);
  color: #fff;
}
.btn--buy:hover {
  background: var(--accent-teal-deep);
  box-shadow: 0 12px 24px var(--accent-teal-glow);
}
.btn--accent {
  background: var(--accent-teal);
  color: #fff;
}
.btn--accent:hover { background: var(--accent-teal-deep); }

/* "Order at Energized Engines" link on each part card */
.part-card .buy-link {
  color: var(--accent-teal);
}
.part-card .buy-link:hover { color: var(--accent-teal-deep); }
.part-card .pn { color: var(--accent-teal); }

/* Vendor banner inside the modal */
.vendor-modal-row {
  background: linear-gradient(180deg, var(--accent-teal-tint), rgba(14,116,97,0.04));
  border-color: rgba(14,116,97,0.32);
}
.vendor-modal-row .copy strong { color: var(--accent-teal); }
html[data-theme="dark"] .vendor-modal-row {
  background: rgba(45,165,146,0.10);
  border-color: rgba(45,165,146,0.35);
}

/* Publisher line (in case promo-strip is ever re-enabled) */
.pub-line a { border-bottom-color: var(--accent-teal); }
.pub-line a:hover { color: var(--accent-teal-deep); }

/* Footer "© Published by …" underline */
.footer-bottom a[href*="energizedengines"],
.disclaimer a {
  border-bottom-color: var(--accent-teal) !important;
}

/* Eyebrow accent (was orange) — only the accent line, the text stays the same */
.eyebrow { color: var(--accent-teal); }
.eyebrow::before { background: var(--accent-teal); }

/* Action-tile left border: was orange, now ink for normal tiles, teal
   for the commerce tile. (Both are now in editorial-row, but keep
   for any other pages still using the action-grid pattern.) */
.action-tile { border-left-color: var(--accent-teal); }
.action-tile:hover { border-left-color: var(--v3-ink); }
.action-tile .verb { color: var(--accent-teal); }
.action-tile .arrow { color: var(--v3-text-faint); }
.action-tile:hover .arrow { color: var(--v3-ink); }

/* Editorial-col "more" link (home page how-it-works row) */
.editorial-col .num { color: var(--accent-teal); }
.editorial-col .num::before { background: var(--accent-teal); }
.editorial-col .more:hover { color: var(--accent-teal-deep); border-color: var(--accent-teal); }

/* Theater hero — replace orange outrigger fill with a quieter
   sand-tone so the bright yellow forks remain the only safety
   accent in the SVG. (Inline SVG fills are matched by attribute.) */
.hero-theater svg line[stroke="#ff6b1a"] { stroke: #5b6e85; }

/* Old hero-pro CTA buttons (still referenced in a couple of pages) */
.btn--accent { background: var(--accent-teal); }

/* Verdict tags on cable-inspection page */
.verdict--service { background: var(--accent-teal-tint); color: var(--accent-teal-deep); }
html[data-theme="dark"] .verdict--service {
  background: rgba(45,165,146,0.18);
  color: var(--accent-teal-deep);
}

/* Calculator gauge - the orange-ish bar fill */
.cap-bar .fill {
  background: linear-gradient(90deg, var(--signal-green), var(--hazard-yellow), var(--signal-red));
}

/* Selection color, focus rings — petrol */
::selection { background: var(--accent-teal-tint); color: var(--v3-ink); }
.global-search input:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px var(--accent-teal-tint);
}

/* Hero CTA stays yellow — it's editorial, not commercial. The buy
   buttons elsewhere now read as the commercial accent in petrol. */

/* ============================================================
   V3.2 — DENSITY PASS · service-tool, not magazine
   ------------------------------------------------------------
   Reference points: Stripe, Linear, Vercel docs, iFixit, real
   shop manuals. White space for hierarchy, not decoration.
   Compresses padding ~35%, tightens type, and rebuilds the hero
   as a dense 2-column control panel.
   ============================================================ */

/* ---- Section rhythm: compressed and consistent ---- */
.section          { padding: 56px 0; }
.section--tight   { padding: 32px 0; }
.section--paper   { padding: 56px 0; }
.section--steel   { padding: 56px 0; }
.section--dark    { padding: 56px 0; }
@media (max-width: 720px) {
  .section { padding: 40px 0; }
  .section--tight { padding: 24px 0; }
}

/* Page head: tighter */
.page-head { padding: 40px 0 32px; }
.page-head h1 {
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  margin-bottom: .25em;
}
.page-head p {
  font-size: .98rem;
  line-height: 1.55;
  max-width: 70ch;
}
.breadcrumb { margin-bottom: 14px; font-size: .66rem; }

/* Body text base: a notch up, leading tighter */
body { font-size: 15.5px; line-height: 1.5; }
p { margin: 0 0 .9em; }
.lead { font-size: 1.04rem; line-height: 1.5; }

/* Headings: tighter */
h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 2vw, 1.65rem); }
h3 { font-size: 1.04rem; }
h4 { font-size: .96rem; }

/* ============================================================
   HERO · Compact 2-column control panel
   The lift on the left at a sensible size, a real functional
   dashboard on the right (lift selector, quick-jumps,
   recently viewed). No more half-empty black canvas.
   ============================================================ */
.hero-theater {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--v3-rule);
  background: var(--v3-paper);
  color: var(--v3-text);
}
html[data-theme="dark"] .hero-theater {
  background: var(--v3-paper-2);
  color: var(--v3-text);
  border-bottom-color: var(--v3-rule);
}
.hero-theater::before, .hero-theater::after { display: none; }
.hero-theater .wrap {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
  align-items: stretch;
  min-height: 0;
}
@media (max-width: 880px) {
  .hero-theater .wrap { grid-template-columns: 1fr; gap: 24px; }
  .theater-stage { max-width: 280px; }
}

.theater-stage {
  position: relative;
  aspect-ratio: 4/5;
  max-height: 420px;
  width: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, var(--v3-paper-2), transparent 30%),
    var(--v3-paper);
  border: 1px solid var(--v3-rule);
  border-radius: 12px;
  padding: 20px;
}
html[data-theme="dark"] .theater-stage {
  background: var(--v3-paper);
  border-color: var(--v3-rule);
}
/* The SVG inside it: the lift renders against the panel */
.theater-stage svg {
  filter: drop-shadow(0 4px 18px rgba(10,14,19,.08));
}

/* Markers: smaller, better-positioned, less arcade */
.theater-marker {
  width: 28px; height: 28px;
  border: 1.5px solid var(--accent-teal);
  background: var(--v3-paper);
  color: var(--accent-teal);
  font-size: .76rem;
  box-shadow: 0 2px 6px rgba(14,116,97,.18);
}
.theater-marker::after { display: none; } /* kill the pulse — too noisy in a dense layout */
.theater-marker:hover {
  background: var(--accent-teal);
  color: #fff;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 4px var(--accent-teal-tint);
}
.theater-marker .tip {
  background: var(--v3-ink);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 3px;
  letter-spacing: 0;
  text-transform: none;
}

/* Right column: dense control panel */
.theater-copy {
  max-width: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.theater-copy .kicker {
  font-size: .66rem;
  letter-spacing: .22em;
  color: var(--v3-text-faint);
  font-weight: 600;
}
.theater-copy .kicker::before { background: var(--accent-teal); }
.theater-copy h1 {
  margin: 12px 0 12px;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.028em;
  color: var(--v3-text);
}
.theater-copy h1 em {
  background: linear-gradient(180deg, transparent 62%, rgba(255,196,25,.55) 62%);
}
.theater-copy p.lead {
  font-size: .98rem;
  line-height: 1.5;
  color: var(--v3-text-soft);
  max-width: 56ch;
  margin-bottom: 16px;
}

/* CTA strip — primary + secondary buy */
.theater-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.theater-cta {
  background: var(--v3-ink);
  color: #fff;
  padding: 11px 18px;
  font-size: .9rem;
  border-radius: 8px;
}
.theater-cta:hover {
  background: #000;
  box-shadow: 0 6px 14px rgba(10,14,19,.18);
  color: #fff;
}
html[data-theme="dark"] .theater-cta { background: var(--accent-teal); color: #fff; }
html[data-theme="dark"] .theater-cta:hover { background: var(--accent-teal-deep); }
.theater-cta-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--accent-teal);
  color: var(--accent-teal);
  font-size: .9rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: background .15s ease;
}
.theater-cta-secondary:hover {
  background: var(--accent-teal-tint);
  text-decoration: none;
  color: var(--accent-teal-deep);
}

/* Dense functional grid in the right column — quick jumps + meta */
.theater-quickjumps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--v3-rule);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.theater-quickjumps a {
  padding: 14px 14px;
  border-right: 1px solid var(--v3-rule);
  text-decoration: none;
  color: var(--v3-text);
  display: flex; flex-direction: column; gap: 2px;
  transition: background .12s ease;
}
.theater-quickjumps a:last-child { border-right: 0; }
.theater-quickjumps a:hover { background: var(--v3-paper-2); text-decoration: none; }
.theater-quickjumps strong {
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--v3-text);
}
.theater-quickjumps small {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--v3-text-faint);
  text-transform: uppercase;
}
@media (max-width: 720px) {
  .theater-quickjumps { grid-template-columns: repeat(2, 1fr); }
  .theater-quickjumps a:nth-child(2n) { border-right: 0; }
  .theater-quickjumps a:nth-child(-n+2) { border-bottom: 1px solid var(--v3-rule); }
}

/* The stat band: drop the floating-meta look */
.theater-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 0;
  padding: 14px 16px;
  border: 1px solid var(--v3-rule);
  border-radius: 10px;
  background: var(--v3-paper-2);
  font-size: .7rem;
  color: var(--v3-text-faint);
  font-family: var(--mono);
  letter-spacing: .08em;
}
.theater-meta > div { padding: 0 4px; border-right: 1px solid var(--v3-rule); }
.theater-meta > div:last-child { border-right: 0; }
.theater-meta strong {
  font-size: 1.15rem;
  font-family: var(--sans);
  letter-spacing: -0.01em;
  color: var(--v3-text);
  margin-bottom: 0;
  font-weight: 700;
  display: inline-block;
  margin-right: 6px;
}
.theater-meta > div { display: flex; align-items: baseline; gap: 6px; }

.theater-jumpnav { display: none; } /* replaced by theater-quickjumps */

/* ============================================================
   Editorial row → DENSE FUNCTIONAL GRID
   ============================================================ */
.editorial-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 0;
  border: 1px solid var(--v3-rule);
  border-radius: 12px;
  overflow: hidden;
  margin: 0;
}
@media (max-width: 880px) { .editorial-row { grid-template-columns: 1fr; } }

.editorial-col {
  padding: 22px 24px;
  border-right: 1px solid var(--v3-rule);
}
.editorial-col:last-child { border-right: 0; }
@media (max-width: 880px) {
  .editorial-col { border-right: 0; border-bottom: 1px solid var(--v3-rule); }
  .editorial-col:last-child { border-bottom: 0; }
}
.editorial-col .num {
  font-size: .68rem;
  letter-spacing: .14em;
  margin-bottom: 10px;
}
.editorial-col h3 {
  font-size: 1.04rem;
  margin-bottom: 6px;
}
.editorial-col p {
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: 10px;
}
.editorial-col .more {
  font-size: .82rem;
}

/* ---- Lede: shorter, tighter ---- */
.section-intro { padding: 48px 0 24px; }
.section-intro .lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.4;
  max-width: 56ch;
}

/* ============================================================
   Series ribbon → SPEC MATRIX (real table)
   ============================================================ */
.series-ribbon {
  padding: 56px 0;
}
.series-ribbon .header { margin-bottom: 18px; }
.series-ribbon h2 { font-size: 1.35rem; }

.series-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  background: var(--paper);
  border: 1px solid var(--v3-rule);
  border-radius: 10px;
  overflow: hidden;
}
html[data-theme="dark"] .series-grid { background: var(--v3-paper); }
@media (max-width: 980px) { .series-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .series-grid { grid-template-columns: repeat(2, 1fr); } }

.series-tile {
  padding: 14px 14px 14px;
  border-right: 1px solid var(--v3-rule);
  border-radius: 0;
  min-height: 0;
  background: transparent;
}
.series-tile:last-child { border-right: 0; }
.series-tile:hover {
  background: var(--v3-paper-2);
  transform: none;
  border-color: var(--v3-rule);
}
.series-tile .name { font-size: .88rem; }
.series-tile .desc { font-size: .72rem; margin-top: 2px; }
.series-tile .stat {
  padding-top: 10px;
  font-size: .7rem;
  border-top: 1px dashed var(--v3-rule);
}
@media (max-width: 980px) {
  .series-tile { border-right: 1px solid var(--v3-rule); border-bottom: 1px solid var(--v3-rule); }
  .series-tile:nth-child(3n) { border-right: 0; }
  .series-tile:nth-last-child(-n+3) { border-bottom: 0; }
}
@media (max-width: 560px) {
  .series-tile:nth-child(3n) { border-right: 1px solid var(--v3-rule); }
  .series-tile:nth-child(2n) { border-right: 0; }
  .series-tile:nth-last-child(-n+3) { border-bottom: 1px solid var(--v3-rule); }
  .series-tile:nth-last-child(-n+2) { border-bottom: 0; }
}

/* ============================================================
   Recently viewed — horizontal pill rail, not full-width empty
   ============================================================ */
#recent-list-wrap {
  border: 1px solid var(--v3-rule);
  border-radius: 8px;
  padding: 10px 14px !important;
  background: var(--v3-paper-2);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
#recent-list-wrap > div:first-child {
  margin-bottom: 0 !important;
  font-size: .66rem !important;
  letter-spacing: .14em !important;
  color: var(--v3-text-faint);
  white-space: nowrap;
}
#recent-list ul {
  display: flex; gap: 8px; flex-wrap: wrap;
  list-style: none; margin: 0; padding: 0;
}
#recent-list li a {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: var(--paper);
  border: 1px solid var(--v3-rule);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: .82rem;
  color: var(--v3-text);
  text-decoration: none;
  transition: border-color .12s ease;
}
#recent-list li a:hover { border-color: var(--v3-text); text-decoration: none; }
#recent-list li a small { font-size: .68rem; color: var(--v3-text-faint); }

/* ============================================================
   Workflow strip — compact horizontal flow, not 4 huge cards
   ============================================================ */
.workflow-strip { padding: 48px 0 !important; }
.workflow-strip h2 { font-size: 1.4rem !important; margin-bottom: 24px !important; }

/* ---- Container: narrower max-width on home for editorial discipline ---- */
.wrap-narrow { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---- Tighten card defaults across the site ---- */
.card { padding: 18px; border-radius: 8px; }
.card .meta { margin-bottom: 8px; font-size: .68rem; }
.callout { padding: 12px 14px; font-size: .9rem; margin: 16px 0; }

/* ---- Tighter spec lists ---- */
.spec-list li { padding: 5px 0; font-size: .88rem; }
.spec-list .k { font-size: .7rem; }

/* ---- Tighter eyebrows ---- */
.eyebrow { font-size: .68rem; letter-spacing: .16em; }

/* ---- Tighter modal padding ---- */
.modal-head { padding: 16px 22px; }
.modal-body { padding: 16px 22px 22px; }

/* ---- Site-footer footprint: less tall ---- */
.site-footer { padding: 32px 0 18px; }
.site-footer h4 { margin-bottom: 10px; }
.footer-grid { gap: 24px; margin-bottom: 24px; }

/* ---- "Order at Energized Engines" link inline with eyebrow style ---- */
.part-card .buy-link { padding-top: 6px; font-size: .72rem; }

/* ============================================================
   V4 — APP SHELL · the real thing
   ------------------------------------------------------------
   Pattern: Stripe / Linear / Vercel docs. Persistent sidebar
   with grouped nav, a slim top bar, and a content column. Used
   on the home page; inner pages keep their existing treatment
   (which is appropriate for long-form chapters).
   ============================================================ */

.app-page {
  background: var(--paper);
  color: var(--v3-text);
  min-height: 100vh;
}
html[data-theme="dark"] .app-page { background: var(--v3-paper); }

.app-page .promo-strip,
.app-page .context-bar,
.app-page > .site-header { display: none; }

.app-topbar {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255,255,255,.95);
  border-bottom: 1px solid var(--v3-rule);
  backdrop-filter: saturate(140%) blur(8px);
  height: 56px;
  display: flex; align-items: center;
}
html[data-theme="dark"] .app-topbar {
  background: rgba(10,14,19,.96);
  border-bottom-color: var(--v3-rule);
}
.app-topbar-inner {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 24px;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 0 20px;
}
.app-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--v3-text);
}
.app-brand:hover { text-decoration: none; }
.app-brand-mark {
  width: 28px; height: 28px;
  background: var(--v3-ink);
  color: var(--accent-teal);
  border-radius: 6px;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
}
html[data-theme="dark"] .app-brand-mark { background: var(--accent-teal); color: var(--v3-paper); }
.app-brand-name {
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.app-brand-name small {
  display: block;
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--v3-text-faint);
  text-transform: uppercase;
  margin-top: 1px;
}

.app-search {
  position: relative;
  max-width: 540px;
  width: 100%;
  justify-self: stretch;
}
.app-search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid var(--v3-rule);
  border-radius: 8px;
  background: var(--v3-paper-2);
  font-size: .9rem;
  color: var(--v3-text);
  transition: border-color .12s ease, background .12s ease;
}
.app-search input:focus {
  outline: 0;
  border-color: var(--accent-teal);
  background: var(--paper);
  box-shadow: 0 0 0 3px var(--accent-teal-tint);
}
.app-search::before {
  content: "";
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  background: no-repeat center/contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a3' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-4-4'/></svg>");
  pointer-events: none;
}
.app-search-kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: flex; gap: 2px;
  pointer-events: none;
}
.app-search-kbd kbd {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 600;
  color: var(--v3-text-faint);
  background: var(--paper);
  border: 1px solid var(--v3-rule);
  padding: 2px 6px;
  border-radius: 4px;
}
.app-search:focus-within .app-search-kbd { display: none; }

.app-topbar-actions { display: flex; align-items: center; gap: 8px; }
.app-shop-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: var(--accent-teal);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  border-radius: 7px;
  text-decoration: none;
  transition: background .12s ease;
}
.app-shop-btn:hover { background: var(--accent-teal-deep); color: #fff; text-decoration: none; }
.app-shop-btn::after { content: "↗"; font-weight: 600; }
.app-icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--v3-rule);
  border-radius: 7px;
  color: var(--v3-text-soft);
  cursor: pointer;
  font-family: var(--mono);
  font-size: .76rem;
}
.app-icon-btn:hover { background: var(--v3-paper-2); color: var(--v3-text); }
.app-icon-btn svg { width: 16px; height: 16px; }

/* ---- App shell: sidebar + main ---- */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 56px);
}
.app-sidebar {
  border-right: 1px solid var(--v3-rule);
  background: var(--v3-paper-2);
  padding: 20px 0;
  position: sticky;
  top: 56px;
  align-self: start;
  height: calc(100vh - 56px);
  overflow-y: auto;
}
html[data-theme="dark"] .app-sidebar { background: var(--v3-paper-2); }

.app-nav-group {
  padding: 0 20px 14px;
  margin-bottom: 6px;
}
.app-nav-group + .app-nav-group { padding-top: 14px; border-top: 1px solid var(--v3-rule); }
.app-nav-group h6 {
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--v3-text-faint);
  margin: 0 0 8px;
}
.app-nav-group ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px;
}
.app-nav-group a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: .86rem;
  color: var(--v3-text-soft);
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.app-nav-group a:hover {
  background: var(--paper);
  color: var(--v3-text);
  text-decoration: none;
}
.app-nav-group a.active {
  background: var(--paper);
  color: var(--v3-text);
  font-weight: 600;
}
html[data-theme="dark"] .app-nav-group a:hover,
html[data-theme="dark"] .app-nav-group a.active { background: var(--paper); color: var(--v3-text); }
.app-nav-group a .badge {
  font-family: var(--mono);
  font-size: .62rem;
  color: var(--v3-text-faint);
  background: transparent;
}
.app-nav-group a:hover .badge { color: var(--v3-text-soft); }
.app-nav-group .app-nav-shop {
  background: var(--accent-teal-tint);
  color: var(--accent-teal-deep);
  font-weight: 600;
}
.app-nav-group .app-nav-shop:hover { background: var(--accent-teal); color: #fff; }

/* ---- Main content area ---- */
.app-main {
  padding: 28px 40px 80px;
  max-width: 1180px;
  width: 100%;
}
.app-main h1.app-h1 {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 4px;
}
.app-main .app-subtitle {
  font-size: .98rem;
  color: var(--v3-text-soft);
  margin: 0 0 24px;
  max-width: 60ch;
}

/* Hero search inside dashboard */
.app-hero-search {
  position: relative;
  margin-bottom: 20px;
  max-width: 720px;
}
.app-hero-search input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border: 1px solid var(--v3-rule);
  border-radius: 10px;
  background: var(--paper);
  font-size: 1rem;
  color: var(--v3-text);
  box-shadow: 0 1px 2px rgba(10,14,19,.04);
}
.app-hero-search input:focus {
  outline: 0;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px var(--accent-teal-tint);
}
.app-hero-search::before {
  content: ""; position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px;
  background: no-repeat center/contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6473' stroke-width='2.2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-4-4'/></svg>");
  pointer-events: none;
}

/* Lift-context strip — clean, in the dashboard */
.app-ctx {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--v3-rule);
  border-radius: 10px;
  background: var(--v3-paper-2);
  font-size: .88rem;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.app-ctx > strong {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--v3-text-faint);
  text-transform: uppercase;
}
.app-ctx-active {
  font-weight: 600;
  color: var(--v3-text);
  font-family: var(--mono);
  font-size: .88rem;
  background: var(--paper);
  border: 1px solid var(--v3-rule);
  padding: 4px 10px;
  border-radius: 6px;
}
.app-ctx select {
  padding: 6px 12px;
  border: 1px solid var(--v3-rule);
  border-radius: 6px;
  font-size: .82rem;
  font-family: inherit;
  background: var(--paper);
  color: var(--v3-text);
}

/* Recently-viewed pill rail in dashboard */
.app-recent {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.app-recent-label {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--v3-text-faint);
}
.app-recent-list { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.app-recent-list li a {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--v3-rule);
  border-radius: 99px;
  font-size: .8rem;
  color: var(--v3-text);
  background: var(--paper);
  text-decoration: none;
  transition: border-color .12s ease;
}
.app-recent-list li a:hover { border-color: var(--v3-text); text-decoration: none; }
.app-recent-list li a small { color: var(--v3-text-faint); font-size: .68rem; }
.app-recent .empty { color: var(--v3-text-faint); font-size: .82rem; font-style: italic; }

/* Section header inside dashboard */
.app-section-h {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 32px 0 12px;
}
.app-section-h h2 {
  font-size: .92rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.005em;
  color: var(--v3-text);
}
.app-section-h .more {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--v3-text-faint);
  text-decoration: none;
}
.app-section-h .more:hover { color: var(--v3-text); text-decoration: none; }

/* Quick-reference grid (4 large cards) */
.app-quickref {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 980px) { .app-quickref { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .app-quickref { grid-template-columns: 1fr; } }

.app-card {
  display: flex; flex-direction: column;
  padding: 16px 18px;
  border: 1px solid var(--v3-rule);
  border-radius: 10px;
  background: var(--paper);
  text-decoration: none;
  color: var(--v3-text);
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
  min-height: 130px;
  position: relative;
}
.app-card:hover {
  border-color: var(--v3-text);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(10,14,19,.06);
}
.app-card .icon {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--accent-teal-tint);
  color: var(--accent-teal-deep);
  display: grid; place-items: center;
  margin-bottom: 12px;
}
.app-card .icon svg { width: 16px; height: 16px; }
.app-card h3 {
  font-size: .96rem;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}
.app-card p {
  font-size: .82rem;
  color: var(--v3-text-soft);
  line-height: 1.45;
  margin: 0;
}
.app-card .meta-bottom {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--v3-text-faint);
  letter-spacing: .04em;
}
.app-card.app-card--shop {
  background: linear-gradient(180deg, var(--v3-ink), #1a232e);
  border-color: var(--v3-ink);
  color: #fff;
}
.app-card.app-card--shop h3 { color: #fff; }
.app-card.app-card--shop p { color: rgba(255,255,255,.65); }
.app-card.app-card--shop .icon { background: rgba(255,255,255,.10); color: var(--accent-teal); }
.app-card.app-card--shop:hover { transform: translateY(-1px); }
.app-card.app-card--shop .meta-bottom { color: var(--accent-teal); }

/* Spec matrix (the lift family) */
.app-spec-matrix {
  border: 1px solid var(--v3-rule);
  border-radius: 10px;
  background: var(--paper);
  overflow: hidden;
}
.app-spec-matrix table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
}
.app-spec-matrix th {
  text-align: left;
  padding: 10px 14px;
  background: var(--v3-paper-2);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--v3-text-faint);
  border-bottom: 1px solid var(--v3-rule);
}
.app-spec-matrix td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--v3-rule);
  vertical-align: middle;
}
.app-spec-matrix tbody tr:last-child td { border-bottom: 0; }
.app-spec-matrix tbody tr:hover { background: var(--v3-paper-2); cursor: pointer; }
.app-spec-matrix .model {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--v3-text);
}
.app-spec-matrix .cap {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--v3-text);
}
.app-spec-matrix .desc { color: var(--v3-text-soft); font-size: .82rem; }
.app-spec-matrix .stock {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .04em;
  color: var(--accent-teal-deep);
}
.app-spec-matrix .row-link,
.app-spec-matrix .row-buy {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background .12s ease, color .12s ease;
  display: inline-block;
}
.app-spec-matrix .row-link {
  color: var(--v3-text-soft);
  border: 1px solid var(--v3-rule);
  background: var(--paper);
}
.app-spec-matrix .row-link:hover {
  color: var(--v3-text);
  border-color: var(--v3-text);
  text-decoration: none;
}
.app-spec-matrix .row-buy {
  color: #fff;
  background: var(--accent-teal);
  border: 1px solid var(--accent-teal);
}
.app-spec-matrix .row-buy:hover {
  background: var(--accent-teal-deep);
  border-color: var(--accent-teal-deep);
  color: #fff;
  text-decoration: none;
}
.app-spec-matrix tbody tr:hover { background: transparent; cursor: default; }

/* Compact workflow inside dashboard */
.app-flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--v3-rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper);
}
@media (max-width: 720px) { .app-flow { grid-template-columns: repeat(2, 1fr); } }
.app-flow-step {
  padding: 14px 16px;
  border-right: 1px solid var(--v3-rule);
}
.app-flow-step:last-child { border-right: 0; }
@media (max-width: 720px) {
  .app-flow-step { border-right: 1px solid var(--v3-rule); border-bottom: 1px solid var(--v3-rule); }
  .app-flow-step:nth-child(2n) { border-right: 0; }
  .app-flow-step:nth-last-child(-n+2) { border-bottom: 0; }
}
.app-flow-step .num {
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  color: var(--accent-teal); letter-spacing: .04em;
}
.app-flow-step h4 {
  font-size: .9rem; font-weight: 700; margin: 4px 0 4px; color: var(--v3-text);
}
.app-flow-step p {
  font-size: .82rem; color: var(--v3-text-soft); margin: 0; line-height: 1.45;
}
.app-flow-step a { color: var(--v3-text); border-bottom: 1px solid var(--v3-rule-strong); text-decoration: none; }
.app-flow-step a:hover { color: var(--accent-teal); border-color: var(--accent-teal); }

/* Footer inside app shell */
.app-footer {
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--v3-rule);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .76rem; color: var(--v3-text-faint);
  flex-wrap: wrap; gap: 10px;
}
.app-footer a { color: var(--v3-text-soft); }
.app-footer a:hover { color: var(--v3-text); }

/* Mobile: sidebar collapses */
@media (max-width: 880px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: fixed; top: 56px; left: 0; bottom: 0; width: 280px;
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 50;
    border-right: 1px solid var(--v3-rule);
  }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { padding: 24px 20px 60px; }
  .app-topbar-inner { grid-template-columns: auto 1fr auto; padding: 0 12px; }
  .app-brand-name small { display: none; }
  .app-shop-btn span { display: none; }
  .app-shop-btn::after { display: none; }
  .app-shop-btn { padding: 7px 10px; }
  .app-mobile-toggle { display: inline-grid; }
}
.app-mobile-toggle { display: none; }
.app-mobile-backdrop {
  display: none;
  position: fixed; inset: 0; background: rgba(10,14,19,.4);
  z-index: 49;
}
.app-mobile-backdrop.open { display: block; }
