/* /ugc-brands/ tree (scripts/generate-brand-pages.mjs). Loaded on top of
   seo.css + site-system.css and inherits their tokens (--primary, --ink,
   --line, --soft, --radius). Only the data components those files lack live
   here: measured chips, stat tiles, share bars, the daily output strip, the
   locked-roster teaser and the brand link grids. Bump BRANDS_CSS_VERSION in
   the generator when this changes. */

.ub-page {
  --ub-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ub-tint: rgba(56, 71, 254, 0.07);
  --ub-tint-line: rgba(56, 71, 254, 0.2);
  --ub-track: #eceef3;
  --ub-sub: #6b6b72;
}

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

.ub-page .seo-article-section { scroll-margin-top: 104px; }
.ub-page .seo-article-section > p a,
.ub-page .ub-findings a,
.ub-page .ub-notes a { color: var(--primary-dark); text-underline-offset: 3px; }

/* ---------- hero meta ---------- */

.ub-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ub-chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 30px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #4a4a50; font-size: 13px; font-weight: 700;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ub-chip-live { border-color: var(--ub-tint-line); background: var(--ub-tint); color: var(--primary-dark); }
.ub-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.ub-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid var(--primary); opacity: 0;
  animation: ub-ping 2.4s var(--ub-ease) infinite;
}
@keyframes ub-ping { 0% { transform: scale(0.4); opacity: 0.55; } 70%, 100% { transform: scale(1.25); opacity: 0; } }

/* ---------- answer + stat tiles ---------- */

.ub-answer-block { margin-bottom: 8px; }
.ub-answer-block > p:not(.seo-answer) { color: #454545; font-size: 18px; line-height: 1.7; }
.ub-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 26px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card, #fff);
}
.ub-stat { margin: 0; padding: 16px 18px 15px; border-right: 1px solid var(--line); }
.ub-stat:last-child { border-right: 0; }
.ub-stat dt { color: var(--ub-sub); font-size: 12.5px; font-weight: 700; letter-spacing: 0.01em; }
.ub-stat dd { margin: 6px 0 0; }
.ub-stat-value {
  display: block; color: var(--ink);
  font-size: clamp(1.5rem, 2.4vw, 1.875rem); font-weight: 800; line-height: 1;
  letter-spacing: -0.035em; font-variant-numeric: tabular-nums;
}
.ub-stat-sub { display: block; margin-top: 7px; color: #8a8a90; font-size: 12px; line-height: 1.3; }

/* ---------- tables ---------- */

.ub-table-wrap { margin: 18px 0 8px; }
.ub-table-wrap:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ub-page .seo-table th, .ub-page .seo-table td { padding: 12px 16px; font-size: 15px; }
.ub-page .seo-table thead th { font-size: 11.5px; color: #5b5b62; white-space: nowrap; }
.ub-kpi-table { min-width: 0; }
.ub-kpi-table tbody th { width: 38%; color: var(--ink); font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: 0; background: transparent; }
.ub-kpi-table td:last-child { color: var(--ub-sub); font-size: 13.5px; }
.ub-num { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink) !important; font-weight: 700; }
.ub-page .ub-compare th, .ub-page .ub-compare td { padding: 12px 10px; font-size: 14px; }
.ub-page .ub-compare thead th { white-space: normal; line-height: 1.3; vertical-align: bottom; }
.ub-page .ub-compare th:first-child, .ub-page .ub-compare td:first-child { padding-left: 16px; }
.ub-compare tbody th { background: transparent; text-transform: none; letter-spacing: 0; font-size: 15px; white-space: nowrap; }
.ub-compare tbody th a { color: var(--primary-dark); text-decoration: none; }
.ub-compare tbody th a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ub-compare tbody th small { display: block; margin-top: 2px; color: #8a8a90; font-size: 12px; font-weight: 600; }
.ub-compare tbody tr { transition: background-color 160ms ease; }
.ub-compare tbody tr:hover { background: #fafafc; }

/* ---------- daily output strip ---------- */

.ub-daily { margin: 22px 0 0; padding: 18px 18px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.ub-daily figcaption { color: #4a4a50; font-size: 13.5px; font-weight: 600; line-height: 1.45; }
.ub-daily-bars { display: flex; align-items: flex-end; gap: 3px; height: 96px; margin-top: 16px; }
.ub-daily-bars span {
  flex: 1 1 0; min-height: 2px; height: var(--h);
  border-radius: 3px 3px 1px 1px; background: var(--primary); opacity: 0.85;
  transform-origin: bottom; animation: ub-rise 640ms var(--ub-ease) both;
}
.ub-daily-bars span:nth-child(3n) { animation-delay: 40ms; }
.ub-daily-bars span:nth-child(3n + 1) { animation-delay: 80ms; }
.ub-daily-axis { display: flex; justify-content: space-between; margin-top: 8px; color: #8a8a90; font-size: 11.5px; font-variant-numeric: tabular-nums; }
@keyframes ub-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* ---------- share bars ---------- */

.ub-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.ub-bars { margin: 0 0 14px; padding: 16px 18px 12px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.ub-grid-2 .ub-bars { margin: 0; }
.ub-bars figcaption { margin-bottom: 10px; color: var(--ink); font-size: 13.5px; font-weight: 800; line-height: 1.35; }
.ub-bars-sub { margin: 16px 0 10px !important; color: var(--ink) !important; font-size: 13.5px !important; font-weight: 800; line-height: 1.35 !important; }
.ub-page .ub-bars ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.ub-page .ub-bars li {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto;
  align-items: center; gap: 10px; color: #3d3d42; font-size: 13.5px; line-height: 1.3;
}
.ub-bar-label { min-width: 0; }
.ub-bar-track { height: 8px; border-radius: 99px; background: var(--ub-track); overflow: hidden; }
.ub-bar-fill {
  display: block; width: var(--w); height: 100%; border-radius: inherit; background: var(--primary);
  transform-origin: left; animation: ub-grow 720ms var(--ub-ease) both;
}
.ub-bar-value { min-width: 64px; text-align: right; color: var(--ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.ub-bar-value small { display: block; color: #8a8a90; font-size: 11px; font-weight: 600; white-space: nowrap; }
@keyframes ub-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- caption signals ---------- */

.ub-signals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 18px; overflow: hidden; border: 1px solid var(--ub-tint-line); border-radius: 14px; background: var(--ub-tint); }
.ub-signals div { padding: 13px 15px; border-right: 1px solid var(--ub-tint-line); }
.ub-signals div:last-child { border-right: 0; }
.ub-signals dt { color: #4b4f86; font-size: 12px; font-weight: 700; line-height: 1.3; }
.ub-signals dd { margin: 5px 0 0; color: var(--primary-dark); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* ---------- findings, notes, sources ---------- */

.ub-page .ub-findings, .ub-page .ub-notes { display: grid; gap: 12px; margin: 18px 0; padding: 0; list-style: none; }
.ub-page .ub-findings li {
  position: relative; padding: 15px 18px 15px 20px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
  font-size: 16.5px; line-height: 1.6;
}
.ub-page .ub-findings li::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--primary);
}
.ub-findings strong { color: var(--ink); }
.ub-page .ub-notes li { position: relative; padding-left: 22px; font-size: 16.5px; line-height: 1.6; }
.ub-page .ub-notes li::before {
  content: ""; position: absolute; left: 3px; top: 0.62em; width: 8px; height: 8px;
  border: 1.5px solid #9a9aa2; border-radius: 50%;
}
.ub-page .ub-sources { display: grid; gap: 6px; margin: 8px 0 18px; padding-left: 20px; }
.ub-page .ub-sources li { font-size: 15px; line-height: 1.5; }
.ub-sources a { color: var(--primary-dark); text-underline-offset: 3px; }
.ub-cite {
  margin: 20px 0 0; padding: 14px 16px; border: 1px dashed #c9c9d1; border-radius: 12px;
  background: #fbfbfc; color: #4a4a50 !important; font-size: 14px !important; line-height: 1.55 !important;
  overflow-wrap: anywhere;
}

/* ---------- locked roster teaser ---------- */

.ub-locked {
  margin-top: 30px; padding: 30px 28px 26px !important;
  border: 1px solid var(--ub-tint-line); border-radius: 20px;
  background: linear-gradient(180deg, var(--ub-tint), rgba(56, 71, 254, 0.015) 70%), #fff;
}
.ub-locked h2 { margin-top: 0; }
.ub-page .ub-locked-list { display: grid; gap: 10px; margin: 16px 0 22px; padding: 0; list-style: none; }
.ub-page .ub-locked-list li {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.9);
  font-size: 15.5px; line-height: 1.55;
}
.ub-locked-list svg { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--ub-tint); color: var(--primary-dark); }
.ub-fineprint { margin: 14px 0 0; color: var(--ub-sub) !important; font-size: 13.5px !important; line-height: 1.5 !important; }

/* ---------- brand link grids ---------- */

.ub-page .ub-brand-links, .ub-page .ub-brand-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 18px; padding: 0; list-style: none; }
.ub-brand-links a, .ub-brand-cards a {
  position: relative; display: grid; gap: 4px; height: 100%;
  padding: 14px 40px 14px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: #fff; color: var(--ink); text-decoration: none;
  transition: border-color 180ms ease, transform 180ms var(--ub-ease), box-shadow 180ms ease;
}
.ub-brand-links a:hover, .ub-brand-cards a:hover {
  border-color: var(--ub-tint-line); transform: translateY(-1px);
  box-shadow: 0 10px 28px -18px rgba(38, 52, 218, 0.45);
}
.ub-brand-links a:active, .ub-brand-cards a:active { transform: translateY(0) scale(0.99); }
.ub-brand-links a:focus-visible, .ub-brand-cards a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ub-brand-links strong { font-size: 16px; }
.ub-brand-links span { color: var(--ub-sub); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.ub-brand-links svg, .ub-card-foot svg {
  position: absolute; right: 15px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  color: var(--primary); transition: transform 180ms var(--ub-ease);
}
.ub-brand-links a:hover svg, .ub-brand-cards a:hover svg { transform: translateX(3px); }
.ub-brand-cards a { gap: 12px; padding: 18px 18px 16px; }
.ub-card-top strong { display: block; font-size: 19px; letter-spacing: -0.02em; }
.ub-card-top small { color: var(--ub-sub); font-size: 13px; font-weight: 600; }
.ub-card-nums { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ub-sub); font-size: 13px; font-variant-numeric: tabular-nums; }
.ub-card-nums b { color: var(--ink); font-size: 15px; }
.ub-card-foot { position: relative; padding-right: 26px; color: var(--primary-dark); font-size: 13px; font-weight: 700; }
.ub-card-foot svg { right: 0; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .ub-stats, .ub-signals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ub-stat:nth-child(2n), .ub-signals div:nth-child(2n) { border-right: 0; }
  .ub-stat:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .ub-signals div:nth-child(-n + 2) { border-bottom: 1px solid var(--ub-tint-line); }
  .ub-grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ub-page .ub-brand-links, .ub-page .ub-brand-cards { grid-template-columns: minmax(0, 1fr); }
  .ub-page .ub-bars li { grid-template-columns: minmax(0, 1fr) auto; }
  .ub-bar-track { grid-column: 1 / -1; grid-row: 2; }
  .ub-kpi-table td:last-child, .ub-kpi-table thead th:last-child { display: none; }
  .ub-kpi-table tbody th { width: 60%; }
  .ub-locked { padding: 22px 18px 20px !important; }
  .ub-daily-bars { gap: 2px; height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .ub-dot::after, .ub-bar-fill, .ub-daily-bars span { animation: none; }
  .ub-brand-links a, .ub-brand-cards a, .ub-brand-links svg, .ub-card-foot svg { transition: none; }
}
