/* Compact Equipment Sales — the shop. Dark, but a workshop dark rather than a tech-startup dark: warm near-black, flat panels
   with rounded-square corners (no pills, no glows, no glass), one red. Names and big numbers in DIN-style condensed caps like
   the decals on the machines; the system font for everything else. A few shop-floor details: a red rule under the header, the
   first key number on a white "data plate" with screw heads, brand names stamped in a little outlined tag, dotted leader lines
   in the spec lists. The 360 viewer styles itself in viewer.css (every class there is prefixed v-) and reads these tokens.
   Older looks: _backup-look-v1/ (first dark), _backup-look-light/ (light catalog). */

/* ===== DESIGN TOKENS — color */
:root {
  --bg: #0e0e0d;              /* page — warm near-black */
  --stage: #0e0e0d;           /* product frame + 360 stage */
  --panel: #161615;           /* panels, cards */
  --panel-2: #1b1b19;         /* card hover */
  --raised: #232321;          /* buttons, chips, tray */
  --raised-hi: #2e2d2a;       /* hover / pressed */
  --hairline: rgba(255, 246, 230, .08);
  --hairline-2: rgba(255, 246, 230, .15);
  --text: #f4f2ed;
  --text-muted: #aba79e;      /* 7:1 on panel */
  --text-faint: #8f8b82;      /* 5:1 on panel — counts, axis labels */
  --accent: #e2261c;          /* red — marks, focus rings, "this one" */
  --accent-text: #ff5d52;     /* red for small text on dark */
  --accent-fill: #d3211b;     /* filled buttons with white text */
  --accent-fill-hi: #e2261c;  /* hover */
  --accent-ink: #c4170f;      /* red text/marks on the white plate */
  --accent-wash: rgba(226, 38, 28, .13);
  --paper: #f4f2ed; --paper-ink: #161616; --paper-muted: #57544d;
  --plate: #f5f5f5;           /* white plate behind any photo still shot on white */
  --well: transparent;        /* machine previews sit right on the card — no black box, no plate */
  --sw-blue: #2f6fd6; --sw-red: #d8262f; --sw-gray: #7a8089; --sw-black: #1a1b1e; --sw-yellow: #f2b705;
}

/* ===== DESIGN TOKENS — type, shape, motion, layout */
:root {
  --font-display: "DIN Condensed", "Bahnschrift Condensed", "Bahnschrift", "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r-frame: 18px; --r-panel: 16px; --r-card: 14px; --r-sm: 10px; --r-pill: 10px;
  --dur: 160ms; --dur-slow: 230ms; --ease: cubic-bezier(.2, .7, .2, 1);
  --top-h: 70px; --gut: 24px;
  color-scheme: dark;
}

/* ===== BASE */
* { box-sizing: border-box; }
html { background: var(--bg); scrollbar-color: #3f3f46 var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 500 15px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button, select, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main:focus { outline: none; }
::selection { background: rgba(226, 38, 28, .35); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ui-i { width: 20px; height: 20px; flex: none; }

/* ===== HEADER */
.top {
  position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; gap: 20px;
  padding: 0 max(var(--gut), env(safe-area-inset-right)) 0 max(var(--gut), env(safe-area-inset-left));
  background: var(--bg); border-bottom: 2px solid var(--accent);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; border-radius: 8px; }
.logo { width: 34px; height: 34px; flex: none; }   /* img/brand/logo.svg (tools/brand.mjs) — the chat avatar; the header logo is the name in type */
.wordmark { display: flex; align-items: center; gap: 9px; padding-top: 3px; color: var(--accent); font: 700 30px/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.wm-sub { display: flex; flex-direction: column; gap: 0; font: 700 12px/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
/* Right side, in the order people use it: Search (a button until it's needed) · Compare · Call (the next step, last). */
.top-acts { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.top-btn {
  flex: none; display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 16px 0 14px; border-radius: var(--r-pill);
  background: var(--raised); border: 1px solid var(--hairline); color: var(--text); text-decoration: none; font: 600 14px var(--font-sans); white-space: nowrap;
  transition: background var(--dur), border-color var(--dur);
}
.top-btn:hover { background: var(--raised-hi); border-color: var(--hairline-2); }
.top-btn .ui-i { width: 19px; height: 19px; }

/* Search: a magnifying-glass button; tapping it (or typing anywhere, / or ⌘K) opens the field in its place. */
.srch { display: flex; justify-content: flex-end; min-width: 0; }
.search {
  display: none; align-items: center; gap: 10px; width: min(560px, 46vw); height: 44px; padding: 0 6px 0 14px;
  background: var(--panel); border: 1px solid var(--accent); border-radius: var(--r-pill); box-shadow: 0 0 0 3px rgba(226, 38, 28, .22);
}
.top.is-search .srch-open { display: none; }
.top.is-search .search { display: flex; animation: srch-in var(--dur-slow) var(--ease); }
@keyframes srch-in { from { opacity: 0; width: 46px; } }
.search > svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--text-muted); stroke-width: 1.65; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; color: var(--text); font: 500 15px var(--font-sans); text-overflow: ellipsis; }
.search input::placeholder { color: var(--text-faint); }
.search input::-webkit-search-cancel-button { display: none; }
.srch-x { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--text-muted); }
.srch-x:hover { background: var(--raised); color: var(--text); }
.srch-x svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; }

.sel-link { padding: 0 7px 0 16px; }
.sel-n { min-width: 28px; height: 28px; padding: 0 8px; display: grid; place-items: center; border-radius: 7px; background: var(--raised-hi); color: var(--text-muted); font: 700 13px/1 var(--font-sans); font-variant-numeric: tabular-nums; transition: background var(--dur), color var(--dur); }
.sel-link.has .sel-n { background: var(--accent-fill); color: #fff; }

/* Call: the number in full on a computer, "Call" on a phone (where tapping dials it). The red glyph makes it findable
   without shouting over the machines. */
.call { padding: 0 16px 0 12px; gap: 9px; background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.call-i { width: 18px; height: 18px; display: grid; place-items: center; color: #fff; }
.call-i svg { width: 17px; height: 17px; fill: currentColor; }
.call:hover { background: var(--accent-fill-hi); border-color: var(--accent-fill-hi); }
.call-s { display: none; }

/* ===== CONTROLS (segmented toggle, circles, pills, buttons) */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--hairline-2); border-radius: var(--r-pill); flex: none; }
.seg button { height: 32px; padding: 0 14px; border-radius: var(--r-pill); font: 700 13px var(--font-sans); color: var(--text-muted); transition: background var(--dur), color var(--dur); }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.circ, .sel {
  flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); text-decoration: none;
  background: var(--raised); border: 1px solid var(--hairline-2); color: var(--text);
  transition: background var(--dur), color var(--dur), border-color var(--dur), transform 150ms var(--ease);
}
.circ:hover, .sel:hover { background: var(--raised-hi); }
.circ:active, .sel:active, .sel-pill:active, .btn:active { transform: translateY(1px); }
.circ.sm { width: 36px; height: 36px; } .circ.sm .ui-i { width: 17px; height: 17px; }
.sel-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px 0 15px; border-radius: var(--r-pill);
  background: var(--raised); border: 1px solid var(--hairline-2); font: 600 14px var(--font-sans); white-space: nowrap;
  transition: background var(--dur), color var(--dur), transform 150ms var(--ease);
}
.sel-pill:hover { background: var(--raised-hi); }
.sel-pill .ui-i { width: 18px; height: 18px; }
a.sel-pill { color: var(--text); text-decoration: none; }
.sel-pill.go { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.sel-pill.go:hover { background: var(--accent-fill-hi); }
/* Compare toggle on cards: an obvious labelled button, not a bare "+" */
.cmp-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 10px; border-radius: var(--r-pill);
  background: var(--raised); border: 1px solid var(--hairline-2); color: var(--text); font: 600 13.5px var(--font-sans); white-space: nowrap;
  transition: background var(--dur), color var(--dur), border-color var(--dur), transform 150ms var(--ease);
}
.cmp-btn:hover { background: var(--raised-hi); border-color: rgba(255, 255, 255, .3); }
.cmp-btn:active { transform: translateY(1px); }
.cmp-btn .ui-i { width: 17px; height: 17px; }
.sel[aria-pressed="true"], .sel-pill[aria-pressed="true"], .cmp-btn[aria-pressed="true"] { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.sel-pill[aria-pressed="true"]:hover, .cmp-btn[aria-pressed="true"]:hover { background: var(--accent-fill-hi); }
.sel[aria-pressed="true"] > .ui-i:first-of-type, .sel[aria-pressed="false"] > .ui-i:nth-of-type(2),
.cmp-btn[aria-pressed="true"] > .ui-i:first-of-type, .cmp-btn[aria-pressed="false"] > .ui-i:nth-of-type(2),
.sel-pill[aria-pressed="true"] > .ui-i:first-of-type, .sel-pill[aria-pressed="false"] > .ui-i:nth-of-type(2) { display: none; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--r-pill);
  background: var(--raised-hi); border: 1px solid var(--hairline-2); color: var(--text); font: 600 14px var(--font-sans); text-decoration: none; white-space: nowrap;
  transition: background var(--dur), transform 150ms var(--ease);
}
.btn:hover { background: #3a3a40; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; } .btn .ui-i { width: 16px; height: 16px; }
.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.btn.primary:hover { background: var(--accent-fill-hi); }
.linkish { font: 600 13px var(--font-sans); color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; border-radius: 4px; }
.linkish:hover { color: var(--text); }

/* ===== VALUES (rounded; exact on hover/tap) */
.val { border-bottom: 1px dotted rgba(245, 245, 244, .4); cursor: help; }
.val .tilde { color: var(--text-faint); font-weight: 500; margin-right: 1px; }
.val.exact { border-bottom-style: solid; }
.val.na { color: var(--text-faint); font-weight: 500; }
.sw { width: 12px; height: 12px; flex: none; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(255, 255, 255, .3); }
.fuel { padding: 4px 7px 3px; border-radius: 5px; background: none; border: 1px solid var(--hairline-2); color: var(--text-muted); font: 700 10.5px/1 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; }
.mini .hit, tr.hit > * { background: var(--accent-wash); box-shadow: inset 2px 0 0 var(--accent); }
/* A highlight on the 360 view (hover or tap a +) lights up the matching numbers (tiles: pdp.css). */
tr.is-lit > * { background: var(--accent-wash); }
.empty { padding: 48px 0; color: var(--text-muted); } .empty b { color: var(--text); }
.empty.panel { padding: 40px 28px; margin-top: 12px; }

/* ===== GRID PAGE (filters + cards) */
.shop { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 24px; max-width: 1560px; margin: 0 auto; padding: 24px max(var(--gut), env(safe-area-inset-left)) 96px; }
.side {
  position: sticky; top: calc(var(--top-h) + 20px); align-self: start; max-height: calc(100vh - var(--top-h) - 40px); overflow: auto;
  padding: 22px 18px; background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--r-panel); scrollbar-width: thin;
}
fieldset { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
legend { display: flex; align-items: center; gap: 8px; padding: 0; margin-bottom: 8px; font: 700 16px/1 var(--font-display); letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
legend::before { content: ""; width: 10px; height: 3px; border-radius: 2px; background: var(--accent); }
.opt, .swatch-btn {
  display: flex; align-items: center; gap: 10px; width: calc(100% + 20px); margin: 0 -10px; padding: 7px 10px; border-radius: 12px;
  font: 600 14px var(--font-sans); text-align: left; cursor: pointer; transition: background var(--dur), color var(--dur);
}
.opt:hover, .swatch-btn:hover { background: var(--raised); }
.opt { position: relative; } .opt input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }  /* the mark is the checkbox */
.opt:has(input:checked) { background: var(--raised-hi); box-shadow: inset 0 0 0 1px var(--accent); } .opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.opt:has(input:disabled) { color: var(--text-faint); cursor: default; background: none; }
/* Filter marks: brand emblems + reference pictograms (app/icons.js BL.MARKS) in one 24×18 slot so labels line up */
/* Marks are white; hovering or picking one lights it up in its own colour (--on): brand colours, fuel-can colours, else red. */
.mk { display: block; width: 24px; height: 18px; flex: none; color: var(--text); --on: var(--accent); transition: color var(--dur); }
.mk-rhino { background: currentColor; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.mk-rippa { --on: var(--sw-blue); } .mk-gas { --on: #ef4444; } .mk-diesel { --on: #facc15; } .opt:hover .mk, .opt:has(input:checked) .mk { color: var(--on); }
.opt:has(input:disabled) .mk { opacity: .4; color: var(--text); } .mk .cut { fill: none; stroke: var(--panel); stroke-width: 1.6; stroke-linecap: round; }
.opt:hover .mk .cut { stroke: var(--raised); } .opt:has(input:checked) .mk .cut { stroke: var(--raised-hi); }
.opt-t { min-width: 0; }
.opt-t small { display: block; margin-top: 1px; font: 600 11.5px/1.25 var(--font-sans); color: var(--text-faint); }   /* motor: "3-cyl diesel · 1.1 L" */
.opt.two { align-items: flex-start; } .opt.two .mk { margin-top: 1px; }
.side-head, .side-foot, .f-toggle { display: none; }
.side .f-clear { margin-top: 2px; }
.opt em, .swatch-btn em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.fuel.mtr { color: var(--text); font-variant-numeric: tabular-nums; }
.res-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 8px; }
.res-title { margin: 0; font: 700 clamp(34px, 4vw, 48px)/1 var(--font-display); letter-spacing: .01em; text-transform: uppercase; }
.res-count { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); } .res-count b { color: var(--text); }
.act-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.act-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 12px; border-radius: var(--r-pill);
  background: var(--raised-hi); box-shadow: inset 0 0 0 1px var(--accent); font: 700 12.5px var(--font-sans); white-space: nowrap;
}
.act-chip .ui-i { width: 14px; height: 14px; color: var(--text-muted); }
.act-chip:hover .ui-i { color: var(--text); }
.act-chips .linkish { margin-left: 4px; }
.res-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.sort select {
  height: 40px; padding: 0 36px 0 14px; border-radius: var(--r-pill); border: 1px solid var(--hairline-2); appearance: none; -webkit-appearance: none;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='1.65' stroke-linecap='round'%3E%3Cpath d='m5 9 7 7 7-7'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
  color: var(--text); font: 600 13.5px var(--font-sans); cursor: pointer;
}
.hint { margin: 0 0 18px; font-size: 13px; color: var(--text-faint); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 16px; }

/* ===== CARDS */
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; cursor: pointer;
  background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--r-card); transition: border-color var(--dur) var(--ease), background var(--dur);
}
.card:hover { background: var(--panel-2); border-color: var(--hairline-2); }
.card.is-sel { border-color: rgba(226, 38, 28, .6); }
.well { position: relative; aspect-ratio: 4 / 3; margin: 8px 8px 0; border-radius: 12px; overflow: hidden; background: var(--well); }
.pic { position: relative; display: grid; place-items: center; width: 100%; height: 100%; }
.pic img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; transition: transform var(--dur-slow) var(--ease); }
.pic.cut img { scale: 1.22; }
/* Measured pictures (BL.fit in app/format.js): placed by the machine's own outline, so every machine and attachment fills its
   box the same amount — no more small buckets next to big grapples. Unmeasured ones keep the plain zoom above. */
.pic.cut.fit { display: block; overflow: hidden; }
.pic.cut.fit img, .t-pic .pic.cut.fit img, .avatar .pic.cut.fit img { position: absolute; height: auto; max-width: none; object-fit: fill; scale: none; }
.pic.plate { width: calc(100% - 16px); height: calc(100% - 16px); margin: 8px; border-radius: 12px; background: var(--plate); isolation: isolate; }
.pic.plate img { padding: 6%; mix-blend-mode: multiply; }
.pic.icon { color: var(--text-muted); } .pic.icon svg { width: 62%; height: 62%; }   /* line drawings as big as the photos */
.card:hover .pic img { transform: translateY(-3px); }
.card-body { flex: 1; padding: 14px 16px 4px; }
.brandline { display: inline-block; padding: 3px 6px 2px; border: 1px solid var(--hairline-2); border-radius: 5px; font: 700 10px/1.2 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }   /* the brand, stamped in a little tag */
.model { margin: 8px 0 0; font: 700 38px/.9 var(--font-display); letter-spacing: .01em; text-transform: uppercase; }
.cls { margin-top: 5px; font-size: 13px; color: var(--text-muted); }
.mini { display: grid; gap: 0; margin: 12px 0 0; }
.mini > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 -6px; padding: 6px; border-top: 1px dotted var(--hairline-2); border-radius: 0; }
.mini dt { overflow: hidden; font-size: 13px; color: var(--text-muted); white-space: nowrap; text-overflow: ellipsis; }
.mini dd { margin: 0; font: 600 14px var(--font-sans); white-space: nowrap; font-variant-numeric: tabular-nums; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 12px 16px; }
.badges { display: flex; flex-wrap: nowrap; align-items: center; gap: 5px; min-width: 0; }
.badges .fuel { flex: none; padding: 5px 9px; }

/* ===== PAGES (compare, product) */
.page { max-width: 1280px; margin: 0 auto; padding: 18px max(var(--gut), env(safe-area-inset-left)) 96px; }
.page-wide { max-width: 1640px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13px; color: var(--text-muted); }
.crumbs a { text-decoration: none; border-radius: 4px; } .crumbs a:hover { color: var(--text); text-decoration: underline; }
.crumbs b { color: var(--text); font-weight: 700; }
.c-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.panel { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--r-panel); }
.sub { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 700 19px/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.sub::before { content: ""; width: 10px; height: 3px; border-radius: 2px; background: var(--accent); }
/* the spec sheet's chart: where this one sits among ours */
.sits { margin: 24px 0 0; padding: 14px 14px 8px; border-radius: 12px; background: var(--bg); border: 1px solid var(--hairline); }
.sits figcaption { display: grid; gap: 1px; }
.sits figcaption span { font: 700 15px var(--font-sans); }
.sits figcaption em { font-style: normal; font-size: 12px; color: rgba(245, 245, 244, .75); }
.sits svg { display: block; width: 100%; height: auto; margin-top: 4px; overflow: visible; }
.s-line { fill: none; stroke: rgba(255, 255, 255, .6); stroke-width: 1.5; stroke-linejoin: round; }
.dot circle { fill: #0a0a0b; stroke: rgba(255, 255, 255, .85); stroke-width: 1.5; }
.dot.me circle { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.s-me { fill: #fff; font: 700 11px var(--font-sans); }
.s-ax { fill: rgba(245, 245, 244, .78); font: 600 10px var(--font-sans); }

/* ===== PRODUCT PAGE — below the fold */
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.wtile { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; background: var(--panel); border: 1px solid var(--hairline); border-radius: 12px; text-decoration: none; transition: background var(--dur), border-color var(--dur); }
.wtile:hover { background: var(--panel-2); border-color: var(--hairline-2); }
.w-pic { width: 72px; height: 54px; flex: none; } .w-pic .pic.icon svg { width: 74%; height: 74%; }
.w-t { display: grid; gap: 2px; min-width: 0; } .w-t b { font: 700 22px/1 var(--font-display); text-transform: uppercase; } .w-t span { font-size: 12.5px; color: var(--text-muted); }
.block { margin-top: 48px; }

.block > h2 { margin: 0 0 8px; font: 700 clamp(30px, 3.2vw, 40px)/1.05 var(--font-display); letter-spacing: .01em; text-transform: uppercase; scroll-margin-top: calc(var(--top-h) + 20px); }
.block > h2:focus { outline: none; }
.pitch { max-width: 70ch; margin: 0 0 20px; font-size: 15px; color: var(--text-muted); }
.spec-cols { columns: 2 380px; column-gap: 16px; }
.sgroup { margin-bottom: 16px; overflow: hidden; break-inside: avoid; background: var(--panel); border: 1px solid var(--hairline); border-radius: 14px; }
.sgroup h3, .staff h3 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 13px 16px 9px; font: 700 16px/1 var(--font-display); letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
.sgroup h3::before { content: ""; width: 10px; height: 3px; border-radius: 2px; background: var(--accent); }
.sgroup table { width: 100%; border-collapse: collapse; }
.sgroup th, .sgroup td { padding: 9px 16px; border-top: 1px dotted var(--hairline-2); }
.sgroup th { text-align: left; font-weight: 500; font-size: 14px; color: var(--text-muted); }
.sgroup td { text-align: right; font: 600 14.5px var(--font-sans); font-variant-numeric: tabular-nums; }
.sgroup td.txt { max-width: 30ch; font-weight: 500; font-size: 13.5px; line-height: 1.4; }
.flag { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 8px; border-radius: 50%; background: var(--accent-fill); color: #fff; font: 700 11px/1 var(--font-sans); vertical-align: 1px; cursor: help; }
.staff { margin-top: 32px; background: var(--panel); border: 1px solid var(--hairline); border-radius: 14px; }
.staff summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-radius: 14px; list-style: none; cursor: pointer; font: 700 15px var(--font-sans); color: var(--text-muted); transition: color var(--dur); }
.staff summary::-webkit-details-marker { display: none; }
.staff summary::before { content: ""; width: 7px; height: 7px; margin: 0 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: -45deg; transition: rotate var(--dur) var(--ease); }
.staff[open] summary::before { rotate: 45deg; }
.staff summary:hover { color: var(--text); }
.staff-in { padding: 0 20px 20px; }
.staff h3 { padding: 22px 0 10px; }
.say { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 16px; padding: 16px 18px; background: var(--raised); border-radius: 12px; }
.say .label { grid-column: 1 / -1; font: 700 11px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.say p { margin: 0; font-size: 16px; line-height: 1.5; }
.notes, .srcs { margin: 0; padding: 0; overflow: hidden; list-style: none; border: 1px solid var(--hairline); border-radius: 12px; }
.notes li + li, .srcs li + li { border-top: 1px solid var(--hairline); }
.notes li { position: relative; padding: 12px 16px 12px 44px; font-size: 14px; color: var(--text-muted); }
.notes li::before { content: "!"; position: absolute; left: 16px; top: 13px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-fill); color: #fff; font: 700 11px/1 var(--font-sans); }
.srcs li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 11px 16px; font-size: 13.5px; }
.kind { font: 700 10px/2 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); }
.srcs a { color: var(--text); text-decoration-color: var(--text-faint); text-underline-offset: 3px; overflow-wrap: anywhere; }
.srcs a:hover { text-decoration-color: var(--accent); }
.srcs .where { display: block; margin-top: 2px; font-size: 12px; color: var(--text-faint); overflow-wrap: anywhere; }

body { --tray-h: 0px; }
body.has-tray { --tray-h: 92px; }
/* ===== SHEETS (product page) — dimmed backdrop + one panel (centered on desktop, a bottom sheet on phones). Only the sheet's body scrolls, and
   only when a phone is too short for it. */
.sheet { position: fixed; inset: 0; z-index: 48; display: grid; place-items: center; padding: 24px; background: rgba(0, 0, 0, .74); opacity: 0; transition: opacity var(--dur) var(--ease); }
.sheet.is-in { opacity: 1; }
.sheet-in { display: flex; flex-direction: column; width: min(1180px, 100%); max-height: 100%; overflow: hidden; background: var(--panel); border: 1px solid var(--hairline-2); border-radius: var(--r-panel);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .95); transform: translateY(14px) scale(.985); transition: transform var(--dur-slow) var(--ease); }
.sheet.is-in .sheet-in { transform: none; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex: none; padding: 20px 18px 12px 24px; }
.sheet-t h2 { margin: 0; font: 700 clamp(28px, 3vw, 38px)/1.05 var(--font-display); letter-spacing: .01em; text-transform: uppercase; }
.sheet-t p { max-width: 80ch; margin: 6px 0 0; font-size: 14px; color: var(--text-muted); }
.sheet-body { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 4px 24px 24px; }
.ss-bar { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; margin: -4px 0 12px; }
.ss-bar .btn { text-decoration: none; }
.sheet .spec-cols { columns: 3 300px; column-gap: 12px; }
.sheet .sgroup { margin-bottom: 12px; border-radius: 12px; }
.sheet .sgroup h3 { padding: 11px 14px 7px; }
.sheet .sgroup th, .sheet .sgroup td { padding: 7px 14px; font-size: 13.5px; }
.sheet .sits { margin: 0 0 12px; break-inside: avoid; }
.ss-h { margin: 0; padding: 20px 0 10px; font: 700 17px/1 var(--font-display); letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
.sheet .wgrid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ===== WHAT'S INCLUDED — the Rhinoceros tool box (app/toolbox.js): a picture of the box beside a plain list of the tools.
   Each row: the tool on a white tile, its name and what it's for, how many. */
.kit { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; gap: 22px; }
.kit-pic { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; }
.kit-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kit-list li { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 12px 8px 8px; border-radius: 12px; background: var(--raised); border: 1px solid var(--hairline); }
.kit-t { flex: none; width: 52px; height: 52px; padding: 5px; border-radius: 9px; background: var(--paper); }
.kit-t img { width: 100%; height: 100%; object-fit: contain; }
.kit-w { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.kit-w b { font: 700 14px/1.2 var(--font-sans); }
.kit-w small { font-size: 12px; line-height: 1.3; color: var(--text-muted); }
.kit-n { flex: none; font: 700 22px/1 var(--font-display); color: var(--text); font-variant-numeric: tabular-nums; }

@media (max-width: 759px) {    /* phone: sheets come up from the bottom; the tool box stacks */
  .sheet { place-items: end stretch; padding: 10px 0 0; }
  .sheet-in { width: 100%; border-radius: 14px 14px 0 0; border-bottom: 0; transform: translateY(24px); }
  .sheet-head { padding: 14px 12px 8px 18px; }
  .sheet-t p { font-size: 13px; }
  .sheet-body { padding: 0 14px calc(16px + env(safe-area-inset-bottom)); }
  .kit { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .kit-pic { width: min(100%, calc(16dvh * 1.5)); margin: 0 auto; }
  .kit-list { grid-template-columns: minmax(0, 1fr); gap: 6px; }
}

@media (max-width: 330px) { .wm-sub { display: none; } }
@media (max-width: 370px) {                /* narrowest phones: the name a size smaller, so search · compare · Call keep their room */
  .top .wordmark { font-size: 21px; gap: 6px; }    /* .top: beats the 560px rule further down */
  .top .wm-sub { font-size: 9px; }
  .top-acts { gap: 6px; }
  .res-tools .sort > span { display: none; }
}

/* short, wide windows (a phone turned sideways): a slimmer header (the product page's own rules are in pdp.css) */
@media (max-height: 631px) and (orientation: landscape) {
  :root { --top-h: 54px; }
  .search, .top-btn { height: 38px; } .srch-open { width: 38px; } .sel-n { min-width: 26px; height: 26px; }
}

/* ===== COMPARE */
.c-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.c-title { margin: 0; font: 700 clamp(34px, 4vw, 48px)/1 var(--font-display); letter-spacing: .01em; text-transform: uppercase; }
.page .hint { margin-top: 8px; }
.ctable-wrap { overflow-x: auto; }
.ctable { width: 100%; min-width: 560px; border-collapse: collapse; }
.ctable thead th { min-width: 170px; padding: 18px 16px 14px; text-align: left; vertical-align: bottom; font-weight: 500; }
.c-item { position: relative; }
.c-link { display: grid; gap: 2px; text-decoration: none; border-radius: 12px; }
.c-pic { display: block; width: 100%; max-width: 200px; aspect-ratio: 4 / 3; margin-bottom: 10px; overflow: hidden; border-radius: 12px; background: var(--well); }
.c-item .model { font-size: 28px; }
.c-item .circ.sm { position: absolute; top: 6px; right: 0; z-index: 2; }
.ctable tbody th, .ctable tbody td { padding: 10px 16px; border-top: 1px solid var(--hairline); }
.ctable tbody th { text-align: left; font-weight: 500; font-size: 14px; color: var(--text-muted); }
.ctable tbody td { font: 600 14.5px var(--font-sans); font-variant-numeric: tabular-nums; }
.ctable td.txt { font-weight: 500; font-size: 13px; line-height: 1.4; }
.ctable tr.grp th { padding-top: 24px; font: 700 16px/1 var(--font-display); letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
.ctable td.win { background: var(--accent-wash); box-shadow: inset 2px 0 0 var(--accent); color: var(--accent-text); }
.ctable td.win .val { border-bottom-color: rgba(226, 38, 28, .5); }
.dash { color: var(--text-faint); }

/* ===== SELECTION TRAY */
.tray {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 40; width: min(980px, calc(100% - 24px)); translate: -50% 0;
  background: var(--raised); border: 1px solid var(--hairline-2); border-radius: 14px; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .95), 0 0 0 1px rgba(0, 0, 0, .5);
}
.tray-in { display: flex; align-items: center; gap: 12px; padding: 9px 9px 9px 18px; }
.tray-label { flex: none; font-size: 13px; color: var(--text-muted); } .tray-label b { color: var(--text); }
.tray-items { display: flex; flex: 1; gap: 8px; min-width: 0; margin: 0; padding: 2px; overflow-x: auto; list-style: none; scrollbar-width: none; }
.tray-item { display: flex; align-items: center; flex: none; padding: 3px; background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--r-pill); }
.tray-item a { display: flex; align-items: center; gap: 8px; padding-right: 2px; border-radius: var(--r-pill); text-decoration: none; font: 700 13px var(--font-sans); white-space: nowrap; }
.t-pic { width: 44px; height: 33px; flex: none; overflow: hidden; border-radius: var(--r-pill); background: var(--well); }
.t-pic .pic.plate { width: 100%; height: 100%; margin: 0; border-radius: 0; } .t-pic .pic.plate img { padding: 2px; }
.t-pic .pic.icon svg { width: 74%; height: 74%; } .t-pic .pic.cut img, .avatar .pic.cut img { scale: 1.5; }
.tray-item button { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--text-muted); transition: background var(--dur), color var(--dur); }
.tray-item button:hover { background: var(--raised-hi); color: var(--text); } .tray-item button .ui-i { width: 15px; height: 15px; }
.tray-acts { display: flex; flex: none; align-items: center; gap: 14px; }
body.has-tray { padding-bottom: 92px; }

/* ===== TOOLTIP + TOAST */
.tip {
  position: fixed; z-index: 60; max-width: min(340px, calc(100vw - 24px)); padding: 11px 13px; pointer-events: none;
  background: var(--raised); color: var(--text); border: 1px solid var(--hairline-2); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .85); font-size: 13px; line-height: 1.45;
}
.tip .tl { margin-bottom: 6px; font: 700 10px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.tip .tv { font: 700 15px/1.35 var(--font-sans); }
.tip .tn { margin-top: 6px; font-size: 12.5px; color: #ffb3b3; }
.tip .ts { margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 70; translate: -50% 16px; opacity: 0; pointer-events: none; padding: 11px 18px; border-radius: var(--r-pill);
  background: var(--text); color: var(--bg); font: 600 13.5px var(--font-sans); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8);
  transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease);
}
.toast.show { opacity: 1; translate: -50% 0; }
body.has-tray .toast { bottom: 104px; }

/* ===== SMALLER SCREENS */
@media (max-width: 1060px) {             /* header: Search and Compare shrink to their UIcons so the phone number keeps its room */
  .srch-open { width: 46px; padding: 0; justify-content: center; } .srch-open .tb-l { display: none; }
  .sel-link { padding: 0 7px 0 13px; gap: 7px; } .sel-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 899px) {              /* filters: a row (Filters button + the categories); the button opens the full panel as a sheet */
  .shop { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 16px; }
  .side { position: relative; top: auto; max-height: none; overflow: visible; padding: 0; background: none; border: 0; border-radius: 0; }
  .side-body { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
  .side-body::-webkit-scrollbar { display: none; }
  .side fieldset { display: none; flex: none; gap: 6px; margin: 0; }
  .side .fs-type { display: flex; }
  .side legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .opt { flex: none; width: auto; margin: 0; padding: 8px 14px; background: var(--panel); border: 1px solid var(--hairline-2); border-radius: var(--r-pill); font-size: 13.5px; white-space: nowrap; }
  .opt:has(input:checked) { background: var(--raised-hi); border-color: var(--accent); }
  .opt em { margin-left: 4px; }
  .f-toggle {
    display: inline-flex; flex: none; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: var(--r-pill);
    background: var(--raised); border: 1px solid var(--hairline-2); font: 600 13.5px var(--font-sans); white-space: nowrap;
  }
  .f-toggle .ui-i { width: 18px; height: 18px; }
  .f-toggle b { min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--accent-fill); color: #fff; font: 700 11.5px/1 var(--font-sans); }
  .f-toggle.on { border-color: var(--accent); }
  .side .f-clear { flex: none; margin: 0 0 0 4px; white-space: nowrap; }

  /* the sheet */
  body.filters-open { overflow: hidden; }
  body.filters-open .shop::before { content: ""; position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .62); }
  body.filters-open .side {
    position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; max-height: min(86dvh, 720px);
    background: var(--panel); border: 1px solid var(--hairline-2); border-bottom: 0; border-radius: 14px 14px 0 0; animation: sheet-up var(--dur-slow) var(--ease);
  }
  @keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } }
  body.filters-open .side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 20px; }
  body.filters-open .side-head h2 { margin: 0; font: 700 30px/1 var(--font-display); text-transform: uppercase; }
  body.filters-open .side-body { display: block; flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 8px 20px 4px; }
  body.filters-open .side fieldset { display: block; margin: 0 0 16px; }
  body.filters-open .side legend { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  body.filters-open .opt { width: calc(100% + 20px); margin: 0 -10px; padding: 8px 10px; background: none; border: 0; border-radius: 12px; font-size: 14.5px; white-space: normal; }
  body.filters-open .opt:has(input:checked) { background: var(--raised-hi); box-shadow: inset 0 0 0 1px var(--accent); }
  body.filters-open .opt em { margin-left: auto; }
  body.filters-open .f-toggle, body.filters-open .side .f-clear { display: none; }
  body.filters-open .side-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--hairline);
  }
  .side-foot .btn { flex: 1; max-width: 260px; justify-content: center; }
}
}
@media (max-width: 759px) {
  :root { --gut: 16px; --top-h: 62px; }
  .block { margin-top: 36px; }
  .say { grid-template-columns: minmax(0, 1fr); } .say .btn { justify-self: start; }
  .srcs li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (max-width: 560px) {
  .top { gap: 10px; }
  .logo { width: 28px; height: 28px; }
  .brand { gap: 7px; }
  .wm-sub { font-size: 10px; }
  .wordmark { font-size: 24px; gap: 7px; }
  /* phone header: logo · round search · compare count · Call. While searching, the field takes the whole row. */
  .top-acts { gap: 8px; }
  .top-btn { height: 40px; padding: 0 12px 0 10px; font-size: 13.5px; }
  .srch-open { width: 40px; padding: 0; justify-content: center; } .srch-open .tb-l { display: none; }
  .sel-link { padding: 0 5px 0 12px; gap: 6px; } .sel-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .sel-n { min-width: 26px; height: 26px; }
  .call { padding: 0 12px 0 10px; gap: 6px; } .call-i { width: 16px; height: 16px; }
  .call-n { display: none; } .call-s { display: inline; }
  .top.is-search .sel-link, .top.is-search .call { display: none; }
  .srch { flex: 1; } .top.is-search .search { width: 100%; }
  .search { height: 42px; padding: 0 4px 0 14px; gap: 8px; } .search input { font-size: 16px; }
  .res-title { font-size: 42px; }
  .res-tools { width: 100%; flex-wrap: nowrap; }
  .res-tools .sort { flex: 1; min-width: 0; } .res-tools .sort select { width: 100%; }
  .results > .hint { display: none; }      /* phones: the ~ and the Compare buttons explain themselves */
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { border-radius: 12px; }
  .well { margin: 6px 6px 0; border-radius: 12px; }
  .card-body { padding: 10px 11px 2px; }
  .model { font-size: 31px; }
  .cls { font-size: 12px; }
  .mini > div { flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 8px; }
  .mini dt { font-size: 11.5px; white-space: normal; }
  .mini dd { font-size: 13.5px; }
  .card-foot { padding: 8px 8px 10px 11px; }
  .card-foot { flex-wrap: wrap; gap: 8px; }
  .cmp-btn { width: 100%; justify-content: center; height: 38px; font-size: 13px; }
  .tray-in { gap: 8px; padding-left: 10px; }
  .tray-label, .tray-item a > span:not(.t-pic), .wide-only { display: none; }
  .tray-acts { gap: 10px; }
}

/* ===== REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; scroll-behavior: auto !important; }
  .card:hover .pic img { transform: none; }
}
