:root, [data-theme="gold"] {
  --bg: #F7F5F0; --surface: #FFFFFF; --ink: #151515; --ink-2: #2A2A2A; --muted: #6B675F; --line: #E8E3D7; --chip: #F1EDE3;
  --accent: #D9A441; --accent-dark: #C08A2A; --accent-text: #151515; --accent-soft: #FBF2DD;
  --hi: #EDBE5A; --hi-ink: #2B1F00; --hero: #121212; --hero-2: #241D10; --glow: rgba(217,164,65,.30);
}
[data-theme="red"] {
  --bg: #F6F7F9; --surface: #FFFFFF; --ink: #0F172A; --ink-2: #1E293B; --muted: #5B6474; --line: #E2E6EE; --chip: #EEF1F5;
  --accent: #E11D48; --accent-dark: #BE123C; --accent-text: #FFFFFF; --accent-soft: #FFE4EA;
  --hi: #FACC15; --hi-ink: #3A2E00; --hero: #0B1120; --hero-2: #2A0B16; --glow: rgba(225,29,72,.38);
}
[data-theme="teal"] {
  --bg: #F2F6F5; --surface: #FFFFFF; --ink: #0B1F24; --ink-2: #15323A; --muted: #4E6166; --line: #DCE6E4; --chip: #E8EFEE;
  --accent: #0F9D8A; --accent-dark: #0B7F70; --accent-text: #FFFFFF; --accent-soft: #DDF4F0;
  --hi: #FFB86B; --hi-ink: #3D2200; --hero: #0B1F24; --hero-2: #0E3A3A; --glow: rgba(15,157,138,.40);
}
:root { --radius: 14px; --ok: #12805C; --warn: #B45309;
  --display: "Space Grotesk", Inter, system-ui, sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15.5px/1.6 Inter, system-ui, sans-serif; }
a { color: inherit; }
img, svg { display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.mono, code { font-family: var(--mono); font-size: .92em; letter-spacing: -.01em; }
.muted { color: var(--muted); }

/* logo: the bevelled O (pin-1 bevel of a PLCC flash chip) + the drawn wordmark, inline SVG (no font needed);
   ORIGINAL takes currentColor, ECU and the mark take --wm-b */
.logo { --wm-b: var(--accent); display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.mark { width: 36px; height: 36px; flex: none; fill: var(--wm-b); }
.wm { width: 139.7px; height: 15px; flex: none; }
.wm-t { font: 700 21px/1 var(--display); letter-spacing: -.03em; } .wm-t b { font-weight: 700; color: var(--wm-b); }
[data-theme="gold"] .logo { --wm-b: #B07A1C; }

/* header */
.hdr { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.hdr .wrap { display: flex; align-items: center; gap: 18px; height: 66px; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 8px 10px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--ink-2); white-space: nowrap; }
.nav a:hover { background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.hdr-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sbtn { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font: 500 14px Inter; cursor: pointer; min-width: 190px; white-space: nowrap; }
.sbtn:hover { border-color: var(--ink); color: var(--ink); }
.sbtn kbd { margin-left: auto; font: 600 11px var(--mono); padding: 2px 6px; border-radius: 6px; background: var(--chip); color: var(--muted); }
.price-pill { font: 600 13px var(--mono); padding: 8px 12px; border-radius: 999px; background: var(--hero); color: var(--hi); white-space: nowrap; }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
@media (max-width: 980px) { .sbtn { min-width: 0; } .sbtn span, .sbtn kbd { display: none; } }
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; padding: 10px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; } .nav a { padding: 12px; } .burger { display: block; } .price-pill { display: none; }
  .wrap { padding: 0 16px; } .mark { width: 32px; height: 32px; } .wm { width: 125.7px; height: 13.5px; } .wm-t { font-size: 19px; }
}

/* buttons, chips, badges */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: 12px;
  border: 0; background: var(--accent); color: var(--accent-text); font: 700 15.5px Inter, sans-serif; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .12s, box-shadow .15s; }
.btn:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 12px 26px -12px var(--glow); }
.btn.ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.dark { background: var(--hero); color: #fff; } .btn.dark:hover { background: var(--ink-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.chip small { color: var(--muted); font-weight: 500; } a.chip:hover { border-color: var(--ink); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.stock { background: var(--hi); color: var(--hi-ink); }
.badge.stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--hi-ink); }
.badge.pack { background: var(--accent-soft); color: var(--accent-dark); }
.badge.soft { background: var(--chip); color: var(--muted); }

/* page head */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 22px 0 10px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--ink); } .crumbs .sep { opacity: .5; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 700; } h2 { font-size: 24px; font-weight: 700; margin-bottom: 14px; }
.lead { color: var(--muted); font-size: 16.5px; margin: 10px 0 0; max-width: 760px; }
.guide { margin: 10px 0 0; font-size: 14.5px; } .guide a { font-weight: 600; }
.section { margin: 38px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }

/* search boxes */
.sbox { display: flex; gap: 8px; background: var(--surface); padding: 8px; border-radius: 16px; border: 1px solid var(--line); }
.sbox select { border: 0; background: var(--chip); border-radius: 10px; padding: 0 12px; font: 600 14px Inter; color: var(--ink); min-width: 120px; }
.sbox input { flex: 1; min-width: 0; border: 0; outline: 0; font: 500 16.5px Inter; padding: 14px 10px; color: var(--ink); background: transparent; }
.sbox .btn { padding: 14px 22px; }
@media (max-width: 640px) { .sbox { flex-wrap: wrap; } .sbox select { flex: 1 1 100%; height: 44px; } .sbox .btn { flex: 1 1 100%; } }
.manual { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; background: var(--surface); padding: 14px;
  border-radius: 16px; border: 1px solid var(--line); }
.manual label { display: flex; flex-direction: column; gap: 5px; font: 700 11px Inter; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 0; }
.manual select, .manual input { height: 46px; border: 1.5px solid var(--line); border-radius: 11px; padding: 0 12px; font: 500 15px Inter;
  color: var(--ink); background: var(--surface); min-width: 0; width: 100%; text-transform: none; letter-spacing: 0; }
.manual input { font-family: var(--mono); font-size: 14.5px; }
.manual select:focus, .manual input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.manual select:disabled { background: var(--chip); color: var(--muted); }
.manual .nums { grid-column: span 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.manual .btn { height: 46px; padding: 0 26px; }
.manual .clear { font: 600 13px Inter; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; padding: 0 4px; height: 46px; }
@media (max-width: 900px) { .manual { grid-template-columns: 1fr 1fr; } .manual .nums { grid-column: span 2; grid-template-columns: 1fr 1fr; } .manual .nums .btn { grid-column: span 2; } }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.08); margin-bottom: 12px; }
.tabs button { border: 0; background: none; padding: 8px 14px; border-radius: 9px; font: 600 14px Inter; color: inherit; opacity: .75; cursor: pointer; }
.tabs button.on { background: var(--surface); color: var(--ink); opacity: 1; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.light-tabs { background: var(--chip); }
@media (max-width: 560px) { .tabs { display: flex; max-width: 100%; overflow-x: auto; } .tabs button { white-space: nowrap; padding: 8px 11px; font-size: 13.5px; } }

/* the search window on every page */
dialog.sd { width: min(980px, calc(100vw - 24px)); border: 0; border-radius: 20px; padding: 22px; background: var(--bg); color: var(--ink);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.55); margin-top: 70px; }
dialog.sd::backdrop { background: rgba(10,12,16,.55); backdrop-filter: blur(3px); }
.sd-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sd-x { border: 0; background: var(--chip); width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 18px; }

/* file lists */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr) minmax(0, 1.6fr) auto; gap: 16px; align-items: center;
  padding: 14px 18px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .12s; }
.row:first-child { border-top: 0; } .row:hover { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.row .car b { display: block; font-weight: 700; } .row .car small { color: var(--muted); }
.row .ecu { font-weight: 600; color: var(--ink-2); font-size: 14.5px; }
.row .nums { display: flex; flex-direction: column; gap: 2px; font: 600 13.5px var(--mono); }
.row .nums span small { font-family: Inter, sans-serif; color: var(--muted); font-weight: 700; font-size: 10.5px; margin-right: 6px; letter-spacing: .04em; }
.row .go { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.row .price { font: 700 16px var(--display); white-space: nowrap; }
.row .arrow { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--hero); color: #fff; flex: none; transition: background .12s; }
.row:hover .arrow { background: var(--accent); color: var(--accent-text); }
.row .arrow::before { content: ""; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 100% no-repeat; }
.row .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media (max-width: 760px) { .row { grid-template-columns: 1fr auto; gap: 6px 12px; } .row .ecu, .row .nums { grid-column: 1; }
  .row .go { grid-column: 2; grid-row: 1 / span 3; flex-direction: column; } }
.mini { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; padding: 13px 18px;
  border-top: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .12s; }
.mini:first-child { border-top: 0; } .mini:hover { background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.mini .m1 { grid-column: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mini .m1 b { font-weight: 700; } .mini .m1 span { color: var(--muted); font-size: 14px; }
.mini .m2 { grid-column: 1; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13.5px; }
.mini .m2 .e { font-weight: 600; color: var(--ink-2); }
.mini .m2 code { font: 600 12.5px var(--mono); padding: 2px 7px; border-radius: 6px; background: var(--chip); }
.mini .mp { grid-column: 2; grid-row: 1 / span 2; font: 700 17px var(--display); padding: 8px 12px; border-radius: 10px; background: var(--chip); }
.mini:hover .mp { background: var(--accent); color: var(--accent-text); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 20px 0; }
.pager a, .pager span { min-width: 40px; padding: 9px 12px; border-radius: 10px; text-align: center; font-weight: 700; font-size: 14px;
  text-decoration: none; background: var(--surface); border: 1px solid var(--line); }
.pager .cur { background: var(--hero); color: #fff; border-color: var(--hero); } .pager .gap { border: 0; background: none; min-width: 0; padding: 9px 2px; }

/* blocks of figures: file, map-pack and hub pages */
.fx { margin-top: 26px; scroll-margin-top: 84px; } .fx h2 { font-size: 20px; margin-bottom: 8px; word-break: break-word; } .fx p { margin: 0 0 10px; } .fx a { font-weight: 600; }
.fx .n { font-family: var(--mono); letter-spacing: -.01em; }
.fxt { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: table; font-size: 14.5px; margin-bottom: 10px; }
.fxt th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 8px 14px; background: var(--chip); }
.fxt td { padding: 8px 14px; border-top: 1px solid var(--line); word-break: break-word; vertical-align: top; }
.fxt td:first-child { white-space: nowrap; } .fxt small { color: var(--muted); font-size: 13px; }
.fxn th:not(:first-child), .fxn td:not(:first-child) { text-align: right; } .fxn td:first-child { white-space: normal; }
@media (max-width: 560px) { .fxt th, .fxt td { padding: 7px 10px; } .fxt td:first-child { white-space: normal; word-break: break-all; min-width: 132px; font-size: 13px; } .fxn td:first-child { word-break: normal; min-width: 0; font-size: inherit; } }
.fxl { list-style: none; margin: 0 0 10px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14.5px; }
.fxl li { padding: 8px 14px; border-top: 1px solid var(--line); } .fxl li:first-child { border-top: 0; } .fxl small { color: var(--muted); font-size: 13px; }
.fxs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; font-size: 13.5px; }
.fxs li { padding: 4px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); } .fxs small { color: var(--muted); font-size: 12.5px; }
.fxc { display: flex; flex-wrap: wrap; gap: 6px; } .fxc a { font: 600 13px var(--mono); padding: 4px 9px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; word-break: break-all; }
.fxc a:hover { border-color: var(--ink); } .fxc small { font: 700 10.5px Inter, sans-serif; color: var(--muted); letter-spacing: .04em; }

/* footer */
.ftr { margin-top: 64px; background: var(--hero); color: #C9CDD6; }
.ftr .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding: 42px 20px 26px; }
.ftr h4 { color: #fff; font: 600 14px var(--display); margin: 0 0 10px; }
.ftr a, .ftr .fbtn { display: block; color: #C9CDD6; text-decoration: none; padding: 3px 0; font-size: 14px; } .ftr a:hover, .ftr .fbtn:hover { color: var(--hi); }
.ftr .fbtn { background: none; border: 0; font-family: inherit; line-height: inherit; text-align: left; cursor: pointer; }
.ftr .logo, .ftr .logo:hover { display: flex; padding: 0; color: #fff; margin-bottom: 14px; --wm-b: color-mix(in srgb, var(--accent) 82%, #fff); }
[data-theme="red"] .ftr .logo { --wm-b: #F43F5E; }
.ftr small { display: block; color: #8A909C; font-size: 12.5px; line-height: 1.6; }
.ftr .base { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 20px; font-size: 12.5px; color: #8A909C; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ftr .base a { display: inline; padding: 0; font-size: inherit; color: #C9CDD6; }
@media (max-width: 760px) { .ftr .wrap { grid-template-columns: 1fr 1fr; } }

/* preview switcher (local preview only) */
.pv { background: var(--hi); color: var(--hi-ink); font: 600 12.5px Inter; padding: 6px 16px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; }
.pv a { color: var(--hi-ink); text-decoration: none; padding: 2px 8px; border-radius: 6px; } .pv a.on { background: var(--hi-ink); color: var(--hi); }

/* the −10 % note (brand.PROMO): a slim bar over the header + a tag at every price */
.promo { background: linear-gradient(90deg, var(--hero), var(--hero-2) 50%, var(--hero)); color: #fff; font: 500 13.5px/1.35 Inter;
  padding: 8px 16px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center; }
.promo b { font-weight: 700; } .promo .go { color: var(--hi); font-weight: 700; text-decoration: none; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; }
.promo .go:hover { text-decoration: underline; }
@media (max-width: 700px) { .promo { flex-wrap: nowrap; font-size: 13px; padding: 7px 12px; } .promo .ex { display: none; } }
@media (max-width: 400px) { .promo .go { display: none; } }
.off { position: relative; overflow: hidden; display: inline-block; font: 800 12px/1 var(--display); letter-spacing: .01em; padding: 5px 8px; border-radius: 7px;
  background: var(--hi); color: var(--hi-ink); white-space: nowrap; vertical-align: middle; }
.off::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.75) 50%, transparent 70%); animation: offshine 3.6s ease-in-out 1s infinite; }
@keyframes offshine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@media (prefers-reduced-motion: reduce) { .off::after { animation: none; } }
.price-pill .off { margin-left: 6px; padding: 3px 6px; font-size: 11px; }
