/* ==========================================================================
   StringSpec — tennis string database
   Vanilla CSS. Mobile-first.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../fonts/bricolage-var-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Plex Sans';
  src: url('../fonts/plexsans-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/plexmono-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/plexmono-500-latin.woff2') format('woff2');
  font-weight: 500 700;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ink: #080b09;
  --ink-1: #0d1210;
  --ink-2: #131a17;
  --ink-3: #1a2320;
  --line: #23302b;
  --line-soft: #1a231f;

  --txt: #e9f0ea;
  --txt-2: #a6b6ac;
  --txt-3: #6d7f75;

  --acid: #d4ff3d;
  --acid-deep: #a8cc22;
  --clay: #ff7a4d;
  --sky: #64d2ff;
  --violet: #b79bff;
  --rose: #ff6b8a;

  --r-sm: 6px;
  --r: 12px;
  --r-lg: 20px;

  --shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.75);
  --gut: 20px;
  --header-h: 60px;

  --f-display: 'Bricolage Grotesque', 'Plex Sans', sans-serif;
  --f-body: 'Plex Sans', system-ui, sans-serif;
  --f-mono: 'Plex Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background-color: var(--ink);
  color: var(--txt);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* `clip` rather than `hidden`: hidden makes body a scroll container and
     silently breaks position:sticky on the filter rail. */
  overflow-x: clip;
}

/* String-bed atmosphere: warp + weft lines over a soft court glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 78% -10%, rgba(212, 255, 61, 0.09), transparent 55%),
    radial-gradient(90% 70% at 8% 105%, rgba(100, 210, 255, 0.06), transparent 60%),
    var(--ink);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    repeating-linear-gradient(90deg, rgba(233, 240, 234, 0.045) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(233, 240, 234, 0.028) 0 1px, transparent 1px 46px);
  -webkit-mask-image: radial-gradient(130% 100% at 50% 0%, #000 15%, transparent 72%);
  mask-image: radial-gradient(130% 100% at 50% 0%, #000 15%, transparent 72%);
}

img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--acid); color: var(--ink); }

.wrap {
  width: 100%;
  max-width: 1400px;
  margin-inline: auto;
  padding-inline: var(--gut);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(8, 11, 9, 0.82);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  flex: none;
}
.brand__mark {
  width: 26px; height: 26px;
  flex: none;
  color: var(--acid);
}
.brand__name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: -0.03em;
  font-stretch: 88%;
}
.brand__name em {
  font-style: normal;
  color: var(--acid);
}

.header-spacer { flex: 1; }

.header-count {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--txt-3);
  text-transform: uppercase;
  white-space: nowrap;
}
.header-count b { color: var(--txt); font-weight: 500; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 46px 0 30px;
  position: relative;
}
.hero__eyebrow {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--acid-deep);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero__eyebrow::after {
  content: '';
  height: 1px;
  flex: 1;
  max-width: 180px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.hero h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 82%;
  font-size: clamp(2.5rem, 10vw, 5.6rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero h1 span {
  display: block;
  color: var(--acid);
}
.hero__sub {
  margin-top: 20px;
  max-width: 54ch;
  color: var(--txt-2);
  font-size: 1rem;
  line-height: 1.62;
}
.hero__sub strong { color: var(--txt); font-weight: 400; }

.hero__grid { display: grid; gap: 34px; }

.presets {
  display: grid;
  gap: 8px;
  align-content: start;
}
.presets__t {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 2px;
}
.preset {
  display: grid;
  gap: 2px;
  padding: 12px 15px;
  text-align: left;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--ink-2), var(--ink-1) 70%);
  transition: border-color 0.18s, transform 0.18s var(--ease);
}
.preset:hover { border-color: var(--acid-deep); transform: translateX(3px); }
.preset:hover .preset__n { color: var(--acid); }
.preset__n {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 90%;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  transition: color 0.18s;
}
.preset__d { font-size: 0.78rem; color: var(--txt-3); }

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}
.stat { display: flex; align-items: baseline; gap: 8px; }
.stat__n {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
}
.stat__l {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-3);
}

/* ==========================================================================
   Toolbar
   ========================================================================== */
.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  padding: 12px 0;
  background: rgba(8, 11, 9, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block: 1px solid var(--line-soft);
  margin-bottom: 22px;
}
.toolbar .wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search {
  position: relative;
  flex: 1;
  min-width: 0;
}
.search svg {
  position: absolute;
  left: 13px; top: 50%;
  translate: 0 -50%;
  width: 16px; height: 16px;
  color: var(--txt-3);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 38px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--txt);
  font-size: 0.95rem;
  transition: border-color 0.18s, background 0.18s;
}
.search input::placeholder { color: var(--txt-3); }
/* WebKit renders its own clear button on type=search, doubling ours. */
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.search input:focus {
  outline: none;
  border-color: var(--acid-deep);
  background: var(--ink-3);
}
.search__clear {
  position: absolute;
  right: 8px; top: 50%;
  translate: 0 -50%;
  width: 26px; height: 26px;
  display: none;
  place-items: center;
  border-radius: 50%;
  color: var(--txt-3);
  background: var(--ink-3);
}
.search__clear:hover { color: var(--txt); }
.search.is-filled .search__clear { display: grid; }

.ctrl {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--txt-2);
  white-space: nowrap;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.ctrl:hover { border-color: var(--txt-3); color: var(--txt); }
.ctrl svg { width: 15px; height: 15px; flex: none; }

.ctrl--select {
  position: relative;
  padding-right: 8px;
}
.ctrl--select select {
  appearance: none;
  background: none;
  border: 0;
  padding-right: 20px;
  font-size: 0.85rem;
  color: var(--txt);
  cursor: pointer;
}
.ctrl--select select:focus { outline: none; }
.ctrl--select select option { background: var(--ink-2); color: var(--txt); }
.ctrl--select::after {
  content: '';
  position: absolute;
  right: 16px;
  width: 6px; height: 6px;
  border-right: 1.6px solid var(--txt-3);
  border-bottom: 1.6px solid var(--txt-3);
  rotate: 45deg;
  translate: 0 -2px;
  pointer-events: none;
}

/* Shape lives on .badge itself — scoping it to one toggle left every other
   badge as a bare coloured rectangle. Toggles override only the colour. */
.badge {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.badge:empty { display: none; }

/* ==========================================================================
   Layout
   ========================================================================== */
.layout {
  display: block;
  padding-bottom: 120px;
}

/* Clear the sticky header + toolbar when scrolling results into view. */
#results { scroll-margin-top: calc(var(--header-h) + 80px); position: relative; }

/* Results arrive from the server, so a fetch is visible rather than a freeze. */
#results.is-loading .grid { opacity: 0.45; transition: opacity 0.15s 0.08s; }
#results.is-loading::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--acid), transparent);
  background-size: 45% 100%;
  background-repeat: no-repeat;
  animation: sweep 1s linear infinite;
}
@keyframes sweep {
  from { background-position: -50% 0; }
  to { background-position: 150% 0; }
}

/* ---------- Filter rail ---------- */
.rail {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  flex-direction: column;
  background: var(--ink-1);
}
.rail.is-open { display: flex; }

.rail__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gut);
  border-bottom: 1px solid var(--line);
}
.rail__head h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.rail__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px var(--gut) 20px;
}

/* The rail scrolls internally, so say so — otherwise filters below the fold
   (the performance sliders) look like they do not exist. */
.rail { position: relative; }
.rail::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  height: 56px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s;
  background: linear-gradient(to top, var(--ink-1) 18%, transparent);
}
.rail.is-scrolled-end::after, .rail:not(.has-overflow)::after { opacity: 0; }
.rail__foot {
  flex: none;
  display: flex;
  gap: 10px;
  padding: 14px var(--gut);
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--ink-1);
}
.rail__foot .btn { flex: 1; }

.fgroup { border-bottom: 1px solid var(--line-soft); }
.fgroup__head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 0;
  text-align: left;
}
.fgroup__head h3 {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--txt-2);
  font-weight: 500;
}
.fgroup__head .chev {
  width: 7px; height: 7px;
  border-right: 1.6px solid var(--txt-3);
  border-bottom: 1.6px solid var(--txt-3);
  rotate: 45deg;
  transition: rotate 0.25s var(--ease);
  flex: none;
  margin-right: 3px;
}
.fgroup[data-open='false'] .chev { rotate: -45deg; }
.fgroup__body { padding-bottom: 18px; }
.fgroup[data-open='false'] .fgroup__body { display: none; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ink-2);
  font-size: 0.8rem;
  color: var(--txt-2);
  transition: all 0.16s;
}
.chip:hover { border-color: var(--txt-3); color: var(--txt); }
.chip small {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--txt-3);
}
/* Measured thickness on gauge chips — 17 and 17L are different strings. */
.chip em {
  font-family: var(--f-mono);
  font-style: normal;
  font-size: 0.62rem;
  color: var(--txt-3);
  opacity: 0.85;
}
.chip[aria-pressed='true'] em { color: rgba(8, 11, 9, 0.62); }

.fgroup__hint {
  font-size: 0.73rem;
  line-height: 1.5;
  color: var(--txt-3);
  margin-bottom: 10px;
}
.cmp-sub { font-family: var(--f-mono); font-size: 0.66rem; color: var(--txt-3); }
.chip[aria-pressed='true'] {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--ink);
  font-weight: 500;
}
.chip[aria-pressed='true'] small { color: rgba(8, 11, 9, 0.6); }

.brand-search {
  width: 100%;
  height: 34px;
  margin-bottom: 10px;
  padding: 0 12px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: 0.83rem;
}
.brand-search:focus { outline: none; border-color: var(--acid-deep); }
.brand-list { max-height: 216px; overflow-y: auto; }

/* Range sliders */
.rangef { margin-bottom: 13px; }
.rangef:last-child { margin-bottom: 4px; }
.rangef__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 2px;
}
.rangef__label { font-size: 0.85rem; color: var(--txt); }
.rangef__val {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  color: var(--acid);
}
.rangef__hint {
  font-size: 0.71rem;
  line-height: 1.35;
  color: var(--txt-3);
  margin-bottom: 5px;
}
.dual {
  position: relative;
  height: 22px;
}
.dual__track {
  position: absolute;
  top: 50%; left: 0; right: 0;
  translate: 0 -50%;
  height: 3px;
  border-radius: 2px;
  background: var(--ink-3);
}
.dual__fill {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  height: 3px;
  border-radius: 2px;
  background: var(--acid);
}
.dual input[type='range'] {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 22px;
  margin: 0;
  appearance: none;
  background: none;
  pointer-events: none;
}
.dual input[type='range']::-webkit-slider-thumb {
  appearance: none;
  pointer-events: auto;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--txt);
  border: 3px solid var(--ink-1);
  box-shadow: 0 0 0 1px var(--acid-deep);
  cursor: grab;
}
.dual input[type='range']::-moz-range-thumb {
  pointer-events: auto;
  width: 16px; height: 16px;
  border: 3px solid var(--ink-1);
  border-radius: 50%;
  background: var(--txt);
  box-shadow: 0 0 0 1px var(--acid-deep);
  cursor: grab;
}

.switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--txt-2);
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch__box {
  width: 34px; height: 20px;
  flex: none;
  border-radius: 999px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.switch__box::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--txt-3);
  transition: translate 0.2s var(--ease), background 0.2s;
}
.switch input:checked + .switch__box {
  background: var(--acid);
  border-color: var(--acid);
}
.switch input:checked + .switch__box::after {
  translate: 14px 0;
  background: var(--ink);
}
.switch input:focus-visible + .switch__box { outline: 2px solid var(--acid); outline-offset: 2px; }

.btn {
  text-decoration: none;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--txt);
  font-size: 0.87rem;
  font-weight: 500;
  transition: all 0.16s;
}
.btn:hover { border-color: var(--txt-3); }
.btn--primary {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--ink);
  font-weight: 600;
}
.btn--primary:hover { background: #e2ff6e; border-color: #e2ff6e; }
.btn--primary:disabled { opacity: 0.35; cursor: not-allowed; }
.btn--ghost { background: none; }

.icon-btn {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--txt-2);
  transition: all 0.16s;
  flex: none;
}
.icon-btn:hover { color: var(--txt); border-color: var(--txt-3); background: var(--ink-2); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- Active filter pills ---------- */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.active-filters:empty { display: none; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 11px;
  border-radius: 999px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--txt-2);
}
.pill b { color: var(--txt); font-weight: 500; }
.pill span {
  display: grid;
  place-items: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--ink-3);
  color: var(--txt-3);
  font-size: 0.72rem;
  line-height: 1;
}
.pill:hover span { background: var(--clay); color: var(--ink); }

/* ==========================================================================
   Result cards
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: linear-gradient(168deg, var(--ink-2), var(--ink-1) 65%);
  text-align: left;
  width: 100%;
  transition: border-color 0.2s, transform 0.2s var(--ease), background 0.2s;
  animation: rise 0.4s var(--ease) backwards;
}
@keyframes rise {
  from { opacity: 0; translate: 0 10px; }
}
.card:hover {
  border-color: var(--line);
  transform: translateY(-2px);
}
.card:hover .card__name { color: var(--acid); }
.card.is-picked {
  border-color: var(--acid);
  background: linear-gradient(168deg, rgba(212, 255, 61, 0.07), var(--ink-1) 62%);
}

.card__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.card__id { flex: 1; min-width: 0; }
.card__brand {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 3px;
}
.card__name {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 90%;
  font-size: 1.08rem;
  line-height: 1.18;
  letter-spacing: -0.022em;
  transition: color 0.18s;
}
/* Stretched link: the model name is the hit target for the whole card. */
.card__open {
  font: inherit;
  color: inherit;
  text-align: left;
  letter-spacing: inherit;
  text-decoration: none;
  cursor: pointer;
}
.card__open::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r);
  z-index: 1;
}
.card__open:focus-visible { outline: none; }
.card__open:focus-visible::after {
  outline: 2px solid var(--acid);
  outline-offset: -2px;
}
.pick { position: relative; z-index: 2; }

.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  padding: 2px 7px;
  border-radius: var(--r-sm);
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--line);
  color: var(--txt-2);
  background: var(--ink-1);
  white-space: nowrap;
}
/* Material colour slots are assigned by frequency at runtime — no material
   name appears in CSS or JS, so a new material just takes the next slot. */
.tag--m0 { background: rgba(255, 122, 77, 0.13); color: #ffa583; border-color: transparent; }
.tag--m1 { background: rgba(100, 210, 255, 0.13); color: #9ce2ff; border-color: transparent; }
.tag--m2 { background: rgba(212, 255, 61, 0.14); color: var(--acid); border-color: transparent; }
.tag--m3 { background: rgba(183, 155, 255, 0.14); color: #cdbcff; border-color: transparent; }
.tag--m4 { background: rgba(255, 107, 138, 0.14); color: #ff9db3; border-color: transparent; }
.tag--m5 { background: rgba(233, 240, 234, 0.08); color: var(--txt-2); border-color: transparent; }

.pick {
  flex: none;
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--txt-3);
  background: var(--ink-1);
  transition: all 0.16s;
}
.pick svg { width: 15px; height: 15px; }
.pick:hover { color: var(--acid); border-color: var(--acid-deep); }
.pick[aria-pressed='true'] {
  background: var(--acid);
  border-color: var(--acid);
  color: var(--ink);
}
.pick:disabled { opacity: 0.3; cursor: not-allowed; }
.pick:disabled:hover { color: var(--txt-3); border-color: var(--line); }

.card__acts { display: flex; gap: 6px; flex: none; position: relative; z-index: 2; }

.fav {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--ink-1);
  color: var(--txt-3);
  transition: all 0.16s;
}
.fav svg { width: 16px; height: 16px; transition: transform 0.22s var(--ease); }
.fav:hover { color: var(--rose); border-color: var(--rose); }
.fav.is-on { color: var(--rose); border-color: rgba(255, 107, 138, 0.45); background: rgba(255, 107, 138, 0.12); }
.fav.is-on svg path { fill: var(--rose); }
.fav.is-on:active svg { transform: scale(0.82); }

.btn--fav { gap: 7px; }
.btn--fav svg { width: 16px; height: 16px; }
.btn--fav.is-on { color: var(--rose); border-color: rgba(255, 107, 138, 0.45); }
.btn--fav.is-on svg path { fill: var(--rose); stroke: var(--rose); }

.fav-toggle.is-on {
  background: rgba(255, 107, 138, 0.14);
  border-color: rgba(255, 107, 138, 0.5);
  color: #ffa8ba;
}
.fav-toggle.is-on svg path { fill: currentColor; }
.fav-toggle .badge { background: var(--rose); color: var(--ink); }
.fav-toggle.is-on .badge { background: var(--ink); color: #ffa8ba; }
.fav-toggle:disabled { opacity: 0.4; cursor: not-allowed; }
.fav-toggle:disabled:hover { border-color: var(--line); color: var(--txt-2); }

.bars { display: flex; flex-direction: column; gap: 7px; }
.bar { display: grid; grid-template-columns: 62px 1fr 44px; align-items: center; gap: 9px; }
.bar__l {
  font-family: var(--f-mono);
  font-size: 0.63rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.bar__t {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--ink-3);
  overflow: hidden;
}
.bar__f {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--acid);
  transform-origin: left;
  animation: grow 0.6s var(--ease) backwards;
}
@keyframes grow { from { scale: 0 1; } }
.bar__v {
  font-family: var(--f-mono);
  font-size: 0.73rem;
  font-weight: 500;
  text-align: right;
  color: var(--txt);
}
.bar--stiff .bar__f { background: var(--clay); }
.bar--hold .bar__f { background: var(--sky); }
.bar--power .bar__f { background: var(--acid); }
.bar--spin .bar__f { background: var(--violet); }

.no-data {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--txt-3);
  padding: 6px 0;
}

/* Empty state */
.empty {
  padding: 70px 20px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
}
.empty h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.empty p { color: var(--txt-2); margin-bottom: 20px; font-size: 0.92rem; }

.load-more { display: grid; place-items: center; padding: 28px 0 10px; }
.sentinel { height: 1px; }

/* ==========================================================================
   Compare tray
   ========================================================================== */
.tray {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  padding: 12px var(--gut);
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: rgba(13, 18, 16, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  translate: 0 130%;
  transition: translate 0.36s var(--ease);
}
.tray.is-up { translate: 0; }
.tray__in {
  max-width: 1400px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.slots { display: flex; gap: 8px; flex: 1; min-width: 0; }
.slot {
  flex: 1;
  min-width: 0;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 11px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  font-size: 0.78rem;
  color: var(--txt-3);
}
.slot--full {
  border-style: solid;
  border-color: var(--line);
  background: var(--ink-2);
  color: var(--txt);
}
.slot__txt { display: block; flex: 1; min-width: 0; line-height: 1.2; }
/* display:block is load-bearing — overflow/text-overflow do not apply to inline boxes. */
.slot__b {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot__m {
  display: block;
  font-size: 0.79rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot__x {
  flex: none;
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--txt-3);
  background: var(--ink-3);
}
.slot__x:hover { background: var(--clay); color: var(--ink); }
.tray .btn { flex: none; }
.tray__clear { display: none; }

/* ==========================================================================
   Sheet (detail + compare)
   ========================================================================== */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 6, 5, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.sheet[hidden] { display: none; }
.sheet {
  position: fixed;
  z-index: 101;
  background: var(--ink-1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: translate 0.4s var(--ease);
}
.sheet__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px var(--gut);
  border-bottom: 1px solid var(--line);
  background: var(--ink-1);
}
.sheet__title {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.sheet__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Detail drawer */
.detail {
  inset: 0;
  translate: 0 100%;
}
.detail.is-open { translate: 0; }

.dt-hero {
  padding: 26px var(--gut) 22px;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(90% 130% at 100% 0%, rgba(212, 255, 61, 0.09), transparent 60%),
    var(--ink-1);
}
.dt-hero__brand {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acid-deep);
  margin-bottom: 8px;
}
.dt-hero h2 {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 85%;
  font-size: clamp(1.7rem, 6.5vw, 2.5rem);
  line-height: 1.02;
  letter-spacing: -0.038em;
  margin-bottom: 14px;
}
.dt-hero .tags { margin-bottom: 18px; }
.dt-hero__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.dt-sec { padding: 24px var(--gut); border-bottom: 1px solid var(--line-soft); }
.dt-sec:last-child { border-bottom: 0; }
.dt-sec > h3 {
  font-family: var(--f-mono);
  font-size: 0.67rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 16px;
}

.profile { display: flex; flex-direction: column; gap: 14px; }
.pf { display: grid; grid-template-columns: 1fr; gap: 5px; }
.pf__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.pf__n { font-size: 0.9rem; font-weight: 500; }
.pf__p {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--txt-2);
}
.pf__t { display: block; height: 6px; border-radius: 3px; background: var(--ink-3); overflow: hidden; }
.pf__f { display: block; height: 100%; border-radius: 3px; transform-origin: left; animation: grow 0.7s var(--ease) backwards; }
.pf__d { font-size: 0.76rem; color: var(--txt-3); }

.specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}
.spec { padding: 13px 14px; background: var(--ink-1); }
.spec__l {
  font-family: var(--f-mono);
  font-size: 0.63rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 5px;
}
.spec__v {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.spec__v small {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 400;
  color: var(--txt-3);
  letter-spacing: 0.02em;
  margin-left: 3px;
}
.spec__r { font-size: 0.72rem; color: var(--txt-3); margin-top: 3px; }

.similar { display: flex; flex-direction: column; gap: 8px; }
.sim {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--ink-2);
  text-align: left;
  transition: border-color 0.16s, background 0.16s;
}
.sim:hover { border-color: var(--acid-deep); background: var(--ink-3); }
.sim__t { flex: 1; min-width: 0; }
.sim__b {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.sim__n { font-size: 0.88rem; font-weight: 500; }
.sim__m {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  color: var(--acid-deep);
  flex: none;
}

/* Compare sheet */
.compare {
  inset: 0;
  translate: 0 100%;
}
.compare.is-open { translate: 0; }

/* ---------- Radar ---------- */
.radar {
  padding: 20px var(--gut) 6px;
  border-bottom: 1px solid var(--line-soft);
  display: grid;
  justify-items: center;
  gap: 4px;
}
.rdr__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 10px;
}
.rdr__key {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--txt);
}
.rdr__key i {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex: none;
}
.rdr__svg {
  width: 100%;
  max-width: 430px;
  height: auto;
  overflow: visible;
}
.rdr__ring { fill: none; stroke: var(--line); stroke-width: 1; }
.rdr__spoke { stroke: var(--line-soft); stroke-width: 1; }
.rdr__lbl {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  fill: var(--txt-2);
}
.rdr__shape {
  transform-origin: center;
  animation: pop 0.55s var(--ease) backwards;
}
@keyframes pop { from { opacity: 0; scale: 0.55; } }
.rdr__note {
  font-size: 0.73rem;
  color: var(--txt-3);
  text-align: center;
  max-width: 44ch;
}

.cmp-top { border-bottom: 1px solid var(--line); }
.verdict__note {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--txt-3);
}

.cmp-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cmp {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.cmp th, .cmp td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: middle;
}
.cmp thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.cmp thead th:first-child { width: 172px; }
.cmp tbody th {
  width: 172px;
  font-weight: 400;
  color: var(--txt-2);
  background: var(--ink-1);
}
.cmp tbody th small {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  color: var(--txt-3);
  margin-top: 2px;
}
.cmp tbody tr:hover td, .cmp tbody tr:hover th { background: var(--ink-2); }

.cmp-head__brand {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.cmp-head__name {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 90%;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 3px 0 8px;
}

.cmp-val {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cmp-val__n {
  font-family: var(--f-mono);
  font-size: 0.92rem;
  font-weight: 500;
  min-width: 46px;
  font-variant-numeric: tabular-nums;
}
.cmp-val__t {
  display: block;
  flex: 1;
  min-width: 40px;
  max-width: 170px;
  height: 4px;
  border-radius: 2px;
  background: var(--ink-3);
  overflow: hidden;
}
.cmp-val__f { display: block; height: 100%; border-radius: 2px; }
.cmp-val.is-best .cmp-val__n { color: var(--acid); }
.cmp-val.is-best::after {
  content: '★';
  font-size: 0.7rem;
  color: var(--acid);
  flex: none;
}


.verdict {
  padding: 20px var(--gut);
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.verdict h3 {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 12px;
}
.verdict__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.vd {
  display: flex;
  align-items: baseline;
  gap: 9px;
  font-size: 0.86rem;
}
.vd__k {
  font-family: var(--f-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-3);
  min-width: 92px;
  flex: none;
}
.vd__v { color: var(--txt); font-weight: 500; }
.vd__v em { font-style: normal; color: var(--acid); }

/* ==========================================================================
   Learn: FAQ + crawlable A–Z index
   ========================================================================== */
.learn { padding: 10px 0 40px; }
.learn__h {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 85%;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  letter-spacing: -0.035em;
  margin-bottom: 20px;
}

.faq {
  display: grid;
  gap: 8px;
  margin-bottom: 32px;
}
.qa {
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--ink-2), var(--ink-1) 70%);
  overflow: hidden;
}
.qa > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  cursor: pointer;
  list-style: none;
}
.qa > summary::-webkit-details-marker { display: none; }
.qa > summary::after {
  content: '';
  flex: none;
  width: 8px; height: 8px;
  border-right: 1.7px solid var(--txt-3);
  border-bottom: 1.7px solid var(--txt-3);
  rotate: 45deg;
  translate: 0 -2px;
  transition: rotate 0.25s var(--ease);
}
.qa[open] > summary::after { rotate: -135deg; translate: 0 2px; }
.qa > summary h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 92%;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.qa[open] > summary h3, .qa > summary:hover h3 { color: var(--acid); }
.qa > p {
  padding: 0 17px 17px;
  max-width: 76ch;
  color: var(--txt-2);
  font-size: 0.89rem;
  line-height: 1.65;
}

.index {
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  background: var(--ink-1);
}
.index > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 17px;
  cursor: pointer;
  list-style: none;
}
.index > summary::-webkit-details-marker { display: none; }
.index > summary::after {
  content: '';
  flex: none;
  width: 8px; height: 8px;
  border-right: 1.7px solid var(--txt-3);
  border-bottom: 1.7px solid var(--txt-3);
  rotate: 45deg;
  translate: 0 -2px;
  transition: rotate 0.25s var(--ease);
}
.index[open] > summary::after { rotate: -135deg; translate: 0 2px; }
.index > summary h3 {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 92%;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.index > summary h3 span {
  display: block;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-top: 3px;
}
.index > summary:hover h3 { color: var(--acid); }

.index__body {
  padding: 4px 17px 20px;
  columns: 1;
}
.index__brand {
  break-inside: avoid;
  margin-bottom: 18px;
}
.index__brand h4 {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acid-deep);
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}
.index__brand ul { list-style: none; padding: 0; }
.index__brand li {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--txt-3);
  margin-bottom: 5px;
}
.index__brand a {
  color: var(--txt-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.index__brand a:hover { color: var(--acid); border-color: var(--acid-deep); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 34px 0 100px;
  margin-top: 20px;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.site-footer p {
  font-size: 0.79rem;
  color: var(--txt-3);
  line-height: 1.65;
  max-width: 68ch;
}
.site-footer a { color: var(--txt-2); text-decoration-color: var(--line); }
.site-footer a:hover { color: var(--acid); }

.glossary { display: grid; gap: 10px; grid-template-columns: 1fr; margin-bottom: 6px; }
.gl__t {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--txt-2);
  margin-bottom: 3px;
}
.gl__d { font-size: 0.78rem; color: var(--txt-3); line-height: 1.55; }

/* ==========================================================================
   Responsive
   ========================================================================== */
/* Phones: keep the hero from eating the whole first screen. */
@media (max-width: 599px) {
  .hero { padding-top: 32px; }

  /* Reclaim toolbar width for the search field. */
  .toolbar .wrap { gap: 8px; }
  .filter-toggle { padding: 0 12px; }
  .filter-toggle .ctrl__label { display: none; }
  .ctrl--select { padding-left: 12px; }
  .ctrl--select select { max-width: 104px; }
  .search input { padding-inline: 36px 32px; }

  /* Empty slots waste scarce width on a phone; the Compare button carries the count. */
  .tray { padding-inline: 14px; }
  .tray__in { gap: 8px; }
  .slots { gap: 6px; }
  .slot:not(.slot--full) { display: none; }
  .slot--full { padding: 0 4px 0 9px; }

  /* Comparison table has to fit three columns in a phone viewport. */
  .cmp { min-width: 560px; }
  .cmp th, .cmp td { padding: 11px 10px; }
  .cmp thead th:first-child, .cmp tbody th { width: 116px; }
  .cmp tbody th small { font-size: 0.58rem; line-height: 1.4; }
  .cmp-val { gap: 7px; }
  .cmp-val__n { min-width: 40px; font-size: 0.85rem; }
  .cmp-val__t { min-width: 26px; max-width: 58px; }

  .presets { grid-template-columns: 1fr 1fr; gap: 7px; }
  .presets__t { grid-column: 1 / -1; }
  .preset { padding: 12px 13px; }
  .preset__n { font-size: 0.92rem; }
  .preset__d { display: none; }
}

@media (min-width: 600px) {
  :root { --gut: 28px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .verdict__row { grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
  .glossary { grid-template-columns: repeat(2, 1fr); gap: 14px 28px; }
  .faq { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .index__body { columns: 2; column-gap: 34px; }
  .specs { grid-template-columns: repeat(3, 1fr); }
  .tray__clear { display: inline-flex; }
}

@media (min-width: 900px) {
  :root { --header-h: 66px; }
  body { font-size: 15.5px; }

  .hero { padding: 70px 0 40px; }
  .hero__stats { gap: 8px 44px; }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 56px;
    align-items: end;
  }
  .presets { padding-bottom: 4px; }

  .layout {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
  }

  .rail {
    position: sticky;
    /* `inset: auto` must precede `top` — it is a shorthand and would reset it. */
    inset: auto;
    top: calc(var(--header-h) + 80px);
    display: flex;
    max-height: calc(100vh - var(--header-h) - 90px);
    background: none;
    z-index: 1;
    border: 1px solid var(--line-soft);
    border-radius: var(--r);
    overflow: hidden;
    background: var(--ink-1);
  }
  .rail__head { padding: 14px 16px; }
  .rail__head .icon-btn { display: none; }
  .rail__body { padding: 2px 16px 14px; }
  .rail__foot { padding: 12px 16px; }
  .rail__foot .btn--primary { display: none; }
  .filter-toggle { display: none; }

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

  .detail {
    inset-block: 0;
    right: 0; left: auto;
    width: min(560px, 100%);
    translate: 100% 0;
    border-left: 1px solid var(--line);
  }
  .compare {
    inset: 24px;
    border-radius: var(--r-lg);
    border: 1px solid var(--line);
    overflow: hidden;
    translate: 0 30px;
    opacity: 0;
  }
  .compare.is-open { translate: 0; opacity: 1; }
  .cmp thead th:first-child, .cmp tbody th { width: 200px; }
  .site-footer { padding-bottom: 60px; }

  /* Pair the profile chart with the written verdict instead of stacking them. */
  .cmp-top {
    display: grid;
    grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
    align-items: center;
    gap: 0 30px;
    padding-right: var(--gut);
  }
  .cmp-top .radar { border-bottom: 0; padding-bottom: 18px; }
  .cmp-top .rdr__legend { flex-direction: column; align-items: flex-start; gap: 5px; }
  .cmp-top .verdict { border-bottom: 0; background: none; padding-block: 20px; }
  .cmp-top .verdict__row { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1180px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .verdict__row { grid-template-columns: repeat(4, 1fr); }
  .glossary { grid-template-columns: repeat(3, 1fr); }
  .index__body { columns: 3; }
}

@media (min-width: 1500px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* Lock scroll when an overlay owns the viewport */
body.is-locked { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Standalone string page
   ========================================================================== */
.str { padding-bottom: 60px; }

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 22px 0 8px;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.crumb a { color: var(--txt-3); text-decoration: none; }
.crumb a:hover { color: var(--acid); }

.str__head {
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(70% 120% at 90% 0%, rgba(212, 255, 61, 0.07), transparent 62%);
}
.str__brand {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acid-deep);
  margin-bottom: 10px;
}
.str h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 84%;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  text-wrap: balance;
}
.str__head .tags { margin-bottom: 18px; }
.str__lede {
  max-width: 62ch;
  color: var(--txt-2);
  font-size: 1rem;
  line-height: 1.65;
}
.str__note { font-size: 0.8rem; color: var(--txt-3); margin: -8px 0 14px; }
.str__cta { margin-top: 22px; }

.str .dt-sec { padding-inline: 0; }
.str .dt-sec > h2 {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 16px;
  font-weight: 500;
}

.brandlist {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}
.brandlist li { font-size: 0.88rem; }
.brandlist a { color: var(--txt); text-decoration: none; border-bottom: 1px solid var(--line); }
.brandlist a:hover { color: var(--acid); border-color: var(--acid-deep); }
.brandlist span { font-family: var(--f-mono); font-size: 0.7rem; color: var(--txt-3); margin-left: 6px; }

@media (min-width: 600px) {
  .str .similar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .brandlist { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .str .specs { grid-template-columns: repeat(3, 1fr); }
  .brandlist { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Link notice ---------- */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding: 11px 12px 11px 14px;
  border: 1px solid rgba(255, 122, 77, 0.35);
  border-left-width: 3px;
  border-radius: var(--r);
  background: rgba(255, 122, 77, 0.08);
}
.notice[hidden] { display: none; }
.notice p {
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #ffb499;
}
.notice__x {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--txt-3);
  font-size: 0.78rem;
  transition: background 0.16s, color 0.16s;
}
.notice__x:hover { background: var(--clay); color: var(--ink); }

/* ==========================================================================
   String finder — /finder/
   Server-rendered, no JS. Reuses .str page furniture for the shell.
   ========================================================================== */
.fnd__head {
  padding: 18px 0 26px;
  border-bottom: 1px solid var(--line-soft);
  background: radial-gradient(74% 130% at 8% 0%, rgba(183, 155, 255, 0.09), transparent 60%);
}
.fnd__eyebrow {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 10px;
}
.fnd__head h1 {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 84%;
  font-size: clamp(2rem, 6.4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
  text-wrap: balance;
}
.fnd__head h1 span { display: block; color: var(--txt-3); }
.fnd__lede { max-width: 60ch; color: var(--txt-2); font-size: 1rem; line-height: 1.65; }

/* ---------- Form ---------- */
.fnd__step { padding: 26px 0; border-bottom: 1px solid var(--line-soft); }
.fnd__step > h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.fnd__step > h2 em { font-style: normal; font-weight: 400; color: var(--txt-3); font-size: 0.86rem; }
.fnd__num {
  flex: none;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--acid);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 0.74rem;
  font-weight: 700;
}
.fnd__note { max-width: 66ch; color: var(--txt-2); font-size: 0.86rem; line-height: 1.6; margin-bottom: 16px; }
.fnd__note a { color: var(--acid); }
.fnd__hint { font-size: 0.74rem; color: var(--txt-3); margin-top: 6px; line-height: 1.45; }

.needs { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 14px 0 22px; }
.need input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.need__box {
  display: block;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink-1);
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, transform 0.16s var(--ease);
}
.need__box:hover { border-color: var(--txt-3); transform: translateY(-1px); }
.need__t { display: block; font-size: 0.94rem; font-weight: 600; margin-bottom: 2px; }
.need__d { display: block; font-size: 0.78rem; color: var(--txt-3); }
.need input:checked + .need__box {
  border-color: var(--acid);
  background: rgba(212, 255, 61, 0.09);
}
.need input:checked + .need__box .need__t { color: var(--acid); }
.need input:focus-visible + .need__box { outline: 2px solid var(--acid); outline-offset: 2px; }

.fnd__also label,
.rk__q label {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-bottom: 7px;
}
.fnd select,
.rk select {
  width: 100%;
  height: 42px;
  padding: 0 34px 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d7f75' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
  color: var(--txt);
  font-family: inherit;
  font-size: 0.87rem;
  appearance: none;
  cursor: pointer;
}
.fnd select:focus, .rk select:focus { outline: none; border-color: var(--acid-deep); }

.rk { display: grid; grid-template-columns: 1fr; gap: 16px; }

.fnd__go { display: flex; flex-wrap: wrap; gap: 10px; padding: 24px 0 4px; }

/* ---------- Results ---------- */
.fnd__results { padding-top: 30px; }
.fnd__rh {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 84%;
  font-size: clamp(1.5rem, 4.4vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 6px;
  text-wrap: balance;
}
.fnd__rh em { font-style: normal; color: var(--acid); }
.fnd__rn { font-size: 0.82rem; color: var(--txt-3); margin-bottom: 20px; line-height: 1.5; }

.picks { list-style: none; padding: 0; display: grid; gap: 10px; }
.pick {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--ink-1);
}
.pick--top {
  border-color: var(--acid-deep);
  background:
    radial-gradient(90% 160% at 100% 0%, rgba(212, 255, 61, 0.09), transparent 62%),
    var(--ink-1);
}
.pick__hd { display: flex; align-items: flex-start; gap: 12px; }
.pick__rank {
  flex: none;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 0.74rem;
  color: var(--txt-3);
}
.pick--top .pick__rank { background: var(--acid); border-color: var(--acid); color: var(--ink); font-weight: 700; }
.pick__id { flex: 1; min-width: 0; }
.pick__brand {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acid-deep);
  margin-bottom: 3px;
}
.pick__id h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.pick__id h3 a { color: var(--txt); text-decoration: none; }
.pick__id h3 a:hover { color: var(--acid); }
.pick__fit { flex: none; text-align: right; }
.pick__fitn {
  display: block;
  font-family: var(--f-mono);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1;
  color: var(--acid);
}
.pick__fitn small { font-size: 0.68rem; opacity: 0.6; }
.pick__fitl {
  display: block;
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-3);
  margin-top: 3px;
}

.pick__why { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 4px; }
.pick__why li {
  position: relative;
  padding-left: 16px;
  font-size: 0.81rem;
  color: var(--txt-2);
  line-height: 1.45;
}
.pick__why li::before {
  content: '';
  position: absolute;
  left: 2px; top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--txt-3);
}
.pick__why li.is-good::before { background: var(--acid); }
.pick__why li.is-weak::before { background: var(--clay); }

.pick__ten {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 0.79rem;
  color: var(--txt-2);
}
.pick__ten b {
  font-family: var(--f-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-3);
  font-weight: 500;
  margin-right: 7px;
}
.pick__ten span { color: var(--txt-3); }

/* ---------- Show the working ---------- */
.fnd__work { padding-top: 26px; }
.wgt { list-style: none; padding: 0; display: grid; gap: 6px; margin-bottom: 16px; }
.wgt li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  background: var(--ink-1);
}
.wgt__l { flex: 1; min-width: 0; font-size: 0.85rem; }
.wgt__d { font-family: var(--f-mono); font-size: 0.72rem; }
.wgt__d--high { color: var(--acid); }
.wgt__d--low { color: var(--sky); }
.wgt__s {
  font-family: var(--f-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--ink-3);
  color: var(--txt-3);
  min-width: 68px;
  text-align: center;
}
.wgt__s--decisive { background: rgba(212, 255, 61, 0.16); color: var(--acid); }
.wgt__s--strong { background: rgba(100, 210, 255, 0.14); color: var(--sky); }

.fnd__why { max-width: 68ch; font-size: 0.86rem; color: var(--txt-2); line-height: 1.65; }
.fnd__caveat {
  max-width: 68ch;
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 122, 77, 0.3);
  border-left-width: 3px;
  border-radius: var(--r);
  background: rgba(255, 122, 77, 0.07);
  font-size: 0.8rem;
  line-height: 1.55;
  color: #ffb499;
}

.rkn { list-style: none; padding: 0; display: grid; gap: 12px; }
.rkn__q { font-size: 0.85rem; margin-bottom: 3px; }
.rkn__q b { color: var(--acid); font-weight: 600; }
.rkn__n { font-size: 0.81rem; color: var(--txt-2); line-height: 1.55; max-width: 68ch; }

.fnd__share {
  margin-top: 22px;
  font-size: 0.75rem;
  color: var(--txt-3);
}
.fnd__share code {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--txt-2);
  word-break: break-all;
}

.needexp { display: grid; gap: 14px; }
.needexp dt {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.needexp dd { margin: 0; font-size: 0.84rem; color: var(--txt-2); line-height: 1.6; max-width: 70ch; }

@media (min-width: 640px) {
  .needs { grid-template-columns: repeat(2, 1fr); }
  .rk { grid-template-columns: repeat(3, 1fr); }
  .fnd__also select { max-width: 340px; }
  .needexp { grid-template-columns: repeat(2, 1fr); gap: 18px 26px; }
}
@media (min-width: 900px) {
  .needs { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Finder entry points ---------- */
.header-link {
  flex: none;
  font-size: 0.78rem;
  color: var(--txt-2);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.16s, border-color 0.16s;
  white-space: nowrap;
}
.header-link:hover { color: var(--acid); border-color: var(--acid-deep); }

.preset--find {
  border-color: var(--acid-deep);
  background: rgba(212, 255, 61, 0.08);
  text-decoration: none;
}
.preset--find .preset__n { color: var(--acid); }
.preset--find:hover { background: rgba(212, 255, 61, 0.14); }

.str__cta { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 520px) {
  .header-link { display: none; }
}
.rk__q--wide select { max-width: 420px; }
