/* Hardened Layer site styles. Tokens come from brand/BRAND.md and the
   approved mockups in website/site-mockups/. Dark only, by brand decision. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #0A0C0F;
  --surface: #0D1014;
  --raised: #12161B;
  --line: #1C2128;
  --line-2: #2A313B;
  --line-3: #3A4452;
  --text: #E6E9EE;
  --text-2: #A7B0BC;
  --text-3: #8F99A7;
  --accent: #4D8EFF;
  --accent-ink: #8DB6FF;
  --button: #2F6FEB;
  --button-hover: #2560D4;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --wrap: 1200px;
  /* Rack Builder warning states: a mount too deep for the chosen frame. */
  --warn-ink: #E8A090;
  --warn-bg: #2A1714;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--text); text-decoration-color: var(--line-3); text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 64px); letter-spacing: -0.035em; line-height: 1.02; }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: 20px; letter-spacing: -0.01em; }
p { margin: 0; }
.mono, code, kbd { font-family: var(--mono); }
code { font-size: 0.92em; color: var(--text); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.muted { color: var(--text-2); }
.quiet { color: var(--text-3); }
.small { font-size: 14px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip { position: absolute; left: 16px; top: -48px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 4px; z-index: 10; }
.skip:focus { top: 12px; }

/* Header */
.site-header { position: relative; z-index: 2; border-bottom: 1px solid var(--line); }
.site-header.over-hero { border-bottom: 0; }
.site-header .wrap { display: flex; align-items: center; gap: 36px; min-height: 72px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; }
.wordmark svg { flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: 14px; flex: 1 1 auto; }
.nav a { color: var(--text-2); text-decoration: none; padding: 10px 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.menu-toggle { display: none; }

/* Buttons. One primary per view; everything else is the outline style or a text link. */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 6px;
  font: inherit; font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; color: var(--text);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.button:hover { border-color: var(--text-3); color: var(--text); background: var(--raised); }
.button.primary { background: var(--button); border-color: var(--button); color: #FFFFFF; }
.button.primary:hover { background: var(--button-hover); border-color: var(--button-hover); }
.button .arrow { font-family: var(--mono); transition: transform .15s ease; }
.button:hover .arrow { transform: translateX(3px); }
.button[aria-disabled="true"] { color: var(--text-3); border-style: dashed; cursor: not-allowed; background: transparent; }
.text-link { color: var(--text-2); }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero .grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(77,142,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77,142,255,.06) 1px, transparent 1px);
  background-size: 120px 120px;
}
.hero .drafting { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; padding: 64px 0 24px; text-align: center; }
.hero h1 { max-width: 880px; margin: 0 auto; }
.hero .lede { max-width: 640px; margin: 24px auto 0; font-size: 19px; color: var(--text-2); }
.hero .actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px; margin-top: 32px; }
.availability { max-width: 760px; margin: 28px auto 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; text-align: left; font-size: 14px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 18px; }
.availability dt { font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; }
.availability dd { margin: 0; }
.hero-story { max-width: 640px; margin: 20px auto 0; font-size: 15px; color: var(--text-3); }
.hero-render { margin: 40px auto 0; max-width: 1200px; }
.hero-render img { display: block; width: 100%; height: auto; }
/* Label columns line up under each build in the render (spans from site/content/hero.json). */
.builds { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: 21.3fr 24.2fr 49fr 5.5fr; gap: 0 12px; }
.builds li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.builds .build-name { color: var(--text); font-weight: 600; font-size: 15px; }
.builds .build-pns { font-size: 13px; }
.builds .mono { color: var(--accent-ink); font-size: 13px; }
.hero-render figcaption, .shelves figcaption { margin: 22px auto 0; max-width: 760px; font-size: 13px; color: var(--text-3); text-align: center; }
.shelves figcaption { text-align: left; max-width: none; border-top: 1px solid var(--line); padding-top: 14px; }
.hero-render figcaption .tag, .shelves figcaption .tag { margin-right: 6px; }
.shelves { margin: 32px 0 0; }
.shelves-drawing { display: block; width: 100%; height: auto; }
.shelves-drawing .lead { fill: none; stroke: var(--accent); stroke-width: 1; opacity: .85; }
.shelves-drawing .dot { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; }
.shelves-drawing .role { font-family: var(--sans); font-weight: 600; font-size: 19px; fill: var(--text); }
.shelves-drawing .pn { font-family: var(--mono); font-size: 16px; fill: var(--accent-ink); }
.shelves-drawing .nm { font-family: var(--sans); font-size: 16px; fill: var(--text-2); }
.shelves-phone, .shelf-list { display: none; }
.shelves-drawing a { fill: var(--accent-ink); text-decoration: underline; }
.shelves-drawing a:hover, .shelves-drawing a:hover tspan { fill: var(--text); }
@media (max-width: 1200px) {
  .shelves-drawing { display: none; }
  .shelves-phone { display: block; width: 100%; max-width: 640px; height: auto; margin: 0 auto; }
  .shelf-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 32px; list-style: none; margin: 16px 0 0; padding: 0; }
  .shelf-list h3 { font-size: 15px; margin: 18px 0 4px; }
  .shelf-list ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  .shelf-list li li { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text); }
  .shelf-list li li small { display: block; color: var(--text-2); font-size: 13px; }
  .shelf-list .mono { color: var(--accent-ink); font-size: 13px; white-space: nowrap; }
}

/* Drafting animation: lines draw, hold, fade and redraw on a 22 s cycle. */
.d { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 22s cubic-bezier(.6,0,.2,1) infinite; }
.h { stroke-dasharray: 1; stroke-dashoffset: 1; animation: once 2.4s cubic-bezier(.6,0,.2,1) forwards; }
.f { opacity: 0; animation: fade 1.2s ease forwards; }
@keyframes draw { 0% { stroke-dashoffset: 1; opacity: 0 } 6% { opacity: 1 } 38% { stroke-dashoffset: 0 } 82% { stroke-dashoffset: 0; opacity: 1 } 100% { stroke-dashoffset: 0; opacity: 0 } }
@keyframes once { to { stroke-dashoffset: 0 } }
@keyframes fade { to { opacity: 1 } }
.dly-0 { animation-delay: 0s } .dly-p4 { animation-delay: .4s } .dly-p5 { animation-delay: .5s } .dly-p7 { animation-delay: .7s }
.dly-p8 { animation-delay: .8s } .dly-p9 { animation-delay: .9s } .dly-1 { animation-delay: 1s } .dly-1p1 { animation-delay: 1.1s }
.dly-1p2 { animation-delay: 1.2s } .dly-1p3 { animation-delay: 1.3s } .dly-1p4 { animation-delay: 1.4s } .dly-1p5 { animation-delay: 1.5s }
.dly-1p6 { animation-delay: 1.6s } .dly-2 { animation-delay: 2s } .dly-3p2 { animation-delay: 3.2s } .dly-4 { animation-delay: 4s }
.dly-5 { animation-delay: 5s } .dly-6p5 { animation-delay: 6.5s } .dly-7p5 { animation-delay: 7.5s } .dly-8p5 { animation-delay: 8.5s }
.dly-10 { animation-delay: 10s }
@media (prefers-reduced-motion: reduce) {
  .d, .h { animation: none; stroke-dashoffset: 0; }
  .f { animation: none; opacity: 1; }
  .button .arrow, .button { transition: none; }
}

/* Sections */
.section { padding: 112px 0 0; }
.section-head { max-width: 680px; }
.section-head p { margin-top: 18px; font-size: 17px; color: var(--text-2); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: center; }
.split.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.figure figcaption { font-size: 13px; color: var(--text-3); padding: 10px 14px; border-top: 1px solid var(--line); }
.facts { margin: 28px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 0; border-top: 1px solid var(--line); font-size: 15px; }
.facts dt, .facts dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--text-3); padding-right: 28px; }
.facts dd { font-family: var(--mono); font-size: 14px; }
.prose p + p { margin-top: 14px; }
.prose p { color: var(--text-2); font-size: 17px; max-width: 640px; }
.after-link { margin-top: 26px; }

/* Configurator */
.configurator { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 32px; }
.config-controls { display: flex; flex-direction: column; gap: 24px; }
.config-controls fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.config-controls legend { font-size: 13px; color: var(--text-3); margin-bottom: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 15px; border-radius: 6px; font: inherit; font-size: 14px; cursor: pointer; background: transparent; color: var(--text-2); border: 1px solid var(--line-2); }
.chip:hover { color: var(--text); border-color: var(--text-3); }
.chip[aria-pressed="true"], .chip[aria-checked="true"] { background: #14223D; color: var(--text); border-color: var(--accent); }
.chip:disabled { color: #5E6775; border-color: var(--line); cursor: not-allowed; background: transparent; }
.config-preview { display: flex; align-items: center; justify-content: center; min-height: 340px; padding: 16px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.rack { display: flex; flex-direction: column; }
.rack-top, .rack-plinth { background: #161B22; border: 1px solid var(--line-3); }
.rack-top { height: 12px; border-radius: 2px 2px 0 0; }
.rack-plinth { height: 16px; }
.rack-row { display: flex; align-items: stretch; }
.rack-side { width: 8px; background: var(--raised); border: 1px solid var(--line-3); }
.rack-bay { width: 96px; display: flex; flex-direction: column; gap: 3px; padding: 4px; background: #080A0D; border: 1px solid var(--line-3); }
.rack-bay .label { margin: 2px 0 0; font-family: var(--mono); font-size: 11px; color: var(--text-3); text-align: center; }
.rack-door { border-radius: 2px; border: 1px solid #2F3844; height: 104px; }
.rack-door.tall { height: 211px; }
.rack-door.mesh { background-color: #0F1318; background-image: radial-gradient(#3A4452 1.1px, transparent 1.4px); background-size: 7px 7px; }
.rack-door.solid { background: #161B22; }
.rack-door.none { background: #0B0E12; background-image: repeating-linear-gradient(180deg, var(--line) 0 1px, transparent 1px 17px); }
.rack-vcm { width: 16px; background: #0B0E12; border: 1px solid var(--line-3); background-image: repeating-linear-gradient(180deg, var(--line-2) 0 3px, transparent 3px 16px); }
.config-out .kit { font-family: var(--mono); font-size: 13px; color: var(--accent-ink); }
.config-out .summary { margin-top: 6px; font-size: 19px; font-weight: 500; }
.bom { margin-top: 18px; border-top: 1px solid var(--line); width: 100%; border-collapse: collapse; font-size: 14px; }
.bom td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.bom td:first-child { font-family: var(--mono); color: var(--text-3); white-space: nowrap; width: 3.2em; }
.bom td.pn { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.bom td.state { font-size: 13px; color: var(--text-3); white-space: nowrap; text-align: right; padding-right: 0; }
.bom .name { color: var(--text-2); }
.config-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 20px; }
.config-note { margin-top: 12px; font-size: 13px; color: var(--text-3); }

/* Status tags */
.tag { display: inline-block; font-family: var(--mono); font-size: 12px; line-height: 1; padding: 6px 8px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; }
.tag.prototype { border-color: #24406E; color: var(--accent-ink); }
.tag.proposed { border-style: dashed; color: var(--text-3); }
.tag.retired { color: var(--text-3); text-decoration: line-through; }
.tag.soon { border-color: var(--line-3); color: var(--text); border-style: dashed; }

/* Device list on the home page */
.makers { margin-top: 40px; columns: 3 260px; column-gap: 48px; }
.maker { break-inside: avoid; padding: 0 0 22px; }
.maker h3 { font-size: 15px; font-weight: 500; color: var(--text); letter-spacing: 0; }
.maker ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; }
.maker li { padding: 3px 0; }
.maker a { color: var(--text-2); text-decoration: none; }
.maker a:hover { color: var(--accent-ink); }
.maker .u { font-family: var(--mono); font-size: 12px; color: var(--text-3); margin-left: 6px; }
.fine { margin-top: 18px; font-size: 13px; color: var(--text-3); max-width: 760px; }

/* Status definitions */
.statuses { margin: 32px 0 0; display: grid; grid-template-columns: max-content 1fr; border-top: 1px solid var(--line); }
.statuses dt, .statuses dd { margin: 0; padding: 16px 0; border-bottom: 1px solid var(--line); }
.statuses dt { padding-right: 32px; }
.statuses dd { color: var(--text-2); font-size: 15px; }

/* Release notes */
.notes { margin-top: 24px; border-top: 1px solid var(--line); }
.note { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.note time { font-family: var(--mono); font-size: 13px; color: var(--text-3); padding-top: 2px; }
.note p { color: var(--text-2); max-width: 820px; }
.head-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; }

.band { margin-top: 112px; padding: 32px 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.band .text { max-width: 680px; }
.band h2 { font-size: 22px; letter-spacing: -0.01em; }
.band p { margin-top: 8px; font-size: 15px; color: var(--text-2); }

/* Page header for inner pages */
.page-head { padding: 56px 0 8px; }
.page-head p { margin-top: 16px; max-width: 720px; font-size: 17px; color: var(--text-2); }
.crumbs { font-size: 13px; color: var(--text-3); padding-top: 22px; }
.crumbs a { color: var(--text-3); }
.crumbs span[aria-hidden] { margin: 0 8px; }

/* Catalog */
.filters { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: end; margin-top: 32px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-3); }
.field input, .field select { min-height: 44px; min-width: 220px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; }
.field input::placeholder { color: var(--text-3); }
.result-count { font-size: 14px; color: var(--text-3); margin-left: auto; }
.catalog-group { padding-top: 56px; }
.catalog-group h2 { font-size: 26px; }
.catalog-group > p { margin-top: 8px; color: var(--text-2); font-size: 15px; max-width: 760px; }
/* Catalog grid: one card per part number, drawing on top, then number, name, status and notes. */
.part-grid { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.part-grid[hidden], .part-card[hidden] { display: none; }
.part-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; transition: border-color .15s ease; }
.part-card:hover, .part-card:focus-within { border-color: var(--line-3); }
.part-link { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.part-link:focus-visible { outline-offset: -2px; }
.part-card img, .part-card .no-thumb { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; background: var(--bg); border-bottom: 1px solid var(--line); }
.part-card .pn { margin: 14px 16px 0; font-family: var(--mono); font-size: 13px; color: var(--accent-ink); }
.part-card .name { margin: 4px 16px 0; font-size: 16px; font-weight: 500; line-height: 1.35; }
.part-link:hover .name { text-decoration: underline; text-decoration-color: var(--line-3); }
.part-card .meta { margin: 12px 16px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13px; color: var(--text-3); }
.part-card .notes { margin: 10px 16px 16px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.part-card .meta:last-child { margin-bottom: 16px; }
.part-card.retired img { filter: grayscale(1); opacity: .55; }
.part-card.retired .name { color: var(--text-2); }
.empty { padding: 28px 0; color: var(--text-2); }

/* Part page */
.part { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; padding: 32px 0 0; align-items: start; }
.part .figure img { width: 100%; }
.part > div:first-child { position: sticky; top: 24px; }
.no-results { padding: 40px 0; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; }
.part h2 { font-size: 20px; }
.part .no-image { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--text-3); font-size: 14px; }
.part-id { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.part-id .pn { font-family: var(--mono); font-size: 14px; color: var(--accent-ink); }
.part h1 { font-size: clamp(32px, 4.4vw, 46px); margin-top: 14px; letter-spacing: -0.03em; }
.part .lead { margin-top: 16px; font-size: 17px; color: var(--text-2); }
.state-box { margin-top: 26px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 15px; color: var(--text-2); }
.state-box strong { color: var(--text); font-weight: 500; }
.download { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.download .free { font-size: 15px; color: var(--text-2); }
.download .free b { color: var(--text); font-weight: 500; }
.download .small { color: var(--text-3); }
.files-list { margin: 14px 0 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.files-list li { padding: 7px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.files-list li:first-child { border-top: 1px solid var(--line); }
.part-sections { padding-top: 72px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.part-sections .wide { grid-column: 1 / -1; }
.part-sections h2 { font-size: 24px; }
.data { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.data th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 13px; padding: 9px 14px 9px 0; border-bottom: 1px solid var(--line-2); }
.data td { padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.data td.num, .data td.mono { font-family: var(--mono); font-size: 13px; }
.steps { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.steps li { counter-increment: step; padding: 16px 0 16px 44px; border-bottom: 1px solid var(--line); position: relative; font-size: 15px; color: var(--text-2); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 16px; font-family: var(--mono); font-size: 13px; color: var(--accent-ink); width: 28px; height: 28px; border: 1px solid #24406E; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
.steps b { display: block; color: var(--text); font-weight: 500; }
.callout { margin-top: 16px; padding: 14px 18px; border: 1px solid var(--line-3); border-radius: 8px; color: var(--text-2); font-size: 15px; }
.callout strong { color: var(--text); font-weight: 500; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; }
.site-footer .top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; font-size: 14px; }
.site-footer .tagline { margin-top: 10px; color: var(--text-3); }
.site-footer .footer-story { margin-top: 6px; color: var(--text-3); }
.story { align-items: start; margin-top: 48px; }
.site-footer h2 { font-size: 14px; font-weight: 500; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 10px 0 0; padding: 0; }
.site-footer li { padding: 5px 0; }
.site-footer li a { color: var(--text-3); text-decoration: none; }
.site-footer li a:hover { color: var(--text); }
.site-footer .bottom { border-top: 1px solid var(--line); padding: 22px 0 40px; font-size: 13px; color: var(--text-3); display: grid; gap: 8px; }

/* Phone and tablet */
@media (max-width: 1000px) {
  .configurator { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .config-out { grid-column: 1 / -1; }
  .split, .split.flip, .part { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .part > div:first-child { position: static; }
  .part-sections { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 20px; }
  .site-header .wrap { min-height: 64px; gap: 12px; }
  .js .menu-toggle { display: inline-flex; margin-left: auto; min-height: 44px; min-width: 44px; align-items: center; justify-content: center; border: 1px solid var(--line-2); border-radius: 6px; background: transparent; color: var(--text); font: inherit; font-size: 14px; padding: 0 12px; cursor: pointer; }
  .js .nav { display: none; flex-basis: 100%; flex-direction: column; gap: 0; padding-bottom: 12px; }
  .js .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-top: 1px solid var(--line); }
  .hero-inner { padding-top: 40px; }
  .hero .lede { font-size: 17px; }
  .hero-render { margin-top: 28px; }
  .builds { position: relative; background: var(--bg); display: block; margin-top: 16px; border-top: 1px solid var(--line); }
  .builds li { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .builds .build-name { flex-basis: 100%; }
  .hero-render figcaption { text-align: left; }
  .availability { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .availability dd { margin-bottom: 10px; }
  .section { padding-top: 80px; }
  .configurator { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .config-preview { min-height: 0; }
  .facts, .statuses { grid-template-columns: minmax(0, 1fr); }
  .facts dt, .statuses dt { border-bottom: 0; padding-bottom: 0; }
  .note { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .site-footer .top { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .result-count { margin-left: 0; }
  .field, .field input, .field select { width: 100%; min-width: 0; }
  /* Catalog grid: two narrow columns on phones; data tables become stacked rows. */
  .part-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .part-card .pn { margin: 10px 10px 0; font-size: 11.5px; overflow-wrap: anywhere; }
  .part-card .name { margin: 3px 10px 0; font-size: 14px; }
  .part-card .meta { margin: 8px 10px 0; gap: 6px; font-size: 12px; }
  .part-card .meta .tag { font-size: 11px; padding: 5px 6px; }
  .part-card .notes { margin: 8px 10px 12px; font-size: 12px; }
  .part-card .meta:last-child { margin-bottom: 12px; }
  .data.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data.stack, .data.stack tbody, .data.stack tr, .data.stack td { display: block; width: 100%; }
  .data.stack tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .data.stack td { border: 0; padding: 2px 0; }
  .data.stack td[data-label]::before { content: attr(data-label) ": "; color: var(--text-3); font-family: var(--sans); }
  .data.stack td:first-child { color: var(--text); }
  .bom td.state { display: none; }
  .band { padding: 24px 20px; }
}
@media (max-width: 380px) {
  .rack-bay { width: 76px; }
}
@media print {
  .site-header, .site-footer, .hero .drafting, .hero .grid, .configurator { display: none; }
  body { background: #FFFFFF; color: #000000; }
}
.related { margin: 14px 0 0; padding: 0; list-style: none; columns: 2 280px; column-gap: 48px; }
.related li { padding: 7px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.related .mono { margin-right: 8px; }
.related-block { margin-top: 56px; }

/* Find a Mount */
.finder { margin-top: 28px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.finder[hidden], .home-finder[hidden], .home-finder-link[hidden] { display: none; }
.finder-field { max-width: 560px; }
.finder-field input { width: 100%; font-size: 17px; min-height: 48px; }
.finder-note { margin: 14px 0 0; font-size: 15px; color: var(--text-2); }
.finder-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.finder-card { padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.finder-card .finder-name { font-size: 16px; font-weight: 500; color: var(--text); }
.finder-card a.finder-name:hover { color: var(--accent-ink); }
.finder-meta { margin: 4px 0 0; font-size: 13px; color: var(--text-3); }
.finder-mount { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--text-2); }
.finder-mount .mono { font-size: 13px; }
.finder-mount .u, .finder-mount .files { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.tag.fit { color: var(--text-2); }
.section-tight { margin-top: 48px; }
.section-tight > p { margin-top: 10px; max-width: 760px; color: var(--text-2); }
.type-list { list-style: none; margin: 16px 0 0; padding: 0; columns: 2 320px; column-gap: 48px; font-size: 14px; }
.type-list li { padding: 7px 0; border-bottom: 1px solid var(--line); break-inside: avoid; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.type-list .type-name { color: var(--text); min-width: 180px; }
.home-finder { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; }
.home-finder .finder-field { flex: 1 1 320px; }
.device-mount + .device-mount { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.device-mount .part-id .pn { text-decoration: none; }
.eyebrow { margin: 0 0 8px; font-size: 13px; color: var(--text-3); }
@media (max-width: 640px) {
  .finder-list { grid-template-columns: minmax(0, 1fr); }
  .type-list .type-name { min-width: 0; width: 100%; }
}
.nowrap { white-space: nowrap; }
.device-mount { margin-top: 18px; }

/* Rack Builder (/rack-builder/) */
.rb-proto { margin-top: 24px; max-width: 900px; }
.rb { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); grid-template-areas: "setup stage" "parts stage" "out out"; gap: 24px; align-items: start; }
.rb-panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 24px; min-width: 0; }
.rb-panel > h2 { font-size: 22px; }
.rb-setup { grid-area: setup; display: flex; flex-direction: column; gap: 18px; }
.rb-setup fieldset, .rb-filter fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rb-setup legend { font-size: 13px; color: var(--text-3); margin-bottom: 8px; padding: 0; }
.rb .chip { min-height: 40px; padding: 0 12px; }
.rb-hint { margin-top: 8px; font-size: 13px; color: var(--text-3); }
.rb-parts { grid-area: parts; }
.rb-filter { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.rb-filter .field input { min-width: 0; width: 100%; }
.rb-check { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-2); min-height: 32px; }
.rb-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.rb-pick-list { margin-top: 12px; max-height: 720px; overflow-y: auto; padding-right: 4px; }
.rb-pick-list h3 { font-size: 15px; color: var(--text-2); margin: 18px 0 8px; }
.rb-picks { list-style: none; margin: 0; padding: 0; }
.rb-pick { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rb-pick[draggable="true"] { cursor: grab; }
.rb-pick > a { display: contents; color: var(--text); text-decoration: none; }
.rb-pick img { grid-row: 1 / span 2; width: 72px; height: 36px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); background: var(--bg); }
.rb-pick .pn { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); grid-column: 2; }
.rb-pick .name { grid-column: 2; font-size: 14px; line-height: 1.35; }
.rb-pick > a:hover .name { color: var(--accent-ink); text-decoration: underline; }
.rb-pick .facts { grid-column: 2; font-size: 12px; color: var(--text-3); font-family: var(--mono); }
.rb-pick .rb-add { grid-column: 3; grid-row: 1 / span 3; min-height: 40px; padding: 0 14px; font-size: 14px; }
.rb-pick.unfit .facts { color: var(--warn-ink); }
.rb-empty { margin-top: 14px; color: var(--text-2); }
.rb-stage { grid-area: stage; display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); gap: 16px 20px; }
.rb-stage-head, .rb-stage .rb-msg, .rb-stage noscript { grid-column: 1 / -1; }
.rb-stage-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.rb-summary { font-family: var(--mono); font-size: 13px; color: var(--accent-ink); }
.rb-3d { min-width: 0; }
.rb-canvas, .rb-pick, .rb-item { -webkit-user-select: none; user-select: none; }
.rb-canvas { display: block; width: 100%; height: 560px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); touch-action: none; cursor: grab; }
.rb-canvas:active { cursor: grabbing; }
.rb-views { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.rb-nogl { padding: 18px; border: 1px dashed var(--line-3); border-radius: 8px; color: var(--text-2); }
.rb-elev { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rb-bay h3 { font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.rb-slots { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); }
.rb-slots > li { min-height: 40px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 8px; font-size: 13px; }
.rb-slots > li:last-child { border-bottom: 0; }
.rb-slot .u, .rb-item .u { font-family: var(--mono); font-size: 11px; color: var(--text-3); min-width: 3.4em; }
.rb-slot .empty { padding: 0; color: var(--text-3); }
.rb-slot.over { background: #14223D; outline: 1px dashed var(--accent); outline-offset: -2px; }
.rb-item { background: #14223D; border-left: 0; cursor: grab; justify-content: space-between; align-items: center; }
.rb-item[data-units="2"] { min-height: 80px; } .rb-item[data-units="3"] { min-height: 120px; } .rb-item[data-units="4"] { min-height: 160px; } .rb-item[data-units="5"] { min-height: 200px; }
.rb-item.selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.rb-item.bad { background: var(--warn-bg); }
.rb-item-label { display: flex; flex-direction: column; min-width: 0; padding: 6px 0; line-height: 1.3; }
.rb-item .pn { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); overflow-wrap: anywhere; }
.rb-item .name { color: var(--text-2); font-size: 12px; }
.rb-tools { display: flex; flex-wrap: nowrap; flex-shrink: 0; gap: 4px; justify-content: flex-end; }
.rb-tool { min-width: 30px; min-height: 30px; padding: 0 6px; border-radius: 4px; border: 1px solid var(--line-3); background: var(--surface); color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.rb-tool:hover { border-color: var(--text-3); }
.rb-tool:disabled { color: #5E6775; border-color: var(--line); cursor: not-allowed; }
.rb-msg { min-height: 1.6em; font-size: 14px; color: var(--text-2); }
.rb-out { grid-area: out; }
.rb-totals { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 12px 40px; }
.rb-totals dt { font-size: 13px; color: var(--text-3); }
.rb-totals dd { margin: 2px 0 0; font-size: 22px; font-weight: 500; }
.rb-warn { margin-top: 16px; padding: 12px 18px; border: 1px solid var(--line-3); border-radius: 8px; color: var(--text-2); font-size: 14px; }
.rb-warn ul { margin: 0; padding-left: 18px; }
.rb-table-wrap { margin-top: 18px; overflow-x: auto; }
.rb-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rb-table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--text-3); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-2); }
.rb-table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.rb-table td.num { font-family: var(--mono); white-space: nowrap; color: var(--text-2); }
.rb-table .rb-part .pn { display: block; font-family: var(--mono); font-size: 13px; }
.rb-table .rb-part .name { color: var(--text-2); }
.rb-table .where { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.rb-table .where .rb-tool { margin: 6px 6px 0 0; }
.rb-table .files ul { margin: 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.rb-table .files li { overflow-wrap: anywhere; }
.rb-table tr.bad td { background: var(--warn-bg); }
.rb-dl { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--accent-ink); }
.rb-note { margin-top: 6px; font-size: 12px; color: var(--text-3); }
.rb-actions .button { min-height: 44px; }
@media (max-width: 1100px) {
  .rb { grid-template-columns: minmax(0, 1fr); grid-template-areas: "setup" "stage" "parts" "out"; }
  .rb-pick-list { max-height: 520px; }
}
@media (max-width: 720px) {
  .rb-panel { padding: 18px; }
  .rb-stage { grid-template-columns: minmax(0, 1fr); }
  .rb-canvas { height: 340px; touch-action: pan-y; }
  .rb-table thead { display: none; }
  .rb-table, .rb-table tbody, .rb-table tr, .rb-table td { display: block; width: 100%; }
  .rb-table tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .rb-table td { border: 0; padding: 4px 0; }
}
@media print {
  .rb-setup, .rb-parts, .rb-stage, .rb-actions, .rb-proto ~ .rb .rb-tool { display: none !important; }
  .rb { display: block; }
  .rb-panel { border: 0; background: #FFFFFF; padding: 0; }
  .rb-out, .rb-out *, .rb-table td, .rb-table .rb-part .name, .rb-table .files ul, .rb-totals dt, .rb-warn, .fine { color: #000000 !important; background: #FFFFFF !important; }
  .rb-table tr.bad td { background: #FFFFFF; }
}
.rb-sheet { margin-top: 8px; font-size: 13px; color: var(--text-2); max-width: 520px; }
.rb-sheet summary { cursor: pointer; color: var(--accent-ink); min-height: 24px; }
.rb-sheet p { margin-top: 6px; }
/* Nine nav items: tighten the gaps between the phone menu and wide screens so the header stays one row. */
@media (min-width: 721px) and (max-width: 1240px) {
  .site-header .wrap { gap: 24px; }
  .nav { gap: 6px 18px; font-size: 13.5px; }
}

/* Printed-part orders (site/lib/shop.mjs): the order box on part and device pages, catalog card prices, /order/. */
.order-box { margin-top: 24px; padding: 18px 20px; border: 1px solid var(--line-3); border-radius: 8px; }
.order-box h2 { font-size: 18px; margin: 0 0 8px; }
.order-box p { color: var(--text-2); font-size: 15px; margin: 6px 0 0; }
.order-box b { color: var(--text); font-weight: 500; }
.order-box .order-price b { font-size: 22px; }
.order-box .fine { margin-top: 12px; }
.order-form { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.order-form .order-qty select { min-width: 90px; }
.part-card .meta .printed { color: var(--text-2); }
.wrap.narrow { max-width: 820px; }
.wrap.narrow section { margin-top: 36px; }
.wrap.narrow section p { color: var(--text-2); }
ul.plain { margin: 12px 0 0; padding-left: 20px; color: var(--text-2); display: grid; gap: 8px; }
.rb-order { margin-top: 14px; }
@media (max-width: 720px) {
  .order-form { flex-direction: column; align-items: stretch; }
  .order-form .button { width: 100%; justify-content: center; }
}
