/* ==========================================================================
   Essential Mod — essentialmod.org
   Design seed: S08 Mod Workshop Assembly (fixed LIGHT theme, no switcher)
   Palette: icon blue + ice blue + cool neutrals
   Fonts: Bricolage Grotesque (display), IBM Plex Sans (body), IBM Plex Mono (labels)
   ========================================================================== */

/* ---------- Fonts (self-hosted, work under file:// and live) ---------- */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/bricolage-grotesque-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --paper: #f3f8ff;        /* cool workshop paper */
  --paper-2: #e8f2ff;      /* tonal band */
  --surface: #ffffff;
  --line: #cbdcf2;
  --line-soft: #dce9f7;
  --grid: rgba(28, 106, 254, 0.07);

  --ink: #14243b;
  --ink-2: #34465e;
  --muted: #4e6079;

  --brand: #1c6afe;       /* primary — CTA */
  --brand-deep: #154fc1;
  --brand-soft: #e3f5ff;
  --link: #1558d6;          /* supporting — links, diagrams, focus */
  --link-deep: #1345a5;
  --link-soft: #e3f5ff;
  --highlight: #5598ff;        /* accent — seated nodes, active step */
  --highlight-soft: #e3f5ff;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --r-xs: 3px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  --shadow-1: 0 1px 2px rgba(20, 36, 59, 0.06);
  --shadow-2: 0 10px 30px -18px rgba(20, 36, 59, 0.35);

  --header-h: 68px;
  --wrap: 1200px;
  --ease-snap: cubic-bezier(0.2, 0.9, 0.25, 1.15);
  --ease-out: cubic-bezier(0.22, 0.8, 0.3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-deep); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 1.4rem + 2.8vw, 3.5rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.65rem, 1.2rem + 1.5vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.35rem); letter-spacing: -0.01em; }
h4 { font-size: 1.05rem; }
code, kbd { font-family: var(--font-mono); font-size: 0.9em; background: var(--paper-2); border: 1px solid var(--line-soft); border-radius: var(--r-xs); padding: 0.05em 0.35em; }
strong { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none; transition: top 0.2s; }
.skip-link:focus { top: 12px; color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2.5rem, 860px); margin-inline: auto; }
.wrap--wide { width: min(100% - 2rem, 1320px); margin-inline: auto; }

/* Mono part label used for section heads */
.part {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-deep);
  margin-bottom: 0.9rem;
}
.part::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.lede { font-size: 1.125rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0.7rem 1.3rem;
  font: 600 1rem/1.2 var(--font-body); letter-spacing: 0.005em;
  border-radius: var(--r-sm); border: 2px solid var(--b);
  text-decoration: none; cursor: pointer;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), background-color 0.18s, color 0.18s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { --b: var(--link); background: var(--link); color: #fff; box-shadow: 0 3px 0 var(--brand-deep); }
.btn--primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 0 #123b98; }
.btn--primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #123b98; }
.btn--ghost { --b: var(--line); background: var(--surface); color: var(--ink); }
.btn--ghost:hover { --b: var(--ink); color: var(--ink); }
.btn--lg { min-height: 56px; padding: 0.85rem 1.6rem; font-size: 1.075rem; }
.btn--sm { min-height: 40px; padding: 0.45rem 0.95rem; font-size: 0.95rem; }
.text-link { font-weight: 600; color: var(--link); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.text-link:hover { color: var(--link-deep); }

/* ==========================================================================
   Header — workbench bar
   ========================================================================== */
#site-header { position: sticky; top: 0; z-index: 100; min-height: var(--header-h); }
.bench {
  position: relative; background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s;
}
@supports (backdrop-filter: blur(8px)) { .bench { background: rgba(255, 255, 255, 0.86); backdrop-filter: saturate(1.2) blur(10px); } }
.bench::after { /* measurement ticks along the bench edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 5px; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px);
  opacity: 0.9;
}
.is-scrolled .bench { box-shadow: 0 8px 24px -18px rgba(20, 36, 59, 0.45); }
.bench__inner { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 34px; height: 34px; flex: none; }
.brand__name { color: var(--brand-deep); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; line-height: 1; }
.brand__tag { display: block; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav { display: flex; align-items: center; }
.nav__list { display: flex; align-items: center; gap: 0.15rem; list-style: none; margin: 0; padding: 0; }
.nav__link {
  position: relative; display: block; padding: 0.5rem 0.7rem;
  color: var(--ink-2); font-size: 0.95rem; font-weight: 500; text-decoration: none; border-radius: var(--r-xs);
}
.nav__link::after { content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.2rem; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease-out); }
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after, .nav__link.is-active::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link.is-active, .nav__link[aria-current="page"] { color: var(--ink); }
.nav__sep { width: 1px; height: 22px; background: var(--line); margin: 0 0.4rem; }
.bench__cta { margin-left: 0.6rem; }
.menu-btn {
  display: none; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.85rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  font: 600 0.95rem var(--font-body); color: var(--ink); cursor: pointer;
}
.menu-btn__bars { position: relative; width: 18px; height: 12px; }
.menu-btn__bars span { position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.25s, opacity 0.2s, top 0.25s; }
.menu-btn__bars span:nth-child(1) { top: 0; }
.menu-btn__bars span:nth-child(2) { top: 5px; }
.menu-btn__bars span:nth-child(3) { top: 10px; }
.menu-btn[aria-expanded="true"] .menu-btn__bars span:nth-child(1) { top: 5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); }

.noscript-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; padding: 0.9rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line); font-size: 0.95rem; }

@media (max-width: 1100px) {
  .menu-btn { display: inline-flex; }
  .bench__cta { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: 0 22px 30px -24px rgba(20, 36, 59, 0.5);
    padding: 0.5rem 1.25rem 1.25rem;
    display: block; visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 0.22s var(--ease-out), transform 0.22s var(--ease-out), visibility 0s linear 0.22s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li { border-bottom: 1px dashed var(--line-soft); }
  .nav__link { padding: 0.85rem 0.2rem; font-size: 1.05rem; }
  .nav__link::after { left: 0.2rem; right: auto; width: 28px; bottom: 0.5rem; }
  .nav__sep { display: none; }
  .nav__mobile-cta { display: flex !important; margin-top: 1rem; }
  .nav__mobile-cta .btn { width: 100%; }
}
.nav__mobile-cta { display: none !important; }

/* ==========================================================================
   Hero — mod identity left, parts diagram right
   ========================================================================== */
.hero { position: relative; padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2.5rem, 4vw, 3.5rem); overflow: hidden; }
.hero::before { /* faint workshop grid */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.hero__eyebrow { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.1rem; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.28rem 0.6rem; font: 500 0.75rem/1.3 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; border: 1px solid var(--line); border-radius: var(--r-xs); background: var(--surface); color: var(--ink-2); }
.chip--brand { border-color: #a9d0ff; background: var(--brand-soft); color: var(--brand-deep); }
.chip--link { border-color: #b9d4f7; background: var(--link-soft); color: var(--link-deep); }
.hero h1 { max-width: 15ch; margin-bottom: 0.4em; }
.hero h1 .h1-sub { display: block; font-size: 0.8em; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-2); margin-top: 0.35em; line-height: 1.2; }
.hero__copy p { max-width: 54ch; color: var(--ink-2); font-size: 1.125rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.4rem; margin: 1.6rem 0 1.8rem; }
.hero__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); max-width: 560px; }
.hero__facts div { padding: 0.75rem 0.9rem 0.75rem 0; border-bottom: 1px solid var(--line); }
.hero__facts div:nth-child(odd) { border-right: 1px solid var(--line); }
.hero__facts div:nth-child(even) { padding-left: 0.9rem; }
.hero__facts dt { font: 500 0.7rem/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hero__facts dd { margin: 0.15rem 0 0; font-weight: 600; font-size: 0.98rem; }
.hero__visual { position: relative; }
.hero__visual svg { width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(20, 36, 59, 0.12)); }

/* Signature motion: parts snap into alignment once, connectors draw */
.js .assembly .part-mod { opacity: 0; transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-snap); }
.js .assembly .part-mod.from-tl { transform: translate(-18px, -14px); }
.js .assembly .part-mod.from-tr { transform: translate(18px, -14px); }
.js .assembly .part-mod.from-bl { transform: translate(-18px, 14px); }
.js .assembly .part-mod.from-br { transform: translate(18px, 14px); }
.js .assembly .part-core { opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-snap); }
.js .assembly .part-rail { opacity: 0; transform: translateY(12px); transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out); }
.js .assembly .wire { stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset 0.8s var(--ease-out); }
.js .assembly .seat { transform-box: fill-box; transform-origin: center; transform: scale(0.2); fill: var(--surface); transition: transform 0.35s var(--ease-snap), fill 0.3s; }
.js .assembly.is-assembled .part-core { opacity: 1; transform: none; }
.js .assembly.is-assembled .part-rail { opacity: 1; transform: none; transition-delay: 0.15s; }
.js .assembly.is-assembled .part-mod { opacity: 1; transform: none; }
.js .assembly.is-assembled .part-mod.d1 { transition-delay: 0.3s; }
.js .assembly.is-assembled .part-mod.d2 { transition-delay: 0.42s; }
.js .assembly.is-assembled .part-mod.d3 { transition-delay: 0.54s; }
.js .assembly.is-assembled .part-mod.d4 { transition-delay: 0.66s; }
.js .assembly.is-assembled .wire { stroke-dashoffset: 0; transition-delay: 0.85s; }
.js .assembly.is-assembled .seat { transform: scale(1); fill: var(--highlight); transition-delay: 1.45s; }

/* ==========================================================================
   Generic section scaffolding
   ========================================================================== */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; position: relative; }
.section--tint { background: var(--paper-2); }
.section--white { background: var(--surface); border-block: 1px solid var(--line-soft); }
.section--tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.head { margin-bottom: clamp(1.8rem, 3.5vw, 2.8rem); max-width: 760px; }
.head--split { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 3rem; align-items: end; }
.head--split .lede { margin: 0; }
.head--center { margin-inline: auto; text-align: center; }
.head h2 { margin-bottom: 0.35em; }

/* ---------- About: editorial + spec sheet ---------- */
.about__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.about__text p { color: var(--ink-2); }
.about__text p:first-of-type::first-line { font-weight: 600; color: var(--ink); }
.about__figure { margin: 2rem 0 0; }
.about__figure img { width: 100%; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.about__figure figcaption { font: 500 0.78rem/1.5 var(--font-mono); color: var(--muted); margin-top: 0.6rem; }
.spec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-2); position: sticky; top: calc(var(--header-h) + 20px); }
.spec__head { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 1.2rem; background: var(--ink); color: #fff; font: 500 0.78rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.spec__head span:last-child { color: #a9d0ff; }
.spec dl { margin: 0; }
.spec__row { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: 0.8rem 1.2rem; border-top: 1px dashed var(--line); }
.spec__row:first-child { border-top: 0; }
.spec dt { font: 500 0.76rem/1.6 var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 0; font-size: 0.97rem; font-weight: 500; }
.spec__foot { padding: 0.8rem 1.2rem; background: var(--paper); border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); }

/* ---------- Features: central assembly diagram + two unequal rails ---------- */
.features__layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: center; }
.rail { display: grid; gap: 1.1rem; }
.rail--major .feat { padding: 1.35rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 0 var(--r-md) var(--r-md) 0; transition: transform 0.25s var(--ease-out), box-shadow 0.25s; }
.rail--major .feat:hover { transform: translateX(4px); box-shadow: var(--shadow-2); }
.feat__code { font: 500 0.72rem var(--font-mono); letter-spacing: 0.08em; color: var(--brand-deep); text-transform: uppercase; }
.feat h3 { margin: 0.25rem 0 0.4rem; }
.feat p { margin: 0; color: var(--ink-2); font-size: 0.98rem; }
.rail--minor { gap: 0; border-top: 2px solid var(--ink); }
.rail--minor .feat { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.rail--minor .feat h3 { font-size: 1.08rem; display: flex; align-items: center; gap: 0.55rem; }
.rail--minor .feat h3::before { content: ""; width: 9px; height: 9px; border: 2px solid var(--link); transform: rotate(45deg); flex: none; }
.rail--minor .feat p { font-size: 0.93rem; }
.features__diagram { position: relative; }
.features__diagram svg { width: 100%; }
.js .socket-diagram .sock { opacity: 0.25; transition: opacity 0.4s, transform 0.5s var(--ease-snap); transform-box: fill-box; transform-origin: center; }
.js .socket-diagram.is-in .sock { opacity: 1; }
.js .socket-diagram .sock-line { stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 0.9s var(--ease-out); }
.js .socket-diagram.is-in .sock-line { stroke-dashoffset: 0; }

/* ---------- How it works: four-step installation rail ---------- */
.steprail { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; counter-reset: step; }
.steprail::before { content: ""; position: absolute; top: 27px; left: 28px; right: calc((100% - 4.5rem) / 4 - 28px); height: 2px; background: var(--line); }
.steprail__track { position: absolute; top: 27px; left: 28px; right: calc((100% - 4.5rem) / 4 - 28px); height: 2px; background: linear-gradient(90deg, var(--brand), var(--highlight)); transform-origin: left; transform: scaleX(1); }
.js .steprail__track { transform: scaleX(0); transition: transform 1.4s var(--ease-out); }
.js .steprail.is-in .steprail__track { transform: scaleX(1); }
.step { position: relative; }
.step__node { position: relative; z-index: 1; width: 56px; height: 56px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-sm); font: 600 1.05rem var(--font-mono); color: var(--ink); box-shadow: 4px 4px 0 var(--brand-soft); transition: background-color 0.35s, color 0.35s, border-color 0.35s; }
.js .steprail.is-in .step__node { background: var(--ink); color: #fff; }
.js .steprail.is-in .step:nth-child(2) .step__node { transition-delay: 0.1s; }
.js .steprail.is-in .step:nth-child(3) .step__node { transition-delay: 0.45s; }
.js .steprail.is-in .step:nth-child(4) .step__node { transition-delay: 0.8s; }
.js .steprail.is-in .step:nth-child(5) .step__node { transition-delay: 1.15s; background: var(--link); border-color: var(--link); }
.step h3 { margin: 1.1rem 0 0.4rem; font-size: 1.15rem; }
.step p { margin: 0; font-size: 0.96rem; color: var(--ink-2); }
.step__tag { display: inline-block; margin-top: 0.7rem; font: 500 0.72rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--link-deep); }

/* ---------- Installation: two-track work order ---------- */
.workorder { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.track { padding: clamp(1.5rem, 3vw, 2.4rem); }
.track + .track { border-left: 1px dashed var(--line); background: linear-gradient(180deg, var(--paper) 0, var(--surface) 100%); }
.track__label { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; padding-bottom: 0.9rem; border-bottom: 2px solid var(--ink); }
.track__label h3 { margin: 0; }
.track__label span { font: 500 0.74rem var(--font-mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.proc { list-style: none; margin: 0; padding: 0; counter-reset: proc; }
.proc li { position: relative; padding: 0 0 1.1rem 2.6rem; counter-increment: proc; }
.proc li::before { content: counter(proc, decimal-leading-zero); position: absolute; left: 0; top: 0.1rem; font: 600 0.82rem var(--font-mono); color: var(--brand-deep); }
.proc li::after { content: ""; position: absolute; left: 0.62rem; top: 1.7rem; bottom: 0.25rem; width: 1px; background: var(--line); }
.proc li:last-child::after { display: none; }
.proc strong { display: block; color: var(--ink); }
.proc span { color: var(--ink-2); font-size: 0.96rem; }
.track__note { margin-top: 0.5rem; padding: 0.8rem 1rem; border-radius: var(--r-sm); background: var(--link-soft); color: var(--link-deep); font-size: 0.92rem; }

/* ---------- Compatibility: specification matrix table ---------- */
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; font-size: 0.97rem; }
.matrix caption { text-align: left; font: 500 0.78rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-bottom: 0.7rem; }
.matrix th, .matrix td { padding: 0.95rem 1.1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--line-soft); }
.matrix thead th { border-top: 0; background: var(--ink); color: #fff; font: 500 0.75rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; }
.matrix tbody th { width: 22%; font-weight: 600; background: var(--paper); }
.matrix td:nth-child(2) { width: 34%; }
.matrix .chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.matrix .chip { font-size: 0.74rem; text-transform: none; letter-spacing: 0.02em; }
.status { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.status--yes::before { background: #3f8f5a; }
.status--no::before { background: var(--brand); }
.status--check::before { background: var(--highlight); }
.matrix__note { margin-top: 1rem; font-size: 0.92rem; color: var(--muted); max-width: 80ch; }

/* ---------- Troubleshooting: diagnostic problem/solution rows ---------- */
.diag { border-top: 2px solid var(--ink); }
.diag__row { display: grid; grid-template-columns: 5.5rem minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1.5rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); transition: background-color 0.2s; }
.diag__row:hover { background: rgba(255, 255, 255, 0.6); }
.diag__code { font: 600 0.8rem var(--font-mono); color: var(--brand-deep); padding-top: 0.2rem; }
.diag__problem { font-weight: 600; font-size: 1.02rem; }
.diag__fix { color: var(--ink-2); font-size: 0.97rem; }
.diag__fix p { margin: 0; }

/* ---------- Release information: version panel + changelog ---------- */
.release { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.vpanel { background: var(--ink); color: #e3f5ff; border-radius: var(--r-lg); padding: clamp(1.5rem, 3vw, 2.2rem); position: relative; overflow: hidden; }
.vpanel::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 50%; box-shadow: 0 0 0 26px rgba(255, 255, 255, 0.03); }
.vpanel h3 { color: #fff; }
.vpanel__ver { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.4rem); line-height: 1; color: #a9d0ff; letter-spacing: -0.03em; margin: 0.3rem 0 1.2rem; }
.vpanel dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.55rem 1.2rem; font-size: 0.95rem; }
.vpanel dt { font: 500 0.74rem/1.7 var(--font-mono); letter-spacing: 0.07em; text-transform: uppercase; color: #b4cce9; }
.vpanel dd { margin: 0; color: #fff; }
.vpanel__note { margin: 1.3rem 0 0; font-size: 0.88rem; color: #d3e4f7; }
.changelog { list-style: none; margin: 0; padding: 0; position: relative; }
.changelog::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.changelog li { position: relative; padding: 0 0 1.5rem 2.2rem; }
.changelog li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; background: var(--surface); border: 2px solid var(--link); border-radius: 3px; transform: rotate(45deg) scale(0.85); }
.changelog li:first-child::before { background: var(--highlight); border-color: var(--brand-deep); }
.changelog__meta { font: 500 0.76rem var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.changelog h3 { margin: 0.15rem 0 0.35rem; font-size: 1.12rem; }
.changelog p { margin: 0; font-size: 0.96rem; color: var(--ink-2); }

/* ---------- Download: wide workshop tray ---------- */
.download { padding: clamp(3rem, 6vw, 5rem) 0; }
.tray {
  position: relative; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.6rem, 4vw, 3.2rem); border-radius: 20px; border: 2px solid var(--ink);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--surface);
  box-shadow: 10px 10px 0 var(--brand-soft);
}
.tray__visual img { width: 100%; max-width: 420px; margin-inline: auto; }
.tray h2 { margin-bottom: 0.4rem; }
.tray__file { margin: 1.2rem 0 1.4rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); }
.tray__file div { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); }
.tray__file div:nth-child(odd) { border-right: 1px solid var(--line); }
.tray__file div:nth-last-child(-n+2) { border-bottom: 0; }
.tray__file dt { font: 500 0.7rem var(--font-mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.tray__file dd { margin: 0.1rem 0 0; font-weight: 600; font-size: 0.95rem; word-break: break-word; }
.tray__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.tray__note { margin: 1.2rem 0 0; padding-top: 1rem; border-top: 1px dashed var(--line); font-size: 0.9rem; color: var(--muted); }
.tray__match { margin-top: 1rem; padding: 0.85rem 1rem; border-left: 3px solid var(--highlight); background: var(--highlight-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: 0.93rem; color: #17458f; }

/* ---------- Guides preview: highlighted setup guide + manual list ---------- */
.guides { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.guide-lead { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform 0.25s var(--ease-out), box-shadow 0.25s; }
.guide-lead:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); color: inherit; }
.guide-lead img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 1px solid var(--line); }
.guide-lead__body { padding: 1.4rem 1.5rem 1.6rem; }
.guide-lead h3 { font-size: 1.45rem; margin: 0.45rem 0 0.5rem; }
.guide-lead p { color: var(--ink-2); margin: 0; }
.guide-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.guide-list li { border-bottom: 1px solid var(--line); }
.guide-list a { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: center; padding: 0.95rem 0; text-decoration: none; color: var(--ink); transition: padding-left 0.2s var(--ease-out); }
.guide-list a:hover { padding-left: 6px; color: var(--ink); }
.guide-list img { width: 96px; height: 60px; object-fit: cover; border-radius: var(--r-xs); border: 1px solid var(--line); }
.guide-list strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.guide-list small { font: 500 0.72rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.guides__more { margin-top: 1.4rem; }
.tag { font: 500 0.72rem var(--font-mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--brand-deep); }

/* ---------- Use cases: typographic editorial list (no cards) ---------- */
.uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(2rem, 5vw, 4.5rem); counter-reset: use; }
.uses li { counter-increment: use; padding: 1.4rem 0 1.4rem 3.6rem; border-top: 1px solid var(--line); position: relative; }
.uses li::before { content: counter(use, decimal-leading-zero); position: absolute; left: 0; top: 1.25rem; font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--brand); }
.uses h3 { font-size: 1.18rem; margin-bottom: 0.3rem; }
.uses p { margin: 0; color: var(--ink-2); }

/* ---------- Safety notice: full-width checklist band ---------- */
.safety { background: var(--link-soft); border-block: 1px solid #b9d4f7; }
.safety__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.safety .part { color: var(--link-deep); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 0.8rem; align-items: start; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid #b9d4f7; border-radius: var(--r-sm); }
.checks li::before { content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 4px; background: var(--link) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.checks strong { display: block; }
.checks span { font-size: 0.95rem; color: var(--ink-2); }

/* ---------- Pros and cons: balanced comparison ---------- */
.versus { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0 clamp(1.5rem, 3vw, 2.5rem); }
.versus__col h3 { display: flex; align-items: center; gap: 0.6rem; padding-bottom: 0.8rem; border-bottom: 2px solid currentColor; }
.versus__col--pro h3 { color: #2f6e45; }
.versus__col--con h3 { color: var(--brand-deep); }
.versus__col ul { list-style: none; padding: 0; margin: 0; }
.versus__col li { padding: 0.85rem 0 0.85rem 1.8rem; border-bottom: 1px solid var(--line); position: relative; color: var(--ink-2); }
.versus__col li strong { color: var(--ink); }
.versus__col--pro li::before, .versus__col--con li::before { position: absolute; left: 0; top: 0.8rem; font: 600 1rem var(--font-mono); }
.versus__col--pro li::before { content: "+"; color: #2f6e45; }
.versus__col--con li::before { content: "\2212"; color: var(--brand); }
.versus__rule { width: 1px; background: repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 12px); }

/* ---------- FAQ: two workshop-manual groupings ---------- */
.faq__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2.25rem); align-items: start; }
.manual { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.manual__head { display: flex; align-items: center; gap: 0.9rem; padding: 1.1rem 1.3rem; border-bottom: 2px solid var(--ink); }
.manual__badge { flex: none; width: 40px; height: 40px; display: grid; place-items: center; background: var(--link); color: #fff; border-radius: var(--r-xs); font: 600 1rem var(--font-mono); }
.manual__head h3 { margin: 0; font-size: 1.15rem; }
.manual__head p { margin: 0; font-size: 0.85rem; color: var(--muted); }
.qa { border-bottom: 1px solid var(--line-soft); }
.qa:last-child { border-bottom: 0; }
.qa h4 { margin: 0; font-family: var(--font-body); font-size: 1rem; letter-spacing: 0; }
.qa__btn { width: 100%; display: grid; grid-template-columns: 3.1rem 1fr 22px; align-items: start; gap: 0.2rem; padding: 0.95rem 1.3rem 0.95rem 1rem; background: none; border: 0; text-align: left; font: 600 1rem/1.45 var(--font-body); color: var(--ink); cursor: pointer; transition: background-color 0.2s; }
.qa__btn:hover { background: var(--paper); }
.qa__num { font: 500 0.76rem/1.9 var(--font-mono); color: var(--muted); }
.qa__icon { position: relative; width: 18px; height: 18px; margin-top: 3px; border: 1.5px solid var(--line); border-radius: 3px; transition: transform 0.3s var(--ease-out), border-color 0.2s, background-color 0.2s; }
.qa__icon::before, .qa__icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%); transition: transform 0.3s; }
.qa__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.qa__btn[aria-expanded="true"] { background: var(--paper); }
.qa__btn[aria-expanded="true"] .qa__num { color: var(--brand-deep); }
.qa__btn[aria-expanded="true"] .qa__icon { background: var(--link); border-color: var(--link); }
.qa__btn[aria-expanded="true"] .qa__icon::before, .qa__btn[aria-expanded="true"] .qa__icon::after { background: #fff; }
.qa__btn[aria-expanded="true"] .qa__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.qa__panel { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.3s var(--ease-out); }
.qa__panel[hidden] { display: none; }
.js .qa__panel { display: grid; grid-template-rows: 0fr; }
.js .qa__panel.is-open { grid-template-rows: 1fr; }
.js .qa__panel[hidden] { display: none; }
.qa__inner { overflow: hidden; }
.qa__inner p { margin: 0; padding: 0 1.3rem 1.1rem 4.1rem; color: var(--ink-2); font-size: 0.97rem; }

/* ==========================================================================
   Footer — bright workshop ledger with measurement grid
   ========================================================================== */
#site-footer { display: block; }
.ledger { position: relative; background: var(--surface); border-top: 1px solid var(--line); padding: clamp(3rem, 6vw, 4.5rem) 0 1.5rem; margin-top: 0; }
.ledger::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 10px), repeating-linear-gradient(90deg, var(--ink-2) 0 1px, transparent 1px 50px); background-size: auto 6px, auto 10px; background-repeat: repeat-x; opacity: 0.55; }
.ledger__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 1fr); gap: 2rem 3rem; padding-bottom: 2.2rem; border-bottom: 1px dashed var(--line); }
.ledger__brand p { color: var(--muted); font-size: 0.95rem; max-width: 46ch; margin-top: 0.9rem; }
.ledger__email { font: 500 0.92rem var(--font-mono); color: var(--ink); }
.ledger h2 { font: 500 0.76rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.9rem; }
.ledger ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.ledger a { color: var(--ink-2); text-decoration: none; font-size: 0.96rem; }
.ledger a:hover { color: var(--brand-deep); }
.ledger__legal { columns: 1; }
.ledger__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem 2rem; padding-top: 1.3rem; font-size: 0.88rem; color: var(--muted); }
.ledger__bottom a { color: var(--ink); font-weight: 600; font-size: 0.88rem; }
.ledger__indie { max-width: 70ch; }

.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 46px; height: 46px; display: grid; place-items: center; background: var(--ink); color: #fff; border: 0; border-radius: var(--r-sm); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity 0.25s, transform 0.25s, visibility 0s linear 0.25s, background-color 0.2s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { background: var(--brand); }
.to-top svg { width: 20px; height: 20px; }

/* ==========================================================================
   Inner pages — page head, breadcrumb
   ========================================================================== */
.page-head { padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(1.8rem, 4vw, 2.6rem); border-bottom: 1px solid var(--line); background: linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 26px 26px, linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 26px 26px; }
.page-head h1 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); max-width: 22ch; }
.page-head .lede { margin-bottom: 0; }
.crumbs { margin-bottom: 1.1rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem; font: 500 0.78rem var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 0.3rem; color: var(--line); }
.crumbs a { color: var(--link); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Blog listing: manuals index ---------- */
.lead-manual { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 0; border: 2px solid var(--ink); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; text-decoration: none; color: inherit; box-shadow: 8px 8px 0 var(--brand-soft); transition: transform 0.25s var(--ease-out), box-shadow 0.25s; }
.lead-manual:hover { transform: translate(-2px, -2px); box-shadow: 12px 12px 0 var(--brand-soft); color: inherit; }
.lead-manual img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1200 / 630; }
.lead-manual__body { padding: clamp(1.4rem, 3vw, 2.4rem); display: flex; flex-direction: column; justify-content: center; border-left: 2px solid var(--ink); }
.lead-manual h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); margin: 0.5rem 0; }
.lead-manual p { color: var(--ink-2); }
.lead-manual .stamp { align-self: flex-start; margin-bottom: 0.4rem; }
.stamp { display: inline-block; font: 600 0.72rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-deep); border: 1.5px solid var(--brand); padding: 0.2rem 0.5rem; border-radius: 2px; transform: rotate(-1.5deg); }
.shelf { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.shelf__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--ink); padding-bottom: 0.7rem; margin-bottom: 0.4rem; }
.shelf__head h2 { margin: 0; font-size: 1.35rem; }
.shelf__head span { font: 500 0.75rem var(--font-mono); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }
.manual-row { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 1.4rem; align-items: center; padding: 1.1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.manual-row:hover { color: inherit; }
.manual-row:hover h3 { color: var(--brand-deep); }
.manual-row img { width: 200px; height: 105px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); transition: transform 0.25s var(--ease-out); }
.manual-row:hover img { transform: translateY(-3px); }
.manual-row h3 { margin: 0.2rem 0 0.3rem; font-size: 1.18rem; transition: color 0.2s; }
.manual-row p { margin: 0; color: var(--ink-2); font-size: 0.96rem; }
.manual-row__go { font: 600 0.8rem var(--font-mono); color: var(--link); white-space: nowrap; }

/* ---------- Article ---------- */
.article-head { padding: clamp(2rem, 5vw, 3.4rem) 0 0; }
.article-head h1 { font-size: clamp(1.95rem, 1.3rem + 2.3vw, 3rem); max-width: 24ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font: 500 0.78rem var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin: 0.6rem 0 1.8rem; }
.article-hero { margin: 0 0 clamp(2rem, 4vw, 3rem); }
.article-hero img { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--line); aspect-ratio: 1200 / 630; object-fit: cover; background: var(--surface); }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(2rem, 5vw, 4rem); align-items: start; padding-bottom: clamp(3rem, 6vw, 5rem); }
.prose { max-width: 70ch; font-size: 1.075rem; }
.prose > p:first-child { font-size: 1.18rem; color: var(--ink); }
.prose h2 { margin-top: 2.2em; padding-top: 0.6em; border-top: 1px dashed var(--line); font-size: clamp(1.45rem, 1.2rem + 0.8vw, 1.85rem); scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3 { margin-top: 1.6em; scroll-margin-top: calc(var(--header-h) + 20px); }
.prose p, .prose li { color: var(--ink-2); }
.prose li { margin-bottom: 0.4em; }
.prose ol, .prose ul { padding-left: 1.4em; }
.prose a { font-weight: 500; }
.callout { margin: 1.6em 0; padding: 1rem 1.2rem; border-left: 4px solid var(--link); background: var(--link-soft); border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.callout p { margin: 0; color: var(--link-deep); }
.callout--warn { border-left-color: var(--brand); background: var(--brand-soft); }
.callout--warn p { color: var(--brand-deep); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.96rem; background: var(--surface); border: 1px solid var(--line); }
.prose th, .prose td { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.prose thead th { background: var(--ink); color: #fff; font: 500 0.75rem var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Sidebar — workshop tool pegboard */
.sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 1.2rem; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.2rem; }
.side-box h2 { font: 500 0.74rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.8rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); }
.side-box ol, .side-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.toc a { display: block; padding: 0.35rem 0 0.35rem 0.8rem; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 0.93rem; line-height: 1.4; transition: border-color 0.2s, color 0.2s; }
.toc a:hover, .toc a.is-active { border-left-color: var(--brand); color: var(--ink); }
.side-facts dl { margin: 0; display: grid; gap: 0.6rem; }
.side-facts dt { font: 500 0.7rem var(--font-mono); letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.side-facts dd { margin: 0; font-size: 0.93rem; font-weight: 500; }
.side-dl { background: var(--ink); color: #e3f5ff; border-color: var(--ink); }
.side-dl h2 { color: #b4cce9; border-bottom-color: rgba(255, 255, 255, 0.15); }
.side-dl p { font-size: 0.92rem; }
.side-dl .btn { width: 100%; }
.side-related a { display: block; padding: 0.5rem 0; border-bottom: 1px dashed var(--line-soft); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; line-height: 1.4; }
.side-related li:last-child a { border-bottom: 0; }
.side-related a:hover { color: var(--brand-deep); }

.related { padding: clamp(3rem, 6vw, 4.5rem) 0; background: var(--paper-2); border-top: 1px solid var(--line); }
.related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.rel-card { display: block; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: transform 0.25s var(--ease-out), box-shadow 0.25s; }
.rel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); color: inherit; }
.rel-card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 1px solid var(--line); }
.rel-card div { padding: 1rem 1.1rem 1.2rem; }
.rel-card h3 { font-size: 1.08rem; margin: 0.3rem 0 0; }

/* ---------- Supporting pages ---------- */
.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3.5rem, 6vw, 5rem); }
.doc-index { position: sticky; top: calc(var(--header-h) + 20px); border-top: 2px solid var(--ink); padding-top: 0.8rem; }
.doc-index h2 { font: 500 0.74rem var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem; }
.doc-index ol { margin: 0; padding-left: 1.3em; font-size: 0.93rem; }
.doc-index a { color: var(--ink-2); text-decoration: none; }
.doc-index a:hover { color: var(--brand-deep); }
.doc { max-width: 72ch; }
.doc h2 { font-size: 1.45rem; margin-top: 2em; scroll-margin-top: calc(var(--header-h) + 20px); }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { color: var(--ink-2); }
.doc .updated { font: 500 0.78rem var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.notices { list-style: none; margin: 0; padding: 0; counter-reset: n; display: grid; gap: 1rem; }
.notices li { counter-increment: n; display: grid; grid-template-columns: 3.2rem 1fr; gap: 1rem; padding: 1.3rem 1.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.notices li::before { content: counter(n, decimal-leading-zero); font: 600 1.4rem/1 var(--font-display); color: var(--brand); }
.notices h2 { font-size: 1.2rem; margin: 0 0 0.4rem; }
.notices p { margin: 0; color: var(--ink-2); }

.clauses { counter-reset: c; }
.clauses section { counter-increment: c; position: relative; padding: 1.5rem 0 1.5rem 4.2rem; border-top: 1px solid var(--line); }
.clauses section::before { content: "\00A7 " counter(c); position: absolute; left: 0; top: 1.65rem; font: 600 0.9rem var(--font-mono); color: var(--brand-deep); }
.clauses h2 { font-size: 1.25rem; margin: 0 0 0.5rem; scroll-margin-top: calc(var(--header-h) + 20px); }
.clauses p { color: var(--ink-2); }

.about-page { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(2rem, 5vw, 4.5rem); padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3.5rem, 6vw, 5rem); align-items: start; }
.about-page .prose { max-width: none; }
.ledger-card { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-md); box-shadow: 8px 8px 0 var(--link-soft); }
.ledger-card h2 { margin: 0; padding: 1rem 1.3rem; border-bottom: 2px solid var(--ink); font-size: 1.15rem; }
.ledger-card ul { list-style: none; margin: 0; padding: 0; }
.ledger-card li { padding: 0.85rem 1.3rem; border-bottom: 1px dashed var(--line); font-size: 0.96rem; color: var(--ink-2); }
.ledger-card li:last-child { border-bottom: 0; }
.ledger-card li strong { color: var(--ink); display: block; }

.contact-wrap { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4rem); padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3.5rem, 6vw, 5rem); align-items: start; }
.mailplate { padding: clamp(1.5rem, 4vw, 2.4rem); background: var(--ink); color: #e3f5ff; border-radius: var(--r-lg); }
.mailplate h2 { color: #fff; font-size: 1.4rem; }
.mailplate__addr { display: block; margin: 1rem 0; padding: 1rem 1.1rem; background: rgba(255, 255, 255, 0.06); border: 1px dashed rgba(255, 255, 255, 0.3); border-radius: var(--r-sm); font: 500 clamp(1rem, 0.9rem + 0.6vw, 1.3rem) var(--font-mono); color: #a9d0ff; word-break: break-all; user-select: all; }
.mailplate p { color: #d3e4f7; font-size: 0.95rem; }
.reasons { list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 2px solid var(--ink); }
.reasons li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.reasons strong { display: block; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.reasons span { color: var(--ink-2); font-size: 0.96rem; }

/* ==========================================================================
   Scroll reveal (only hides when JS is running and motion is allowed)
   ========================================================================== */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease-out), transform 0.7s var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: 0.08s; }
.js .reveal-d2 { transition-delay: 0.16s; }
.js .reveal-d3 { transition-delay: 0.24s; }

/* Animation intensity: BALANCED is the default. data-motion="subtle" / "expressive" on <html> adjusts strength only. */
.js[data-motion="subtle"] .reveal { transform: translateY(8px); }
.js[data-motion="expressive"] .reveal { transform: translateY(28px) scale(0.99); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .assembly .part-mod, .js .assembly .part-core, .js .assembly .part-rail { opacity: 1; transform: none; }
  .js .assembly .wire { stroke-dashoffset: 0; }
  .js .assembly .seat { transform: none; fill: var(--highlight); }
  .js .steprail__track { transform: scaleX(1); }
  .js .socket-diagram .sock { opacity: 1; }
  .js .socket-diagram .sock-line { stroke-dashoffset: 0; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .features__layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .features__diagram { grid-column: 1 / -1; order: -1; max-width: 460px; margin-inline: auto; }
  .ledger__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__visual { max-width: 560px; margin-inline: auto; width: 100%; }
  .about__grid, .release, .safety__grid, .guides, .contact-wrap, .about-page { grid-template-columns: minmax(0, 1fr); }
  .spec { position: static; }
  .workorder { grid-template-columns: minmax(0, 1fr); }
  .track__label { flex-wrap: wrap; }
  .track__label span { white-space: normal; }
  .track + .track { border-left: 0; border-top: 1px dashed var(--line); }
  .tray { grid-template-columns: minmax(0, 1fr); box-shadow: 6px 6px 0 var(--brand-soft); }
  .tray__visual { order: 2; }
  .tray__visual img { max-width: 320px; }
  .head--split { grid-template-columns: minmax(0, 1fr); }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar .toc-box { grid-column: 1 / -1; order: -1; }
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-index { position: static; }
  .lead-manual { grid-template-columns: minmax(0, 1fr); }
  .lead-manual__body { border-left: 0; border-top: 2px solid var(--ink); }
  .related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related__grid > :nth-child(3) { display: none; }
}
@media (max-width: 820px) {
  .steprail { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steprail::before, .steprail__track { top: 28px; bottom: 28px; left: 27px; right: auto; width: 2px; height: auto; }
  .steprail__track { transform-origin: top; }
  .js .steprail__track { transform: scaleY(0); }
  .js .steprail.is-in .steprail__track { transform: scaleY(1); }
  .step { display: grid; grid-template-columns: 56px 1fr; gap: 0 1.1rem; padding-bottom: 1.6rem; }
  .step h3 { margin-top: 0.6rem; }
  .step__node { grid-row: span 3; }
  .faq__grid, .versus { grid-template-columns: minmax(0, 1fr); }
  .versus__rule { display: none; }
  .versus__col--con { margin-top: 2rem; }
  .diag__row { grid-template-columns: 4rem 1fr; gap: 0.4rem 1rem; }
  .diag__fix { grid-column: 2; }
  .uses { grid-template-columns: minmax(0, 1fr); }
  .ledger__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ledger__brand { grid-column: 1 / -1; }
  .manual-row { grid-template-columns: 140px minmax(0, 1fr); }
  .manual-row img { width: 140px; height: 74px; }
  .manual-row__go { display: none; }
  /* Matrix becomes stacked rows */
  .matrix thead { display: none; }
  .matrix caption { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .matrix, .matrix tbody, .matrix tr, .matrix th, .matrix td { display: block; width: 100% !important; }
  .matrix tr { border-top: 1px solid var(--line); }
  .matrix tr:first-child { border-top: 0; }
  .matrix tbody th { border-top: 0; padding-bottom: 0.4rem; }
  .matrix td { border-top: 0; padding-top: 0.3rem; }
  .matrix td[data-label]::before { content: attr(data-label); display: block; font: 500 0.68rem var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .wrap, .wrap--narrow { width: min(100% - 2rem, var(--wrap)); }
  .brand__tag { display: none; }
  .hero__actions .btn { width: 100%; }
  .hero__facts { grid-template-columns: minmax(0, 1fr); }
  .hero__facts div:nth-child(odd) { border-right: 0; }
  .hero__facts div:nth-child(even) { padding-left: 0; }
  .features__layout { grid-template-columns: minmax(0, 1fr); }
  .tray__file { grid-template-columns: minmax(0, 1fr); }
  .tray__file div:nth-child(odd) { border-right: 0; }
  .tray__file div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .tray__actions .btn { width: 100%; }
  .spec__row { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .qa__btn { grid-template-columns: 2.6rem 1fr 20px; padding-right: 1rem; padding-left: 0.85rem; }
  .qa__inner p { padding: 0 1rem 1rem 0.85rem; }
  .sidebar { grid-template-columns: minmax(0, 1fr); }
  .related__grid { grid-template-columns: minmax(0, 1fr); }
  .related__grid > :nth-child(3) { display: block; }
  .ledger__grid { grid-template-columns: minmax(0, 1fr); }
  .ledger__bottom { flex-direction: column; }
  .manual-row { grid-template-columns: minmax(0, 1fr); gap: 0.7rem; }
  .manual-row img { width: 100%; height: auto; aspect-ratio: 1200 / 630; }
  .guide-list a { grid-template-columns: 78px 1fr; }
  .guide-list img { width: 78px; height: 50px; }
  .notices li { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .clauses section { padding-left: 0; padding-top: 2.6rem; }
  .clauses section::before { top: 1.2rem; }
  .uses li { padding-left: 3rem; }
  .uses li::before { font-size: 1.4rem; }
}
@media (max-width: 380px) {
  .brand__name { font-size: 1.05rem; }
  .menu-btn__label { display: none; }
  h1 { font-size: 2rem; }
}

@media print {
  #site-header, .to-top, .sidebar, .related { display: none !important; }
  body { background: #fff; }
}
