
:root {
  --page-bg: #eef1ea;
  --surface: #ffffff;
  --surface-muted: #f4f7f0;
  --surface-strong: #062e20;
  --text: #13201a;
  --muted: #5a665e;
  --line: #dfe5da;
  --line-strong: #cdd6c7;
  --brand: #003b29;
  --brand-light: #3f8a5f;
  --brand-strong: #022e20;
  --accent: #d9b15c;
  --accent-soft: rgba(217, 177, 92, 0.16);
  --visibility-track: rgba(38, 77, 62, 0.08);
  --visibility-fill:
    linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 100%),
    linear-gradient(90deg, #234536 0%, #315c48 52%, #5c8f70 100%);
  --visibility-fill-soft:
    linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 100%),
    linear-gradient(90deg, #ffffff 0%, #d5e9dd 100%);
  --success: #10b981;
  --success-soft: rgba(110, 231, 183, 0.18);
  --warn: #c89a3b;
  --danger: #b53b3b;
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px -38px rgba(2, 40, 25, 0.32);
  --shadow-sm: 0 14px 36px -28px rgba(2, 40, 25, 0.28);
  --provider-openai: #10a37f;
  --provider-anthropic: #d97757;
  --provider-google: #4285f4;
  --public-hero-title: clamp(2.375rem, 5vw, 3.875rem);
  --public-section-title: clamp(2rem, 3.5vw, 2.85rem);
  --public-card-title: 1.15rem;
  --public-card-body: 0.875rem;
  --public-body: clamp(1.02rem, 1.5vw, 1.125rem);
  --public-body-sm: 1rem;
  --public-section-y: 56px;
  --public-section-y-compact: 40px;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  background: var(--page-bg);
  color: var(--text);
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px;
}
body::before {
  background:
    radial-gradient(circle at 8% 2%, rgba(200,245,96,0.14), transparent 34%),
    radial-gradient(circle at 96% 8%, rgba(63,138,95,0.11), transparent 34%),
    var(--page-bg);
}
.topbar { -webkit-backdrop-filter: blur(18px); }

.ratings-page {
  overflow: hidden;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
.ratings-page h1,
.ratings-page h2,
.ratings-page h3,
.ratings-page p {
  overflow-wrap: anywhere;
}

.hero { padding: 28px 0 var(--public-section-y); }
.hero-card {
  position: relative;
  padding: 0; overflow: visible;
  border: 0;
  background: none;
  box-shadow: none;
}
.hero-card h1 { margin: 0; max-width: 940px; color: var(--text); font-size: var(--public-hero-title); font-weight: 700; line-height: 1.04; letter-spacing: -0.03em; text-wrap: balance; }
.hero-copy { margin-top: 24px; max-width: 790px; color: var(--muted); font-size: var(--public-body); line-height: 1.62; }
.kicker,
.eyebrow {
  display: inline-flex; align-items: center;
  padding: 0; border: 0; border-radius: 0; background: transparent;
  color: #1f7a52; font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px; font-weight: 700; letter-spacing: 0; line-height: 1.35; text-transform: uppercase;
}
.kicker { margin: 0 0 22px; }
.kicker::before,
.eyebrow::before { margin-right: 8px; content: "//"; white-space: normal; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; color: #859087; font-family: "Space Mono", ui-monospace, monospace; font-size: 12px; font-weight: 400; }
.breadcrumb a { color: #859087; }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb .separator { color: rgba(95, 112, 104, 0.5); }
.breadcrumb .current { color: var(--text); font-weight: 700; }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin-top: 22px;
  color: #6b8078; font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px; font-weight: 700; line-height: 1.55;
}
.hero-meta span { display: inline-flex; align-items: baseline; gap: 6px; }
.hero-meta strong { color: var(--text); font-weight: 700; }

.hero-actions, .inline-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff; color: var(--text);
  font-size: var(--public-body-sm); font-weight: 700;
  box-shadow: 0 10px 30px -22px rgba(15, 23, 42, 0.25);
  cursor: pointer; transition: transform 140ms ease;
  text-decoration: none;
  max-width: 100%;
  text-align: center;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--brand); color: #fff; border-color: transparent; }
.button.primary:hover { background: var(--brand-strong); color: #fff; }
.button.sm { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 12px; }

.section { padding: var(--public-section-y) 0; }
.section-soft { padding: var(--public-section-y) 0; }
.section-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 32px; }
.section-header h2 { margin: 0; color: var(--text); font-size: var(--public-section-title); font-weight: 700; line-height: 1.08; letter-spacing: -0.035em; }
.section-header p { margin: 14px 0 0; max-width: 760px; color: var(--muted); line-height: 1.62; font-size: var(--public-body); }
.eyebrow { margin: 0 0 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-sm); padding: clamp(22px, 2.6vw, 28px); min-width: 0; }
.card.flush { padding: 0; }

/* sticky in-page anchor navigation */
.rating-anchors { position: sticky; top: 68px; z-index: 30; background: rgba(238,241,234,0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.rating-anchors-inner { display: flex; gap: 6px; overflow-x: auto; padding: 11px 0; scrollbar-width: none; }
.rating-anchors-inner::-webkit-scrollbar { display: none; }
.rating-anchors a { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--muted); padding: 7px 14px; border-radius: 10px; white-space: nowrap; transition: background 160ms ease, color 160ms ease; }
.rating-anchors a:hover { background: rgba(38,77,62,0.07); color: var(--text); }
.rating-anchors a.is-active { background: var(--brand); color: #fff; }

/* leader spotlight bento (top-1 card + KPI column) */
.leader-bento { display: grid; gap: 14px; grid-template-columns: 1.55fr 1fr; align-items: stretch; }
.kpi-col { display: grid; gap: 14px; }
.leader-spot { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 2.4vw, 26px); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.kpi-col .kpi::before { display: none; }
.leader-spot-kicker { display: inline-flex; align-items: center; gap: 7px; color: #b8902f; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.leader-spot-main { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.leader-spot-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.leader-spot-logo { width: 46px; height: 46px; border-radius: 13px; background: rgba(217,177,92,0.18); color: #7a5e16; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; flex-shrink: 0; }
.leader-spot-name { font-size: 19px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; line-height: 1.15; overflow-wrap: anywhere; }
.leader-spot-domain { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.leader-ring-svg { width: 84px; height: 84px; flex-shrink: 0; }
.leader-ring-track { fill: none; stroke: #eef1ee; stroke-width: 7; }
.leader-ring-val { fill: none; stroke: var(--brand); stroke-width: 7; stroke-linecap: round; }
.leader-ring-score { fill: var(--brand); font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; }
.leader-ring-cap { fill: #94a3b8; font-size: 8px; font-weight: 700; letter-spacing: 0.04em; }
.leader-spark { margin-top: 18px; flex: 1; min-height: 96px; display: flex; }
.leader-spark-svg { display: block; width: 100%; height: 100%; min-height: 96px; }
.leader-spot-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.leader-spot-stats > div span { display: block; font-size: 11px; color: #94a3b8; margin-bottom: 2px; }
.leader-spot-stats > div strong { font-size: 16px; color: var(--text); font-weight: 800; font-variant-numeric: tabular-nums; }
.leader-delta { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.leader-delta.is-up { background: rgba(78,171,118,0.16); color: #1c8a4a; }
.leader-delta.is-down { background: rgba(181,59,59,0.12); color: #b53b3b; }
@media (max-width: 860px) {
  .leader-bento { grid-template-columns: 1fr; }
  .kpi-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .kpi-col { grid-template-columns: 1fr; }
  .leader-ring-svg { width: 72px; height: 72px; }
  .leader-spot-stats { gap: 16px; }
}

.kpi-strip { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px 20px 18px 22px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden;
  min-width: 0;
  transition: transform 140ms ease, box-shadow 140ms ease;
}
.kpi:hover { transform: translateY(-2px); box-shadow: 0 22px 48px -30px rgba(15,23,42,0.4); }
/* slim accent rail keyed to each metric */
.kpi::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--brand-light);
}
.kpi.is-warn::before { background: var(--accent); }
.kpi.is-up::before { background: #4eab76; }
.kpi-label { max-width: calc(100% - 50px); color: #6b8078; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.35; }
.kpi-value { max-width: calc(100% - 50px); color: var(--text); font-size: 27px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.1; margin-top: 8px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 6px; line-height: 1.45; }
.kpi-deco {
  position: absolute; top: 18px; right: 18px;
  width: 38px; height: 38px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(78,171,118,0.12); color: var(--brand);
}
.kpi-deco svg { width: 20px; height: 20px; }
/* leader: filled forest-green hero card with gold accents */
.kpi.is-accent {
  border-color: rgba(217,177,92,0.35);
  background:
    radial-gradient(circle at top right, rgba(217,177,92,0.24), transparent 62%),
    linear-gradient(158deg, #214335 0%, #16372c 100%);
  box-shadow: 0 24px 50px -30px rgba(22,55,44,0.75);
}
.kpi.is-accent::before { display: none; }
.kpi.is-accent .kpi-label { color: var(--accent); }
.kpi.is-accent .kpi-value { color: #fff; }
.kpi.is-accent .kpi-sub { color: rgba(255,255,255,0.72); }
.kpi.is-accent .kpi-deco { background: rgba(217,177,92,0.18); color: var(--accent); }
.kpi.is-warn .kpi-deco { background: rgba(217,177,92,0.16); color: #8a6a2a; }
.kpi.is-up .kpi-deco { background: rgba(78,171,118,0.16); color: #1c8a4a; }
/* inline rank-shift pill inside the dynamics KPI */
.kpi-sub .delta-up, .kpi-sub .delta-down {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 2px 8px; border-radius: 999px; margin-right: 4px;
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.kpi-sub .delta-up { background: rgba(78,171,118,0.16); color: #1c8a4a; }
.kpi-sub .delta-down { background: rgba(181,59,59,0.12); color: #b53b3b; }

.provider-tabs {
  display: flex; gap: 4px; padding: 6px; border-radius: 16px;
  width: max-content; max-width: 100%; overflow-x: auto;
  border: 1px solid var(--line); background: rgba(255,255,255,0.96); box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.provider-tabs::-webkit-scrollbar { display: none; }
.provider-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 12px;
  background: transparent; border: 0; cursor: pointer;
  color: #475569; font-size: 13px; font-weight: 700;
  transition: background 120ms ease, color 120ms ease;
  text-decoration: none;
  flex: 0 0 auto;
  white-space: nowrap;
}
.provider-tab:hover { background: rgba(241,245,249,0.6); color: var(--text); }
.provider-tab.is-active { background: var(--brand); color: #fff; }
.provider-tab .dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; opacity: 0.85; }
.provider-tab.tab-openai.is-active { background: var(--provider-openai); }
.provider-tab.tab-anthropic.is-active { background: var(--provider-anthropic); }
.provider-tab.tab-google.is-active { background: var(--provider-google); }
.provider-tab-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(15,23,42,0.06);
  flex-shrink: 0;
}
.provider-tab-icon img { width: 15px; height: 15px; object-fit: contain; display: block; }
.provider-tabs--compact {
  box-shadow: none;
  background: rgba(248,250,252,0.8);
}
.provider-tabs--compact .provider-tab {
  padding: 7px 11px;
  font-size: 12px;
}
.provider-tabs--compact .provider-tab-icon {
  width: 20px;
  height: 20px;
  border-radius: 7px;
}
.provider-tabs--compact .provider-tab-icon img { width: 14px; height: 14px; }
.provider-switcher-copy { margin: 8px 0 0; max-width: 620px; color: var(--muted); font-size: 14px; line-height: 1.65; font-weight: 500; }

.charts-row { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
.chart-card { background: rgba(255,255,255,0.98); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow-sm); }
.chart-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 8px; }
.chart-title { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.chart-sub { color: var(--muted); font-size: 13px; font-weight: 500; margin-top: 2px; }
.provider-chart-panel[hidden] { display: none; }
.line-chart-svg { overflow: visible; }
.line-point { pointer-events: none; }
.line-point-hit { pointer-events: none; }
.line-point-halo { opacity: 0.14; transition: opacity 120ms ease; }
.line-hover-band { cursor: crosshair; outline: none; }
.line-hover-hit { pointer-events: all; }
.line-hover-guide,
.line-hover-marker {
  opacity: 0;
  transition: opacity 120ms ease;
}
.line-hover-guide {
  stroke: rgba(38,77,62,0.22);
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
}
.line-hover-band:hover .line-hover-guide,
.line-hover-band:focus .line-hover-guide,
.line-hover-band:hover .line-hover-marker,
.line-hover-band:focus .line-hover-marker { opacity: 1; }
.share-chart { display: grid; gap: 10px; padding: 12px 0 4px; }
.share-row { display: grid; grid-template-columns: minmax(88px, 116px) minmax(0, 1fr) 44px; align-items: center; gap: 10px; min-width: 0; border-radius: 8px; outline: none; cursor: help; }
.share-row:hover .share-track,
.share-row:focus-visible .share-track { background: rgba(15,23,42,0.075); }
.share-row:focus-visible { box-shadow: 0 0 0 3px rgba(38,77,62,0.12); }
.share-name { color: #0f172a; font-size: 12px; font-weight: 750; line-height: 1.25; text-align: left; overflow-wrap: anywhere; }
.share-track { height: 18px; border-radius: 7px; background: var(--visibility-track); overflow: hidden; min-width: 0; }
.share-track > span { display: block; height: 100%; border-radius: inherit; background: var(--visibility-fill); transition: filter 120ms ease; }
.share-row:hover .share-track > span,
.share-row:focus-visible .share-track > span { filter: saturate(1.15) brightness(1.03); }
.share-value { color: #475569; font-size: 11px; font-weight: 800; white-space: nowrap; }
.competition-chart { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding-top: 12px; }
.competition-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "label count" "meter meter";
  gap: 10px 12px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.06);
  background: linear-gradient(180deg, rgba(248,251,246,0.96) 0%, rgba(255,255,255,0.96) 100%);
  outline: none;
  cursor: help;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.competition-row:hover,
.competition-row:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(38,77,62,0.16);
  box-shadow: 0 14px 34px -26px rgba(15,23,42,0.45);
}
.competition-row.is-leading {
  border-color: rgba(217,177,92,0.4);
  background:
    radial-gradient(circle at top right, rgba(217,177,92,0.16), transparent 60%),
    linear-gradient(135deg, rgba(38,77,62,0.07) 0%, rgba(78,171,118,0.1) 100%);
}
.competition-label { grid-area: label; display: flex; align-items: center; gap: 10px; min-width: 0; }
.competition-copy { min-width: 0; display: grid; gap: 3px; }
.competition-rank {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(38,77,62,0.08);
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.competition-row.is-leading .competition-rank {
  background: linear-gradient(160deg, #2d5a47 0%, #16372c 100%);
  color: var(--accent);
  box-shadow: 0 0 0 2px rgba(217,177,92,0.45);
}
.competition-topic { min-width: 0; color: #0f172a; font-size: 13px; font-weight: 800; line-height: 1.28; overflow-wrap: anywhere; }
.competition-date { color: var(--muted); font-size: 11px; font-weight: 600; }
.competition-count {
  grid-area: count;
  justify-self: end;
  align-self: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(38,77,62,0.08);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.competition-row.is-leading .competition-count { background: rgba(217,177,92,0.2); color: #8a6a2a; }
.competition-meter { grid-area: meter; height: 9px; border-radius: 999px; background: var(--visibility-track); overflow: hidden; }
.competition-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--visibility-fill); }
.competition-row.is-leading .competition-meter > span { background: linear-gradient(90deg, #c79a3c 0%, #e2c478 100%); }
.competition-row:hover .competition-meter > span,
.competition-row:focus-visible .competition-meter > span { filter: saturate(1.12) brightness(1.02); }
.provider-distribution-grid { display: grid; gap: 12px; }
.provider-distribution-row { display: grid; grid-template-columns: minmax(140px, 180px) minmax(0, 1fr) 92px; gap: 12px; align-items: center; }
.provider-distribution-topic { min-width: 0; display: grid; gap: 4px; }
.provider-distribution-name { font-weight: 700; font-size: 13px; color: #0f172a; overflow-wrap: anywhere; }
.provider-distribution-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; color: var(--muted); font-size: 11px; font-weight: 600; }
.provider-distribution-missing { color: #a16207; }
.provider-distribution-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(15,23,42,0.06); min-width: 0; }
.provider-distribution-total { font-size: 11px; color: #64748b; font-weight: 600; text-align: right; white-space: nowrap; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 16px; }
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #475569; font-weight: 600; }
.chart-legend-swatch { width: 12px; height: 4px; border-radius: 2px; }
/* SVG axis text: viewBox is 640px wide, so we bump it on phones so the labels
   stay legible at narrow widths instead of scaling down to ~6px. */
.chart-axis { font-size: 10px; }
@media (max-width: 640px) { .chart-axis { font-size: 16px; } }
/* Reusable placeholders that used to be repeated as inline styles. */
.chart-empty { padding: 30px 0; color: #94a3b8; font-size: 13px; text-align: center; }
.dash-placeholder { color: #cbd5e1; }
.provider-row--chart { justify-content: flex-end; margin-top: 0; }

.leaderboard-card { padding: 0; overflow: hidden; }
.leaderboard-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.leaderboard-title { display: grid; gap: 6px; min-width: 0; }
.leaderboard-provider-filter { display: flex; justify-content: flex-end; min-width: 0; }
.leaderboard-head h3 { margin: 0; font-size: 18px; }
.leaderboard-head .meta { color: var(--muted); font-size: 13px; }
.leaderboard-scroll { overflow-x: visible; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.leaderboard-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.leaderboard-table th, .leaderboard-table td { padding: 16px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.leaderboard-table th:nth-child(1), .leaderboard-table td:nth-child(1) { width: 54px; text-align: center; }
.leaderboard-table th:nth-child(2), .leaderboard-table td:nth-child(2) { width: 30%; }
.leaderboard-table th:nth-child(3), .leaderboard-table td:nth-child(3) { width: 24%; }
.leaderboard-table th:nth-child(4), .leaderboard-table td:nth-child(4) { width: 92px; }
.leaderboard-table th:nth-child(5), .leaderboard-table td:nth-child(5) { width: 112px; }
.leaderboard-table th:nth-child(6), .leaderboard-table td:nth-child(6) { width: 86px; }
.leaderboard-table th:nth-child(7), .leaderboard-table td:nth-child(7) { width: 64px; }
.leaderboard-table thead th {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: #64748b;
  background: rgba(248, 250, 252, 0.7);
  border-bottom: 1px solid var(--line);
  user-select: none;
}
.leaderboard-table thead th[data-sort] { cursor: pointer; }
.leaderboard-table thead th .sort-indicator { color: rgba(100,116,139,0.5); margin-left: 4px; font-size: 10px; }
.leaderboard-table thead th.is-sorted { color: var(--brand); }
.leaderboard-table thead th.is-sorted .sort-indicator { color: var(--brand); }
.leaderboard-table td.right, .leaderboard-table th.right { text-align: right; }
.leaderboard-table tbody tr { transition: background 100ms ease; }
.leaderboard-table tbody tr:hover { background: rgba(248, 250, 252, 0.55); }
.leaderboard-table tr:last-child td { border-bottom: 0; }
.column-head { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
/* The visible badge stays small (16px) so the column header layout doesn't grow,
   but the touch target is expanded via padding + a transparent inset for
   pointer/keyboard interactions — meets the 24px minimum on desktop. */
.column-help {
  position: relative;
  width: 16px; height: 16px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(38,77,62,0.08); color: var(--brand);
  border: 1px solid rgba(38,77,62,0.12);
  font-size: 10px; font-weight: 900; line-height: 1; letter-spacing: 0;
  text-transform: none; cursor: help; flex-shrink: 0;
}
/* Asymmetric inset: expand the hit area UPWARD/DOWNWARD/RIGHT but only a
   couple of pixels LEFT, so the pseudo-element does not eat clicks meant
   for the column label (which sits immediately to the help icon's left
   in .column-head). */
.column-help::after {
  content: ""; position: absolute; inset: -8px -8px -8px -2px; border-radius: 999px;
}
@media (max-width: 640px) {
  .column-help::after { inset: -14px -14px -14px -4px; }
}
.column-tooltip {
  position: fixed; z-index: 1000; width: max-content; max-width: min(320px, calc(100vw - 24px));
  padding: 10px 12px; border-radius: 10px; background: #111827; color: #fff;
  box-shadow: 0 18px 46px rgba(15,23,42,0.24);
  font-size: 12px; line-height: 1.45; font-weight: 650; letter-spacing: 0; text-align: left;
  white-space: normal; text-transform: none; pointer-events: none;
  opacity: 0; transform: translateY(4px); transition: opacity 120ms ease, transform 120ms ease;
}
.column-tooltip.is-visible { opacity: 1; transform: translateY(0); }
.chart-tooltip-panel { display: grid; gap: 8px; min-width: min(250px, calc(100vw - 52px)); }
.chart-tooltip-title {
  color: rgba(255,255,255,0.68);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chart-tooltip-list { display: grid; gap: 7px; }
.chart-tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.chart-tooltip-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.chart-tooltip-metrics {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
  flex-shrink: 0;
}
.chart-tooltip-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18);
}
.chart-tooltip-name {
  color: rgba(255,255,255,0.96);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-tooltip-value {
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.chart-tooltip-change {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.chart-tooltip-change.is-up { color: #86efac; }
.chart-tooltip-change.is-down { color: #fca5a5; }
.chart-tooltip-change.is-flat,
.chart-tooltip-change.is-empty { color: rgba(255,255,255,0.5); }

.rank-cell { font-weight: 800; font-size: 16px; width: 54px; color: var(--brand-strong); text-align: center; }
.rank-medal { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.rank-medal-1 { background: linear-gradient(140deg, #fff0c4, #e9b651); color: #5a3d04; box-shadow: 0 4px 14px -6px rgba(217,177,92,0.6); }
.rank-medal-2 { background: linear-gradient(140deg, #f1f3f5, #c2cad1); color: #303a44; }
.rank-medal-3 { background: linear-gradient(140deg, #f6dec4, #c98e5f); color: #4d2c0e; }

.brand-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-cell > div { min-width: 0; }
.brand-logo-wrap {
  position: relative; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(140deg, #eef8ef 0%, #dff0df 100%);
  border: 1px solid var(--line); overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-logo-wrap::before {
  content: attr(data-initial);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); font-weight: 800; font-size: 15px; z-index: 0;
}
.brand-logo { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; position: relative; z-index: 1; background: transparent; }
.brand-logo.brand-favicon { padding: 7px; object-fit: contain; background: transparent; }
.brand-logo.is-loaded { background: #fff; }
.brand-logo-placeholder { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(140deg, #eef8ef 0%, #dff0df 100%); border: 1px solid var(--line); color: var(--brand); font-weight: 800; font-size: 15px; flex-shrink: 0; }
.brand-cell .brand-name { display: block; font-weight: 700; color: var(--text); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-cell a.brand-name { text-decoration: none; }
.brand-cell a.brand-name:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.brand-domain { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.score-cell { min-width: 0; }
.score-bar { position: relative; height: 6px; border-radius: 999px; background: var(--visibility-track); overflow: hidden; }
.score-bar > span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--visibility-fill); border-radius: 999px; }
.score-value { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--text); }

.spark-tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: 10px;
  cursor: help;
  transition: background 120ms ease, box-shadow 120ms ease;
}
.spark-tooltip-trigger:hover,
.spark-tooltip-trigger:focus-visible {
  background: rgba(38,77,62,0.06);
  box-shadow: inset 0 0 0 1px rgba(38,77,62,0.12);
  outline: none;
}
.spark { display: block; transition: filter 120ms ease, transform 120ms ease; }
.spark-tooltip-trigger:hover .spark,
.spark-tooltip-trigger:focus-visible .spark { filter: saturate(1.08) brightness(1.02); transform: translateY(-0.5px); }
.spark-tooltip-panel { min-width: min(230px, calc(100vw - 52px)); }
.spark-tooltip-label { font-weight: 700; }
.delta-up { color: #1c8a4a; font-weight: 800; }
.delta-down { color: #b53b3b; font-weight: 800; }
.delta-flat { color: #94a3b8; font-weight: 700; }

.provider-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.provider-card {
  background: rgba(255,255,255,0.98); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden;
}
.provider-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.provider-card.p-openai::before { background: var(--provider-openai); }
.provider-card.p-anthropic::before { background: var(--provider-anthropic); }
.provider-card.p-google::before { background: var(--provider-google); }
.provider-card-head { display: flex; align-items: center; gap: 12px; }
.provider-card-icon { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); flex-shrink: 0; }
.provider-card-icon img { width: 22px; height: 22px; object-fit: contain; display: block; }
.provider-card.p-openai .provider-card-icon { background: rgba(16,163,127,0.08); border-color: rgba(16,163,127,0.16); }
.provider-card.p-anthropic .provider-card-icon { background: rgba(217,119,87,0.08); border-color: rgba(217,119,87,0.18); }
.provider-card.p-google .provider-card-icon { background: rgba(66,133,244,0.08); border-color: rgba(66,133,244,0.18); }
.provider-card-name { font-weight: 800; font-size: 16px; }
.provider-card-sub { color: var(--muted); font-size: 12px; font-weight: 500; }
.provider-rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.provider-rank-row:last-child { border-bottom: 0; }
.provider-rank-num { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; background: rgba(248, 250, 252, 1); color: #334155; }
.provider-rank-row:first-of-type .provider-rank-num { background: linear-gradient(140deg, #fff0c4, #e9b651); color: #5a3d04; }
.provider-rank-brand { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.provider-rank-name { font-weight: 700; min-width: 0; font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }
.provider-rank-score { color: var(--muted); font-size: 13px; font-weight: 600; flex-shrink: 0; }

.cited-grid { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cited-item { background: rgba(255,255,255,0.98); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; transition: transform 120ms ease, box-shadow 120ms ease; }
.cited-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.cited-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cited-num { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: 0.08em; }
.cited-favicon-wrap {
  position: relative;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(140deg, #eef8ef 0%, #dff0df 100%);
  border: 1px solid var(--line);
  overflow: hidden;
}
.cited-favicon-wrap::before {
  content: attr(data-initial);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-weight: 800;
  font-size: 10px;
  line-height: 1;
  z-index: 0;
}
.cited-favicon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: transparent;
  border: 1px solid var(--line);
  padding: 2px;
  object-fit: contain;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  display: block;
}
.cited-favicon.is-loaded { background: #fff; }
.cited-favicon-placeholder { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(140deg, #eef8ef 0%, #dff0df 100%); color: var(--brand); font-weight: 800; font-size: 10px; line-height: 1; padding: 0; }
.cited-domain { font-weight: 800; word-break: break-all; font-size: 14px; }
.cited-meta { color: var(--muted); font-size: 12px; margin-top: auto; font-weight: 500; }

.prompts-list { display: grid; gap: 10px; }
.prompt-card { background: rgba(255,255,255,0.98); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; gap: 14px; align-items: center; }
.prompt-intent { flex-shrink: 0; min-width: 110px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.prompt-intent.i-general { background: rgba(78,171,118,0.14); color: #1c6b3f; }
.prompt-intent.i-comparison { background: rgba(217,177,92,0.16); color: #8a6a2a; }
.prompt-intent.i-task { background: rgba(99,102,241,0.14); color: #4338ca; }
.prompt-intent.i-problem { background: rgba(225,113,113,0.14); color: #9b3232; }
.prompt-intent.i-local_choice { background: rgba(14,165,233,0.14); color: #0369a1; }
.prompt-text { flex: 1; min-width: 0; line-height: 1.55; color: var(--text); font-size: 15px; overflow-wrap: anywhere; }

.methodology { display: grid; gap: 14px; max-width: 820px; }
.methodology p { margin: 0; color: #334155; font-size: var(--public-body-sm); line-height: 1.78; }
.methodology code { padding: 3px 8px; border-radius: 8px; background: rgba(18,60,45,0.08); font-size: 0.92em; color: var(--brand-strong); }
.methodology-list { display: grid; gap: 8px; margin: 6px 0; padding: 0; list-style: none; }
.methodology-list li { display: flex; gap: 10px; padding: 6px 0; color: #334155; font-size: var(--public-body-sm); line-height: 1.6; }
.methodology-list li::before { content: ""; flex-shrink: 0; margin-top: 8px; width: 8px; height: 8px; border-radius: 999px; background: var(--brand); box-shadow: 0 0 0 4px rgba(38,77,62,0.12); }
.methodology-list li.minus::before { background: var(--danger); box-shadow: 0 0 0 4px rgba(181,59,59,0.12); }

.cta-card {
  border-radius: 36px; padding: clamp(32px, 4vw, 40px);
  background:
    radial-gradient(circle at top right, rgba(110, 231, 183, 0.22), transparent 34%),
    radial-gradient(circle at bottom left, rgba(234, 168, 53, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(244,250,246,0.98) 100%);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; gap: 22px;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, 0.7fr);
  align-items: center;
}
.cta-card h2 { margin: 0; font-size: var(--public-section-title); line-height: 1.5; letter-spacing: -0.025em; }
.cta-card p { margin: 12px 0 0; color: #475569; max-width: 540px; font-size: var(--public-body); line-height: 1.78; }
.cta-side { padding: 18px; border-radius: 22px; background: rgba(255,255,255,0.7); border: 1px solid var(--line); }
.cta-side strong { display: block; color: #047857; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.cta-side ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.cta-side li { padding-left: 20px; position: relative; color: #475569; font-size: 13px; line-height: 1.55; }
.cta-side li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 8px; border-radius: 999px; background: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,0.12); }

.rating-cta {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 62px 48px;
  background:
    radial-gradient(120% 140% at 76% 12%, rgba(120, 191, 106, 0.2), transparent 55%),
    var(--brand-strong);
  text-align: center;
}
.rating-cta__copy { max-width: 680px; margin: 0 auto; }
.rating-cta__eyebrow {
  display: inline-flex;
  margin: 0;
  padding: 0; border: 0; border-radius: 0; background: transparent;
  color: #c8f560;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: uppercase;
}
.rating-cta__eyebrow::before { margin-right: 8px; content: "//"; white-space: normal; }
.rating-cta h2 {
  max-width: 680px;
  margin: 18px auto 0;
  color: #ffffff;
  font-size: clamp(31px, 4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.rating-cta p {
  max-width: 590px;
  margin: 18px auto 0;
  color: #a9c6b6;
  font-size: 15.5px;
  line-height: 1.65;
}
.rating-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}
.rating-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 21px;
  border-radius: 12px;
  border: 1px solid #c8f560;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.rating-cta__button:hover,
.rating-cta__button:focus-visible {
  color: #ffffff;
  transform: translateY(-2px);
}
.rating-cta__button--primary {
  background: transparent;
}
.rating-cta__button--primary:hover,
.rating-cta__button--primary:focus-visible { background: rgba(127, 191, 106, 0.12); }
.rating-cta__button--secondary {
  border-color: rgba(255, 255, 255, 0.18);
}
.rating-cta__button--secondary:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}
.rating-cta__arrow { font-size: 16px; line-height: 1; }

.hero-search-form { display: flex; gap: 10px; margin-top: 26px; max-width: 640px; padding: 6px; border-radius: 18px; background: rgba(255,255,255,0.92); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-search-form select { flex: 1; height: 56px; padding: 0 42px 0 16px; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); font-weight: 600; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 16px center; }
.hero-search-form .button { min-width: 56px; min-height: 56px; padding: 0 22px; border-radius: 14px; }
.popular-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; color: var(--muted); font-size: 13px; }
.popular-row .label { font-weight: 700; }
.popular-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 999px; background: rgba(255,255,255,0.85); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; transition: background 120ms ease, transform 120ms ease, border-color 120ms ease; text-decoration: none; }
.popular-chip:hover { background: rgba(236, 253, 245, 0.95); transform: translateY(-1px); border-color: rgba(31,94,72,0.25); }

/* ─── Topic icon badge ─────────────────────────────────────── */
.topic-icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.06);
  flex-shrink: 0;
}
.topic-icon-badge--sm { width: 28px; height: 28px; border-radius: 9px; }
.topic-icon-badge--sm svg { width: 16px; height: 16px; }
.topic-icon-badge--md { width: 40px; height: 40px; }
.topic-icon-badge--md svg { width: 22px; height: 22px; }
.topic-icon-badge--lg { width: 56px; height: 56px; border-radius: 18px; }
.topic-icon-badge--lg svg { width: 30px; height: 30px; }

/* ─── Hero custom picker ───────────────────────────────────── */
.vy-picker { position: relative; max-width: 640px; margin-top: 26px; }
.vy-picker-trigger {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 10px 14px; min-height: 68px;
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow);
  cursor: pointer; font: inherit; text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.vy-picker-trigger:hover { border-color: rgba(31,94,72,0.25); }
.vy-picker.is-open .vy-picker-trigger { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(38,77,62,0.12), var(--shadow); }
.vy-picker-trigger-icon { display: inline-flex; }
.vy-picker-trigger-label { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.vy-picker-trigger-arrow { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 12px; background: var(--brand); color: #fff; transition: transform 200ms ease; }
.vy-picker.is-open .vy-picker-trigger-arrow { transform: rotate(180deg); }

.vy-picker-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 50;
  max-height: 460px; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 32px 80px -28px rgba(15, 23, 42, 0.36);
  display: flex; flex-direction: column;
  animation: vy-fade-in 140ms ease;
}
@keyframes vy-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.vy-picker-search {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.vy-picker-search input {
  flex: 1; height: 32px; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 14px; color: var(--text);
}
.vy-picker-groups { flex: 1; overflow-y: auto; padding: 8px; }
.vy-picker-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.vy-picker-group + .vy-picker-group { margin-top: 4px; }
.vy-picker-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.vy-picker-group-options { display: grid; gap: 2px; }
.vy-picker-option {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 8px 12px; border-radius: 12px;
  background: transparent; border: 0; cursor: pointer;
  font: inherit; text-align: left; color: var(--text);
  transition: background 100ms ease;
}
.vy-picker-option:hover, .vy-picker-option:focus-visible { background: rgba(236, 253, 245, 0.7); outline: none; }
.vy-picker-option-label { flex: 1; font-size: 14px; font-weight: 600; }
.vy-picker-option-arrow { color: var(--brand); font-weight: 800; opacity: 0; transition: opacity 100ms ease; }
.vy-picker-option:hover .vy-picker-option-arrow,
.vy-picker-option:focus-visible .vy-picker-option-arrow { opacity: 1; }

/* ─── Custom select (filter dropdown) ──────────────────────── */
.vy-select { position: relative; }
.vy-select-button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; min-height: 48px; padding: 0 14px;
  background: #fff; border: 1px solid rgba(15,23,42,0.08);
  border-radius: 14px; cursor: pointer; font: inherit;
  font-size: 14px; font-weight: 600; color: var(--text);
  text-align: left;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.vy-select-button:hover { border-color: rgba(31,94,72,0.25); }
.vy-select.is-open .vy-select-button { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(38,77,62,0.12); }
.vy-select-text { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vy-select-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  color: #64748b; transition: transform 180ms ease;
}
.vy-select.is-open .vy-select-arrow { transform: rotate(180deg); color: var(--brand); }
.vy-select[data-value]:not([data-value="all"]) .vy-select-button {
  background: rgba(236, 253, 245, 0.5);
  border-color: rgba(31,94,72,0.35);
  color: var(--brand-strong);
}
.vy-select-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 22px 60px -22px rgba(15, 23, 42, 0.32);
  padding: 6px; display: grid; gap: 2px;
  max-height: 320px; overflow-y: auto;
  animation: vy-fade-in 120ms ease;
}
.vy-select-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  background: transparent; border: 0; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text);
  text-align: left;
}
.vy-select-option:hover, .vy-select-option:focus-visible { background: rgba(236,253,245,0.8); outline: none; }
.vy-select-check { color: var(--brand); width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: 0; }
.vy-select-option.is-selected .vy-select-check { opacity: 1; }
.vy-select-option.is-selected { color: var(--brand-strong); font-weight: 700; }
.vy-select-option-content { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vy-select-option-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(15,23,42,0.06);
  flex-shrink: 0;
}
.vy-select-option-icon img { width: 15px; height: 15px; object-fit: contain; display: block; }

/* Override default display to ensure [hidden] works on grid/flex panels */
.vy-select-panel[hidden],
.vy-picker-panel[hidden],
.vy-picker-empty[hidden] { display: none; }

.featured-card {
  display: grid; gap: 32px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  padding: clamp(28px, 4vw, 40px); border-radius: 36px;
  background:
    radial-gradient(circle at top right, rgba(217,177,92,0.16), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(244,250,246,0.98) 100%);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.featured-section { padding-top: 52px; }
.featured-section .section-header { margin-bottom: 26px; }
.featured-section .eyebrow { margin-bottom: 14px; }
.featured-section .section-header h2 { margin-bottom: 14px; }
.featured-card > * { min-width: 0; }
.featured-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.featured-meta-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,0.7); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--muted); }
.featured-card h2 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 2rem); letter-spacing: -0.025em; line-height: 1.5; }
.featured-podium { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); margin-top: 22px; }
.podium-card { padding: 18px; border-radius: 18px; background: rgba(255,255,255,0.95); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-height: 130px; position: relative; overflow: hidden; }
.podium-card.r-1 { background: linear-gradient(160deg, #fff5d6 0%, #ffe5a3 100%); border-color: #e9b651; }
.podium-card.r-2 { background: linear-gradient(160deg, #f1f3f5 0%, #d8e0e6 100%); border-color: #c2cad1; }
.podium-card.r-3 { background: linear-gradient(160deg, #fce2c8 0%, #e5b69a 100%); border-color: #c98e5f; }
.podium-rank { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(15,23,42,0.6); }
.podium-name { font-size: 18px; font-weight: 800; color: var(--text); line-height: 1.2; overflow-wrap: break-word; word-break: normal; }
.podium-score { font-size: 13px; font-weight: 700; color: rgba(15,23,42,0.7); margin-top: auto; }
.featured-visibility {
  min-height: 100%;
  padding: clamp(22px, 3vw, 28px);
  border-radius: 28px;
  border: 1px solid rgba(38,77,62,0.1);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(248,251,246,0.94) 100%);
  display: grid;
  gap: 18px;
  align-content: start;
}
.featured-visibility-leader {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(38,77,62,0.95), rgba(78,171,118,0.88));
  color: #fff;
  display: grid;
  gap: 8px;
}
.featured-visibility-leader-label { font-size: 11px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.78); }
.featured-visibility-leader strong { font-size: clamp(1.45rem, 3vw, 2.25rem); line-height: 1.05; overflow-wrap: anywhere; }
.featured-visibility-leader span:last-of-type { color: rgba(255,255,255,0.84); font-size: 13px; font-weight: 800; }
.featured-visibility-meter { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.18); overflow: hidden; }
.featured-visibility-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--visibility-fill-soft); }
.featured-visibility-list { display: grid; gap: 10px; }
.featured-visibility-row {
  display: grid;
  grid-template-columns: 28px minmax(108px, 1fr) minmax(120px, 1.35fr) 52px;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(15,23,42,0.1);
  outline: none;
}
.featured-visibility-row:last-child { border-bottom: 0; }
.featured-visibility-row:focus-visible { border-radius: 12px; box-shadow: 0 0 0 3px rgba(38,77,62,0.12); }
.featured-visibility-rank {
  width: 28px; height: 28px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(38,77,62,0.08); color: var(--brand);
  font-size: 12px; font-weight: 900;
}
.featured-visibility-brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 800; color: var(--text); }
.featured-visibility-brand > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.featured-visibility-track { height: 12px; border-radius: 999px; background: var(--visibility-track); overflow: hidden; min-width: 0; }
.featured-visibility-track > span { display: block; height: 100%; border-radius: inherit; background: var(--visibility-fill); }
.featured-visibility-score { color: var(--text); font-size: 13px; font-weight: 900; text-align: right; }
.featured-visibility-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.overview-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.movement-card { display: grid; gap: 14px; }
.boundary-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(38,77,62,0.08);
  background:
    radial-gradient(circle at top right, rgba(110,231,183,0.12), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,251,246,0.98) 100%);
}
.boundary-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.boundary-note {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(236,253,245,0.92);
  border: 1px solid rgba(167,243,208,0.95);
  color: #047857;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.boundary-columns { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.boundary-column {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(15,23,42,0.06);
  background: rgba(255,255,255,0.78);
}
.boundary-column.is-entered {
  background: linear-gradient(180deg, rgba(236,253,245,0.84) 0%, rgba(255,255,255,0.9) 100%);
  border-color: rgba(52,168,83,0.14);
}
.boundary-column.is-exited {
  background: linear-gradient(180deg, rgba(254,242,242,0.84) 0%, rgba(255,255,255,0.9) 100%);
  border-color: rgba(220,38,38,0.1);
}
.boundary-column-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.boundary-column-title { margin: 0; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.boundary-column-title.is-entered { color: #166534; }
.boundary-column-title.is-exited { color: #991b1b; }
.boundary-column-copy { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; max-width: 40ch; }
.boundary-count {
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}
.boundary-count.is-entered { background: rgba(34,197,94,0.14); color: #166534; }
.boundary-count.is-exited { background: rgba(239,68,68,0.12); color: #991b1b; }
.movement-group { display: grid; gap: 8px; }
.movement-group-title { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; margin: 2px 0; }
.movement-group-title::before { content: ""; width: 7px; height: 7px; border-radius: 999px; flex: 0 0 auto; }
.movement-group-title.is-up { color: #1c8a4a; }
.movement-group-title.is-up::before { background: #34a853; box-shadow: 0 0 0 3px rgba(52,168,83,0.16); }
.movement-group-title.is-down { color: #b53b3b; }
.movement-group-title.is-down::before { background: #d4534f; box-shadow: 0 0 0 3px rgba(212,83,79,0.14); }
.movement-empty {
  min-height: 194px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(248,250,252,0.65);
  border: 1px dashed rgba(15,23,42,0.14);
}
.movement-empty strong { color: var(--text); font-size: 15px; }
.movement-empty span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.movers-list { display: grid; gap: 7px; }
.mover-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,0.7); border: 1px solid var(--line); transition: border-color 120ms ease, background 120ms ease; }
.mover-row:hover { background: #fff; border-color: rgba(38,77,62,0.16); }
.mover-rank { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 7px; background: rgba(38,77,62,0.07); color: var(--brand); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.mover-name { flex: 1; min-width: 0; font-weight: 750; font-size: 13px; overflow-wrap: anywhere; color: #0f172a; }
.mover-name-with-icon { display: inline-flex; align-items: center; gap: 8px; }
.mover-name-with-icon > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.mover-topic { color: var(--muted); font-size: 11px; margin-top: 1px; }
.mover-delta { font-size: 12px; font-weight: 800; white-space: nowrap; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
/* delta as a tinted chip inside mover rows (scoped so plain .delta-* in tables stay text) */
.mover-delta.delta-up, .mover-delta.delta-down {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px 10px; border-radius: 999px; letter-spacing: 0.01em;
}
.mover-delta.delta-up { background: rgba(78,171,118,0.15); color: #178045; }
.mover-delta.delta-down { background: rgba(181,59,59,0.12); color: #b53b3b; }

.filter-collapse {
  position: sticky; top: 70px; z-index: 30;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,251,246,0.94) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 18px 48px -32px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.filter-collapse[open] { padding-bottom: 0; }
.filter-collapse-summary {
  display: none; /* hidden on desktop, content is always visible */
}
.filter-bar {
  display: grid; gap: 12px; padding: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}
.filter-field { position: relative; }
.filter-field select, .filter-field input {
  width: 100%; height: 48px; padding: 0 40px 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.08); background: #fff;
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text);
  appearance: none; outline: none;
  -webkit-appearance: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.filter-field select:hover, .filter-field input:hover { border-color: rgba(31,94,72,0.25); }
.filter-field select:focus, .filter-field input:focus,
.filter-field.is-focused select, .filter-field.is-focused input {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(38,77,62,0.12);
}
.filter-field select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23264d3e' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 16px center;
  cursor: pointer;
}
.filter-field.has-search input { padding-left: 44px; padding-right: 36px; }
.filter-field.has-search::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 16px; height: 16px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3e%3ccircle cx='11' cy='11' r='7'/%3e%3cline x1='21' y1='21' x2='16.65' y2='16.65'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-size: contain;
  pointer-events: none;
}
.filter-field label {
  position: absolute; top: -7px; left: 14px; padding: 1px 8px; z-index: 1;
  font-size: 10px; font-weight: 800; color: var(--brand);
  background: #fff; letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 6px; pointer-events: none;
}
.filter-field.is-changed label { color: #047857; }
.filter-field.is-changed select, .filter-field.is-changed input { border-color: rgba(31,94,72,0.4); background: rgba(236,253,245,0.4); }
.filter-reset {
  align-self: end; min-height: 48px; padding: 0 18px; border-radius: 14px;
  background: rgba(255,255,255,0.7); border: 1px solid var(--line);
  color: var(--brand); font-size: 13px; font-weight: 800;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer; transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}
.filter-reset:hover { background: rgba(236,253,245,0.95); color: var(--brand-strong); transform: translateY(-1px); }
.filter-reset::before {
  content: ""; width: 14px; height: 14px;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23264d3e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='1 4 1 10 7 10'/%3e%3cpath d='M3.51 15a9 9 0 1 0 2.13-9.36L1 10'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-size: contain;
}

.topic-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.topic-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: rgba(255,255,255,0.98); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-sm); transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease; cursor: pointer; color: var(--text); text-decoration: none; min-width: 0; }
.topic-card:hover { transform: translateY(-3px); border-color: rgba(31,94,72,0.18); box-shadow: var(--shadow); }
.topic-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.topic-card h3 { margin: 0; font-size: var(--public-card-title); font-weight: 800; letter-spacing: 0; line-height: 1.55; overflow-wrap: anywhere; }
.topic-card .topic-group { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.topic-card-icon { width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-muted); border: 1px solid var(--line); color: var(--brand); font-size: 18px; }
.topic-card-top3 { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: rgba(248,250,252,0.6); border: 1px solid var(--line); }
.topic-card-top3-row { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.topic-card-top3-rank { width: 18px; color: var(--muted); font-weight: 700; font-size: 11px; flex-shrink: 0; }
.topic-card-top3-name { flex: 1; min-width: 0; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topic-card-top3-score { color: var(--muted); font-weight: 600; font-size: 12px; min-width: 36px; text-align: right; flex-shrink: 0; }
/* Mini/podium favicons live inside a wrap whose ::before draws the initial
   letter behind the image. If the <img> fails to load, ratings-interactions.js
   hides it and the initial letter becomes visible. */
.brand-favicon-mini-wrap, .brand-favicon-podium-wrap {
  position: relative; flex-shrink: 0; display: inline-block; vertical-align: middle;
  background: linear-gradient(140deg, #eef8ef 0%, #dff0df 100%);
  border: 1px solid var(--line); overflow: hidden;
}
.brand-favicon-mini-wrap { width: 18px; height: 18px; border-radius: 4px; }
.brand-favicon-podium-wrap { width: 28px; height: 28px; border-radius: 6px; border-color: rgba(15,23,42,0.12); }
.brand-favicon-mini-wrap::before, .brand-favicon-podium-wrap::before {
  content: attr(data-initial);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand); font-weight: 800; line-height: 1; z-index: 0;
}
.brand-favicon-mini-wrap::before { font-size: 10px; }
.brand-favicon-podium-wrap::before { font-size: 13px; }
.brand-favicon-mini, .brand-favicon-podium {
  width: 100%; height: 100%; object-fit: contain; background: transparent;
  display: block; position: relative; z-index: 1; border: 0;
}
.brand-favicon-mini.is-loaded, .brand-favicon-podium.is-loaded { background: #fff; }
.brand-favicon-mini { border-radius: 3px; }
.brand-favicon-podium { border-radius: 5px; }
.brand-favicon-mini-favicon { padding: 2px; }
.brand-favicon-podium-favicon { padding: 3px; }
.brand-favicon-mini-placeholder { width: 18px; height: 18px; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(140deg, #eef8ef 0%, #dff0df 100%); border: 1px solid var(--line); color: var(--brand); font-weight: 800; font-size: 10px; line-height: 1; flex-shrink: 0; vertical-align: middle; }
.brand-favicon-podium-placeholder { width: 28px; height: 28px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.6); border: 1px solid rgba(15,23,42,0.12); color: var(--brand); font-weight: 800; font-size: 13px; line-height: 1; flex-shrink: 0; vertical-align: middle; }
.podium-name-row { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.podium-name-row .podium-name { margin: 0; }
.topic-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 4px; }
.topic-card-updated { color: var(--muted); font-size: 11px; font-weight: 700; }
.topic-card-cta { color: var(--brand); font-size: 13px; font-weight: 800; flex-shrink: 0; }

.related-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.related-card { padding: 15px 18px; background: rgba(255,255,255,0.96); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: space-between; color: var(--text); gap: 12px; transition: transform 120ms ease, border-color 120ms ease; text-decoration: none; }
.related-card:hover { transform: translateY(-2px); border-color: rgba(31,94,72,0.2); }
.related-card .name { font-weight: 600; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.related-card .arrow { color: #94a3b8; font-weight: 700; }

.empty-state { padding: 48px 32px; text-align: center; background: rgba(255,255,255,0.96); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.empty-state-illustration { width: 120px; height: 120px; margin: 0 auto 16px; border-radius: 32px; background: linear-gradient(160deg, #eef8ef, #f7ecd0); display: inline-flex; align-items: center; justify-content: center; font-size: 48px; color: var(--brand); }
.empty-state h3 { margin: 0 0 8px; font-size: 22px; }
.empty-state p { margin: 0 auto; color: var(--muted); max-width: 480px; line-height: 1.6; }

@media (max-width: 960px) {
  .charts-row, .featured-card, .cta-card, .rating-cta { grid-template-columns: 1fr; }
  .share-row { grid-template-columns: minmax(104px, 148px) minmax(0, 1fr) 44px; }
  .provider-distribution-row { grid-template-columns: 1fr; }
  .provider-distribution-total { text-align: left; }
  .topic-grid, .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cited-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .provider-grid { grid-template-columns: 1fr; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-collapse { position: static; }
  .overview-grid { grid-template-columns: 1fr; }
  .overview-grid > .chart-card { grid-column: auto !important; }
  .boundary-columns { grid-template-columns: 1fr; }
  .rating-cta__actions { justify-self: start; }
}
@media (max-width: 640px) {
  .container {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }
  .hero { padding: 22px 0 var(--public-section-y-compact); }
  .hero-card { padding: 0; }
  .hero-card h1 {
    font-size: 2.35rem;
    line-height: 1.5;
  }
  .hero-copy {
    font-size: 1.02rem;
    line-height: 2rem;
  }
  .section-header p,
  .cta-card p {
    font-size: 1rem;
    line-height: 2rem;
  }
  .section,
  .section-soft {
    padding: var(--public-section-y-compact) 0;
  }
  .section-header {
    margin-bottom: 24px;
  }
  .section-header h2,
  .cta-card h2 {
    font-size: 1.75rem;
    line-height: 1.5;
  }
  .rating-cta h2 {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  .card,
  .chart-card,
  .provider-card,
  .featured-card,
  .topic-card,
  .related-card {
    padding: 22px;
  }
  .leaderboard-card {
    padding: 0;
  }
  .leaderboard-scroll {
    overflow-x: auto;
    /* Edge gradients hint that the table extends horizontally. They use
       background-attachment: local so the side gradient fades away once the
       user scrolls to the corresponding edge. */
    background:
      linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
      linear-gradient(to right, rgba(255,255,255,0), #fff 70%) 100% 0,
      radial-gradient(farthest-side at 0 50%, rgba(15,23,42,0.16), transparent),
      radial-gradient(farthest-side at 100% 50%, rgba(15,23,42,0.16), transparent) 100% 0;
    background-repeat: no-repeat;
    background-size: 32px 100%, 32px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
  }
  .leaderboard-table {
    min-width: 760px;
    table-layout: auto;
  }
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 16px 16px;
  }
  .brand-cell {
    min-width: 220px;
  }
  .brand-cell .brand-name,
  .brand-domain {
    white-space: normal;
  }
  .score-cell {
    min-width: 180px;
  }
  .featured-section { padding-top: 44px; }
  .featured-section .section-header { margin-bottom: 24px; }
  .featured-section .eyebrow { margin-bottom: 16px; }
  .featured-section .section-header h2 { margin-bottom: 14px; }
  .topic-grid, .related-grid, .cited-grid { grid-template-columns: 1fr; }
  .kpi-strip, .filter-bar { grid-template-columns: 1fr; }
  .provider-distribution-meta { gap: 4px 8px; }
  .boundary-card-head { display: grid; }
  .boundary-note { width: fit-content; }
  .featured-card,
  .featured-visibility,
  .featured-visibility-list,
  .featured-visibility-row {
    min-width: 0;
  }
  .featured-card,
  .featured-visibility {
    max-width: 100%;
  }
  /* Collapsed filter UI on phones: summary becomes a tap target; the body
     reveals on open. Default state is open, so first paint shows everything
     and the user can collapse if they want screen real-estate back. */
  .filter-collapse-summary {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 56px; padding: 18px;
    cursor: pointer; user-select: none;
    list-style: none;
  }
  .filter-collapse-summary::-webkit-details-marker { display: none; }
  .filter-collapse-label { font-weight: 800; font-size: 15px; color: var(--text); }
  .filter-collapse-chevron {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 999px;
    background: rgba(38,77,62,0.08); color: var(--brand);
    transition: transform 160ms ease;
  }
  .filter-collapse[open] .filter-collapse-chevron { transform: rotate(180deg); }
  .filter-collapse[open] .filter-bar { padding-top: 0; }
  .featured-podium { grid-template-columns: 1fr; }
  .featured-visibility-row { grid-template-columns: 28px minmax(0, 1fr) 50px; }
  .featured-visibility-track { grid-column: 2 / -1; }
  .featured-visibility-brand > span:last-child { white-space: normal; overflow-wrap: anywhere; }
  .topic-card-foot { flex-direction: column; align-items: flex-start; }
  .cta-card { padding: 24px; border-radius: 28px; }
  .rating-cta {
    padding: 24px;
    border-radius: 28px;
  }
  .rating-cta p {
    font-size: 1rem;
    line-height: 2rem;
  }
  .hero-actions .button, .inline-actions .button { flex: 1 1 100%; }
  .rating-cta__button {
    width: 100%;
    min-width: 0;
  }
  .leaderboard-head { flex-direction: column; align-items: flex-start; }
  .leaderboard-provider-filter,
  .leaderboard-provider-filter .provider-tabs { width: 100%; }
  .share-chart { gap: 12px; }
  .share-row { grid-template-columns: 1fr 42px; gap: 6px 9px; }
  .share-name { grid-column: 1 / -1; text-align: left; }
  .provider-tabs { width: 100%; }
  .provider-row--chart { justify-content: flex-start; }
  .provider-tab { justify-content: center; }
  .competition-chart { grid-template-columns: 1fr; }
  .competition-row { grid-template-columns: minmax(0, 1fr) auto; }
  .filter-reset { width: 100%; justify-content: center; }
  .prompt-card { flex-direction: column; gap: 10px; }
  .prompt-intent { min-width: 0; align-self: flex-start; }
  .vy-picker-panel { max-height: min(460px, calc(100vh - 160px)); }
}

/* Align both public ratings surfaces with the current VYDAI site language. */
.ratings-page .leader-spot,
.ratings-page .kpi,
.ratings-page .chart-card,
.ratings-page .leaderboard-card,
.ratings-page .provider-card,
.ratings-page .topic-card,
.ratings-page .related-card,
.ratings-page .filter-collapse,
.ratings-page .empty-state {
  border-color: var(--line);
  background-color: #fff;
  box-shadow: var(--shadow-sm);
}
.ratings-page .chart-card,
.ratings-page .leaderboard-card,
.ratings-page .provider-card,
.ratings-page .topic-card,
.ratings-page .empty-state {
  border-radius: 22px;
}
.ratings-page .topic-card:hover,
.ratings-page .related-card:hover,
.ratings-page .provider-card:hover {
  border-color: #bcd3ab;
  box-shadow: 0 18px 44px -30px rgba(2,40,25,0.38);
}
.ratings-page .topic-card h3,
.ratings-page .leader-spot-name,
.ratings-page .chart-title,
.ratings-page .provider-card-title {
  color: var(--text);
  font-weight: 700;
}
.ratings-page .topic-group,
.ratings-page .topic-card-updated,
.ratings-page .kpi-label,
.ratings-page .leader-spot-kicker,
.ratings-page .rating-cta__eyebrow {
  font-family: "Space Mono", ui-monospace, monospace;
}
.ratings-page .provider-tabs,
.ratings-page .vy-picker-trigger,
.ratings-page .filter-collapse {
  border-color: var(--line);
  box-shadow: none;
}
.ratings-page .provider-tab.is-active,
.ratings-page .vy-picker-trigger-arrow,
.ratings-page .filter-reset {
  background: var(--brand);
}
.ratings-page .filter-reset {
  border-color: var(--brand);
  color: #ffffff;
}
.ratings-page .filter-reset:hover,
.ratings-page .filter-reset:focus-visible {
  background: var(--brand-strong);
  color: #ffffff;
}
.ratings-page .filter-reset::before {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='1 4 1 10 7 10'/%3e%3cpath d='M3.51 15a9 9 0 1 0 2.13-9.36L1 10'/%3e%3c/svg%3e");
}
.ratings-page .cta-card {
  border-color: rgba(200,245,96,0.18);
  background:
    radial-gradient(circle at 88% 14%, rgba(200,245,96,0.16), transparent 38%),
    linear-gradient(145deg, #0b4732 0%, #022e20 100%);
  box-shadow: 0 28px 70px -42px rgba(2,40,25,0.72);
}
.ratings-page .rating-cta {
  background:
    radial-gradient(120% 140% at 76% 12%, rgba(120, 191, 106, 0.2), transparent 55%),
    var(--brand-strong);
  box-shadow: none;
}
.ratings-page .cta-card h2,
.ratings-page .cta-card p,
.ratings-page .rating-cta h2,
.ratings-page .rating-cta p,
.ratings-page .rating-cta__eyebrow {
  color: #fff;
}
.ratings-page .cta-card .eyebrow,
.ratings-page .rating-cta__eyebrow {
  color: #c8f560;
}
.ratings-page .cta-side {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.07);
}
.ratings-page .cta-side,
.ratings-page .cta-side strong,
.ratings-page .cta-side li {
  color: #d6e3da;
}
.ratings-page :where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(167,229,43,0.42);
  outline-offset: 3px;
}

@supports (overflow: clip) {
  html,
  body,
  .ratings-page { overflow-x: clip; }
}

@media (max-width: 720px) {
  .container {
    width: calc(100% - 28px);
    max-width: calc(100% - 28px);
  }
  .ratings-page .hero {
    padding: 24px 0 36px;
  }
  .ratings-page .hero-card {
    padding: 0;
  }
  .ratings-page .hero-card h1 {
    max-width: 100%;
    font-size: clamp(2.25rem, 11vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    text-wrap: wrap;
    word-break: normal;
  }
  .ratings-page .hero-copy {
    margin-top: 20px;
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.65;
  }
  .ratings-page .breadcrumb {
    margin-bottom: 18px;
    font-size: 11px;
  }
  .ratings-page .kicker {
    max-width: 100%;
    margin-bottom: 20px;
    white-space: normal;
    line-height: 1.55;
  }
  .ratings-page .hero-meta {
    gap: 7px 14px;
  }
  .ratings-page .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .ratings-page .hero-actions .button {
    width: 100%;
    min-height: 52px;
  }
  .ratings-page .section,
  .ratings-page .section-soft {
    padding: 36px 0;
  }
  .ratings-page .section-header h2,
  .ratings-page .cta-card h2,
  .ratings-page .rating-cta h2 {
    font-size: clamp(1.9rem, 9vw, 2.35rem);
    line-height: 1.08;
  }
  .ratings-page .section-header p,
  .ratings-page .cta-card p,
  .ratings-page .rating-cta p {
    font-size: 1rem;
    line-height: 1.65;
  }
  .ratings-page .leader-bento,
  .ratings-page .charts-row,
  .ratings-page .overview-grid,
  .ratings-page .featured-card,
  .ratings-page .cta-card,
  .ratings-page .rating-cta {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  .ratings-page .card,
  .ratings-page .chart-card,
  .ratings-page .provider-card,
  .ratings-page .topic-card,
  .ratings-page .related-card {
    padding: 20px;
  }
  .ratings-page .leaderboard-card {
    padding: 0;
  }
  .ratings-page .provider-tabs,
  .ratings-page .leaderboard-provider-filter,
  .ratings-page .leaderboard-provider-filter .provider-tabs {
    max-width: 100%;
  }
  .ratings-page .rating-anchors {
    top: 70px;
  }
  .ratings-page .rating-anchors-inner {
    padding: 9px 0;
  }
  .ratings-page .rating-anchors a {
    padding: 7px 12px;
  }
  .ratings-page .cta-card,
  .ratings-page .rating-cta {
    padding: 26px 22px;
    border-radius: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ratings-page *,
  .ratings-page *::before,
  .ratings-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
