:root {
  /* Layout: bare settings column on grey paper beside one continuous white spec sheet.
     Hairline rules instead of cards; label-tape yellow marks the current choice. */
  color-scheme: light;

  --paper: #f1f2ee;
  --sheet: #ffffff;
  --ink: #15181b;
  --ink-2: #474e54;
  --ink-3: #697178;
  --rule: #d6d9d3;
  --tape: #ffd60a;
  --tape-soft: #fff5bf;

  /* Status colors (separate from the accent) */
  --ok: #17704a;
  --ok-bg: #e7f2ec;
  --warn: #8f5400;
  --warn-bg: #fbf0d9;
  --fail: #b3261c;
  --fail-bg: #fbe8e5;

  /* Wire colors, one per protocol */
  --wire-tb: #1f55d0;
  --wire-dp: #b85000;
  --wire-usb: #17804f;
  --wire-dl: #8b3fc4;

  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 3px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--wire-tb);
  outline-offset: 2px;
}

fieldset {
  border: 0;
  min-width: 0;
}

/* Header */
.site-header {
  border-bottom: 2px solid var(--ink);
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
}

.brand-name {
  font-weight: 700;
}

.brand-suite {
  font-weight: 500;
  color: var(--ink-3);
}

.header-note {
  font-size: 13px;
  color: var(--ink-3);
}

/* Hero */
.hero {
  padding: 40px 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 28ch;
  text-wrap: balance;
}

.hero-sub {
  color: var(--ink-2);
  font-size: 17px;
  max-width: 62ch;
}

/* Form controls */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.select-input,
.text-input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background-color: var(--sheet);
  border: 1px solid var(--ink-3);
  border-radius: var(--radius);
  padding: 9px 12px;
}

.select-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2315181b' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  text-overflow: ellipsis;
  cursor: pointer;
}

.select-input:hover,
.text-input:hover {
  border-color: var(--ink);
}

@media (max-width: 600px) {
  .select-input,
  .text-input {
    font-size: 16px;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  padding: 8px 12px;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--tape);
}

.btn-primary {
  background: var(--ink);
  color: var(--sheet);
}

.btn-primary:hover {
  background: #000000;
}

.btn-buy {
  background: var(--tape);
}

.btn-buy:hover {
  background: #f2c800;
}

.btn-quiet {
  border-color: transparent;
  background: none;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 4px 6px;
}

.btn-quiet:hover {
  background: none;
  color: var(--ink);
}

.btn-block {
  width: 100%;
}

.text-link {
  font-size: 13px;
  color: var(--ink-2);
  text-underline-offset: 3px;
}

.text-link:hover {
  color: var(--ink);
}

/* Wizard: one question at a time, on a single sheet */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wizard {
  max-width: 760px;
  padding-bottom: 64px;
}

#wizard-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--ink);
  padding: 24px 28px 28px;
}

@media (max-width: 600px) {
  #wizard-body {
    padding: 20px 16px 24px;
  }
  .header-note {
    display: none;
  }
}

.wizard-progress {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: 13px;
  color: var(--ink-3);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.wizard-progress li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wp-num {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.wizard-progress li.past {
  color: var(--ink-2);
}

.wizard-progress li.past .wp-num {
  border-color: var(--ink-3);
}

.wizard-progress li.current {
  color: var(--ink);
  font-weight: 600;
}

.wizard-progress li.current .wp-num {
  background: var(--tape);
  border-color: var(--ink);
}

.wizard-q {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 30px);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
  outline: none;
}

.wizard-help {
  color: var(--ink-2);
  margin-top: -8px;
}

/* Device search box */
.combo {
  position: relative;
  display: flex;
  gap: 8px;
}

.combo-input {
  flex: 1;
  font-size: 17px;
  padding: 11px 14px;
}

.suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  list-style: none;
  background: var(--sheet);
  border: 1px solid var(--ink);
  box-shadow: 0 10px 24px rgba(21, 24, 27, 0.14);
}

.suggest-item {
  padding: 9px 14px;
  cursor: pointer;
}

.suggest-item + .suggest-item {
  border-top: 1px solid var(--rule);
}

.suggest-item:hover,
.suggest-item.active {
  background: var(--tape-soft);
}

.quick-picks,
.extras-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--ink);
}

.chip-check {
  padding: 8px 14px;
}

.chip-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--ink);
}

.chip-check:has(input:checked) {
  background: var(--tape);
  border-color: var(--ink);
}

/* Follow-up question */
.followup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--paper);
  border-left: 3px solid var(--ink);
}

.followup-q {
  font-weight: 600;
  font-size: 16px;
  padding: 0;
}

.followup-hint {
  font-size: 13.5px;
  color: var(--ink-2);
  max-width: 62ch;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.option-btn {
  text-align: left;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
}

.option-btn:hover {
  border-color: var(--ink);
  background: var(--tape-soft);
}

/* Match confirmation */
.match-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  background: var(--ok-bg);
  border-left: 3px solid var(--ok);
}

.match-label {
  font-size: 13px;
  color: var(--ink-2);
}

.match-name {
  font-size: 16px;
  font-weight: 600;
}

.match-note {
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 4px;
  max-width: 66ch;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

.wizard-nav-right {
  display: flex;
  gap: 8px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary:disabled:hover {
  background: var(--ink);
}

/* Screens */
.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.screen-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
}

.screen-card:hover {
  border-color: var(--ink);
}

.screen-card.selected {
  background: var(--tape);
  border-color: var(--ink);
}

.screen-icon {
  width: 80px;
  height: 34px;
  margin-bottom: 6px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.screen-title {
  font-weight: 600;
  font-size: 15px;
}

.screen-sub {
  font-size: 13px;
  color: var(--ink-2);
}

.portrait-check {
  align-self: flex-start;
}

/* Common desks, under question 1 */
.preset-strip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.preset-strip-label {
  font-size: 13px;
  color: var(--ink-3);
}

.preset-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.preset-link {
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: none;
  border: 0;
  padding: 2px 0;
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-underline-offset: 3px;
  cursor: pointer;
  text-align: left;
}

.preset-link:hover {
  text-decoration-color: var(--ink);
  background: var(--tape-soft);
}

/* Results header: what was asked, and the knobs */
.results {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 0 64px;
}

.summary-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  line-height: 1.25;
}

.summary-part {
  font: inherit;
  color: var(--ink);
  background: none;
  border: 0;
  border-bottom: 2px dotted var(--ink-3);
  padding: 0;
  cursor: pointer;
}

.summary-part:hover {
  background: var(--tape-soft);
  border-bottom-color: var(--ink);
}

.summary-op {
  font-weight: 500;
  color: var(--ink-3);
}

.summary-restart {
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  margin-left: auto;
}

.summary-notes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13.5px;
  color: var(--ink-2);
  max-width: 90ch;
}

.summary-notes strong {
  color: var(--ink);
  font-weight: 600;
}

.settings-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 32px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}

.settings-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
}

.settings-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
}

.settings-owned {
  flex-wrap: nowrap;
  gap: 10px;
}

.settings-owned .select-input {
  width: auto;
  max-width: 320px;
  padding-top: 6px;
  padding-bottom: 6px;
  font-size: 13.5px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ink-2);
  cursor: pointer;
}

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

.toggle:has(input:checked) {
  color: var(--ink);
}

@media (max-width: 600px) {
  .settings-owned {
    flex-wrap: wrap;
  }
  .settings-owned .select-input {
    width: 100%;
    max-width: none;
  }
  .summary-restart {
    margin-left: 0;
  }
}

/* Result sheet */
.solution-stack {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--ink);
  min-width: 0;
}

.solution-stack > * {
  padding: 24px 28px;
}

.solution-stack > * + * {
  border-top: 1px solid var(--rule);
}

@media (max-width: 600px) {
  .solution-stack > * {
    padding: 20px 16px;
  }
}

/* Verdict */
.verdict-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.verdict-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.verdict-stamp {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.verdict-card.perfect .verdict-stamp {
  color: var(--ok);
  background: var(--ok-bg);
}

.verdict-card.compatible_with_notes .verdict-stamp {
  color: var(--warn);
  background: var(--warn-bg);
}

.verdict-card.incompatible .verdict-stamp {
  color: var(--fail);
  background: var(--fail-bg);
}

.verdict-cost {
  font-size: 14px;
  color: var(--ink-2);
}

.verdict-cost strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
}

.verdict-headline {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

.verdict-summary {
  color: var(--ink-2);
  max-width: 70ch;
}

.verdict-fails {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px 10px 30px;
  background: var(--fail-bg);
  border-left: 3px solid var(--fail);
  color: var(--fail);
  font-size: 14px;
  font-weight: 600;
}

.verdict-checks-link {
  align-self: flex-start;
  font-size: 13.5px;
  color: var(--ink-2);
  text-underline-offset: 3px;
}

.verdict-checks-link:hover {
  color: var(--ink);
}

#checks {
  scroll-margin-top: 16px;
}

/* Share bar */
.solution-stack > .share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 0;
  padding-top: 0;
}

/* Option switcher */
.arch-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.arch-tab {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px 12px;
  cursor: pointer;
}

.arch-tab:hover {
  border-color: var(--ink);
}

.arch-tab.active {
  background: var(--tape);
  border-color: var(--ink);
}

.arch-tab-role {
  font-size: 12.5px;
  color: var(--ink-2);
}

.arch-tab.active .arch-tab-role {
  color: var(--ink);
}

.arch-tab-name {
  font-size: 14px;
  font-weight: 600;
}

/* Sheet sections */
.sheet-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}

.section-note {
  font-size: 13px;
  color: var(--ink-3);
}

/* Checks */
.alerts-list {
  display: flex;
  flex-direction: column;
}

.check-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}

.check-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.check-status {
  align-self: start;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 2px 0;
  border-radius: 2px;
}

.check-row.fail .check-status {
  color: var(--fail);
  background: var(--fail-bg);
}

.check-row.note .check-status {
  color: var(--warn);
  background: var(--warn-bg);
}

.check-row.pass .check-status {
  color: var(--ok);
  background: var(--ok-bg);
}

.check-title {
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}

.check-detail {
  font-size: 14px;
  color: var(--ink-2);
  max-width: 78ch;
}

/* Bandwidth meter */
.bw-meter-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.bw-header {
  display: flex;
  justify-content: space-between;
  gap: 4px 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-2);
}

.bw-header strong {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink);
}

.bw-track {
  height: 10px;
  background: var(--paper);
  border: 1px solid var(--ink);
}

.bw-fill {
  height: 100%;
  background: var(--ink);
  transition: width 0.2s ease;
}

.bw-fill.high {
  background: var(--fail);
}

@media (prefers-reduced-motion: reduce) {
  .bw-fill {
    transition: none;
  }
}

/* Wiring diagram */
.legend-row {
  display: flex;
  gap: 6px 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink-2);
}

.legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-line {
  display: inline-block;
  width: 20px;
  border-top: 3px solid;
}

.legend-line.wire-tb {
  border-color: var(--wire-tb);
}
.legend-line.wire-dp {
  border-color: var(--wire-dp);
}
.legend-line.wire-usb {
  border-color: var(--wire-usb);
}
.legend-line.wire-dl {
  border-color: var(--wire-dl);
  border-top-style: dashed;
}

.diagram-scroll {
  overflow-x: auto;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.wiring-svg {
  display: block;
  width: 100%;
  min-width: 800px;
  height: auto;
}

.wiring-svg .grid-dot {
  fill: #c3c7c0;
}

.wire-group {
  --w: var(--wire-tb);
}
.wire-group.p-dp14 {
  --w: var(--wire-dp);
}
.wire-group.p-usb3 {
  --w: var(--wire-usb);
}
.wire-group.p-displaylink {
  --w: var(--wire-dl);
}
.wiring-svg.is-broken .wire-group {
  --w: var(--fail);
}

.wire-group .wire {
  fill: none;
  stroke: var(--w);
  stroke-width: 2.25;
}

.wire-group.p-displaylink .wire,
.wiring-svg.is-broken .wire {
  stroke-dasharray: 6 4;
}

.wire-group .wire-end {
  fill: var(--w);
}

.wire-plug .plug-shell {
  stroke: var(--w);
  stroke-width: 2.2;
}

.wire-plug .plug-core,
.wire-plug .plug-mark {
  fill: var(--w);
}

.wire-group .wire-pill {
  fill: var(--sheet);
  stroke: var(--w);
  stroke-width: 1;
}

.wire-group .wire-label {
  fill: var(--w);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.node rect {
  fill: var(--sheet);
  stroke: var(--ink);
  stroke-width: 1.25;
}

.node-kvm rect {
  fill: var(--tape-soft);
  stroke-width: 2;
}

.wiring-svg.is-broken .node-kvm rect {
  fill: var(--fail-bg);
  stroke: var(--fail);
}

.node-badge {
  fill: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.node-title {
  fill: var(--ink);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
}

.node-sub {
  fill: var(--ink-2);
  font-family: var(--font-body);
  font-size: 10.5px;
}

/* Device sketches in the diagram boxes */
.dev-icon .dev-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.dev-icon rect.dev-line,
.dev-icon path.dev-line {
  fill: var(--sheet);
}

.dev-icon .dev-thin {
  fill: none;
  stroke: var(--ink);
  stroke-width: 0.7;
  stroke-linecap: round;
}

.dev-icon .dev-dot {
  fill: var(--ink);
}

.dev-icon .dev-fill {
  fill: var(--ink-3);
  opacity: 0.35;
}

.node-kvm .dev-icon rect.dev-line {
  fill: var(--tape-soft);
}

/* Full-screen diagram */
.title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-small {
  font-size: 13px;
  padding: 5px 10px;
  min-width: 34px;
}

.diagram-dialog {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}

.diagram-dialog[open] {
  display: flex;
  flex-direction: column;
}

.dd-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--sheet);
  border-bottom: 2px solid var(--ink);
}

.dd-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.dd-tools {
  display: flex;
  gap: 6px;
}

.dd-canvas {
  flex: 1;
  overflow: auto;
  padding: 16px;
  overscroll-behavior: contain;
}

.dd-canvas .wiring-svg {
  min-width: 0;
  max-width: none;
}

/* Parts list */
.bom-list {
  display: flex;
  flex-direction: column;
}

.bom-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}

.bom-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.bom-qty {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bom-role {
  font-size: 12.5px;
  color: var(--ink-3);
}

.bom-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.bom-why {
  font-size: 14px;
  color: var(--ink-2);
  max-width: 70ch;
}

.bom-included {
  font-size: 13px;
  color: var(--ok);
  margin-top: 4px;
}

.bom-cta-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 150px;
}

.bom-price-label {
  display: block;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--ink-3);
  text-align: right;
}

@media (max-width: 680px) {
  .bom-price-label {
    display: inline;
    margin-right: 4px;
  }
}

.bom-price {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 680px) {
  .bom-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .bom-cta-col {
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
  }
}

.bom-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 2px solid var(--ink);
}

.bom-total {
  font-size: 15px;
  font-weight: 600;
}

.bom-total strong {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.affiliate-disclosure {
  font-size: 12.5px;
  color: var(--ink-3);
  max-width: 60ch;
}

/* Connector drawings: plug faces, in the diagram's line style */
.plug-icon {
  flex: none;
  width: 60px;
  height: 35px;
}

.plug-shell {
  fill: var(--sheet);
  stroke: var(--ink);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.plug-core {
  fill: var(--ink-3);
}

.plug-mark {
  fill: var(--ink);
}

.cable-ends {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
}

.ce-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ce-name {
  font-size: 12px;
  color: var(--ink-2);
}

.ce-wire {
  width: 56px;
  margin-top: 16px;
  border-top: 2px solid var(--ink);
}

.cable-ends.compact {
  margin-top: 0;
  gap: 4px;
}

.cable-ends.compact .plug-icon {
  width: 44px;
  height: 26px;
}

.cable-ends.compact .ce-name {
  font-size: 11px;
}

.cable-ends.compact .ce-wire {
  width: 24px;
  margin-top: 12px;
}

@media (max-width: 600px) {
  .checklist-steps .cable-ends {
    grid-column: 2;
  }
}

.plug-guide {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--paper);
  break-inside: avoid;
}

.plug-guide-title {
  font-size: 13px;
  font-weight: 600;
}

.plug-guide-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px 20px;
}

.plug-guide-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.35;
}

.plug-guide-list strong {
  display: block;
  font-weight: 600;
}

.plug-hint {
  color: var(--ink-2);
}

/* Hook-up steps */
.checklist-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.checklist-steps li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
  font-size: 14.5px;
}

.checklist-steps li:first-child {
  border-top: 0;
  padding-top: 0;
}

.step-num {
  font-family: var(--font-mono);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.step-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
  padding: 0 6px;
  margin-right: 6px;
  background: var(--tape);
  border-radius: 2px;
  vertical-align: 1px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 24px 0 40px;
  color: var(--ink-2);
  font-size: 13.5px;
}

.site-footer strong {
  color: var(--ink);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.telemetry-drawer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 12px;
}

.telemetry-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.telemetry-totals {
  color: var(--ink);
  margin-bottom: 8px;
}

.telemetry-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 180px;
  overflow-y: auto;
  overflow-wrap: anywhere;
}

.telemetry-rows strong {
  color: var(--ink);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: calc(100vw - 40px);
  background: var(--ink);
  color: var(--sheet);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: var(--radius);
  z-index: 120;
}

/* Cable labels: print-only sheet of fold-over flags */
.label-sheet {
  display: none;
}

.cl-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.cl-head h1 {
  font-family: var(--font-display);
  font-size: 18px;
}

.cl-head p {
  font-size: 11px;
  color: var(--ink-2);
  max-width: 90ch;
}

.cl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.cable-label {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px dashed #8a9096;
  margin: -0.5px;
  break-inside: avoid;
}

.cl-half {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px 6px 12px;
  border-left: 5px solid var(--cl);
  min-height: 0.85in;
  font-size: 9.5px;
  line-height: 1.3;
}

.cl-half:first-child {
  border-right: 1px dotted #8a9096;
}

.cl-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.cl-plug strong {
  font-weight: 600;
}

.cl-kind {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 8.5px;
}

/* One-page printable wiring sheet */
@media print {
  body {
    background: #ffffff;
    font-size: 12px;
  }
  .site-header,
  .hero,
  .wizard,
  .summary-bar,
  .settings-bar,
  .share-bar,
  .arch-tabs,
  .site-footer,
  .toast,
  .bom-cta-col a {
    display: none !important;
  }
  .container {
    max-width: none;
    padding: 0;
  }
  .solution-stack {
    border: 0;
  }
  .solution-stack > * {
    padding: 12px 0;
  }
  .diagram-scroll {
    overflow: visible;
    background: #ffffff;
  }
  .wiring-svg {
    min-width: 0;
  }
  .check-row,
  .bom-item,
  .checklist-steps li,
  .diagram-scroll {
    break-inside: avoid;
  }
  .verdict-stamp,
  .check-status,
  .step-tag,
  .node-kvm rect,
  .bw-fill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body.printing-labels > *:not(.label-sheet) {
    display: none !important;
  }
  body.printing-labels .label-sheet {
    display: block;
    padding: 0;
  }
  .cl-half {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
