@font-face { font-family: "Overpass"; src: url("/fonts/overpass-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Big Shoulders"; src: url("/fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
    --petrol: #17343C;      /* enclosure paint */
    --petrol-2: #24505B;
    --steel: #E4E8E6;       /* page */
    --plate: #F5F7F5;       /* raised surface */
    --ink: #142226;
    --muted: #4D5F64;
    --line: #BAC5C3;
    --breaker: #F4C430;     /* action color: breaker-panel yellow */
    --breaker-2: #DDAC14;
    --danger: #9E2A1F;
    --display: "Big Shoulders", "Arial Narrow", Impact, sans-serif;
    --body: "Overpass", "Segoe UI", system-ui, sans-serif;
}

/* One wire color per equipment type, used on the home harness, spines, and filters. */
.wire-air-cooled { --wire: #C8322B; }
.wire-liquid-cooled { --wire: #1F6FB2; }
.wire-rv-mobile { --wire: #2E8B57; }
.wire-portable { --wire: #D9731A; }
.wire-power-equipment { --wire: #6D4AA3; }
.wire-transfer-monitoring { --wire: #8A5A2B; }
.wire-vintage { --wire: #39474B; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--steel); color: var(--ink); font: 400 1.0625rem/1.55 var(--body); display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol-2); text-underline-offset: .15em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--petrol-2); outline-offset: 2px; }
.top :focus-visible, .hero :focus-visible, .foot :focus-visible { outline-color: var(--breaker); }

h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.05; letter-spacing: .005em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.5rem, 6vw, 3.5rem); }
h2 { font-size: 1.875rem; }
h3 { margin: 0; }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--breaker); color: var(--ink); padding: 8px 12px; z-index: 2; }
.skip:focus { top: 8px; }

.btn, .btn-quiet, .btn-quiet-dark { display: inline-block; font: 700 1rem/1 var(--body); padding: 14px 20px 11px; border-radius: 3px; border: 0; cursor: pointer; text-decoration: none; }
.btn { background: var(--breaker); color: var(--ink); box-shadow: inset 0 -3px 0 var(--breaker-2); }
.btn:hover { background: #FFD24D; color: var(--ink); }
.btn-wide { width: 100%; text-align: center; }
.btn-quiet { background: var(--petrol-2); color: #fff; padding: 10px 14px 8px; }
.btn-quiet:hover { background: #2E6370; }
.btn-quiet-dark { background: none; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.link { background: none; border: 0; padding: 0; color: var(--petrol-2); font: inherit; text-decoration: underline; cursor: pointer; }

/* Header */
.top { background: var(--petrol); color: #fff; }
.top-row { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { font: 800 1.625rem/1 var(--display); color: #fff; text-decoration: none; letter-spacing: .01em; }
.brand:hover { color: var(--breaker); }
.top-search { display: flex; gap: 6px; flex: 1 1 280px; max-width: 460px; }
.top-search input { flex: 1; min-width: 0; font: inherit; padding: 8px 10px 6px; border: 0; border-radius: 3px; background: var(--plate); color: var(--ink); }
.top-nav { display: flex; gap: 20px; margin-left: auto; }
.top-nav a { color: #fff; text-decoration: none; font-weight: 600; }
.top-nav a:hover { color: var(--breaker); }

/* Hero */
.hero { background: var(--petrol); color: #fff; padding: 40px 0 56px; }
.hero h1 { font-size: clamp(3rem, 9.5vw, 6.5rem); max-width: 11em; line-height: .96; margin-bottom: .4em; }
.hero-search label { display: block; font-weight: 600; margin-bottom: 8px; }
.hero-field { display: flex; gap: 8px; max-width: 720px; }
.hero-field input { flex: 1; min-width: 0; font: 500 1.25rem var(--body); padding: 13px 14px 10px; border: 0; border-radius: 3px; background: var(--plate); color: var(--ink); }
.hero-note { margin: 14px 0 0; color: #C9D6D4; }

/* Sections */
.band { padding-top: 48px; }
.band:last-of-type { padding-bottom: 56px; }
.page { padding-top: 32px; padding-bottom: 56px; }
.narrow { max-width: 760px; }
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.4em; }
.lead { color: var(--muted); }

/* Home harness: the wires leave one bundle and land on one terminal per equipment type. */
.harness { display: grid; grid-template-columns: minmax(48px, 18%) minmax(0, 1fr); }
.harness-wires { width: 100%; height: 100%; display: block; }
.harness-wires path { fill: none; stroke: var(--wire); stroke-width: 6; transition: stroke-width .12s; }
.harness-rows { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 78px; min-width: 0; }
.terminal { display: flex; align-items: center; gap: 16px; padding: 0 18px 0 30px; position: relative; color: var(--ink); text-decoration: none; background: var(--plate); border-bottom: 1px solid var(--line); }
.terminal:last-child { border-bottom: 0; }
.terminal::before { content: ""; position: absolute; left: 0; top: 50%; width: 22px; height: 6px; margin-top: -3px; background: var(--wire); }
.terminal::after { content: ""; position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: #C9D1CF; border: 2px solid var(--ink); box-shadow: inset 0 0 0 4px #C9D1CF, inset 0 0 0 5px var(--ink); }
.terminal:hover { background: #fff; color: var(--ink); }
.terminal-text { flex: 1; min-width: 0; padding-left: 16px; }
.terminal-name { display: block; font: 800 1.5rem/1.1 var(--display); }
.terminal-blurb { display: block; color: var(--muted); font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.terminal-count { font: 800 1.75rem/1 var(--display); }
@media (hover: hover) {
    .harness:has(.terminal:nth-child(1):hover) path:nth-child(1),
    .harness:has(.terminal:nth-child(2):hover) path:nth-child(2),
    .harness:has(.terminal:nth-child(3):hover) path:nth-child(3),
    .harness:has(.terminal:nth-child(4):hover) path:nth-child(4),
    .harness:has(.terminal:nth-child(5):hover) path:nth-child(5),
    .harness:has(.terminal:nth-child(6):hover) path:nth-child(6),
    .harness:has(.terminal:nth-child(7):hover) path:nth-child(7) { stroke-width: 10; }
}

/* Manual covers. The left edge is a spine in the category's wire color. */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 32px 24px; }
.book a { color: inherit; text-decoration: none; display: block; }
.book-cover { width: 100%; aspect-ratio: 17 / 22; object-fit: cover; object-position: top; border-left: 7px solid var(--wire); background: #fff; box-shadow: 0 1px 0 var(--line); }
.book-title { font-size: 1rem; line-height: 1.3; font-weight: 700; margin-top: 10px; }
.book a:hover .book-title { text-decoration: underline; }
.book-meta { color: var(--muted); font-size: .875rem; margin: 3px 0 2px; overflow-wrap: anywhere; }
.book-price { font-weight: 700; margin: 0; }

/* Listing */
.listing { display: grid; grid-template-columns: 230px 1fr; gap: 32px; align-items: start; }
.filter { display: flex; flex-direction: column; }
.filter a { padding: 8px 10px 6px; color: var(--ink); text-decoration: none; border-left: 5px solid var(--wire, var(--line)); line-height: 1.25; }
.filter a:hover { background: var(--plate); }
.filter a[aria-current="true"] { background: var(--plate); font-weight: 700; }
.result-count { color: var(--muted); }
.empty { background: var(--plate); padding: 24px; }

/* Product */
.crumb a { font-weight: 600; text-decoration: none; border-left: 5px solid var(--wire); padding-left: 8px; color: var(--ink); }
.product { display: grid; grid-template-columns: minmax(200px, 300px) 1fr 320px; gap: 32px; align-items: start; }
.product-cover img { border-left: 8px solid var(--wire); background: #fff; }
.product-info h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.product-info h2 { font-size: 1.375rem; margin: 1em 0 .25em; }
.spec { margin: 0 0 1em; }
.spec div { display: flex; gap: 12px; padding: 5px 0 3px; border-bottom: 1px solid var(--line); }
.spec dt { width: 120px; flex: none; color: var(--muted); }
.spec dd { margin: 0; }
.caution { background: #FBEBC0; border-left: 5px solid var(--breaker-2); padding: 10px 12px 8px; }
.buy { background: var(--plate); padding: 16px; position: sticky; top: 16px; }
.buy fieldset { border: 0; padding: 0; margin: 0 0 12px; }
.buy legend { font: 800 1.375rem var(--display); padding: 0; margin-bottom: 8px; }
.option { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 10px; padding: 12px 10px 10px; border: 2px solid var(--line); cursor: pointer; margin-bottom: 8px; font-size: .9375rem; line-height: 1.35; }
.option:has(input:checked) { border-color: var(--ink); }
.option input { margin: 3px 0 0; accent-color: var(--petrol-2); }
.option-text strong { display: block; font-size: 1rem; }
.option-price { font-weight: 700; font-size: 1.0625rem; }

/* Cart, checkout, and order lines */
.lines { list-style: none; margin: 0 0 16px; padding: 0; background: var(--plate); }
.lines-plain { background: none; }
.line { display: flex; gap: 14px; padding: 14px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.lines-plain .line { padding-left: 0; padding-right: 0; }
.line img { width: 56px; flex: none; }
.line-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.line-meta { color: var(--muted); font-size: .875rem; }
.line-price { font-weight: 700; }
.line-action { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: none; }
.totals { margin: 0 0 16px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; }
.totals dd { margin: 0; }
.totals .total { font-weight: 700; font-size: 1.25rem; }
.actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.form h2 { margin: 12px 0 0; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field input { width: 100%; font: inherit; padding: 10px 10px 8px; border: 2px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); }
.field input.input-validation-error { border-color: var(--danger); }
.field-row { display: grid; grid-template-columns: 1fr 76px 120px; gap: 12px; }
.address { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.address legend { font: 800 1.375rem var(--display); padding: 0; margin-bottom: 8px; }
.help { color: var(--muted); font-size: .9375rem; margin: 4px 0 0; }
.field-error, .form-error { color: var(--danger); font-weight: 600; font-size: .9375rem; }
.form-error ul { margin: 0; padding: 0; list-style: none; }
.validation-summary-valid { display: none; }
.notice { background: var(--plate); border-left: 5px solid var(--petrol-2); padding: 10px 12px 8px; margin: 16px 0 0; }

/* How buying works: a real sequence, so it's numbered. */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s); display: block; font: 800 2.5rem/1 var(--display); color: var(--petrol-2); margin-bottom: 6px; }
.steps strong { display: block; }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 16px; align-items: center; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--plate); font-size: .9375rem; }
th, td { text-align: left; padding: 8px 10px 6px; border-bottom: 1px solid var(--line); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Footer */
.foot { background: var(--petrol); color: #DCE5E3; padding: 28px 0 20px; }
.foot a { color: #fff; }
.foot-row { display: flex; justify-content: space-between; gap: 16px 40px; flex-wrap: wrap; }
.foot-row nav { display: flex; flex-direction: column; gap: 4px; }
.foot-name { font: 800 1.375rem var(--display); color: #fff; margin-bottom: 4px; }
.foot-legal { font-size: .8125rem; color: #AFC0BD; margin: 16px 0 0; }

@media (max-width: 1000px) {
    .product { grid-template-columns: minmax(150px, 240px) 1fr; }
    .buy { grid-column: 1 / -1; position: static; }
}
@media (max-width: 760px) {
    .listing { grid-template-columns: 1fr; gap: 16px; }
    .filter { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .filter a { border-left-width: 4px; background: var(--plate); font-size: .9375rem; }
    .steps { grid-template-columns: 1fr; }
    .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
    .terminal { padding-right: 12px; }
    .terminal-name { font-size: 1.3125rem; }
    .terminal-blurb { font-size: .8125rem; }
    .top-nav { margin-left: 0; order: 3; width: 100%; }
    .brand { width: 100%; }
    .hero-field { flex-direction: column; }
}
@media (max-width: 560px) {
    .product { grid-template-columns: 1fr; }
    .product-cover { max-width: 220px; }
    .line { flex-wrap: wrap; }
    .line-action { align-items: flex-start; width: 100%; }
    .field-row { grid-template-columns: 1fr 76px; }
    .field-row .field:last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Checkout email code */
.field input.code-input { max-width: 13rem; font-size: 1.625rem; font-weight: 700; letter-spacing: .25em; font-variant-numeric: tabular-nums; }
.verify-more { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 20px; align-items: baseline; }

/* Bot trap: off-screen for people, still present for form-filling bots. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Table of contents previews */
.previews { list-style: none; margin: 0 0 1em; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.preview { display: block; border: 1px solid var(--line); background: #fff; }
.preview img { width: 120px; height: auto; }
.preview:hover { border-color: var(--ink); }
.viewer { padding: 0; border: 0; width: min(900px, 100vw - 16px); max-height: calc(100vh - 16px); background: var(--plate); color: var(--ink); }
.viewer::backdrop { background: rgb(20 34 38 / .8); }
.viewer-bar { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: var(--petrol); color: #fff; }
.viewer-buttons { display: flex; gap: 6px; }
.viewer-btn { font: 600 .9375rem var(--body); padding: 7px 10px 5px; border: 0; border-radius: 3px; background: var(--petrol-2); color: #fff; cursor: pointer; }
.viewer-btn:hover { background: #2E6370; }
.viewer-btn[data-close] { background: var(--breaker); color: var(--ink); }
.viewer-img { width: 100%; height: auto; }

/* Model lookup table */
.model-filter { max-width: 420px; margin-bottom: 16px; }
.model-table th[scope="row"] { font-weight: 700; white-space: nowrap; }
.model-table td .line-meta { white-space: nowrap; }
.model-table tbody tr:hover { background: #fff; }
@media (max-width: 760px) {
    .model-table thead { display: none; }
    .model-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px; border-bottom: 1px solid var(--line); }
    .model-table th, .model-table td { border: 0; padding: 0; }
    .model-table td:nth-child(2) { grid-column: 1 / -1; color: var(--muted); }
    .model-table td:nth-child(3) { grid-column: 1; }
    .model-table td.num { grid-row: 1; grid-column: 2; }
    .model-table tr[hidden] { display: none; }
}
.model-table .group-row th { background: var(--steel); font: 800 1.25rem var(--display); padding-top: 14px; }
.model-table tbody[hidden] { display: none; }
@media (max-width: 760px) { .model-table tr.group-row { display: block; padding: 0; } .model-table tr.group-row th { display: block; padding: 12px 10px 6px; } }

.shipping-choice { border: 0; padding: 0; margin: 0; }
.shipping-choice legend { font: 800 1.375rem var(--display); padding: 0; margin-bottom: 8px; }
.totals div[hidden] { display: none; }

/* Cart: add or remove a CD */
.cd-toggle { margin: 6px 0 2px; }
.btn-small { padding: 8px 12px 6px; font-size: .9375rem; }
.buy-price { font: 800 2.25rem/1 var(--display); margin: 0 0 8px; }
.buy-what { margin-bottom: 6px; }

/* Admin: shipping labels */
.label-row { grid-template-columns: 1fr 140px; }
.field select { width: 100%; font: inherit; padding: 9px 8px 7px; border: 2px solid var(--line); border-radius: 3px; background: #fff; color: var(--ink); }
.rates .line { align-items: center; }
.rate-wanted { background: #fff; }
.actions-left { justify-content: flex-start; }
.section-gap { margin-top: 2rem; }
