/* Autobyte — v2.3 homepage: ECU / chiptuning look.
   Loaded last; restyles the shared pieces (header, search, results, browse) and
   adds the animated hero, stats, tool cards and latest bulletins. */

/* ---------- background: circuit grid + glow that follows the pointer ---------- */
.hm-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  --g: color-mix(in srgb, var(--primary) 8%, transparent);
  background:
    radial-gradient(620px 420px at var(--mx, 72%) var(--my, 18%), color-mix(in srgb, var(--primary) 11%, transparent), transparent 70%),
    radial-gradient(800px 500px at 8% 105%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%),
    linear-gradient(var(--g) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(90deg, var(--g) 1px, transparent 1px) 0 0 / 34px 34px,
    var(--bg); }
body { background: transparent; }
html { background: var(--bg); }
.hm-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- header: glass bar ---------- */
.topbar { background: color-mix(in srgb, #070C10 78%, transparent); border-bottom: 1px solid rgba(25,195,192,.18);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 11px 24px; }
.brand__logo { width: 40px; height: 40px; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.brand__sub { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2px; color: #19C3C0; }
.topbar__meta { display: none; }
.hm-cta { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border: 0; border-radius: 10px;
  cursor: pointer; font: 700 14px/1 inherit; font-family: inherit; color: #04110F; white-space: nowrap;
  background: linear-gradient(135deg, #19C3C0, #5EF0D8);
  box-shadow: 0 0 0 1px rgba(25,195,192,.25), 0 8px 26px -10px rgba(25,195,192,.6); transition: transform .2s; }
.hm-cta:hover { transform: translateY(-2px); }
.hm-cta svg { width: 16px; height: 16px; }

/* ---------- hero ---------- */
.hm-hero { padding: 64px 0 26px; }
.hm-hgrid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; }
.hm-left { min-width: 0; animation: hmIn .7s cubic-bezier(.2,.8,.2,1) both; }
.hm-tag { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--mono); letter-spacing: 1.5px; color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); background: color-mix(in srgb, var(--primary) 8%, transparent);
  padding: 7px 12px; border-radius: 99px; }
.hm-tag i { width: 7px; height: 7px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 10px #3DDC84; animation: hmBlink 1.6s infinite; }
.hm-h1 { font-size: clamp(34px, 5.2vw, 60px); line-height: 1.04; letter-spacing: -1.5px; margin: 18px 0 16px; font-weight: 850; }
.hm-grad { background: linear-gradient(90deg, var(--primary), #7DF5E2 40%, var(--accent)); -webkit-background-clip: text; background-clip: text;
  color: transparent; background-size: 200% 100%; animation: hmShine 6s linear infinite; }
[data-theme="light"] .hm-grad { background-image: linear-gradient(90deg, var(--primary), #14A3A1 45%, var(--accent)); }
.hm-glitch { position: relative; display: inline-block; }
.hm-glitch::before, .hm-glitch::after { content: attr(data-t); position: absolute; inset: 0; opacity: 0; -webkit-text-fill-color: currentColor; }
.hm-glitch::before { color: var(--accent); animation: hmGlitch 7s infinite steps(1); }
.hm-glitch::after { color: var(--primary); animation: hmGlitch 7s .08s infinite steps(1) reverse; }
.hm-lead { font-size: 17px; color: var(--muted); max-width: 540px; margin: 0 0 24px; }

/* search (same element ids as before, new look) */
.hm-left .search { max-width: 580px; margin: 0; border-radius: 14px; padding: 7px 8px 7px 18px; border-width: 1.5px;
  animation: none; box-shadow: var(--shadow); }
.hm-left .search:focus-within { transform: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent), 0 14px 40px -14px color-mix(in srgb, var(--primary) 55%, transparent); }
.hm-left .search__icon { color: var(--primary); width: 21px; height: 21px; }
#searchInput { font: 600 17px var(--mono); padding: 13px 0; min-width: 0; }
#searchInput::-webkit-search-cancel-button { display: none; }
.hm-under { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; max-width: 580px; }
.hm-chips { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.hm-chips button { font: 600 12.5px var(--mono); padding: 7px 11px; border-radius: 8px; border: 1px solid var(--border); cursor: pointer;
  background: var(--surface); color: var(--muted); transition: color .2s, border-color .2s, transform .2s; }
.hm-chips button:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.hm-under .controls { margin: 0; animation: none; }
.hm-under .select { box-shadow: none; border-radius: 10px; padding: 3px 4px 3px 12px; }
#makeFilter { border-radius: 8px; padding: 6px 8px; }

/* ---------- ECU board ---------- */
.hm-board { position: relative; aspect-ratio: 1 / .92; border-radius: 22px; border: 1px solid var(--border); overflow: hidden;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--primary) 10%, var(--surface)), var(--surface) 70%);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.55); transition: transform .2s ease-out; animation: hmIn .8s .1s cubic-bezier(.2,.8,.2,1) both; }
.hm-pcb { position: absolute; inset: 0; width: 100%; height: 100%; }
.hm-trace { fill: none; stroke: color-mix(in srgb, var(--primary) 30%, transparent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hm-pulse { fill: none; stroke: var(--primary); stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: 14 400;
  filter: drop-shadow(0 0 4px var(--primary)); animation: hmFlow 3.2s linear infinite; }
.hm-pulse.a { stroke: var(--accent); filter: drop-shadow(0 0 4px var(--accent)); }
.hm-pad { fill: var(--surface-2); stroke: color-mix(in srgb, var(--primary) 45%, transparent); stroke-width: 1.5; }
.hm-via { fill: var(--bg); stroke: color-mix(in srgb, var(--primary) 50%, transparent); stroke-width: 1.5; }
.hm-chip { fill: #0A1015; stroke: #2A3E49; stroke-width: 2; }
[data-theme="light"] .hm-chip { fill: #1B2A33; }
.hm-pin { fill: #9FB3B8; }
.hm-chiptext { font: 700 15px var(--mono); fill: #CFE5E5; letter-spacing: 2px; }
.hm-chipsub { font: 600 9.5px var(--mono); fill: #6F8790; letter-spacing: 1.5px; }
.hm-lbl { font: 600 10px var(--mono); fill: var(--muted); letter-spacing: 1px; }
.hm-led { animation: hmBlink 1.2s infinite; }
.hm-panel { position: absolute; background: color-mix(in srgb, var(--bg) 82%, transparent); border: 1px solid var(--border); border-radius: 12px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font: 600 11px/1.5 var(--mono); color: var(--muted); }
.hm-panel h4 { margin: 0; padding: 7px 10px; border-bottom: 1px solid var(--border); font: 700 10.5px var(--mono); letter-spacing: 1.5px;
  color: var(--primary); display: flex; justify-content: space-between; gap: 8px; }
.hm-scope { right: 4%; top: 4%; width: 46%; height: 28%; }
.hm-scope canvas { display: block; width: 100%; height: calc(100% - 30px); }
.hm-hex { left: 4%; bottom: 4%; width: 44%; height: 30%; overflow: hidden; }
.hm-hex pre { margin: 0; padding: 6px 10px; font: 500 10.5px/1.55 var(--mono); color: color-mix(in srgb, var(--slate) 70%, transparent); white-space: pre; }
.hm-hex pre b { color: var(--accent); font-weight: 700; }
.hm-bar { position: absolute; left: 10px; right: 10px; bottom: 9px; height: 5px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.hm-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 9px; }
.hm-live { right: 4%; bottom: 4%; width: 40%; padding: 10px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.hm-live div { display: flex; flex-direction: column; }
.hm-live span { font-size: 9.5px; letter-spacing: 1.2px; }
.hm-live strong { font: 800 17px var(--mono); color: var(--slate); }
.hm-live strong em { font-style: normal; font-size: 10px; color: var(--muted); margin-left: 3px; }
.hm-board.is-paused *, .hm-board.is-paused { animation-play-state: paused !important; }

/* ---------- results (search) ---------- */
.results { margin-top: 10px; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); align-items: start; }
.results:empty { margin: 0; }
.results > .count, .results > .state { grid-column: 1 / -1; }
.results .card { border-radius: 16px; }
.results .card:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 25%, transparent), 0 14px 40px -16px color-mix(in srgb, var(--primary) 50%, transparent); }
.card__id { font-family: var(--mono); }

/* ---------- stats ---------- */
.hm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 26px 0 0; }
.hm-stats:empty { display: none; }
.hm-stat { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 18px 20px; position: relative; overflow: hidden; }
.hm-stat::after { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--primary), transparent); transform: translateX(-100%); animation: hmSweep 4s infinite; }
.hm-stat:nth-child(2)::after { animation-delay: 1s; } .hm-stat:nth-child(3)::after { animation-delay: 2s; } .hm-stat:nth-child(4)::after { animation-delay: 3s; }
.hm-stat b { display: block; font: 800 30px var(--mono); letter-spacing: -1px; }
.hm-stat span { color: var(--muted); font-size: 13px; font-weight: 600; }

/* ---------- sections ---------- */
.hm-sec { padding: 56px 0 8px; }
.hm-sh { margin-bottom: 22px; }
.hm-sh h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.6px; margin: 6px 0 0; }
.hm-sh p { color: var(--muted); margin: 6px 0 0; max-width: 560px; }
.hm-k { font: 700 12px var(--mono); letter-spacing: 2px; color: var(--accent); }

.hm-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hm-card { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: flex; flex-direction: column; isolation: isolate;
  border: 1px solid var(--border); background: var(--surface); border-radius: 18px; padding: 22px; overflow: hidden; color: var(--slate);
  transition: transform .25s, border-color .25s, box-shadow .25s; }
.hm-card::before { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px 160px at var(--cx, 50%) var(--cy, 0%), color-mix(in srgb, var(--primary) 18%, transparent), transparent 70%); }
.hm-card:hover, .hm-card:focus-visible { transform: translateY(-5px); border-color: color-mix(in srgb, var(--primary) 60%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 25%, transparent), 0 12px 36px -14px color-mix(in srgb, var(--primary) 50%, transparent); }
.hm-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.hm-card:hover::before { opacity: 1; }
.hm-ic { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; color: var(--primary); margin-bottom: 16px;
  background: color-mix(in srgb, var(--primary) 12%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); }
.hm-ic svg { width: 26px; height: 26px; }
.hm-card.amb .hm-ic { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.hm-ct { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.hm-cd { color: var(--muted); font-size: 14px; line-height: 1.55; flex: 1; }
.hm-go { display: inline-flex; gap: 6px; margin-top: 16px; font-weight: 700; font-size: 13.5px; color: var(--primary); }
.hm-go i { font-style: normal; transition: transform .2s; }
.hm-card:hover .hm-go i { transform: translateX(5px); }
.hm-n { position: absolute; right: 18px; top: 18px; font: 700 11px var(--mono); color: var(--muted); opacity: .6; }

.hm-latest { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; }
.hm-list { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); overflow: hidden; }
.hm-row { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 92px 1fr auto; gap: 14px; align-items: center;
  width: 100%; padding: 15px 18px; border-top: 1px solid var(--border); color: var(--slate); transition: background .2s; }
.hm-row:first-child { border-top: 0; }
.hm-row:hover, .hm-row:focus-visible { background: var(--surface-2); }
.hm-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.hm-no { font: 800 12.5px var(--mono); color: var(--primary); }
.hm-rt { display: block; font-weight: 700; }
.hm-rs { display: block; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-rmain { min-width: 0; }
.hm-dtc { font: 700 11.5px var(--mono); padding: 4px 8px; border-radius: 7px; color: var(--accent); white-space: nowrap;
  background: color-mix(in srgb, var(--accent) 12%, transparent); }
.hm-flash { border: 1px solid var(--border); border-radius: 18px; background: var(--surface); padding: 22px; }
.hm-flash h3 { margin: 0 0 4px; }
.hm-flash p { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.hm-steps { display: flex; flex-direction: column; gap: 10px; font: 600 13px var(--mono); }
.hm-steps div { display: flex; align-items: center; gap: 10px; color: var(--muted); transition: color .3s; }
.hm-steps i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); flex: none; transition: all .3s; }
.hm-steps .ok { color: var(--slate); }
.hm-steps .ok i { border-color: #3DDC84; background: #3DDC84; box-shadow: 0 0 10px rgba(61,220,132,.6); }
.hm-steps .run { color: var(--primary); }
.hm-steps .run i { border-color: var(--primary); border-top-color: transparent; animation: hmSpin .8s linear infinite; }

/* ---------- browse + footer ---------- */
.browse { margin: 56px 0 70px; }
.browse__title { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -.4px; }
.browse__head { border-bottom: 0; padding-bottom: 0; margin-bottom: 16px; }
.group { border-radius: 14px; }
.leaf__id { font-family: var(--mono); }
.sitefoot { background: color-mix(in srgb, var(--bg) 80%, transparent); margin-top: 0; }

/* ---------- searching: results straight under the search box ---------- */
body.is-searching .hm-extra,
body.is-searching .hm-board,
body.is-searching .hm-tag,
body.is-searching .hm-lead { display: none; }
body.is-searching .hm-hgrid { grid-template-columns: 1fr; }
body.is-searching .hm-hero { padding: 26px 0 6px; }
body.is-searching .hm-h1 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 14px; letter-spacing: -.8px; }
body.is-searching .hm-left { animation: none; }

/* reveal on scroll */
.hm-rv { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.hm-rv.in { opacity: 1; transform: none; }

@keyframes hmIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes hmFlow { from { stroke-dashoffset: 414; } to { stroke-dashoffset: 0; } }
@keyframes hmBlink { 50% { opacity: .25; } }
@keyframes hmShine { to { background-position: 200% 0; } }
@keyframes hmSweep { to { transform: translateX(100%); } }
@keyframes hmSpin { to { transform: rotate(360deg); } }
@keyframes hmGlitch { 0%, 92%, 100% { opacity: 0; transform: none; }
  93% { opacity: .8; transform: translate(-3px,1px); clip-path: inset(10% 0 55% 0); }
  95% { opacity: .8; transform: translate(3px,-1px); clip-path: inset(60% 0 8% 0); }
  97% { opacity: .6; transform: translate(-2px,0); clip-path: inset(35% 0 40% 0); } }

@media (max-width: 960px) {
  .hm-hgrid { grid-template-columns: 1fr; gap: 28px; }
  .hm-board { max-width: 620px; width: 100%; margin: 0 auto; }
  .hm-cards { grid-template-columns: 1fr 1fr; }
  .hm-latest { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hm-wrap { padding: 0 16px; }
  .topbar { padding: 9px 12px; gap: 8px; }
  .brand__sub { display: none; }
  .brand__name { font-size: 15px; }
  .hm-cta span { display: none; }
  .hm-cta { width: 38px; padding: 0; justify-content: center; }
  .toolsbtn span { display: none; }
  .hm-hero { padding: 30px 0 16px; }
  .hm-tag { font-size: 10.5px; letter-spacing: 1px; } .hm-long { display: none; }
  .hm-lead { font-size: 15.5px; margin-bottom: 18px; }
  #searchInput { font-size: 16px; }
  .hm-cards { grid-template-columns: 1fr; }
  .hm-card { padding: 18px; flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; }
  .hm-card .hm-ic { margin: 0; width: 44px; height: 44px; }
  .hm-card .hm-ct { flex: 1; margin: 0; font-size: 16.5px; }
  .hm-card .hm-cd { flex-basis: 100%; margin-top: 8px; }
  .hm-card .hm-go, .hm-card .hm-n { display: none; }
  .hm-board { aspect-ratio: 1 / 1.05; }
  .hm-hex { width: 52%; height: 30%; } .hm-scope { width: 62%; height: 26%; }
  .hm-live { width: 40%; padding: 8px 9px; gap: 4px 8px; } .hm-live strong { font-size: 13px; } .hm-live span { font-size: 8.5px; }
  .hm-row { grid-template-columns: 74px 1fr; } .hm-dtc { display: none; }
  .hm-stat b { font-size: 24px; } .hm-stats { grid-template-columns: 1fr 1fr; }
  .results { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-hero *, .hm-extra *, .hm-board, .hm-left { animation: none !important; transition: none !important; }
  .hm-rv { opacity: 1; transform: none; }
}

/* ---------- compact result cards ---------- */
.results > .count { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.backpill { border: 1px solid var(--border); background: var(--surface); color: var(--primary); font: 700 13px/1 inherit; font-family: inherit;
  padding: 8px 12px; border-radius: 99px; cursor: pointer; transition: border-color .15s; }
.backpill:hover { border-color: var(--primary); }
.card--hit { cursor: pointer; gap: 8px; outline: none; }
.card--hit:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent); }
.card--hit .card__title { font-size: 18px; }
.card__clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.code--more { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px;
  padding-top: 10px; border-top: 1px solid var(--border); }
.card__open { font-weight: 700; font-size: 14px; color: var(--primary); }
.card__open i { font-style: normal; display: inline-block; transition: transform .2s; }
.card--hit:hover .card__open i { transform: translateX(4px); }
.card__pdf { font: 700 12px var(--mono); letter-spacing: .5px; text-decoration: none; color: var(--muted); border: 1px solid var(--border);
  padding: 6px 10px; border-radius: 8px; transition: color .15s, border-color .15s; }
.card__pdf:hover { color: var(--primary); border-color: var(--primary); }
.card__lockpill { font-size: 12px; font-weight: 700; color: var(--accent); }
.leaf:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* ---------- bulletin view ---------- */
.bview { position: fixed; inset: 0; z-index: 45; display: flex; justify-content: center; align-items: flex-start; padding: 4vh 16px; }
.bview[hidden] { display: none; }
.bview__backdrop { position: fixed; inset: 0; background: rgba(4,9,12,.66); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade .2s ease both; }
.bview__panel { position: relative; width: 100%; max-width: 880px; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 90px -20px rgba(0,0,0,.6); animation: bvIn .28s cubic-bezier(.2,.8,.2,1) both; }
.bview__bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, var(--primary)); }
.bview__back { display: inline-flex; align-items: center; gap: 4px; height: 38px; padding: 0 14px 0 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--slate); font: 700 14px/1 inherit; font-family: inherit; }
.bview__back:hover { border-color: var(--primary); color: var(--primary); }
.bview__back svg { width: 20px; height: 20px; }
.bview__no { font: 800 13px var(--mono); color: var(--primary); letter-spacing: .5px; }
.bview__msg { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--ok); }
.bview__act { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 13px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--slate); font: 700 13.5px/1 inherit; font-family: inherit; text-decoration: none; }
.bview__act:hover { border-color: var(--primary); color: var(--primary); }
.bview__act svg { width: 17px; height: 17px; }
.bview__act--pdf { background: var(--primary); border-color: var(--primary); color: #04110F; }
[data-theme="light"] .bview__act--pdf { color: #fff; }
.bview__act--pdf:hover { color: #04110F; filter: brightness(1.1); }
.bview__act[hidden] { display: none; }
.bview__body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 22px 26px 30px; }

.bv-kicker { font: 700 11.5px var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
.bv-title { font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -.6px; margin: 6px 0 14px; line-height: 1.15; }
.bv-veh { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; background: var(--surface-2); }
.bv-veh div { padding: 10px 14px; border-left: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.bv-veh div:first-child { border-left: 0; }
.bv-veh span { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); }
.bv-veh b { font-size: 15px; }
.bv-sec { margin-top: 22px; }
.bv-sec h3 { font-size: 12px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--primary); margin: 0 0 8px; }
.bv-sec p, .bv-sec li { font-size: 15.5px; line-height: 1.65; margin: 0; max-width: 72ch; }
.bv-sec ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.bv-sec.is-cause, .bv-sec.is-fix { border-left: 3px solid var(--primary); padding: 2px 0 2px 16px; }
.bv-sec.is-cause { border-left-color: var(--accent); }
.bv-sec.is-cause h3 { color: var(--accent); }
.bv-codes { display: grid; gap: 8px; }
.bv-code { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 10px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 9%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.bv-code b { font: 800 14px var(--mono); color: var(--accent); white-space: nowrap; }
.bv-code span { font-size: 14.5px; }
.bv-note { margin-top: 22px; padding: 12px 16px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.bv-note b { color: var(--accent); font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; }
.bv-note p { margin: 4px 0 0; font-size: 15px; line-height: 1.6; }
.bv-more summary { cursor: pointer; font-weight: 700; color: var(--primary); font-size: 14.5px; padding: 10px 0; }
.bv-more p { color: var(--slate-soft); }
.bv-lock { margin-top: 22px; padding: 18px; border-radius: 14px; border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, transparent); }
.bv-lock p { color: var(--muted); margin: 6px 0 12px; }
.bv-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.bv-gallery figure { margin: 0; }
.bv-gallery img { width: 100%; display: block; border-radius: 10px; border: 1px solid var(--border); background: #fff; cursor: zoom-in; }
.bv-gallery figcaption { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.bv-disclaimer { margin: 26px 0 0; font-size: 12.5px; color: var(--muted); }
@keyframes bvIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------- tools menu on phones: full width under the header ---------- */
@media (max-width: 600px) {
  .toolsmenu { position: fixed; left: 10px; right: 10px; top: 62px; width: auto; max-width: none; max-height: calc(100vh - 80px); overflow-y: auto; }
  .bview { padding: 0; }
  .bview__panel { max-width: none; max-height: none; height: 100%; border-radius: 0; border: 0; animation: bvSlide .26s cubic-bezier(.2,.8,.2,1) both; }
  .bview__body { padding: 18px 16px 40px; }
  .bview__bar { padding: 10px 12px; }
  .bview__act span { display: none; }
  .bview__act { width: 40px; padding: 0; justify-content: center; }
  .bv-veh div { border-left: 0; border-top: 1px solid var(--border); }
  .bv-veh div:first-child { border-top: 0; }
}
@keyframes bvSlide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* v2.4 — narrow phones: keep every header button full size */
.topbar__right > * , .iconbtn, .hm-cta, .toolsbtn { flex-shrink: 0; }
@media (max-width: 400px) {
  .topbar { padding: 9px 10px; }
  .topbar__right { gap: 6px; }
  .brand { gap: 9px; min-width: 0; }
  .brand__logo { width: 34px; height: 34px; }
  .brand__name { font-size: 13.5px; max-width: 92px; line-height: 1.15; }
  .iconbtn, .navbtn { width: 36px; height: 36px; }
  .toolsbtn { height: 36px; padding: 0 9px; }
}
