/* ============================================================
   BadmintonLabs — V2 design system
   Refined sport: vibrant accent, real photography, custom icons
   ============================================================ */

:root {
  /* Surface — slight cool-stone shift away from yellow paper. */
  --bg:           #fbf9f3;          /* clean warm off-white */
  --surface:      #ffffff;
  --surface-2:    #f7f4ea;
  --line:         #ece7d6;
  --line-2:       #e4dec8;

  /* Ink — stone-900 base adds a hint of warm-brown anchor (was zinc-900,
     true-neutral). Subtle but gives the design a place to rest against
     the orange accents. --ink-sub bumped from zinc-400 (~3.5:1) to
     zinc-500 (~4.6:1) so muted body copy clears WCAG AA. */
  --ink:          #1c1917;
  --ink-mut:      #52525b;
  --ink-sub:      #71717a;

  /* Sport accent (used sparingly) */
  --accent:       #ea580c;          /* court orange */
  --accent-d:     #c2410c;
  --accent-2:     #f59e0b;          /* dialed-back yellow */
  --accent-bg:    #fff4e6;
  --accent-soft:  #fed7aa;

  /* State */
  --emerald:      #059669;
  --emerald-d:    #047857;
  --emerald-bg:   #ecfdf5;
  --emerald-line: #a7f3d0;
  --rose:         #be123c;
  --indigo:       #4338ca;
  --violet:       #7c3aed;
  --teal:         #0d9488;

  /* Spacing */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.25rem; --s-6: 1.5rem; --s-8: 2rem; --s-10: 2.5rem; --s-12: 3rem;

  /* Radius */
  --r-sm: 5px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-pill: 999px;

  /* Shadow */
  --sh-sm:  0 1px 3px rgba(24,24,27,.04);
  --sh-md:  0 4px 12px rgba(24,24,27,.06);
  --sh-lg:  0 8px 24px rgba(234,88,12,.10);
  --sh-pop: 0 16px 36px rgba(24,24,27,.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.55;
  color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum' 1, 'kern' 1;   /* tabular figures for price columns */
}
a { color: var(--accent); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; letter-spacing: -0.005em; }
h1 { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 2.55rem; line-height: 1.05; }
h2 { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.55rem; line-height: 1.15; }
h3 { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 1.15rem; line-height: 1.2; }

code {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--surface-2); padding: 0.1em 0.4em; border-radius: var(--r-sm);
}

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

/* ============================================================
   SVG icon helper
   ============================================================ */
.ico { width: 1em; height: 1em; vertical-align: -0.125em;
  stroke: currentColor; stroke-width: 1.75; fill: none;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253,251,246,0.88);
  backdrop-filter: saturate(1.6) blur(10px);
  -webkit-backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: 1.2rem; letter-spacing: 0.01em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink);
}
.brand:hover { text-decoration: none; }
/* Brand mark — black tile holding the gold shuttle SVG (Option J from
   the 2026-05-18 logo exploration). The mark stands alone as a favicon.
   Tile background swaps to var(--accent) for the Option I alternative
   (see _base.html for the swap-in markup). */
.brand-mark {
  width: 34px; height: 34px;
  background: var(--ink);
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 24px; height: 24px; display: block; }
/* Legacy .ico fallback for any older brand block that hasn't migrated. */
.brand-mark .ico { width: 18px; height: 18px; stroke-width: 2; color: var(--accent-2); }
.brand-name { line-height: 1.1; }
.brand-name small { display: block; font-size: 0.66rem; font-weight: 500;
  color: var(--ink-sub); letter-spacing: 0.06em; text-transform: uppercase; }
/* Split-weight wordmark: "Badminton" thin + "Labs" heavy orange. Lives
   inside .brand-name so the tagline <small> rules still apply. The
   uppercase + 1.2rem rule on .brand is overridden here so the wordmark
   reads as mixed-case "BadmintonLabs" at a slightly larger size. */
.brand-name-split {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  letter-spacing: -0.005em;
  text-transform: none;
  line-height: 1;
}
.brand-name-split .bn-lite  { font-weight: 300; color: var(--ink); }
.brand-name-split .bn-heavy { font-weight: 800; color: var(--accent); }

nav.nav { display: flex; gap: 0.15rem; flex: 1; flex-wrap: wrap; }
nav.nav a {
  padding: 0.45rem 0.95rem; border-radius: var(--r-md);
  color: var(--ink-mut); font-size: 0.88rem; font-weight: 600;
  transition: background 150ms, color 150ms;
}
nav.nav a.active { background: var(--ink); color: #fff; }
nav.nav a:hover:not(.active) { background: rgba(24,24,27,.05); color: var(--ink); text-decoration: none; }

/* ============================================================
   PAGE
   ============================================================ */
.page { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem 4rem; }

.page-head { margin: 1.5rem 0 1rem; }
.page-head h1 { margin-bottom: var(--s-2); }
.page-head .lede { color: var(--ink-mut); font-size: 1rem; max-width: 600px; }
.page-head .meta { color: var(--ink-sub); font-size: 0.85rem;
  display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 0.5rem; }
.page-head .meta strong { color: var(--ink); }

/* ============================================================
   HERO (compare page) — text + photo accent
   ============================================================ */
.hero {
  margin: 1.75rem 0 2rem;
  padding: 1.85rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.5rem;
  align-items: center;
}
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; }
}
.hero h1 { margin: 0 0 0.55rem; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(105deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .sub { color: var(--ink-mut); font-size: 1rem; margin: 0 0 1.1rem; max-width: 480px; }
.hero-rail {
  display: flex; gap: 1.5rem; align-items: center;
  color: var(--ink-mut); font-size: 0.85rem; flex-wrap: wrap;
}
.hero-rail strong { color: var(--ink); }
.hero-rail .dot { color: var(--line-2); }
.hero-rail .live-pulse { color: var(--emerald-d); font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.35rem; }
.hero-rail .live-pulse::before {
  content: ''; width: 7px; height: 7px;
  background: var(--emerald); border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}

.hero-cta { display: flex; gap: 0.5rem; margin-top: 1.1rem; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.95rem; border-radius: var(--r-pill);
  font-size: 0.83rem; font-weight: 600;
  border: 1px solid var(--line-2); color: var(--ink); background: #fff;
  transition: border-color 150ms, color 150ms, background 150ms;
}
.pill:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pill.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill .ico { width: 14px; height: 14px; stroke-width: 2; }

/* Hero image accent */
.hero-image {
  position: relative;
  height: 280px;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent-bg) 0%, #fef3c7 100%);
  border: 1px solid var(--line);
}
.hero-image img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.hero-image::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(234,88,12,0.12) 0%, transparent 40%),
    linear-gradient(0deg, rgba(24,24,27,0.10) 0%, transparent 50%);
  pointer-events: none;
}
.hero-image-tag {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(24,24,27,0.75);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  border-radius: var(--r-sm);
  display: inline-flex; align-items: center; gap: 0.4rem;
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ============================================================
   TRENDING SCROLLER
   ============================================================ */
.trending {
  margin: 0 0 2rem;
}
.trending-head {
  display: flex; align-items: baseline; gap: 1rem;
  margin-bottom: 0.85rem;
}
.trending-head h2 {
  font-size: 1.05rem; font-weight: 700; letter-spacing: 0;
  text-transform: uppercase;
  font-family: 'Barlow', sans-serif;
  color: var(--ink-mut);
  letter-spacing: 0.08em;
}
.trending-head h2 strong {
  color: var(--ink);
  font-weight: 700;
}
.trending-nav { margin-left: auto; display: flex; gap: 0.4rem; }
.trending-nav button {
  width: 32px; height: 32px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-mut);
  border-radius: var(--r-md); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color 150ms, color 150ms;
}
.trending-nav button:hover { border-color: var(--accent); color: var(--accent); }
.trending-nav button .ico { width: 16px; height: 16px; stroke-width: 2.25; }

.trending-rail {
  display: flex; gap: 0.85rem;
  overflow-x: auto; scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  /* Hide scrollbar (visually) */
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.trending-rail::-webkit-scrollbar { height: 6px; }
.trending-rail::-webkit-scrollbar-track { background: transparent; }
.trending-rail::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.trend-card {
  flex: 0 0 200px; scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0.85rem;
  text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 0.35rem;
  transition: border-color 180ms, transform 180ms, box-shadow 180ms;
}
.trend-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: var(--sh-md); text-decoration: none;
}
.trend-img {
  width: 100%; height: 110px;
  background: linear-gradient(135deg, #fefaf2, var(--accent-bg));
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.trend-img img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 0.3rem; }
.trend-name { font-size: 0.85rem; font-weight: 600; line-height: 1.3;
  color: var(--ink); margin-top: 0.25rem; }
.trend-meta { display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.75rem; color: var(--ink-sub); }
.trend-price { font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem; font-weight: 700; color: var(--emerald-d); letter-spacing: -0.01em; }

/* ============================================================
   TOOLBAR (search + zip + addons rows)
   ============================================================ */
.toolbar { display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 1.5rem; }
.row {
  display: flex; align-items: center; gap: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0.7rem 0.95rem;
  transition: border-color 150ms, box-shadow 150ms;
}
.row:focus-within { border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(234,88,12,.10); }
.row.zip-set {
  border-color: var(--emerald-line);
  background: linear-gradient(180deg, var(--emerald-bg), #fff 50%);
}
.row-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--accent-bg); color: var(--accent);
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
}
.row-icon .ico { width: 16px; height: 16px; stroke-width: 2; }
.row.zip-set .row-icon { background: var(--emerald-bg); color: var(--emerald-d); }
.row input[type=text] {
  flex: 1; border: 0; outline: none; font: inherit;
  font-size: 1rem; padding: 0.4rem 0; background: transparent;
  color: var(--ink); font-weight: 500;
}
.row input[type=text]::placeholder { color: var(--ink-sub); font-weight: 400; }

/* ---------- Search-first toolbar layout ----------
   .search-row breaks .row's single-line flex into two stacked lines:
   a prominent search input + button on top, secondary filters below.
   Same <form>, so any filter state (checkbox/dropdown) submits with the
   search. The filter-line vanishes when empty. */
.search-row {
  display: block;          /* override .row's flex */
  padding: 0.5rem 0.85rem;
}
.search-row .search-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.search-row .search-input {
  flex: 1 1 auto;
  width: 100%;             /* fill the .ac-wrap container so the input
                              actually stretches to the search button — without
                              this the input keeps its ~170px browser default
                              even though the wrapper is flex:1 wide */
  box-sizing: border-box;
  font-size: 1.05rem;      /* slightly larger than default for prominence */
  padding: 0.55rem 0;
  min-width: 0;            /* allow shrink in narrow viewports */
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink); font-weight: 500;
  font-family: inherit;
}
.search-row .search-input::placeholder { color: var(--ink-sub); font-weight: 400; }
.search-row .ac-wrap { flex: 1 1 auto; min-width: 0; }
.search-row .filter-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}
.search-row .filter-line:empty {
  display: none;           /* hide divider if no filters */
}
/* Compact sub-line text: filter widgets read as secondary, not as headline. */
.search-row .filter-line .check { font-size: 0.85rem; color: var(--ink-mut); }
.search-row .filter-line select { font-size: 0.84rem; padding-top: 0.35rem; padding-bottom: 0.35rem; }

/* Filter dropdown — brand/material/etc. selectors in the filter-line.
   Slightly tighter than the ZIP/sort selects so the row stays compact. */
.filter-select {
  font-size: 0.84rem;
  padding: 0.35rem 1.9rem 0.35rem 0.7rem;
  max-width: 220px;
}

/* Facet chip group — radio-style anchors that filter by category-specific
   facet (shuttle material, shoe gender, bag type). One chip is .on at a time. */
.facet-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 2px 2px 2px 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.facet-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-sub);
  padding-right: 0.15rem;
  white-space: nowrap;
}
.facet-chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-mut);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background 100ms, color 100ms;
  white-space: nowrap;
  line-height: 1;
}
.facet-chip:hover {
  color: var(--ink);
  background: rgba(24, 24, 27, 0.05);
}
.facet-chip.on {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(234, 88, 12, 0.25);
}
.facet-chip.on:hover { background: var(--accent-d, #c2410c); }
@media (max-width: 600px) {
  .search-row .search-line { flex-wrap: wrap; }
  .search-row .search-line .btn.accent { flex: 1; justify-content: center; }
}
.zip-input {
  font: inherit; font-size: 0.95rem; font-weight: 600;
  padding: 0.45rem 0.7rem; width: 110px; letter-spacing: 0.06em;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: #fff;
}
.zip-input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234,88,12,.15); }
label.weak { color: var(--ink-mut); font-size: 0.85rem; font-weight: 500; }
.check {
  display: inline-flex; gap: 0.45rem; align-items: center; cursor: pointer;
  font-size: 0.9rem; font-weight: 500; color: var(--ink);
}
.check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

select {
  font: inherit; font-size: 0.88rem; font-weight: 500;
  padding: 0.45rem 2rem 0.45rem 0.75rem;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%2352525b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/></svg>") right 0.65rem center no-repeat;
  appearance: none; cursor: pointer; color: var(--ink);
}
select:hover { border-color: var(--accent); }
select:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234,88,12,.15); }
select:disabled { opacity: 0.5; cursor: not-allowed; }

.btn {
  font: inherit; font-size: 0.9rem; font-weight: 600;
  padding: 0.55rem 1.05rem;
  background: var(--ink); color: #fff;
  border: 0; border-radius: var(--r-md); cursor: pointer;
  transition: background 150ms, transform 100ms;
  display: inline-flex; align-items: center; gap: 0.4rem;
  text-decoration: none;
}
.btn:hover { background: #27272a; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.accent { background: var(--accent); }
.btn.accent:hover { background: var(--accent-d); }
.btn.ghost { background: transparent; color: var(--ink-mut);
  border: 1px solid var(--line-2); }
.btn.ghost:hover { background: rgba(24,24,27,.04); color: var(--ink); }
.btn.lg { padding: 0.7rem 1.3rem; font-size: 1rem; }
.btn.sm { padding: 0.4rem 0.75rem; font-size: 0.82rem; }
.btn .ico { width: 16px; height: 16px; stroke-width: 2.25; }
.row .ml-auto { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* ============================================================
   MODEL CARD
   ============================================================ */
.model-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--sh-sm);
  margin-bottom: 1rem;
  transition: border-color 200ms, box-shadow 200ms;
}
.model-card:hover {
  border-color: var(--line-2);
  box-shadow: 0 8px 24px rgba(234,88,12,.06);
}
.model-head { display: grid; grid-template-columns: 130px 1fr; gap: 1.5rem; align-items: center; }
.model-thumb {
  width: 130px; height: 130px;
  background: linear-gradient(135deg, #fefaf2, var(--accent-bg));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.model-thumb img { width: 100%; height: 100%; object-fit: contain;
  padding: 0.4rem; transition: transform 350ms; }
.model-card:hover .model-thumb img { transform: scale(1.05); }
.model-thumb-empty {
  width: 130px; height: 130px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.model-head h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem; font-weight: 700; letter-spacing: -0.005em;
  margin: 0 0 0.4rem; color: var(--ink);
  line-height: 1.15;
}
.model-head h3 a { color: inherit; }
.model-head h3 a:hover { color: var(--accent); text-decoration: none; }

.brand-tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink); color: var(--accent-2);
  border-radius: var(--r-sm);
  margin-left: 0.6rem; vertical-align: 0.18em;
}

.spec-strip { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.5rem 0 0.7rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.74rem; font-weight: 600;
  padding: 0.28rem 0.7rem; border-radius: var(--r-pill);
  color: var(--ink-mut); background: var(--surface-2);
  border: 1px solid var(--line-2);
}
.chip .ico { width: 12px; height: 12px; stroke-width: 2.25; }
.chip.flex   { background: var(--accent-bg);  color: var(--accent);    border-color: var(--accent-soft); }
.chip.bal    { background: var(--emerald-bg); color: var(--emerald-d); border-color: var(--emerald-line); }
.chip.skill  { background: #ede9fe;           color: var(--violet);    border-color: #ddd6fe; }
.chip.style  { background: #ccfbf1;           color: var(--teal);      border-color: #99f6e4; }
.model-summary {
  display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: baseline;
  font-size: 0.88rem; color: var(--ink-mut);
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, var(--bg), #fff);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-top: 0.4rem;
}
.model-summary .best-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-sub);
}
.model-summary .best-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em;
  color: var(--emerald-d);
}
.model-summary .sub { color: var(--ink-sub); font-size: 0.78rem; }
.model-summary .sep { color: var(--line-2); }
.model-summary strong { color: var(--ink); }

/* ============================================================
   RETAILER CARDS
   ============================================================ */
.retailer-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem; }
.ret-card {
  flex: 0 1 210px; min-width: 185px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0.85rem 1rem;
  text-decoration: none; color: var(--ink);
  transition: border-color 180ms, box-shadow 180ms, transform 180ms;
  position: relative;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.ret-card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(234,88,12,.10);
  transform: translateY(-2px);
  text-decoration: none;
}
.ret-card.cheapest {
  border-color: var(--emerald);
  box-shadow: 0 0 0 1px var(--emerald), 0 4px 14px rgba(16,185,129,.14);
}
.ret-card.cheapest::before {
  content: 'BEST DEAL'; position: absolute;
  top: -1px; left: 12px;
  background: var(--emerald); color: #fff;
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em;
  padding: 0.18rem 0.55rem;
  border-radius: 0 0 5px 5px;
}
.ret-card.out { opacity: 0.55; }

.ret-name {
  font-size: 0.78rem; color: var(--ink-mut); font-weight: 600;
  display: flex; align-items: center; gap: 0.35rem; padding-top: 0.15rem;
}
.live-badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  background: var(--emerald); color: #fff;
  font-size: 0.58rem; padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-weight: 800; letter-spacing: 0.1em;
}
.live-badge::before {
  content: ''; width: 4px; height: 4px;
  background: #fff; border-radius: 50%;
  animation: pulse 1.6s ease-in-out infinite;
}

.ret-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem; font-weight: 700; color: var(--ink);
  margin-top: 0.1rem; letter-spacing: -0.015em;
}
.ret-card.out .ret-price { color: var(--ink-sub); text-decoration: line-through; }
.ret-native { font-size: 0.7rem; color: var(--ink-sub); }
.ret-stock {
  font-size: 0.74rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.ret-stock.in { color: var(--emerald-d); }
.ret-stock.out { color: var(--rose); }
.ret-stock .ico { width: 12px; height: 12px; stroke-width: 2.5; }

/* Per-unit price chip (shuttles). Subtle inline-block so it sits between
   the headline price and the stock badge without visually competing.
   `.best` highlights the lowest per-unit price across retailers in the group. */
.ret-unit {
  display: inline-flex; align-items: baseline; gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--ink-mut);
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}
.ret-unit strong {
  color: var(--ink);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: -0.01em;
}
.ret-unit .subtle {
  color: var(--ink-sub);
  font-weight: 500;
}
.ret-unit.best strong { color: var(--emerald-d); }
.ret-unit.best::after {
  content: "★";
  color: var(--emerald-d);
  font-size: 0.72rem;
  margin-left: 0.15rem;
}

/* Shuttle speed chips — surfaced from product_variants. Filled = in stock,
   outlined = listed but out of stock. The little 75-79 numbers form a
   speed-by-availability strip below the per-unit price. */
.ret-speeds {
  display: inline-flex; align-items: center;
  gap: 0.3rem;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--ink-mut);
  flex-wrap: wrap;
}
.ret-speeds-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-sub);
  font-weight: 600;
}
.ret-speed-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 20px;
  padding: 0 0.32rem;
  border-radius: 5px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background 100ms, color 100ms;
}
.ret-speed-chip.on {
  background: var(--accent-bg);
  color: var(--accent-d, #c2410c);
  border-color: var(--accent-soft, var(--accent-bg));
}
.ret-speed-chip.off {
  background: transparent;
  color: var(--ink-sub);
  border-color: var(--line-2);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* Shoe-size chips — same visual language as speed chips. Filled = in
   stock, outlined+strikethrough = listed but out of stock. */
.ret-sizes {
  display: inline-flex; align-items: center;
  gap: 0.3rem;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--ink-mut);
  flex-wrap: wrap;
}
.ret-sizes-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-sub);
  font-weight: 600;
}
.ret-size-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 20px;
  padding: 0 0.32rem;
  border-radius: 5px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background 100ms, color 100ms;
}
.ret-size-chip.on {
  background: var(--accent-bg);
  color: var(--accent-d, #c2410c);
  border-color: var(--accent-soft, var(--accent-bg));
}
.ret-size-chip.off {
  background: transparent;
  color: var(--ink-sub);
  border-color: var(--line-2);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* Pack-size chips (strings). 10m set vs 200m reel — each chip links to that
   pack's PDP, the cheapest-per-meter chip gets the emerald 'best' tint. The
   chip text reads "<length>m $<price>"; the per-meter price lives in the
   tooltip so the chip stays compact. */
.ret-packs {
  display: inline-flex; align-items: center;
  gap: 0.3rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}
.ret-pack-chip {
  display: inline-flex; align-items: center; gap: 0.18rem;
  padding: 0 0.4rem;
  height: 20px;
  border-radius: 5px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: background 100ms, color 100ms, border-color 100ms;
}
.ret-pack-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.ret-pack-chip strong { font-weight: 700; }
.ret-pack-cpr {
  /* "≈ $8.05/string" suffix on reel chips. Slightly smaller and muted so
     the chip's primary read is still the pack length + total price. */
  font-family: 'Barlow', sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  opacity: 0.78;
  margin-left: 2px;
}
.ret-pack-chip.best .ret-pack-cpr {
  opacity: 1;
}

/* String compare cards: per-job pricing display. The big number is
   $X/job (derived from reel or equal to a 10m set price); .ret-pack-basis
   sits underneath in muted type and explains where the number came from.
   .derived gets a gold accent so reel-derived rows stand out — "you're
   seeing math, not the sticker price". */
.ret-price-unit {
  font-family: 'Barlow', sans-serif;
  font-size: 0.55em;
  font-weight: 500;
  color: var(--ink-sub);
  margin-left: 1px;
  letter-spacing: 0.02em;
}
.ret-pack-basis {
  display: block;
  font-family: 'Barlow', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--ink-sub);
  margin-top: 2px;
  letter-spacing: 0.005em;
}
.ret-pack-basis.derived {
  color: var(--accent-d);
  font-weight: 600;
}
.best-num-unit {
  font-size: 0.55em;
  font-weight: 500;
  color: var(--ink-sub);
  margin-left: 1px;
  letter-spacing: 0.02em;
}
.ret-pack-chip.on {
  background: var(--accent-bg);
  color: var(--accent-d, #c2410c);
  border-color: var(--accent-soft, var(--accent-bg));
}
.ret-pack-chip.off {
  background: transparent;
  color: var(--ink-sub);
  border-color: var(--line-2);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.ret-pack-chip.best {
  background: var(--emerald-bg, #d1fae5);
  color: var(--emerald-d, #047857);
  border-color: var(--emerald-soft, var(--emerald-bg, #a7f3d0));
}
.ret-pack-chip:hover { filter: brightness(0.95); }

/* Manufacturer-recommended strings on racquet model_detail.html and vs.html.
   Each rec is grouped by intent (Power / Control / All-round / Suggested)
   and rendered as a chip that links to the string's /model page. Same
   emerald palette as the 'Yonex pick' chip on /strings/recommend so the
   visual signal is consistent. */
.string-rec-row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.string-rec-intent {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-sub);
  min-width: 60px;
}
.string-rec-chip {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
  background: var(--emerald-bg, #d1fae5);
  color: var(--emerald-d, #047857);
  border: 1px solid var(--emerald-soft, var(--emerald-bg, #a7f3d0));
  text-decoration: none;
  transition: background 100ms, color 100ms;
}
.string-rec-chip:hover {
  background: var(--emerald-d, #047857);
  color: #fff;
}

/* 'Yonex pick' chip on the string recommender results — signals that a
   string is manufacturer-recommended for one of the racquets the user
   picked, which adds +1.0 to the score (plus +0.4 when intent matches
   play_style). Same emerald accent as the per-meter 'best' pack chip. */
.mfg-rec-chip {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.4rem;
  border-radius: 5px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: var(--emerald-bg, #d1fae5);
  color: var(--emerald-d, #047857);
  border: 1px solid var(--emerald-soft, var(--emerald-bg, #a7f3d0));
  cursor: help;
  vertical-align: 0.08em;
}

/* Bulk-pricing chip (shuttles). Click expands a small table showing each
   tube-count tier with per-tube savings. Same click-popover pattern as the
   retailer-policy badge so we don't trigger the parent <a>. */
.ret-bulk {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.74rem;
  color: var(--emerald-d);
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-line);
  padding: 0.18rem 0.55rem;
  margin-top: 0.25rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  cursor: help;
  user-select: none;
}
.ret-bulk:hover { filter: brightness(0.97); }
.ret-bulk strong {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.ret-bulk-saves { color: var(--emerald-d); font-weight: 700; }
.ret-bulk-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 280px;
  padding: 0.7rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 130ms ease-out, transform 130ms ease-out, visibility 0s linear 130ms;
  z-index: 60;
  text-align: left;
  color: var(--ink);
  white-space: normal;
  cursor: default;
}
.ret-bulk.open .ret-bulk-pop {
  opacity: 1; pointer-events: auto; visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}
.ret-bulk-title {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-d, #c2410c);
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}
.ret-bulk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}
.ret-bulk-table th {
  text-align: left;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-sub);
  padding: 0.2rem 0.35rem;
  border-bottom: 1px solid var(--line);
}
.ret-bulk-table td {
  padding: 0.35rem 0.35rem;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-mut);
}
.ret-bulk-table tr:last-child td { border-bottom: 0; }
.ret-bulk-table td:first-child { font-weight: 700; color: var(--ink); }
.ret-bulk-table td:nth-child(2),
.ret-bulk-table td:nth-child(3) { font-weight: 600; color: var(--ink); }
.ret-bulk-table tr.best td:nth-child(3) { color: var(--emerald-d); }
.ret-bulk-table tr.best td:nth-child(3)::after {
  content: " ★"; color: var(--emerald-d); font-size: 0.72rem;
}
.ret-bulk-table tr.best td:nth-child(4) {
  color: var(--emerald-d); font-weight: 700;
}
.ret-bulk-table tr.oos td { opacity: 0.55; }
.ret-bulk-foot {
  margin-top: 0.45rem;
  font-size: 0.7rem;
  color: var(--ink-sub);
  font-weight: 500;
}

.ret-ship {
  font-size: 0.74rem; color: var(--ink-mut);
  border-top: 1px dashed var(--line);
  margin-top: 0.4rem; padding-top: 0.35rem;
  display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap;
}
.ret-ship .ico { width: 12px; height: 12px; stroke-width: 2; color: var(--ink-sub); }
.ret-total { color: var(--accent); font-weight: 600; }

.ret-string {
  display: inline-flex; align-items: center; gap: 0.3rem; flex-wrap: wrap;
  font-size: 0.72rem; color: var(--accent);
  background: var(--accent-bg);
  padding: 0.22rem 0.55rem; border-radius: var(--r-sm);
  margin-top: 0.3rem; font-weight: 600;
  border: 1px solid var(--accent-soft);
}
.ret-string .ico { width: 12px; height: 12px; stroke-width: 2.25; }

.ret-perk {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: var(--emerald-bg); color: var(--emerald-d);
  font-size: 0.72rem;
  padding: 0.18rem 0.55rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--emerald-line);
  margin-top: 0.25rem;
  font-weight: 600;
}
.ret-perk .ico { width: 12px; height: 12px; stroke-width: 2.25; }
.ret-perk strong { font-weight: 700; }

/* Retailer policy badge — small ⓘ chip on each retailer card. Click toggles
   the .open state which reveals .ret-policy-pop with the full policy notes.
   Uses click (not :hover) so it works on touch + the inner popover doesn't
   trigger navigation when the user reads it. */
.ret-policy {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.72rem; color: var(--ink-mut);
  padding: 0.18rem 0.55rem;
  margin-top: 0.25rem;
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  cursor: help;
  font-weight: 600;
  user-select: none;
}
.ret-policy:hover { color: var(--ink); border-color: var(--ink-sub); }
.ret-policy .ico { width: 13px; height: 13px; stroke-width: 2; }
.ret-policy-label { letter-spacing: 0.01em; }

.ret-policy-pop {
  /* Hidden by default — toggled visible via .open class on .ret-policy */
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 280px;
  padding: 0.7rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 130ms ease-out, transform 130ms ease-out, visibility 0s linear 130ms;
  z-index: 60;
  text-align: left;
  font-weight: 500;
  color: var(--ink);
  white-space: normal;
  cursor: default;
}
.ret-policy.open .ret-policy-pop {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}
.ret-policy-title {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-d, #c2410c);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.ret-policy-list {
  margin: 0 0 0.4rem;
  padding-left: 1rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--ink-mut);
}
.ret-policy-list li { margin-bottom: 0.2rem; }
.ret-policy-row {
  display: flex; flex-direction: column;
  font-size: 0.74rem;
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--line);
}
.ret-policy-key {
  color: var(--ink-sub);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
  font-weight: 600;
}
.ret-policy-val {
  color: var(--ink);
  font-weight: 600;
  margin-top: 0.15rem;
}

.ret-effective {
  margin-top: 0.5rem; padding-top: 0.4rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 0.74rem; color: var(--ink-mut); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.ret-effective strong {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem; font-weight: 700; color: var(--accent);
  letter-spacing: -0.015em; text-transform: none;
}
.ret-card.cheapest .ret-effective strong { color: var(--emerald-d); }

.subtle { color: var(--ink-sub); font-size: 0.85rem; font-weight: normal; }

.trunc-banner {
  background: linear-gradient(180deg, #fffbed 0%, #fff7e0 100%);
  border: 1px solid #f3e1a8;
  border-left: 4px solid var(--accent, #ea580c);
  border-radius: 10px;
  padding: 0.85rem 1.1rem;
  margin: 1.25rem 0 1rem;
  font-size: 0.92rem;
  color: #6b4d10;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4rem;
}
.trunc-banner strong { color: #4a3608; }
.trunc-banner a {
  color: var(--accent, #ea580c);
  font-weight: 600;
  margin-left: 0.25rem;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.trunc-banner a:hover { color: #b8480c; }

/* ============================================================
   TOOLTIP — for spec hover
   ============================================================ */
.has-tooltip { position: relative; }
.has-tooltip .tooltip-body {
  position: absolute; left: 0; top: calc(100% + 6px);
  width: 320px;
  background: var(--ink); color: #f4f4f5;
  border-radius: var(--r-lg);
  padding: 0.75rem 0.9rem;
  font-size: 0.82rem; line-height: 1.5;
  box-shadow: var(--sh-pop);
  opacity: 0; pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 150ms, transform 150ms;
  z-index: 80;
}
.has-tooltip:hover .tooltip-body,
.has-tooltip:focus-within .tooltip-body { opacity: 1; transform: translateY(0); }
.tooltip-row { display: flex; gap: 0.55rem; padding: 0.15rem 0; }
.tooltip-key { color: #a1a1aa; min-width: 90px; font-size: 0.74rem; }
.tooltip-val { flex: 1; }
.tooltip-intent { font-style: italic; color: #d4d4d8;
  border-bottom: 1px solid #3f3f46; padding-bottom: 0.4rem; margin-bottom: 0.4rem; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty {
  text-align: center; padding: var(--s-12) var(--s-4);
  color: var(--ink-mut);
  background: var(--surface);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-xl);
}
.empty .ico { width: 48px; height: 48px; stroke-width: 1.5;
  color: var(--ink-sub); margin-bottom: 0.5rem; }

/* ============================================================
   FORMS (recommend page)
   ============================================================ */
fieldset {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.25rem;
  margin: 0 0 1rem;
  box-shadow: var(--sh-sm);
}
legend {
  padding: 0 var(--s-2);
  font-weight: 700; font-size: 0.78rem;
  color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-size: 0.82rem; color: var(--ink-mut); font-weight: 600; }
.field select, .field input[type=text] {
  font: inherit; font-size: 0.95rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: #fff; color: var(--ink);
  transition: border-color 150ms, box-shadow 150ms;
}
.field select:focus, .field input[type=text]:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234,88,12,.15);
}
.field-wide { grid-column: 1 / -1; }

/* Brand preference: horizontal checkbox chips. Checked = filled accent;
   unchecked = outlined neutral. Click anywhere on the chip to toggle. */
.brand-checks {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  padding-top: 0.1rem;
}
.brand-check {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 0.9rem; font-weight: 600;
  color: var(--ink-mut);
  cursor: pointer;
  transition: border-color 150ms, background 150ms, color 150ms;
}
.brand-check input[type=checkbox] {
  width: 14px; height: 14px; margin: 0; accent-color: var(--accent);
  cursor: pointer;
}
.brand-check:hover { border-color: var(--accent); color: var(--ink); }
.brand-check:has(input:checked) {
  border-color: var(--accent);
  background: rgba(234,88,12,.08);
  color: var(--accent);
}

.past-row {
  display: grid; grid-template-columns: 1fr 160px 150px;
  gap: 0.5rem; margin-bottom: 0.4rem; align-items: center;
}
.past-row select { width: 100%; padding: 0.5rem 0.75rem; font-size: 0.9rem;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: #fff; }
.past-add {
  background: transparent; border: 0; padding: 0.4rem 0;
  color: var(--accent); font-weight: 600; font-size: 0.88rem; cursor: pointer;
}
.past-add:hover { text-decoration: underline; }

/* ============================================================
   RECOMMENDER RESULTS
   ============================================================ */
.target-summary {
  background: linear-gradient(135deg, var(--accent-bg) 0%, #fff 70%);
  border: 1px solid var(--accent-soft);
  border-radius: var(--r-lg);
  padding: 0.9rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.92rem; color: var(--ink);
  display: flex; gap: 0.85rem; align-items: flex-start;
}
.target-summary .icon {
  width: 32px; height: 32px;
  background: var(--accent); color: #fff;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.target-summary .icon .ico { width: 18px; height: 18px; stroke-width: 2.25; }
.target-summary strong { color: var(--ink); }

.reco-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 1rem 1.25rem;
  margin-bottom: 0.6rem;
  display: grid;
  grid-template-columns: 56px 1fr 1fr 140px;
  gap: 1rem; align-items: center;
  box-shadow: var(--sh-sm);
  transition: box-shadow 200ms, transform 200ms, border-color 200ms;
}
.reco-card:hover { box-shadow: var(--sh-md); transform: translateY(-2px);
  border-color: var(--line-2); }
.reco-rank {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.7rem; font-weight: 700;
  color: var(--ink-sub); text-align: center;
}
.reco-card:nth-child(2) .reco-rank,
.reco-card.top .reco-rank { color: var(--accent); }
.reco-name { font-size: 1rem; font-weight: 700;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.reco-name a { color: var(--ink); }
.reco-name a:hover { color: var(--accent); text-decoration: none; }
.reco-meta { color: var(--ink-sub); font-size: 0.78rem; margin-top: 0.15rem; }
.reco-summary { color: var(--ink-mut); font-size: 0.84rem;
  font-style: italic; margin-top: 0.2rem; line-height: 1.45; }
.reco-explain { color: var(--ink-mut); font-size: 0.85rem; }

/* Community-rating chip — inline next to the racquet name. Filled star,
   compact count. Only rendered when rating_count >= 20 so a single low
   sample doesn't shout. */
.rating-chip {
  display: inline-flex; align-items: center; gap: 0.2rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--r-sm);
  background: rgba(234,88,12,.08);
  color: var(--accent);
  font-size: 0.78rem; font-weight: 700;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.rating-chip .star { font-size: 0.85rem; line-height: 1; }
.rating-chip .rating-count { color: var(--ink-sub); font-weight: 500; }

/* Caveat badge — durability/safety warnings surfaced inline.
   Distinct from rating-chip via warmer color + warning glyph. */
.caveat-badge.warning {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--r-sm);
  background: #fef3c7;          /* amber-100 */
  color: #92400e;               /* amber-900 */
  border: 1px solid #fcd34d;    /* amber-300 */
  font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: help;
}
.reco-price { text-align: right; }
.reco-price .price { font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.2rem; font-weight: 700; color: var(--emerald-d); }
.reco-price .ret-count { font-size: 0.75rem; color: var(--ink-sub); }
@media (max-width: 700px) {
  .reco-card { grid-template-columns: 48px 1fr; }
  .reco-card .reco-explain, .reco-card .reco-price { grid-column: 2; }
}

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.detail-layout {
  display: grid; grid-template-columns: 2fr 1fr; gap: 2rem;
  margin-top: 1.5rem;
}
@media (max-width: 800px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--sh-sm);
  margin-bottom: 1rem;
}
.specs-row {
  display: grid; grid-template-columns: 130px 1fr;
  gap: 0.75rem; padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.specs-row:last-child { border-bottom: 0; }
.specs-key { color: var(--ink-mut); font-weight: 600;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
.specs-val { color: var(--ink); }

.chart-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 1rem;
  text-align: center; box-shadow: var(--sh-sm);
}
.chart-card img { max-width: 100%; height: auto; border-radius: var(--r-md); }
.chart-card .caption { font-size: 0.78rem; color: var(--ink-sub); margin-top: 0.5rem; }

/* Trait radar card — visual companion to .chart-card on the detail
   right column. Sized so the SVG centers in a square frame; caption
   below mirrors .chart-card so the two cards stack consistently. */
.radar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--sh-sm);
  margin-bottom: 1rem;
}
.radar-card .spec-radar {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.radar-card .caption {
  font-size: 0.78rem;
  color: var(--ink-sub);
  margin-top: 0.5rem;
  line-height: 1.3;
}
.radar-card .caption .muted { font-size: 0.72rem; }

/* ============================================================
   DATA TABLE (all listings)
   ============================================================ */
.data-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-sm);
}
.data-table th, .data-table td {
  padding: 0.7rem 0.85rem; text-align: left; vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.data-table th {
  background: var(--surface-2);
  font-size: 0.78rem; font-weight: 700;
  color: var(--ink-mut); text-transform: uppercase; letter-spacing: 0.06em;
}
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: var(--bg); }
.data-table img.thumb { width: 50px; height: 50px; object-fit: contain;
  border-radius: var(--r-sm); }

/* ============================================================
   UTILITY
   ============================================================ */
.muted { color: var(--ink-mut); }
.text-success { color: var(--emerald-d); font-weight: 600; }
.text-danger { color: var(--rose); }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }

/* ============================================================
   /vs — multi-racquet comparison
   ============================================================ */

.vs-picker {
  display: flex; align-items: stretch; gap: 0.85rem;
  margin: 1.5rem 0 1.25rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.vs-slots { display: flex; gap: 0.85rem; flex: 1; flex-wrap: wrap; }
.vs-slot {
  position: relative;
  width: 180px; min-height: 120px;
  border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0.7rem;
  background: #fff;
  border: 1.5px solid var(--line);
  text-align: center;
  transition: 150ms ease-out;
}
.vs-slot.filled {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(234,88,12,0.10);
}
.vs-slot.empty {
  border-style: dashed; border-color: #d1d5db;
  background: #f9fafb;
}
.vs-slot.empty:hover { border-color: var(--accent); background: #fffbf5; }
.vs-slot.empty select {
  width: 100%; padding: 0.55rem 0.5rem;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; font-family: inherit; font-size: 0.85rem;
  cursor: pointer;
}
.vs-slot.empty select:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234,88,12,.15); }
.vs-slot.ghost {
  border-style: dashed; border-color: #e5e7eb;
  background: #fafafa;
}
.vs-slot-img {
  width: 70px; height: 70px;
  background: linear-gradient(135deg,#fafaf6,#f3f0e7);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 0.45rem;
}
.vs-slot-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vs-slot-name {
  font-size: 0.85rem; font-weight: 600; line-height: 1.2;
  color: var(--ink, #0f172a);
}
.vs-slot-remove {
  position: absolute; top: -8px; right: -8px;
  width: 24px; height: 24px;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #6b7280;
  text-decoration: none;
  transition: 120ms;
}
.vs-slot-remove:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.vs-slot-remove .ico { width: 14px; height: 14px; }

.vs-clear {
  align-self: center;
  font-size: 0.85rem;
  color: var(--ink-mut, #475569);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  white-space: nowrap;
}
.vs-clear:hover { color: var(--accent); }

.vs-prompt {
  background: linear-gradient(180deg, #fffaf0, #fff);
  border: 1.5px dashed #f3d49a;
  border-radius: 14px;
  padding: 1.85rem 1.5rem;
  text-align: center;
  margin: 1rem 0 2rem;
}

/* Comparison table */
.vs-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15,23,42,.05);
}
.vs-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.vs-table th, .vs-table td {
  padding: 0.75rem 0.95rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
  vertical-align: top;
  text-align: left;
}
.vs-table tr:last-child td { border-bottom: 0; }
.vs-row-label {
  width: 160px;
  color: var(--ink-mut, #475569);
  font-weight: 500;
  background: #fafafa;
  border-right: 1px solid var(--line);
}
.vs-row-section td {
  background: #fef3e8;
  color: #9a3412;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.6rem 0.95rem;
  border-bottom: 1px solid #fde2c7;
  border-top: 1px solid #fde2c7;
}
.vs-col-head {
  text-align: center;
  vertical-align: top;
  padding: 1rem 0.85rem;
  background: linear-gradient(180deg, #fff, #fafafa);
  border-bottom: 2px solid var(--line);
}
.vs-col-img {
  width: 72px; height: 72px;
  margin: 0 auto 0.5rem;
  background: linear-gradient(135deg,#fafaf6,#f3f0e7);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.vs-col-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vs-col-name {
  font-size: 0.95rem; font-weight: 700;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}
.vs-col-name a { color: inherit; text-decoration: none; }
.vs-col-name a:hover { color: var(--accent); }
.vs-col-family { display: inline-block; }

.vs-price { font-size: 1.1rem; font-weight: 700; color: var(--ink, #0f172a); }
.vs-price.winner {
  color: var(--emerald-d);
  background: var(--emerald-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--emerald-line);
}

.vs-cell-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 0.25rem 0.4rem;
  border-radius: 6px;
  margin: -0.25rem -0.4rem;
  transition: 120ms;
}
.vs-cell-link:hover { background: #fffaf0; }
.vs-cell-link.oos { opacity: 0.55; }
.vs-cell-total { font-weight: 700; color: var(--ink, #0f172a); }

/* ============================================================
   Centered hero (with action cards)
   ============================================================ */
.hero-centered {
  margin: 1.5rem 0 2.25rem;
  padding: 1.85rem 1rem 1.75rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero-centered .hero-eyebrow { margin-bottom: 1rem; }
.hero-centered .hero-rail { display: inline-flex; }
.hero-h1 {
  margin: 0.45rem auto 0.6rem;
  max-width: 720px;
  line-height: 1.05;
  font-size: 2.8rem;
  font-weight: 800;
}
.hero-h1 em {
  font-style: normal;
  background: linear-gradient(105deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  color: var(--ink-mut);
  font-size: 1.02rem;
  max-width: 580px;
  margin: 0 auto 1.5rem;
}

.action-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  max-width: 880px;
  margin: 1.5rem auto 1.25rem;
}
@media (max-width: 720px) {
  .action-cards { grid-template-columns: 1fr; gap: 0.7rem; }
}
.action-card {
  display: block;
  text-align: left;
  padding: 1.15rem 1.2rem 1.1rem;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: 180ms cubic-bezier(.2,.7,.3,1);
  position: relative;
}
.action-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(234,88,12,.08);
  transform: translateY(-2px);
  text-decoration: none;
}
.action-card.primary {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
  border-color: var(--accent-soft);
}
.action-card.primary:hover { border-color: var(--accent); }

.action-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: var(--accent-bg); color: var(--accent);
  border-radius: 9px;
  margin-bottom: 0.65rem;
}
.action-card.primary .action-icon { background: var(--accent); color: #fff; }
.action-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 1.05rem;
  margin-bottom: 0.25rem;
}
.action-desc {
  font-size: 0.85rem; color: var(--ink-mut);
  line-height: 1.45;
}

.hero-quick {
  display: inline-flex; align-items: center; gap: 0.5rem;
  flex-wrap: wrap; justify-content: center;
  margin-top: 0.75rem;
}

/* ============================================================
   Page-transition loader — racquets rallying a shuttle
   ============================================================ */
#page-loader {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(253, 251, 246, 0.82);
  backdrop-filter: saturate(1.4) blur(6px);
  -webkit-backdrop-filter: saturate(1.4) blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease-out;
}
#page-loader.on { opacity: 1; pointer-events: auto; }

.loader-stage {
  display: flex; flex-direction: column; align-items: center; gap: 0.85rem;
  padding: 1.5rem 2rem;
}
.loader-svg {
  /* Larger render so the 3D-perspective court scene is legible. The
     viewBox is 480 × 200; CSS scales preserve aspect ratio. */
  width: 460px; height: 192px; display: block;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,0.10));
}

.loader-rkt {
  transform-box: fill-box;
  transform-origin: 50% 100%;  /* pivot at the butt of the handle */
  animation-duration: 1.3s;
  animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1);
  animation-iteration-count: infinite;
}
/* Near racquet — front-left of court, scaled UP for depth (closer to camera).
   Translate puts the (scaled) butt around world (125, 175) on the court. */
.loader-rkt-l {
  animation-name: rally-rkt-near;
  transform: translate(125px, 148.6px) scale(1.2) rotate(-10deg);
}
/* Far racquet — sits on the back baseline (y=60), mirror of the near
   racquet against the front baseline. Scaled DOWN for depth. */
.loader-rkt-r {
  animation-name: rally-rkt-far;
  transform: translate(280px, 37.2px) scale(0.72) rotate(12deg);
}

/* Near racquet swing — receives shuttle at 100%/0% (the loop boundary).
   Wind-up around 92–96%, contact at 0%, follow-through to 6%, idle from 12%. */
@keyframes rally-rkt-near {
  0%        { transform: translate(125px, 148.6px) scale(1.2) rotate(-32deg); } /* contact (swung through) */
  6%        { transform: translate(125px, 148.6px) scale(1.2) rotate(-18deg); }
  12%, 86%  { transform: translate(125px, 148.6px) scale(1.2) rotate(-10deg); } /* idle */
  94%       { transform: translate(125px, 148.6px) scale(1.2) rotate(38deg); }  /* wind-up */
  100%      { transform: translate(125px, 148.6px) scale(1.2) rotate(-32deg); } /* loops to 0% */
}

/* Far racquet swing — receives shuttle at 48–52%. Wind-up at 43%, contact
   at 48%, follow-through to 54%, idle the rest of the loop. */
@keyframes rally-rkt-far {
  0%, 38%   { transform: translate(280px, 37.2px) scale(0.72) rotate(12deg); } /* idle */
  43%       { transform: translate(280px, 37.2px) scale(0.72) rotate(-48deg); } /* wind-up */
  48%       { transform: translate(280px, 37.2px) scale(0.72) rotate(30deg); }  /* contact */
  54%       { transform: translate(280px, 37.2px) scale(0.72) rotate(18deg); }  /* follow-thru */
  62%, 100% { transform: translate(280px, 37.2px) scale(0.72) rotate(12deg); }
}

.loader-shuttle {
  animation: rally-shuttle 1.3s cubic-bezier(0.42, 0, 0.58, 1) infinite;
  transform-box: fill-box;
}

/* Shuttle flight: 3D-curved arc from near racquet up over the net to far
   racquet (now on the back baseline), then back. Apex ≈ (216, 16) above
   the net. Rotation tracks the cork-leading orientation along the tangent. */
@keyframes rally-shuttle {
  /* === Outbound: near → apex → far === */
  0%   { transform: translate(125px, 133px) rotate(120deg); }   /* leaving near racquet */
  7%   { transform: translate(148px,  80px) rotate(128deg); }
  14%  { transform: translate(172px,  43px) rotate(140deg); }
  22%  { transform: translate(196px,  22px) rotate(159deg); }
  28%  { transform: translate(216px,  16px) rotate(180deg); }   /* apex over the net */
  34%  { transform: translate(236px,  22px) rotate(201deg); }
  41%  { transform: translate(260px,  32px) rotate(220deg); }
  /* Arrived at far racquet face — cork kisses the strings */
  48%  { transform: translate(284px,  42px) rotate(233deg); }
  52%  { transform: translate(284px,  42px) rotate(233deg); }   /* held during far wind-up */
  /* === Impact flip: cork swings to lead the return leg === */
  55%  { transform: translate(284px,  42px) rotate(53deg); }
  /* === Return: far → apex → near === */
  61%  { transform: translate(260px,  32px) rotate(40deg); }
  67%  { transform: translate(236px,  22px) rotate(21deg); }
  73%  { transform: translate(216px,  16px) rotate(0deg); }     /* return apex */
  80%  { transform: translate(196px,  22px) rotate(-21deg); }
  87%  { transform: translate(172px,  43px) rotate(-40deg); }
  93%  { transform: translate(148px,  80px) rotate(-53deg); }
  /* Arrived back at near racquet face */
  97%  { transform: translate(125px, 133px) rotate(-60deg); }
  /* Impact flip back to outbound orientation (continuous loop) */
  100% { transform: translate(125px, 133px) rotate(120deg); }
}

.loader-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-mut);
  letter-spacing: 0.04em;
  display: inline-flex; align-items: baseline; gap: 0.15rem;
}
.loader-dots { display: inline-flex; gap: 2px; margin-left: 1px; }
.loader-dots i {
  width: 3px; height: 3px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: dot-fade 1.4s ease-in-out infinite;
}
.loader-dots i:nth-child(2) { animation-delay: 0.18s; }
.loader-dots i:nth-child(3) { animation-delay: 0.36s; }

@keyframes dot-fade {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

/* Reduced-motion users see a quiet text-only spinner */
@media (prefers-reduced-motion: reduce) {
  .loader-rkt, .loader-shuttle, .loader-dots i { animation: none !important; }
  .loader-svg { display: none; }
}

/* ============================================================
   Centered topbar — brand stacked above nav, both centered
   ============================================================ */
.topbar-centered .topbar-inner {
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem 0.75rem;
}
.topbar-centered .brand {
  flex-direction: row;
  text-align: center;
}
.topbar-centered .brand-name { text-align: left; }
.topbar-centered nav.nav {
  flex: 0;
  justify-content: center;
}
@media (max-width: 540px) {
  .topbar-centered nav.nav { flex-wrap: wrap; }
}

/* ============================================================
   Racquet autocomplete (used by /vs picker and search inputs)
   ============================================================ */
.ac-wrap { position: relative; flex: 1; }
.ac-dropdown {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
  z-index: 60;
  max-height: 340px;
  overflow-y: auto;
  display: none;
  padding: 4px;
}
.ac-dropdown.open { display: block; }

.ac-item {
  display: flex; flex-direction: column;
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: transparent;
  border: 0;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: background 80ms;
}
.ac-item:hover, .ac-item.active { background: var(--accent-bg); }
.ac-name {
  font-weight: 600; font-size: 0.92rem; color: var(--ink);
  line-height: 1.25;
}
.ac-name mark { background: var(--accent-2); color: var(--ink); padding: 0 2px; border-radius: 3px; }
.ac-item.active .ac-name { color: var(--accent-d); }
.ac-sub {
  font-size: 0.75rem; color: var(--ink-mut);
  margin-top: 0.15rem;
}
.ac-empty {
  padding: 0.85rem; color: var(--ink-sub); font-size: 0.85rem;
  text-align: center;
}

/* /vs slot search input */
.vs-search-input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit; font-size: 0.85rem;
  background: #fff;
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.vs-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234,88,12,.15);
}
.vs-slot-hint {
  margin-top: 0.4rem;
  font-size: 0.7rem; color: var(--ink-sub);
  line-height: 1.3;
  text-align: center;
}

/* Tech tags inside /vs comparison table */
.tech-tags {
  display: flex; flex-wrap: wrap; gap: 0.3rem;
  max-width: 320px;
}
.tech-chip {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  background: var(--accent-bg);
  color: var(--accent-d, #c2410c);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  white-space: nowrap;
  cursor: help;
  transition: 100ms;
}
.tech-chip:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Annotated list of tech features for the model detail page —
   surfaces what each tech actually does, beyond the tag chip. */
.tech-list {
  margin: 0.65rem 0 0;
  padding: 0;
  list-style: none;
  display: flex; flex-direction: column;
  gap: 0.4rem;
}
.tech-list li {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-mut);
  padding-left: 0.7rem;
  border-left: 2px solid var(--accent-soft);
}
.tech-list li strong { color: var(--ink); font-weight: 700; }

/* ============================================================
   Hover spec popover — shows full specs on hover for any element
   tagged with data-racquet-key. Used on /, /vs, /recommend cards.
   ============================================================ */
.spec-pop {
  position: fixed;
  z-index: 1100;
  width: 320px;
  max-width: calc(100vw - 24px);
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  font-size: 0.85rem;
  color: var(--ink);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 120ms ease-out, transform 120ms ease-out;
}
.spec-pop.on { opacity: 1; transform: translateY(0); }
.spec-pop-head {
  display: flex;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem 0.55rem;
  border-bottom: 1px solid var(--line);
}
.spec-pop-img {
  width: 56px; height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-2);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.spec-pop-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  color: var(--ink);
}
.spec-pop-sub {
  margin-top: 0.18rem;
  font-size: 0.74rem;
  color: var(--ink-mut);
  line-height: 1.3;
}
.spec-pop-body {
  padding: 0.55rem 0.85rem 0.7rem;
}
.spec-pop-row {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.22rem 0;
  font-size: 0.82rem;
  line-height: 1.35;
}
.spec-pop-row + .spec-pop-row { border-top: 1px dashed var(--line); }
.spec-pop-label {
  color: var(--ink-sub);
  font-weight: 500;
  flex-shrink: 0;
}
.spec-pop-val {
  color: var(--ink);
  text-align: right;
  font-weight: 500;
}
.spec-pop-techs {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap;
  gap: 0.25rem;
}
.spec-pop-techs .tech-chip {
  font-size: 0.66rem;
  padding: 0.12rem 0.42rem;
}
.tech-chip.community:hover { background: #c7d2fe; color: #312e81; }
.spec-pop-foot {
  display: flex; justify-content: space-between;
  padding: 0.55rem 0.85rem;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 11px 11px;
  font-size: 0.78rem;
}
.spec-pop-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  color: var(--accent-d, #c2410c);
}
.spec-pop-loading {
  padding: 1.1rem;
  text-align: center;
  color: var(--ink-sub);
  font-size: 0.82rem;
}
.spec-pop-empty {
  padding: 1.1rem 0.85rem;
  color: var(--ink-mut);
  font-size: 0.82rem;
  line-height: 1.4;
}
@media (prefers-reduced-motion: reduce) {
  .spec-pop { transition: opacity 80ms; transform: none !important; }
}
@media (hover: none) {
  /* Touch devices: hover doesn't apply; let the underlying link work normally
     and skip the popover to avoid sticky tooltips. */
  .spec-pop { display: none !important; }
}

/* ============================================================
   Category mega-menu (topbar) — Racquets / Shuttles / Shoes / Bags
   Each category is a top-level link with a hover-revealed dropdown
   of category-scoped tools (Price Compare / Compare / Recommend / All).
   ============================================================ */
.cat-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
}
.cat-item {
  position: relative;
}
.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.55rem 0.95rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-mut);
  border-radius: 9px;
  text-decoration: none;
  transition: background 110ms, color 110ms;
  white-space: nowrap;
}
.cat-btn:hover,
.cat-btn:focus-visible {
  color: var(--ink);
  background: var(--surface-2);
  outline: none;
}
.cat-item.active .cat-btn {
  color: var(--accent-d, #c2410c);
  background: var(--accent-bg);
}
.cat-chev {
  width: 11px; height: 11px;
  opacity: 0.55;
  transition: transform 180ms ease-out, opacity 110ms;
}
.cat-item:hover .cat-chev,
.cat-item:focus-within .cat-chev {
  transform: rotate(180deg);
  opacity: 1;
}

.cat-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 180px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.13);
  opacity: 0;
  pointer-events: none;
  /* Closing transition includes a 250ms grace period — gives the cursor
     time to travel from the button down into the menu. Reopening cancels
     the delay so it pops back instantly (see :hover rule below). */
  transition: opacity 130ms ease-out 250ms,
              transform 130ms ease-out 250ms,
              visibility 0s linear 380ms;
  visibility: hidden;
  z-index: 100;
}
/* Invisible bridge — extends the menu's hover area UP into the 6px gap
   between the button and the dropdown, plus a few pixels under the
   button itself. Without this, mousing through the gap drops the cursor
   out of every :hover state simultaneously and the menu closes. */
.cat-menu::before {
  content: '';
  position: absolute;
  top: -10px;       /* covers the 6px gap + a bit more for forgiveness */
  left: -8px;
  right: -8px;
  height: 14px;
  /* background: rgba(255,0,0,.2);  /* uncomment to debug the bridge */
}
.cat-item:hover > .cat-menu,
.cat-item:focus-within > .cat-menu {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  /* Open immediately on hover-in; the closing delay is on the base rule. */
  transition: opacity 130ms ease-out 0ms,
              transform 130ms ease-out 0ms,
              visibility 0s linear 0ms;
}
.cat-menu a {
  display: block;
  padding: 0.5rem 0.8rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-mut);
  border-radius: 7px;
  text-decoration: none;
  transition: background 80ms, color 80ms;
  white-space: nowrap;
}
.cat-menu a:hover {
  background: var(--accent-bg);
  color: var(--accent-d, #c2410c);
}
.cat-menu a.on {
  color: var(--accent-d, #c2410c);
  background: color-mix(in oklab, var(--accent-bg) 80%, transparent);
  font-weight: 600;
}

/* Hide the old .nav block entirely if any template still references it */
.topbar-centered .nav { display: none; }

/* On narrow screens stack categories vertically with full-width dropdowns */
@media (max-width: 540px) {
  .cat-nav { flex-direction: row; gap: 0.15rem; }
  .cat-btn { padding: 0.5rem 0.7rem; font-size: 0.86rem; }
  .cat-menu { min-width: 160px; }
}

/* Reduced-motion: kill the chevron rotation + dropdown slide */
@media (prefers-reduced-motion: reduce) {
  .cat-chev,
  .cat-item:hover > .cat-menu,
  .cat-item:focus-within > .cat-menu { transition: none; transform: translateX(-50%); }
  .cat-chev { transition: none; }
}

/* ============================================================
   Speed / crispness pass — applied app-wide
   ============================================================ */

/* Skip rendering work for off-screen cards. Browsers that don't support
   content-visibility just ignore this rule (no fallback needed). */
.model-card,
.listing-row,
.reco-card,
.trend-card {
  content-visibility: auto;
  /* contain-intrinsic-size keeps the scrollbar accurate before the card
     has been laid out — pick a height close to the typical rendered size. */
  contain-intrinsic-size: auto 220px;
}

/* GPU-friendly: promote the topbar to its own layer so it doesn't repaint
   when the body scrolls. */
.topbar {
  contain: layout style;
  will-change: transform;
}

/* Smaller hero metric strip — reads less busy when content is dense */
.hero-eyebrow .hero-rail {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   /shuttles/speed — speed-by-location recommender
   ============================================================ */
.speed-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 1.2rem 1.4rem;
  margin: 0 0 1.5rem;
  box-shadow: var(--sh-sm);
}
.speed-form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 1rem 1.2rem;
  align-items: end;
}
@media (max-width: 760px) {
  .speed-form-row { grid-template-columns: 1fr 1fr; }
  .speed-form-row .speed-submit { grid-column: 1 / -1; }
}
.speed-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.speed-field label {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.85rem; font-weight: 600; color: var(--ink);
}
.speed-field label .ico { width: 14px; height: 14px; color: var(--accent); }
.speed-field input {
  font: inherit; font-size: 0.95rem; font-weight: 600;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: #fff; color: var(--ink);
  outline: none;
  transition: border-color 120ms, box-shadow 120ms;
}
.speed-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(234,88,12,.15);
}
.speed-field-hint { font-size: 0.74rem; color: var(--ink-sub); }
.speed-field-hint strong { color: var(--ink); }
.speed-submit .btn { width: 100%; padding: 0.6rem 1rem; }
.speed-error {
  margin-top: 0.85rem;
  background: #fff4ed; color: #9a3412;
  border: 1px solid #fed7aa; border-radius: var(--r-md);
  padding: 0.55rem 0.85rem; font-size: 0.88rem;
}

/* ----- recommendation card ----- */
.speed-rec {
  background: linear-gradient(135deg, var(--accent-bg), #fff 70%);
  border: 1px solid var(--accent);
  border-radius: var(--r-xl);
  padding: 1.4rem 1.6rem;
  margin: 0 0 1.6rem;
  box-shadow: var(--sh-sm);
}
.speed-rec-main {
  display: flex; align-items: center; gap: 1.4rem;
}
.speed-rec-num {
  font-family: 'Barlow Condensed', system-ui, sans-serif;
  font-size: 5rem; font-weight: 800; line-height: 1;
  color: var(--accent);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.speed-rec-headline {
  font-size: 1.25rem; font-weight: 600; color: var(--ink);
}
.speed-rec-headline strong { color: var(--accent); }
.speed-rec-band {
  font-size: 0.92rem; color: var(--ink-mut); margin-top: 0.2rem;
}
.speed-rec-meta {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem;
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px dashed var(--line-2);
  font-size: 0.86rem; color: var(--ink-mut);
}
.speed-rec-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.speed-rec-meta .ico { width: 13px; height: 13px; color: var(--accent); }
.speed-rec-meta .weak { color: var(--ink-sub); margin-left: -0.4rem; }

.speed-section-h {
  font-size: 1.15rem; font-weight: 600;
  margin: 1.6rem 0 0.85rem;
  color: var(--ink);
}
.speed-section-h .weak { color: var(--ink-sub); font-weight: 400; }
.speed-empty {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  padding: 1rem 1.2rem;
  color: var(--ink-mut);
  font-size: 0.92rem;
}
.speed-empty p { margin: 0.2rem 0; }

/* ----- explainer + chart (shown before any submit) ----- */
.speed-explainer {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 1.4rem 1.6rem;
  margin-top: 1.5rem;
}
.speed-explainer h2 {
  font-size: 1.1rem; margin: 0 0 0.8rem;
}
.speed-explainer ul { margin: 0 0 1.2rem; padding-left: 1.2rem; color: var(--ink-mut); }
.speed-explainer ul li { margin: 0.3rem 0; line-height: 1.45; }
.speed-chart {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
}
.speed-chart th, .speed-chart td {
  text-align: left; padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--line);
}
.speed-chart th {
  font-weight: 600; color: var(--ink-sub);
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.speed-chart td:nth-child(2) { font-size: 1.05rem; color: var(--accent); }

/* ============================================================
   HERO — GEOMETRIC (ported from shape-landing-hero.tsx)
   Dark cinematic band with drifting gradient pills.
   Pure CSS — no framer-motion, no JS-per-frame.
   Animations are compositor-only (transform/opacity) and run on
   slow 14-18s loops so the GPU does very little work per second.
   ============================================================ */
.hero-geo {
  position: relative;
  /* Break out of .page's 1200px max-width + horizontal padding so the
     dark band runs edge-to-edge regardless of viewport size. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 1rem;
  margin-bottom: 2rem;
  padding: 4.5rem 1.5rem 4rem;
  overflow: hidden;
  background: #060608;
  color: #fff;
  isolation: isolate;
}
@media (min-width: 720px) { .hero-geo { padding: 6rem 2rem 5rem; } }

/* Soft indigo→rose wash sitting under everything */
.hero-geo::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 20% 30%, rgba(99,102,241,0.18), transparent 70%),
    radial-gradient(50% 45% at 80% 80%, rgba(244,63,94,0.16), transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}
/* Top + bottom edge fades into the rest of the (light) page */
.hero-geo::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(to top,    #060608, transparent 18%),
    linear-gradient(to bottom, #060608 0%, transparent 12%);
  z-index: 2; pointer-events: none;
}

.hero-geo .geo-shapes { position: absolute; inset: 0; z-index: 1;
  pointer-events: none; }

/* Each shape is a soft rounded pill with a one-sided gradient.
   We animate transform only — keeps it on the compositor. */
.geo-shape {
  position: absolute;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.12);
  box-shadow:
    0 10px 36px rgba(255,255,255,0.06),
    inset 0 0 24px rgba(255,255,255,0.04);
  opacity: 0;
  will-change: transform, opacity;
  animation:
    geo-fade-in 1.6s cubic-bezier(.23,.86,.39,.96) forwards,
    geo-drift 16s ease-in-out infinite;
}
/* Soft radial highlight in the centre of each pill */
.geo-shape::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.18), transparent 70%);
}

@keyframes geo-fade-in {
  from { opacity: 0; transform: translate3d(0,-120px,0) rotate(var(--rot-start, 0deg)); }
  to   { opacity: 1; transform: translate3d(0,0,0)       rotate(var(--rot, 0deg)); }
}
/* Long, gentle drift. translate3d only — composited, no layout. */
@keyframes geo-drift {
  0%, 100% { transform: translate3d(0,0,0)    rotate(var(--rot, 0deg)); }
  50%      { transform: translate3d(0,18px,0) rotate(var(--rot, 0deg)); }
}

/* Per-shape variants. Sizes & gradients mirror the source component. */
.geo-shape.s1 {
  width: 540px; height: 130px; top: 18%; left: -8%;
  --rot: 12deg; --rot-start: -3deg;
  background: linear-gradient(to right, rgba(99,102,241,0.18), transparent 70%);
  animation-delay: 0.25s, 1.7s;
}
.geo-shape.s2 {
  width: 460px; height: 112px; top: 70%; right: -4%;
  --rot: -15deg; --rot-start: -30deg;
  background: linear-gradient(to right, rgba(244,63,94,0.18), transparent 70%);
  animation-delay: 0.45s, 2.0s;
}
.geo-shape.s3 {
  width: 280px; height: 72px; bottom: 8%; left: 8%;
  --rot: -8deg; --rot-start: -23deg;
  background: linear-gradient(to right, rgba(139,92,246,0.18), transparent 70%);
  animation-delay: 0.55s, 2.2s;
}
.geo-shape.s4 {
  width: 190px; height: 54px; top: 10%; right: 18%;
  --rot: 20deg; --rot-start: 5deg;
  background: linear-gradient(to right, rgba(245,158,11,0.18), transparent 70%);
  animation-delay: 0.65s, 2.4s;
}
.geo-shape.s5 {
  width: 140px; height: 36px; top: 6%; left: 24%;
  --rot: -25deg; --rot-start: -40deg;
  background: linear-gradient(to right, rgba(34,211,238,0.18), transparent 70%);
  animation-delay: 0.75s, 2.6s;
}
@media (max-width: 720px) {
  .geo-shape.s1 { width: 360px; height: 90px; left: -20%; }
  .geo-shape.s2 { width: 320px; height: 84px; right: -20%; }
  .geo-shape.s3 { width: 200px; height: 56px; }
  .geo-shape.s4 { width: 140px; height: 42px; }
  .geo-shape.s5 { width: 110px; height: 30px; }
}

/* Foreground content */
.hero-geo .geo-inner {
  position: relative; z-index: 3;
  max-width: 880px; margin: 0 auto; text-align: center;
}

.geo-badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  font-size: 0.78rem; letter-spacing: 0.04em;
  color: rgba(255,255,255,0.72);
  margin-bottom: 1.75rem;
  opacity: 0; transform: translateY(20px);
  animation: geo-rise 0.9s 0.5s cubic-bezier(.25,.4,.25,1) forwards;
}
.geo-badge .geo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #f43f5e; box-shadow: 0 0 0 3px rgba(244,63,94,0.18);
}

.geo-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  /* Sized to fit comfortably in the 880px max-width hero-inner with
     ~80px of side margin even when Barlow Condensed hasn't loaded yet
     and the wider Arial fallback is in use. Caps at 4rem so the
     gradient-clipped period on "your game." never crops on any
     viewport from iPhone SE to a 4K monitor. */
  font-size: clamp(2.1rem, 5vw, 4rem);
  /* line-height needs to be > 1 because background-clip:text paints the
     gradient inside the line-box, and any glyph that hangs below the
     baseline (the descenders of "y" and "g" in "your game.") falls
     outside that box and renders invisible. Measured at 64px Arial
     Bold fallback: descenders extend ~76.67px so the box must be at
     least that, plus headroom — 1.25 = 80px gives ~3px clearance. */
  line-height: 1.25;
  letter-spacing: 0;
  /* Cap the rendered width and add inline padding so the gradient
     background extends past the last glyph and webkit/safari can't
     slice the period at the right edge. */
  max-width: min(100%, 880px);
  margin: 0 auto 1.1rem;
  padding-inline: 0.4em;
  opacity: 0; transform: translateY(20px);
  animation: geo-rise 0.9s 0.7s cubic-bezier(.25,.4,.25,1) forwards;
}
.geo-title .geo-line-a {
  background: linear-gradient(to bottom, #ffffff, rgba(255,255,255,0.78));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.geo-title .geo-line-b {
  display: block;
  background: linear-gradient(to right, #fdba74, #ffffff 50%, #f9a8d4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  /* Without this, Safari/Chrome clip the right edge of the last glyph
     because background-clip:text uses the glyph's advance width as the
     mask boundary, not its visual extent. A few extra pixels on the
     gradient background fills the gap. */
  padding-right: 0.08em;
}

.geo-sub {
  max-width: 620px; margin: 0 auto;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 300;
  color: rgba(255,255,255,0.48);
  letter-spacing: 0.01em;
  line-height: 1.6;
  opacity: 0; transform: translateY(20px);
  animation: geo-rise 0.9s 0.9s cubic-bezier(.25,.4,.25,1) forwards;
}

.geo-stats {
  display: inline-flex; align-items: center; gap: 0.85rem;
  flex-wrap: wrap; justify-content: center;
  margin-top: 1.75rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  opacity: 0; transform: translateY(20px);
  animation: geo-rise 0.9s 1.1s cubic-bezier(.25,.4,.25,1) forwards;
}
.geo-stats strong { color: #fff; font-weight: 600; }
.geo-stats .geo-stat-sep { color: rgba(255,255,255,0.18); }
.geo-stats .geo-live {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: #4ade80; font-weight: 500;
}
.geo-stats .geo-live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,0.18);
  animation: geo-pulse 2.4s ease-in-out infinite;
}

@keyframes geo-rise {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes geo-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.18); }
  50%      { box-shadow: 0 0 0 6px rgba(74,222,128,0.05); }
}

/* Respect motion preferences — pin everything to its final pose,
   no drifting, no fade-up. */
@media (prefers-reduced-motion: reduce) {
  .geo-shape,
  .geo-badge,
  .geo-title,
  .geo-sub,
  .geo-stats { animation: none !important; opacity: 1; transform: none; }
  .geo-shape.s1 { transform: rotate(12deg); }
  .geo-shape.s2 { transform: rotate(-15deg); }
  .geo-shape.s3 { transform: rotate(-8deg); }
  .geo-shape.s4 { transform: rotate(20deg); }
  .geo-shape.s5 { transform: rotate(-25deg); }
  .geo-stats .geo-live::before { animation: none; }
}

/* The action-cards block below the hero — already exists, but on the
   light page background it needs a slight lift so the dark hero
   doesn't bleed visually into it. */
.hero-geo + .action-cards { margin-top: -1.5rem; position: relative; z-index: 4; }

/* ============================================================
   LANDING — section heads, category grid, tools row, trust foot
   ============================================================ */
.section-head {
  text-align: center;
  margin: 0 auto 1.5rem;
  max-width: 720px;
}
.section-head h2 {
  font-size: 1.85rem;
  letter-spacing: -0.02em;
}
.section-head-sm h2 { font-size: 1.5rem; }
.section-head .section-sub {
  margin: 0.45rem 0 0;
  color: var(--ink-mut);
  font-size: 1rem;
}

/* --- category grid (4 tiles) --- */
.cat-grid-wrap { margin: 0 auto 3rem; max-width: 1100px; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 980px) {
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .cat-grid { grid-template-columns: 1fr; }
}

.cat-tile {
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.4rem 1.3rem 1.25rem;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform 220ms cubic-bezier(.2,.7,.3,1),
              box-shadow 220ms ease,
              border-color 220ms ease;
}
.cat-tile:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: var(--ink-mut);
  box-shadow: 0 14px 28px rgba(24,24,27,0.08);
}
/* Accent stripe at the top of each tile — single visual cue per category */
.cat-tile::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--tile-accent, var(--accent));
  opacity: 0.85;
}
/* On hover, the tile gets a soft accent glow */
.cat-tile::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(60% 40% at 80% 0%, var(--tile-glow, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}
.cat-tile:hover::after { opacity: 1; }

.cat-tile-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.9rem;
}
.cat-tile-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--tile-icon-bg, var(--accent-bg));
  color: var(--tile-accent, var(--accent));
}
.cat-tile-icon .ico { width: 22px; height: 22px; stroke-width: 1.6; }
.cat-tile-cta {
  display: inline-flex; align-items: center;
  font-size: 0.78rem; font-weight: 600;
  color: var(--ink-mut);
  letter-spacing: 0.01em;
}
.cat-tile:hover .cat-tile-cta { color: var(--tile-accent, var(--accent)); }

.cat-tile-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}
.cat-tile-meta {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--ink-mut);
  margin-bottom: 0.85rem;
}
.cat-tile-meta strong { color: var(--ink); font-weight: 600; }
.cat-tile-meta .cat-tile-dot { color: var(--line-2); }
.cat-tile-tag {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink-mut);
}

/* Per-category accent palette. Pulled from the existing token set so
   nothing here is one-off magic. */
.cat-tile-racquet {
  --tile-accent:   var(--accent);
  --tile-icon-bg:  var(--accent-bg);
  --tile-glow:     rgba(234,88,12,0.10);
}
.cat-tile-shuttle {
  --tile-accent:   var(--indigo);
  --tile-icon-bg:  #eef2ff;
  --tile-glow:     rgba(67,56,202,0.08);
}
.cat-tile-shoe {
  --tile-accent:   var(--emerald);
  --tile-icon-bg:  var(--emerald-bg);
  --tile-glow:     rgba(5,150,105,0.08);
}
.cat-tile-bag {
  --tile-accent:   var(--violet);
  --tile-icon-bg:  #f3e8ff;
  --tile-glow:     rgba(124,58,237,0.08);
}
.cat-tile-string {
  --tile-accent:   #0d9488;
  --tile-icon-bg:  #ccfbf1;
  --tile-glow:     rgba(13,148,136,0.10);
}
.cat-tile-grip {
  --tile-accent:   #c2410c;
  --tile-icon-bg:  #fed7aa;
  --tile-glow:     rgba(194,65,12,0.10);
}

/* --- tools row --- */
.tools-row {
  margin: 0 auto 3rem;
  max-width: 1100px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
@media (max-width: 760px) {
  .tools-grid { grid-template-columns: 1fr; }
}
.tool-card {
  display: block;
  padding: 1.1rem 1.2rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  text-decoration: none;
  transition: 180ms ease;
}
.tool-card:hover {
  text-decoration: none;
  background: var(--surface);
  border-color: var(--accent-soft);
  transform: translateY(-2px);
}
.tool-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--accent-bg); color: var(--accent);
  border-radius: 9px;
  margin-bottom: 0.55rem;
}
.tool-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 1rem;
  margin-bottom: 0.25rem;
}
.tool-desc { font-size: 0.85rem; color: var(--ink-mut); line-height: 1.45; }

/* Section footer — small CTA strip under a tools-grid (e.g. the "Sign
   in to start" call under the Your gear section). */
.section-foot {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  text-align: left;
}

/* Landing "Learn" tile chips — preview of topic-themed pills under the
   Learn tool card. Reuses the per-topic gradients from /learn so the
   smash / footwork / doubles colors carry over and link the two pages. */
.landing-learn-chips, .landing-players-row {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin-top: 0.7rem;
}
.landing-learn-chip {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-d));
}
.landing-learn-chip.topic-smash    { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%); }
.landing-learn-chip.topic-clear    { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
.landing-learn-chip.topic-drop     { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.landing-learn-chip.topic-slice    { background: linear-gradient(135deg, #ec4899 0%, #be185d 100%); }
.landing-learn-chip.topic-net      { background: linear-gradient(135deg, #10b981 0%, #047857 100%); }
.landing-learn-chip.topic-footwork { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); }
.landing-learn-chip.topic-doubles  { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%); }
.landing-learn-chip.topic-singles  { background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%); }
.landing-learn-chip.topic-deception { background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%); }

.landing-player-chip {
  font-family: 'Barlow', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

/* Nominative-use disclaimer chip that sits inline with the brand filter
   on every compare page. Reinforces the footer disclaimer at the
   moment a user narrows by brand. Quiet styling so it doesn't compete
   with the filter — just enough presence to be noticed. */
.filter-disclaimer {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  margin-left: 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-sub);
  background: var(--surface-2);
  border: 1px dashed var(--line-2, var(--line));
  border-radius: 999px;
}
.filter-disclaimer .ico { color: var(--ink-sub); }

/* --- trust foot --- */
.landing-foot {
  margin: 2.5rem auto 1rem;
  padding: 1.6rem 1.4rem;
  max-width: 920px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-mut);
  font-size: 0.95rem;
  line-height: 1.55;
}
.landing-foot-inner strong { color: var(--ink); }

/* ============================================================
   UI/UX POLISH — accessibility, focus rings, motion, responsive
   Added at end so it cascades over earlier `outline: none` rules.
   ============================================================ */

/* -- Reusable accent-gradient text run used in page <h1> taglines.
      Replaces the duplicated inline-style block on /vs and /recommend. */
.grad-em {
  font-style: normal;
  background: linear-gradient(105deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* -- Unified keyboard focus ring. We use :focus-visible so mouse clicks
      don't get the ring, only keyboard nav. Selector list covers every
      interactive surface the user can tab through. The box-shadow
      naturally inherits each element's own border-radius — we never
      override it, so cards keep their rounded corners on focus. */
.btn:focus-visible,
.brand:focus-visible,
.pill:focus-visible,
.facet-chip:focus-visible,
.action-card:focus-visible,
.cat-tile:focus-visible,
.tool-card:focus-visible,
.ret-card:focus-visible,
.trend-card:focus-visible,
.model-card:focus-visible,
.reco-card:focus-visible,
.trending-nav button:focus-visible,
.vs-clear:focus-visible,
.vs-cell-link:focus-visible,
.vs-slot-remove:focus-visible,
.past-add:focus-visible,
.ret-bulk:focus-visible,
.ret-policy:focus-visible,
.ret-size-chip:focus-visible,
.ret-speed-chip:focus-visible,
.cat-menu a:focus-visible,
nav.nav a:focus-visible,
.data-table a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.35),
              0 0 0 4px rgba(234, 88, 12, 0.15);
}

/* Underline links (in body copy, retailer policy text) still need a
   visible focus state — they have no box to ring, so use outline. */
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
/* …but the card surfaces above have their own ring, so suppress the
   plain link outline on them to avoid a double indicator. */
.action-card:focus-visible,
.cat-tile:focus-visible,
.tool-card:focus-visible,
.ret-card:focus-visible,
.trend-card:focus-visible,
.cat-menu a:focus-visible,
nav.nav a:focus-visible,
.pill:focus-visible,
.facet-chip:focus-visible,
.brand:focus-visible,
.vs-clear:focus-visible,
.vs-cell-link:focus-visible,
.vs-slot-remove:focus-visible { outline: none; }

/* Inputs use the existing accent border + soft ring; just make sure the
   ring is keyboard-only so we don't show it on every mouse focus. */
.search-input:focus-visible,
.vs-search-input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.18);
  border-radius: var(--r-md);
}

/* -- Reduced-motion: kill hover lifts and image zooms. The geo-hero and
      loader already opt out; this catches every card surface. */
@media (prefers-reduced-motion: reduce) {
  .action-card:hover,
  .cat-tile:hover,
  .tool-card:hover,
  .ret-card:hover,
  .trend-card:hover,
  .model-card:hover,
  .reco-card:hover { transform: none; }
  .model-card:hover .model-thumb img { transform: none; }
}

/* -- Responsive: /recommend past-row collapses from 3 columns to a
      stacked layout below 560px so iPhone-SE-class viewports don't
      horizontally overflow. */
@media (max-width: 560px) {
  .past-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding: 0.75rem;
    background: var(--surface-2);
    border-radius: var(--r-md);
  }
  .past-row select { width: 100%; }
}

/* -- Body text minimum on mobile: bump base size up to 16px to satisfy
      the "readable-font-size" rule and prevent iOS Safari's auto-zoom
      on focused inputs. Keeps the 15px desktop voice intact. */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .row input[type=text],
  .search-row .search-input,
  .field select,
  .field input[type=text],
  .zip-input { font-size: 16px; }
}

/* -- Price numerals get Barlow Condensed: the condensed sibling of the
      body font (Barlow). Same designer, narrower glyph widths, tabular
      figures — gives price tags a "scoreboard / sport ticker" energy
      while staying typographically related to body text. */
.best-num,
.ret-price,
.trend-price,
.vs-price,
.reco-price .price {
  font-family: 'Barlow Condensed', 'Barlow', sans-serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.005em;
}
.best-num { font-size: 1.7rem; }   /* slight bump — Barlow Condensed reads narrower at the same px */
.ret-price { font-size: 1.28rem; }
.vs-price  { font-size: 1.22rem; }

/* ============================================================
   MOBILE PASS — Phase 1: compare-page model cards
   Below 640px the desktop "130px thumb + 1fr content" grid crushed
   the right column on phones (~170px) and clipped chips/summary.
   Approach: shrink thumb, flatten the inner content wrapper into
   the grid via display:contents so the title sits beside the thumb
   while spec strips and the summary span the full card width.
   ============================================================ */
@media (max-width: 640px) {
  .model-card { padding: 1rem 1.05rem; }

  .model-head {
    grid-template-columns: 78px 1fr;
    column-gap: 0.85rem;
    row-gap: 0.5rem;
    align-items: start;
  }
  .model-thumb,
  .model-thumb-empty { width: 78px; height: 78px; }

  /* Flatten the unnamed inner wrapper so its children participate in
     .model-head's grid directly. Title sits next to thumb; chips and
     summary break out to span both columns below. */
  .model-head > :last-child { display: contents; }

  .model-head h3 {
    grid-column: 2;
    font-size: 1.25rem;
    line-height: 1.2;
    margin: 0;
  }
  .model-head .spec-strip,
  .model-head .model-summary { grid-column: 1 / -1; }

  /* Brand tag goes inline with the title on desktop (right-of-h3
     with vertical-align lift). On mobile it can wrap to a new line
     under the title — drop the lift so it aligns cleanly. */
  .brand-tag { margin-left: 0.4rem; vertical-align: 0.05em; }

  .model-summary {
    padding: 0.6rem 0.8rem;
    gap: 0.35rem 0.7rem;
    font-size: 0.84rem;
  }
  .model-summary .best-num { font-size: 1.45rem; }
  /* Drop the inline "·" separators — gap handles spacing once each
     summary fragment wraps onto its own line at mobile widths. */
  .model-summary .sep { display: none; }

  /* Retailer cards: 2-up at phone widths. 185px desktop min-width
     overridden so two cards share the row; tighter padding and a
     smaller native-currency footnote keep each tile readable. */
  .retailer-row { gap: 0.55rem; }
  .ret-card {
    flex: 1 1 calc(50% - 0.3rem);
    min-width: 0;
    padding: 0.65rem 0.75rem;
  }
  .ret-card .ret-name   { font-size: 0.74rem; }
  .ret-card .ret-price  { font-size: 1.15rem; }
  .ret-card .ret-native { font-size: 0.66rem; }
  .ret-card .ret-stock  { font-size: 0.7rem; }
  .ret-card .ret-ship,
  .ret-card .ret-string,
  .ret-card .ret-perk   { font-size: 0.72rem; flex-wrap: wrap; }
  .ret-card .ret-policy { font-size: 0.7rem; }
  /* BEST DEAL ribbon shrinks so it doesn't dominate the narrow tile */
  .ret-card.cheapest::before {
    font-size: 0.55rem;
    padding: 0.15rem 0.45rem;
    letter-spacing: 0.08em;
  }
}

/* ============================================================
   MOBILE PASS — Phase 2: mega-menu tap-to-open
   Desktop uses :hover/:focus-within (already styled above). On touch
   devices (no hover input) those triggers are neutralised here so the
   menu is driven purely by an .open class toggled in _base.html JS.
   ============================================================ */
@media (hover: none) {
  /* Suppress hover-driven open on touch — phones often briefly satisfy
     :hover after a tap and would otherwise flash the menu open. */
  .cat-item:hover > .cat-menu,
  .cat-item:focus-within > .cat-menu {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateX(-50%) translateY(-4px);
    transition: opacity 130ms ease-out 250ms,
                transform 130ms ease-out 250ms,
                visibility 0s linear 380ms;
  }
  /* Tap-toggled open state — set/cleared by the cat-nav JS in _base.html */
  .cat-item.open > .cat-menu {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    transition: opacity 130ms ease-out 0ms,
                transform 130ms ease-out 0ms,
                visibility 0s linear 0ms;
  }
  .cat-item.open .cat-chev { transform: rotate(180deg); opacity: 1; }

  /* 44px touch targets for sub-items, slightly larger type for readability */
  .cat-menu {
    min-width: 200px;
    padding: 6px;
  }
  .cat-menu a {
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ============================================================
   MOBILE PASS — Phase 3a: /vs picker
   Each slot was fixed at 180px and the slots-row wrap left awkward
   gaps next to the search input. On phones each slot now takes the
   full row so the search field is comfortably tappable.
   ============================================================ */
@media (max-width: 540px) {
  .vs-picker {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem;
    gap: 0.6rem;
  }
  .vs-slots { gap: 0.6rem; }
  .vs-slot { width: 100%; min-height: 96px; padding: 0.6rem; }
  .vs-slot.ghost { min-height: 56px; }
  .vs-slot-img { width: 56px; height: 56px; margin-bottom: 0.35rem; }
  .vs-slot-name { font-size: 0.9rem; }
  .vs-clear { align-self: flex-end; }
}

/* ============================================================
   MOBILE PASS — Phase 3b: /vs comparison table
   The table already scrolls horizontally (min-width 720). On phones
   row labels become sticky-left so the user can scroll right to see
   racquet 3/4's column without losing track of which row they're on.
   Cell padding tightens and the label column shrinks to free more
   visible width for the data columns.
   ============================================================ */
@media (max-width: 640px) {
  .vs-table th, .vs-table td {
    padding: 0.55rem 0.65rem;
    font-size: 0.85rem;
  }
  .vs-row-label {
    width: 110px;
    position: sticky;
    left: 0;
    z-index: 1;
    /* Match the desktop background — must stay opaque so scrolling
       columns don't bleed through the sticky cell. */
    background: #fafafa;
  }
  .vs-col-img { width: 56px; height: 56px; }
  .vs-col-name { font-size: 0.86rem; }
  .vs-col-head { padding: 0.75rem 0.55rem; }
  .vs-price { font-size: 1rem; }
  /* Tech-tags container in /vs cells: drop the desktop max-width so
     chips can use the narrower mobile cell width without overflowing. */
  .vs-table .tech-tags { max-width: none; }
}

/* ============================================================
   MOBILE PASS — Phase 3c: model detail page
   detail-layout already stacks under 800px. Below 540px the spec
   key/value grid stacks vertically so the value column isn't crushed
   into ~145px between a 130px key column and the section padding.
   ============================================================ */
@media (max-width: 540px) {
  .detail-section {
    padding: 1rem 1.05rem;
  }
  .specs-row {
    grid-template-columns: 1fr;
    gap: 0.1rem;
    padding: 0.55rem 0;
  }
  .specs-key { font-size: 0.68rem; }
  .specs-val { font-size: 0.92rem; }
  .tech-list li { font-size: 0.82rem; line-height: 1.45; }
}

/* ============================================================
   MOBILE PASS — Phase 4: touch-target polish
   Bumps the smallest tap-only controls toward the 44px guideline
   without affecting desktop sizes. min-height pairs with the existing
   display: inline-flex on each element so the hit area = visual area.
   ============================================================ */
@media (max-width: 640px) {
  /* Top-nav category buttons (the 540px rule shrank them for horizontal
     fit; restore confident vertical tap height). */
  .cat-btn {
    padding: 0.65rem 0.85rem;
    min-height: 40px;
    font-size: 0.9rem;
  }

  /* Primary buttons — Search, Apply, etc. */
  .btn    { padding: 0.7rem 1.1rem;  font-size: 0.95rem; min-height: 44px; }
  .btn.sm { padding: 0.55rem 0.85rem; font-size: 0.86rem; min-height: 38px; }

  /* Compare-page filter chips (facet rail + brand pills). */
  .facet-chip {
    padding: 0.5rem 0.85rem;
    font-size: 0.86rem;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
  }
  .brand-check {
    padding: 0.55rem 0.9rem;
    font-size: 0.92rem;
    min-height: 40px;
  }

  /* Hero CTA pills (homepage / landing). */
  .pill {
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    min-height: 38px;
  }

  /* Retailer-card policy / bulk toggles — open a popover, so the tap
     surface needs to be confident. Keep typography small (these live
     inside a narrow card) and bump only the hit area. */
  .ret-policy, .ret-bulk { min-height: 32px; }

  /* /vs slot remove (×) — destructive action; was 24px square. */
  .vs-slot-remove { width: 36px; height: 36px; top: -10px; right: -10px; }
  .vs-slot-remove .ico { width: 16px; height: 16px; }

  /* "Clear all" link in /vs picker — was a bare underline anchor. */
  .vs-clear {
    padding: 0.5rem 0.25rem;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
}

/* ============================================================
   MOBILE PASS — Phase 5: remaining pages
   /listings flat data-table needed a scroll wrapper; the speed-chart
   and geo-stats just need tighter density on phones.
   ============================================================ */

/* Horizontal scroll for wide tables (/listings, /all flat view). The
   border + radius move to the wrapper so the rounded edge stays clean
   while the table itself scrolls inside. */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--sh-sm);
}
.table-scroll .data-table {
  border-radius: 0;
  border: 0;
  box-shadow: none;
  min-width: 640px;
}

@media (max-width: 640px) {
  /* Compact data-table cells inside the scroll wrapper */
  .data-table th, .data-table td {
    padding: 0.55rem 0.65rem;
    font-size: 0.85rem;
  }
  .data-table img.thumb { width: 38px; height: 38px; }

  /* /shuttles/speed — explainer chart tightens on phones. */
  .speed-chart th, .speed-chart td {
    padding: 0.5rem 0.55rem;
    font-size: 0.85rem;
  }
  .speed-chart td:nth-child(2) { font-size: 0.95rem; }

  /* Landing hero stats chip wraps to multi-line on narrow widths. Drop
     the inline "·" separators when wrapped — the line break is enough. */
  .geo-stats {
    gap: 0.55rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.78rem;
  }
  .geo-stats .geo-stat-sep { display: none; }
}

/* ============================================================
   Site footer — brand non-affiliation disclaimer + meta links.
   Renders on every page via _base.html. Intentionally low-key
   styling so it doesn't compete with the primary content but is
   always readable (WCAG AA on cream).
   ============================================================ */
.site-footer {
  margin-top: 4rem;
  padding: 1.6rem 1.25rem 1.4rem;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}
.site-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: flex-start;
}
.site-footer-disclaimer {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-sub);
  max-width: 78ch;
}
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--ink-mut);
}
.site-footer-links a {
  color: var(--ink-mut);
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-sub);
  padding-bottom: 1px;
}
.site-footer-links a:hover {
  color: var(--accent-d);
  border-bottom-color: var(--accent);
}
.site-footer-sep { color: var(--ink-sub); opacity: 0.55; }
.site-footer-meta { color: var(--ink-sub); }

/* Price-accuracy disclaimer banner — sits just under page-head on every
   page that surfaces prices. Slim, dismissable in look but not in DOM:
   the legal value is having it visible without scrolling. {{ last_seen
   | time_ago }} interpolates the freshest timestamp in the listing set. */
.price-disclaimer {
  margin: 0 0 1rem;
  padding: 0.55rem 0.85rem;
  background: var(--accent-bg);
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-mut);
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.price-disclaimer strong { color: var(--accent-d); font-weight: 600; }
.price-disclaimer .price-disclaimer-sep {
  color: var(--accent-soft);
  opacity: 0.8;
}

/* Per-retailer-card 30-day price sparkline. Tiny 62×20px polyline that
   only renders when the price_history series has ≥2 points. Hidden until
   the daily refresh has accumulated meaningful history; then it shows
   the price trend so users can spot real sales vs synthetic discounts. */
.ret-spark {
  width: 62px;
  height: 20px;
  display: block;
  margin-top: 0.2rem;
  opacity: 0.85;
}
.ret-card:hover .ret-spark { opacity: 1; }

/* Racquet selector chart on /racquets — 2-axis quadrant scatter
   (balance × flex) inspired by Yonex's published selector chart but
   built from our racquet_specs (flex_numeric + balance_numeric).
   Color codes by product family so users can spot family clusters. */
.racquet-selector {
  margin: 0 0 1.4rem;
  padding: 1rem 1.2rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.racquet-selector-head h2 {
  margin: 0 0 0.2rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.racquet-selector-svg {
  width: 100%;
  height: auto;
  max-height: 400px;
  margin-top: 0.6rem;
}
.racquet-selector-svg a { cursor: pointer; }
.racquet-selector-svg .selector-dot {
  transition: r 120ms ease, fill-opacity 120ms ease;
}
.racquet-selector-svg a:hover .selector-dot {
  r: 8;
  fill-opacity: 1;
}
.racquet-selector-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 0.85rem;
  font-size: 0.78rem;
  color: var(--ink-mut);
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
}
.racquet-selector-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.racquet-selector-legend .legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* String trait bar overlay on /strings/vs — grouped bars for rep/ctl/dur
   across the 2-4 selected strings. Color palette must match the order in
   the strings_vs.html template (it's hard-coded there for stable
   string-to-color mapping across the page). */
.trait-overlay {
  margin: 0 0 1.4rem;
  padding: 1rem 1.2rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.trait-overlay-head h2 {
  margin: 0 0 0.2rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.trait-overlay-svg {
  width: 100%;
  height: auto;
  max-height: 320px;
  margin-top: 0.6rem;
}
.trait-overlay-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--ink-mut);
  align-items: center;
  justify-content: center;
  margin-top: 0.4rem;
}
.trait-overlay-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.trait-overlay-legend .legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* String trait scatter — Feel-vs-Repulsion 2-axis chart at the top of
   /strings. Inspired by Yonex's published string positioning chart but
   built from our own data. SVG scales responsively via the viewBox. */
.string-scatter {
  margin: 0 0 1.4rem;
  padding: 1rem 1.2rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.string-scatter-head h2 {
  margin: 0 0 0.2rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.string-scatter-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.6rem;
}
.string-scatter-svg {
  width: 100%;
  height: auto;
  max-height: 360px;
}
.string-scatter-svg a { cursor: pointer; }
.string-scatter-svg .scatter-dot {
  transition: r 120ms ease, fill-opacity 120ms ease;
}
.string-scatter-svg a:hover .scatter-dot {
  r: 9;
  fill-opacity: 1;
}
.string-scatter-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.78rem;
  color: var(--ink-mut);
  align-items: center;
  justify-content: center;
}
.string-scatter-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.string-scatter-legend .legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* String trait sparkline (rep/ctl/dur 1-5 bars) on /strings list cards.
   Compact 3-row display — letter key + filled bar + numeric value.
   Color-codes the bars to match the rest of the app: repulsion=orange,
   control=violet, durability=emerald. */
.trait-spark {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 0.55rem;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-mut);
}
.trait-spark-row {
  display: inline-grid;
  grid-template-columns: 14px 100px 26px;
  align-items: center;
  gap: 6px;
}
.trait-spark-key {
  font-weight: 700;
  color: var(--ink-mut);
  letter-spacing: 0.02em;
}
.trait-spark-track {
  position: relative;
  height: 6px;
  background: var(--line-2);
  border-radius: 3px;
  overflow: hidden;
}
.trait-spark-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 200ms ease;
}
.trait-spark-fill.rep { background: var(--accent); }
.trait-spark-fill.ctl { background: var(--violet); }
.trait-spark-fill.dur { background: var(--emerald-d); }
.trait-spark-num {
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}

/* Per-retailer-card freshness badge. Tiny, in-corner, low-contrast so it
   doesn't compete with the price. On hover/focus it darkens slightly. */
.ret-fresh {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  color: var(--ink-sub);
  margin-top: 0.15rem;
}
.ret-fresh::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--emerald);
  display: inline-block;
}

/* Static documentation pages (/privacy, /terms). Same width + rhythm
   as page-head so the doc text doesn't stretch across the full grid. */
.static-doc {
  max-width: 70ch;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
}
.static-doc h2 {
  margin-top: 1.8rem;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mut);
}
.static-doc p { margin: 0 0 0.85rem; }
.static-doc ul { margin: 0 0 1rem 1.2rem; padding: 0; }
.static-doc li { margin-bottom: 0.35rem; }


/* Similar-racquets chips on /model and /racquets/similar.
   .xbnd marks cross-brand picks with a yellow left rail so users see
   at a glance which results are from other brands (the main reason to
   use this widget). #2 (find structurally similar racquets) shipped via
   similar_racquets.py — distance L2 over balance/flex/feel/weight. */
.similar-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.similar-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  background: var(--card-bg-sub, var(--bg-sub, #faf8f1));
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 999px;
  font-size: 0.82rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 120ms ease, background 120ms ease;
}
.similar-chip:hover {
  border-color: var(--accent, #f59e0b);
  background: var(--card, #fff);
}
.similar-chip.xbnd { border-left: 2px solid var(--accent-2, #facc15); padding-left: 0.55rem; }
.similar-chip .similar-name { font-weight: 500; }
.similar-chip .similar-brand {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-sub, #71717a);
}


/* ===== Price-history chart on /model + /strings/<key> + /grips/<key> =====
   Renders only when ≥2 days of scraped history exist (Jinja partial
   _price_history_chart.html short-circuits otherwise). Multi-line SVG —
   one polyline per retailer, color-coded with stable palette matching
   trait-overlay charts elsewhere. Hidden circles on every datapoint
   give a hover tooltip with date + price; circle radius is intentionally
   small (2.2px) so high-density days don't read as bubble noise. */
.price-history-section {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem 1.2rem;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
}
.price-history-head { margin-bottom: 0.4rem; }
.price-history-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 0.4rem;
}
.price-history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  margin-top: 0.55rem;
  font-size: 0.82rem;
}
.price-history-legend .legend-item {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--ink, #18181b);
}
.price-history-legend .legend-swatch {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
}


/* ===== Back-in-stock alert form on /model + /strings/<key> + /grips/<key> =====
   Shown only when at least one retailer listing is currently OOS. The
   form posts via fetch() to /alerts/subscribe so the confirmation
   renders inline without a page reload (the submit handler lives in
   templates/_notify_form.html). */
.notify-section {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem 1.1rem;
  background: var(--card, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  border-left: 3px solid var(--accent, #f59e0b);
}
.notify-head { margin-bottom: 0.7rem; }
.notify-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.notify-form input[type=email] {
  flex: 1 1 220px;
  min-width: 200px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  background: var(--bg, #fff);
  font: inherit;
  font-size: 0.95rem;
}
.notify-form input[type=email]:focus {
  outline: none;
  border-color: var(--accent, #f59e0b);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}
.notify-form select {
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  background: var(--bg, #fff);
  font: inherit;
  font-size: 0.92rem;
}
.notify-form button[type=submit] {
  flex: 0 0 auto;
  padding: 0.55rem 1.1rem;
}
.notify-result {
  margin-top: 0.55rem;
  font-size: 0.88rem;
  min-height: 1.3em;
}
.notify-result.ok  { color: var(--emerald-d, #065f46); font-weight: 500; }
.notify-result.err { color: #b91c1c; font-weight: 500; }
