/* Build configurator styles — loaded only by /build/configure.
 *
 * Kept out of style.css deliberately: this is ~400 lines used by exactly one
 * page, and every other page would otherwise pay for it. Tokens come from
 * style.css, which loads first.
 *
 * Surfaces here are neutral rather than the green-tinted --bg-card used
 * elsewhere on the site: the configurator puts a lot of chrome on screen at
 * once, and reserving the accent for selection state and the primary action is
 * what keeps it readable.
 */

.cfg-note {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  max-width: 640px;
  margin-top: 18px;
  line-height: 1.6;
}

.cfg-section { padding-top: 0; }

.cfg-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 60px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.cfg-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cfg-spin 0.7s linear infinite;
}

@keyframes cfg-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .cfg-spinner { animation-duration: 2.4s; }
}

.cfg-noscript,
.cfg-error {
  border: 1px solid rgba(232, 179, 60, 0.35);
  background: rgba(232, 179, 60, 0.07);
  border-radius: 14px;
  padding: 22px 24px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.cfg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 26px;
  align-items: start;
}

.cfg-main { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.cfg-rail { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* On a laptop the rail is taller than the screen; it scrolls on its own so the
   total and the button are always a wheel-turn away, not at the page's end. */
@media (min-width: 1081px) {
  .cfg-rail { max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.62) transparent; padding-right: 4px; }
  /* The rail is a flex column: without this its cards shrink to fit the max-height
     instead of the rail scrolling, and the view collapses to nothing. */
  .cfg-rail > * { flex-shrink: 0; }
}

/* ── section furniture ── */

.cfg-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 15px; }
.cfg-num { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: rgba(255, 255, 255, 0.62); }
.cfg-h2 { font-size: 20px; font-weight: 500; margin: 0; }
.cfg-note-sm { font-size: 13px; color: rgba(255, 255, 255, 0.62); }
.cfg-lead { font-size: 13.5px; color: var(--text-secondary); margin: 0 0 16px; max-width: 660px; line-height: 1.6; }

/* Each block is a <section>, and style.css pads every section on the site by
 * var(--section-py) var(--section-px) — 140px and 72px at desktop width. That
 * pushed the parts column 140px below the rail, 72px in from its edge, and put
 * over 300px between consecutive blocks. The column's own gap does the spacing. */
.cfg-block { min-width: 0; padding: 0; }

/* Credit for Open Icecat's photographs, which its licence asks for wherever
 * they appear. Shown by the script only when a part on the page has one. */
.cfg-credit {
  margin-top: 28px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── chassis cards ── */

.cfg-case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.cfg-case {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.022);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.cfg-case:hover { border-color: rgba(255, 255, 255, 0.62); }
.cfg-case-pick { cursor: pointer; }
.cfg-case-pick:focus-visible { outline: none; }
.cfg-case:has(> .cfg-case-pick:focus-visible) { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.cfg-case > .cfg-spec-toggle { margin: -8px 17px 16px; }
.cfg-case > .cfg-specs { margin: 0 17px 17px; }
.cfg-opt { display: flex; flex-direction: column; min-width: 0; }
.cfg-opt > .cfg-spec-toggle { margin: 6px 0 0 122px; }
.cfg-opt > .cfg-specs { margin-top: 8px; }
.cfg-case.is-on { border-color: rgba(93, 202, 165, 0.5); background: rgba(29, 158, 117, 0.1); }

.cfg-case-shot,
.cfg-cool-shot {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1a2b26 0%, #0e1c18 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cfg-case-shot svg { width: 68%; height: 68%; }
.cfg-cool-shot { aspect-ratio: 16 / 10; }
.cfg-cool-shot svg { width: 76%; height: 76%; }

.cfg-render-tag {
  position: absolute;
  left: 10px;
  top: 9px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.cfg-case-meta { padding: 15px 17px 17px; }
.cfg-case-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.cfg-case-name { font-size: 15px; font-weight: 500; }
.cfg-case-price { font-family: var(--font-mono); font-size: 13px; color: rgba(255, 255, 255, 0.8); }
.cfg-case-form { font-family: var(--font-mono); font-size: 12px; color: rgba(255, 255, 255, 0.62); margin-top: 4px; }
.cfg-case-blurb { font-size: 12.5px; color: var(--text-secondary); margin-top: 8px; line-height: 1.5; }

/* ── tier shortcut ── */

.cfg-tierbar {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.028);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cfg-tier-title { font-size: 15px; font-weight: 500; margin-bottom: 3px; }
.cfg-tier-sub { font-size: 13px; color: var(--text-secondary); }
.cfg-pills { display: flex; gap: 8px; }

.cfg-pill {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 9px 18px;
  min-height: 40px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.cfg-pill:hover { border-color: rgba(255, 255, 255, 0.62); color: #fff; }
.cfg-pill.is-on { border-color: rgba(93, 202, 165, 0.5); background: rgba(29, 158, 117, 0.1); color: var(--text-accent); }

/* ── option rows ── */

.cfg-rows { display: flex; flex-direction: column; gap: 10px; }

.cfg-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: transparent;
  border-radius: 12px;
  padding: 12px 18px 12px 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.cfg-row:hover { border-color: rgba(255, 255, 255, 0.62); }
.cfg-row:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.cfg-row.is-on { border-color: rgba(93, 202, 165, 0.5); background: rgba(29, 158, 117, 0.1); }
.cfg-row.is-auto { cursor: default; background: rgba(255, 255, 255, 0.028); }
.cfg-row.is-auto:hover { border-color: rgba(255, 255, 255, 0.62); }

.cfg-thumb {
  width: 92px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(160deg, #1a2b26 0%, #0e1c18 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.cfg-thumb svg { width: 72%; height: 72%; }
.cfg-row-body { min-width: 0; }
.cfg-row-name { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 15px; font-weight: 500; }
.cfg-row-spec { font-family: var(--font-mono); font-size: 12.5px; color: rgba(255, 255, 255, 0.62); margin-top: 3px; }

.cfg-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 100px;
  padding: 2px 9px;
}

.cfg-row-price { text-align: right; }
.cfg-delta { font-family: var(--font-mono); font-size: 14px; color: rgba(255, 255, 255, 0.72); }
.cfg-delta.is-on { color: var(--accent-light); }
.cfg-abs { font-size: 11.5px; color: rgba(255, 255, 255, 0.62); margin-top: 2px; }

/* ── cooling ── */

.cfg-seg {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 100px;
  padding: 5px;
  width: fit-content;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.cfg-seg-btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 9px 20px;
  min-height: 40px;
  border: none;
  border-radius: 100px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.cfg-seg-btn:hover { color: #fff; }
.cfg-seg-btn.is-on { background: var(--accent); color: #fff; }

.cfg-cool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

.cfg-cool {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.022);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.cfg-cool:hover { border-color: rgba(255, 255, 255, 0.62); }
.cfg-cool:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.cfg-cool.is-on { border-color: rgba(93, 202, 165, 0.5); background: rgba(29, 158, 117, 0.1); }

.cfg-cool-meta { padding: 14px 16px 15px; }
.cfg-cool-name { font-size: 14.5px; font-weight: 500; }
.cfg-cool-spec { font-family: var(--font-mono); font-size: 12px; color: rgba(255, 255, 255, 0.62); margin-top: 3px; }

.cfg-cool-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  margin-top: 11px;
}

.cfg-cool-noise { font-size: 12px; color: rgba(255, 255, 255, 0.62); }
.cfg-cool-price { font-family: var(--font-mono); font-size: 14px; color: rgba(255, 255, 255, 0.8); }

/* ── operating system ── */

.cfg-os-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.cfg-os {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  padding: 13px 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.cfg-os:hover { border-color: rgba(255, 255, 255, 0.62); }
.cfg-os:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.cfg-os.is-on { border-color: rgba(93, 202, 165, 0.5); background: rgba(29, 158, 117, 0.1); }

.cfg-os-icon {
  width: 44px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cfg-os-icon svg { width: 21px; height: 21px; }
.cfg-os-name { font-size: 14.5px; font-weight: 500; }
.cfg-os-spec { font-size: 12px; color: rgba(255, 255, 255, 0.62); margin-top: 2px; line-height: 1.45; }
.cfg-os-price { font-family: var(--font-mono); font-size: 13.5px; color: rgba(255, 255, 255, 0.8); text-align: right; }
.cfg-os-price.is-free { color: var(--accent-light); }

/* ── right rail ── */

.cfg-card {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 22px;
}

.cfg-view { padding: 0; overflow: hidden; }

.cfg-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  display: block;
  margin-bottom: 16px;
}

.cfg-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cfg-view-head .cfg-kicker { margin-bottom: 0; white-space: nowrap; }
.cfg-hint { font-family: var(--font-mono); font-size: 10.5px; color: rgba(255, 255, 255, 0.62); }

.cfg-view-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.cfg-dims,
.cfg-fit { font-family: var(--font-mono); font-size: 10.5px; color: rgba(255, 255, 255, 0.62); }
.cfg-fit.is-warn { color: #E8B33C; }

.cfg-lines { display: flex; flex-direction: column; gap: 9px; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }

.cfg-line { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; }
.cfg-line-k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }
.cfg-line-v { font-size: 13px; color: rgba(255, 255, 255, 0.78); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-line-p { font-family: var(--font-mono); font-size: 12.5px; color: rgba(255, 255, 255, 0.62); }

.cfg-checks { display: flex; flex-direction: column; gap: 10px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.cfg-check { display: flex; gap: 9px; align-items: flex-start; }
.cfg-check-icon { flex-shrink: 0; margin-top: 3px; width: 14px; height: 14px; }
.cfg-check-icon svg { width: 14px; height: 14px; display: block; }
.cfg-check-text { font-size: 12.5px; color: var(--text-secondary); line-height: 1.45; }
.cfg-check.is-warn .cfg-check-text { color: #E8B33C; }
.cfg-check-detail { font-family: var(--font-mono); font-size: 11.5px; color: rgba(255, 255, 255, 0.62); margin-top: 2px; }

.cfg-totals { display: flex; flex-direction: column; gap: 9px; padding: 4px 0 4px; }
.cfg-total-row { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-secondary); }
.cfg-total-v { font-family: var(--font-mono); color: #fff; }
.cfg-total-row.is-grand { border-top: 1px solid rgba(255, 255, 255, 0.11); margin-top: 6px; padding-top: 14px; align-items: baseline; }
.cfg-total-row.is-grand span:first-child { font-size: 15px; font-weight: 500; color: #fff; }
.cfg-total-row.is-grand .cfg-total-v { font-size: 25px; letter-spacing: -0.5px; }
.cfg-deposit { font-size: 12px; color: rgba(255, 255, 255, 0.62); text-align: right; }

.cfg-cta { width: 100%; margin-top: 18px; }
.cfg-fineprint { font-size: 12px; color: rgba(255, 255, 255, 0.62); text-align: center; margin-top: 12px; line-height: 1.5; }
.cfg-cta + .cfg-fineprint { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.cfg-lines + .cfg-checks, .cfg-lines + .cfg-kicker-sub { margin-top: 14px; }
.cfg-rail-error { font-size: 13.5px; color: #E8B33C; margin: 0; line-height: 1.6; }

.cfg-incl { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.cfg-incl li { position: relative; padding-left: 20px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.5; }
.cfg-incl li::before { content: '+'; position: absolute; left: 4px; top: 0; color: var(--accent); font-family: var(--font-mono); }

/* ── chassis size chips ── */

.cfg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.cfg-chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.5px;
  padding: 7px 12px;
  min-height: 30px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}
.cfg-chip:hover { border-color: rgba(255, 255, 255, 0.62); color: #fff; }
.cfg-chip.is-on { border-color: var(--accent); color: var(--accent-light); background: var(--accent-glow); }

/* ── the 3D view ── */

.b3d-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 220px;
  overflow: hidden;
  cursor: grab;
  background: radial-gradient(120% 80% at 50% 60%, #173a32 0%, #12302A 45%, #0C1F1A 100%);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  outline: none;
}

.b3d-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.b3d-stage:active { cursor: grabbing; }
.v3d-canvas { display: block; width: 100%; height: 100%; }
.v3d-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.v3d-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #9FE1CB;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(12, 31, 26, 0.72);
}

.v3d-tag { font-weight: 600; color: #fff; background: rgba(12, 31, 26, 0.85); }
.v3d-tag.is-fail { color: #E2756F; }
.v3d-tag.is-warn { color: #E8B33C; }

.v3d-poster {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.62);
  pointer-events: none;
  transition: opacity 0.3s;
}

.v3d-poster { background-size: cover; background-position: center; }
.v3d-poster-text { padding: 4px 10px; border-radius: 4px; background: rgba(12, 31, 26, 0.6); }
.b3d-stage.is-3d .v3d-poster { opacity: 0; }
.v3d-fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.b3d-stage.is-fallback .b3d-views { display: none; }
.b3d-stage.is-fallback { cursor: default; }
.cfg-view-sentinel { height: 1px; }

.b3d-views { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 5px; }

.b3d-view-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 7px 12px;
  min-height: 30px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.b3d-view-btn:hover { border-color: rgba(255, 255, 255, 0.62); color: #fff; }
.b3d-zoom { padding: 7px 10px; min-width: 30px; }

.cfg-fit.is-fail { color: #E2756F; }
button.cfg-fit { background: none; border: 0; padding: 0; cursor: pointer; text-align: right; }
button.cfg-fit.is-fail, button.cfg-fit.is-warn { text-decoration: underline dotted; text-underline-offset: 3px; }
button.cfg-fit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

.cfg-measure { margin: 10px 0 0; }
.cfg-measure summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.cfg-measure-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.cfg-measure-table th,
.cfg-measure-table td { text-align: left; padding: 4px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); font-size: 12px; }
.cfg-measure-table th { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; color: rgba(255, 255, 255, 0.62); }
.cfg-measure-table tr.is-fail td { color: #E2756F; }
.cfg-measure-table tr.is-warn td { color: #E8B33C; }

/* ── enquiry modal ── */

.cfg-modal-back {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(4, 12, 10, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}

.cfg-modal {
  width: 100%;
  max-width: 560px;
  background: #0F2A22;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 30px 32px 32px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8);
}

.cfg-modal-title { font-size: 24px; font-weight: 700; letter-spacing: -0.4px; margin: 0 0 10px; }
.cfg-modal-lead { font-size: 14.5px; color: var(--text-secondary); margin: 0 0 22px; line-height: 1.6; }

.cfg-form { display: flex; flex-direction: column; gap: 14px; }
.cfg-field { display: flex; flex-direction: column; gap: 7px; }
.cfg-field-label { font-size: 12.5px; color: var(--text-secondary); }

.cfg-field input,
.cfg-field textarea {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 13px 14px;
  min-height: 46px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
}

.cfg-field input:focus,
.cfg-field textarea:focus {
  outline: none;
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(93, 202, 165, 0.12);
}

.cfg-field textarea { resize: vertical; min-height: 78px; }

.cfg-spec {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 15px 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
  max-height: 240px;
  overflow: auto;
  white-space: pre;
}

.cfg-modal-actions { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.cfg-modal-actions .btn-primary,
.cfg-modal-actions .btn-secondary { flex: 1 1 140px; justify-content: center; }

.cfg-form-status { font-size: 13px; color: var(--text-muted); min-height: 18px; text-align: center; }
.cfg-form-status.is-error { color: #E8B33C; }

/* ── responsive ── */

@media (max-width: 1080px) {
  .cfg-layout { grid-template-columns: minmax(0, 1fr); }
  .cfg-rail { position: static; order: -1; 
  .cfg-view.is-strip { position: sticky; top: 0; z-index: 30; margin: 0 -20px; border-radius: 0; }
  .cfg-view.is-strip .b3d-stage { aspect-ratio: auto; height: 150px; min-height: 0; }
  .cfg-view.is-strip .cfg-view-head, .cfg-view.is-strip .b3d-views { display: none; }
  .cfg-view.is-strip .cfg-view-foot { padding-top: 6px; padding-bottom: 6px; }
}
}

@media (max-width: 760px) {
  .cfg-case-grid,
  .cfg-cool-grid,
  .cfg-os-grid { grid-template-columns: minmax(0, 1fr); }

  .cfg-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 10px 14px 10px 10px; }
  .cfg-thumb { width: 64px; }
  .cfg-opt > .cfg-spec-toggle { margin-left: 86px; }
  .cfg-tierbar { flex-direction: column; align-items: flex-start; }
  .cfg-pills { width: 100%; }
  .cfg-pill { flex: 1 1 0; text-align: center; }
  .cfg-seg { width: 100%; }
  .cfg-seg-btn { flex: 1 1 0; padding: 9px 10px; }
  .cfg-modal { padding: 24px 20px 26px; }
  .cfg-modal-back { padding: 20px 12px; }
}

/* ── Order placement: the extra controls the enquiry form didn't need ──────
 * Added when the modal stopped being an enquiry and started writing a real
 * order with a reference, a price lock and a tracking link.
 */

.cfg-field-hint {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}

.cfg-radio-row { display: flex; gap: 10px; flex-wrap: wrap; }

.cfg-radio {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1 1 150px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  /* 44px min height: this is the one control people hit on a phone. */
  min-height: 44px;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.cfg-radio:hover { border-color: rgba(255, 255, 255, 0.62); }

.cfg-radio input { accent-color: var(--accent); width: 15px; height: 15px; }

.cfg-radio:has(input:checked) {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.cfg-radio input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── The confirmation, once a reference exists ───────────────────────────── */

.cfg-done-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
}

.cfg-done-total span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cfg-done-total strong { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }

.cfg-done-link {
  display: block;
  padding: 13px 16px;
  margin-bottom: 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  border-radius: 8px;
  transition: background 0.14s ease;
  /* The link is the whole point of the screen — make it a real target. */
  min-height: 44px;
  line-height: 20px;
}

.cfg-done-link:hover { background: rgba(255, 255, 255, 0.04); }

.cfg-done-note {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

/* The `hidden` attribute only wins against a UA default. .cfg-field sets
 * display:flex, which beats it — so the delivery-address field stayed on
 * screen while pickup was selected. Any element here toggled with el.hidden
 * needs this, so it is written once for all of them rather than per rule. */
[hidden] { display: none !important; }

/* ── Brand, model and the expandable spec sheet ────────────────────────────
 * Added when every part gained a manufacturer and a full sheet. The ordering
 * on a card is deliberate and matches how people actually read a part: who
 * makes it, which model, then the two or three figures that decide it. The
 * rest is one tap away rather than on the page, because nine parts' worth of
 * full sheets is a page nobody reaches the bottom of.
 */

.cfg-row-brand {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.cfg-row.is-on .cfg-row-brand { color: var(--accent-light); }

.cfg-spec-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 0;
  padding: 7px 2px 3px;
  margin-top: 4px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  /* A real target, not a 12px word: this sits inside a row that is itself
   * clickable, so it has to be unmistakably its own control. */
  min-height: 34px;
  transition: color 0.14s ease;
}

.cfg-spec-toggle:hover { color: var(--text-secondary); }
.cfg-spec-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.cfg-spec-caret {
  width: 0;
  height: 0;
  border-left: 4.5px solid currentColor;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  transition: transform 0.16s ease;
}

.cfg-spec-toggle.is-open { color: var(--accent-light); }
.cfg-spec-toggle.is-open .cfg-spec-caret { transform: rotate(90deg) translateX(-1px); }

/* The sheet spans the whole row rather than the middle column — at phone
 * width the middle column is about 40 characters across. */
.cfg-specs {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
}

.cfg-spec-list {
  display: grid;
  grid-template-columns: minmax(112px, 34%) 1fr;
  gap: 7px 18px;
  margin: 0;
}

.cfg-spec-k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  padding-top: 1px;
}

.cfg-spec-v {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

.cfg-spec-src {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.6;
  color: #E8B33C;
}

.cfg-spec-src.is-ok { color: var(--text-muted); }

/* ── Fit checks now have three levels ─────────────────────────────────────
 * Amber used to mean both "runs a bit warm" and "will not physically close",
 * which taught people to ignore amber. Red is now reserved for the second.
 */

.cfg-check.is-fail { color: #E2756F; }
.cfg-check.is-fail .cfg-check-detail { color: rgba(226, 117, 111, 0.75); }

/* ── Touch target sizes ───────────────────────────────────────────────────
 * Found by rendering the page in headless Chromium at real phone viewports —
 * desktop Chrome refuses a window resize, so this layout had never actually
 * been measured. The ISO/SIDE/FRONT buttons sat at 30px, which is fine with a
 * mouse and a miss with a thumb. Only raised where there is a touch pointer,
 * so the desktop chrome stays as designed.
 */
@media (hover: none) and (pointer: coarse) {
  .b3d-view-btn {
    min-height: 44px;
    padding: 12px 16px;
    font-size: 11px;
  }

  /* Breadcrumbs are 11px tall site-wide. On the build pages they are a real
   * navigation path between three levels, so give them a thumb-sized row
   * here rather than restyling every page on the site. */
  .breadcrumbs a {
    display: inline-block;
    padding: 12px 2px;
    min-height: 44px;
    line-height: 20px;
  }
}

/* ── 09 Add-ons ───────────────────────────────────────────────────────────
 * Five small radiogroups rather than one long list, because "which monitor"
 * and "which mouse" are separate decisions and a flat list of eleven things
 * hides that. Each group leads with "Not included", which is both the default
 * and the honest option — most people already own a keyboard.
 */

.cfg-extra-group { margin-top: 26px; }
.cfg-extra-group:first-of-type { margin-top: 18px; }

.cfg-extra-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* The "Not included" row has no product to show. An empty slot keeps the
 * three-column grid aligned rather than letting the text jump left. */
.cfg-thumb.is-empty {
  background: transparent;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.62);
}

/* Sub-heading inside the summary card, for the add-ons block. */
.cfg-kicker-sub {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── depth on demand ──────────────────────────────────────────
 *
 * Every group shows three and hides the rest. The button is deliberately
 * understated: a business customer scanning the page should read it as a
 * footnote, not as a decision they have been handed. An enthusiast reads the
 * count in it and knows the range is there.
 *
 * It is full-width and sits below the rows rather than beside the heading,
 * because at phone width anything next to a heading either wraps badly or
 * steals the tap target from the heading itself.
 */

.cfg-showall {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 10px;
  /* 44px: a real target on a touch screen, which the 30px ISO/SIDE/FRONT
   * buttons taught us the hard way. */
  min-height: 44px;
  padding: 0 16px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.cfg-showall:hover {
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.022);
}

.cfg-showall:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cfg-showall.is-open { color: var(--accent-light); border-color: rgba(93, 202, 165, 0.32); }

.cfg-showall-caret {
  width: 0;
  height: 0;
  border-top: 4.5px solid currentColor;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  transition: transform 0.16s ease;
}

.cfg-showall.is-open .cfg-showall-caret { transform: rotate(180deg); }

/* ── board and supply override ────────────────────────────────
 *
 * Section 08 promises we choose these two. The override has to exist — an
 * enthusiast with a board in mind should not have to email us — without
 * undoing the promise, so it is a quiet link inside the row rather than a
 * fourth radiogroup on the page. Most visitors should never notice it.
 */

.cfg-swap {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  padding: 6px 2px 2px;
  margin-top: 2px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.62);
  text-underline-offset: 3px;
  min-height: 32px;
  transition: color 0.14s ease;
}

.cfg-swap:hover { color: var(--text-secondary); text-decoration-color: currentColor; }
.cfg-swap:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.cfg-swap.is-open { color: var(--accent-light); }

/* Indented and hairlined on the left so it reads as belonging to the row
 * above it rather than as another top-level group of options. */
.cfg-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 2px 0 4px 14px;
  padding-left: 16px;
  border-left: 1px solid rgba(93, 202, 165, 0.22);
}

@media (max-width: 640px) {
  .cfg-picker { margin-left: 0; padding-left: 10px; }
  .cfg-showall { font-size: 10.5px; letter-spacing: 0.05em; }
}

/* The override rows sit one level down, so they are a touch quieter than a
 * top-level option row. */
.cfg-picker .cfg-row { padding: 10px 14px 10px 10px; }

/* A photograph in the tile where the part has one.
 *
 * `contain` rather than `cover`: these are product shots on white or cut out,
 * and cropping a graphics card to fill a 4:3 box cuts the ends off the thing
 * the customer is trying to look at. The tile keeps its own background, so a
 * cut-out image sits on the same dark ground as the drawings beside it.
 */
.cfg-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  /* Product shots are almost all on white. Multiply drops the paper and keeps
   * the part, which is what makes a photo tile sit beside a drawn one without
   * looking like a sticker. Screen-blend the few that ship cut out on black by
   * giving them .is-cutout. */
  mix-blend-mode: multiply;
  filter: brightness(1.18) contrast(1.06);
}

.cfg-thumb.has-photo { background: #e9edf0; }
.cfg-thumb-img.is-cutout { mix-blend-mode: normal; filter: none; }

/* The same treatment on the larger chassis and cooler cards. The "render" tag
 * only ever sits on a drawing, never on a photograph. */
.cfg-case-shot.has-photo,
.cfg-cool-shot.has-photo { background: #e9edf0; }

.cfg-shot-img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: brightness(1.12) contrast(1.05);
}

/* Size chips above a list of displays. */
.cfg-size-seg { margin: 0 0 12px; }
.cfg-size-seg .cfg-seg-btn { min-height: 36px; padding: 7px 14px; }

@media (prefers-reduced-motion: no-preference) {
  .cfg-thumb-img { transition: transform 0.25s ease; }
  .cfg-row:hover .cfg-thumb-img { transform: scale(1.04); }
}

/* ── AA contrast for the configurator's muted text ────────────────────────
   The site token --text-muted is white at 0.35, which reads at 3.2:1 on this
   ground; the configurator's own uses go to 0.62 (about 7:1). The chosen state
   and the open state keep their accent colour. */
.cfg-row-brand, .cfg-spec-toggle, .cfg-spec-toggle span, .cfg-extra-label, .cfg-swap, .cfg-credit, .cfg-spec-k { color: rgba(255, 255, 255, 0.62); }
.cfg-row.is-on .cfg-row-brand, .cfg-case.is-on .cfg-row-brand { color: var(--accent-light); }
.cfg-spec-toggle.is-open, .cfg-spec-toggle.is-open span { color: var(--accent-light); }

/* A sheet never widens its card: long values (URLs in a source row) wrap. */
.cfg-specs { min-width: 0; max-width: 100%; }
.cfg-spec-list { min-width: 0; }
.cfg-spec-v { min-width: 0; overflow-wrap: anywhere; }
