:root {
  color-scheme: dark;
  --page: #090c12;
  --panel: #121822;
  --raised: #182230;
  --raised-2: #202c3b;
  --text: #f4f7fb;
  --muted: #b6c0ce;
  --quiet: #7f8b9b;
  --line: rgba(182, 192, 206, 0.16);
  --line-strong: rgba(182, 192, 206, 0.28);
  --blue: #23a6d5;
  --blue-soft: rgba(35, 166, 213, 0.14);
  --ember: #ff5a3d;
  --gold: #f4c542;
  --red: #e10600;
  --green: #38b27a;
  --danger: #ff7463;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --content: 1180px;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

/* Public methodology */
.methodology-page {
  --methodology-accent: var(--blue, #25b7d3);
}

.series-page-nascar .methodology-page {
  --methodology-accent: var(--gold, #f6c443);
}

.series-page-f1 .methodology-page {
  --methodology-accent: var(--red, #ff4058);
}

.methodology-hero {
  padding-bottom: clamp(1.8rem, 3vw, 3rem);
}

.methodology-hero h1 {
  max-width: 920px;
}

.methodology-hero > p:last-child {
  max-width: 900px;
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.65;
}

.methodology-section {
  padding-top: clamp(2.5rem, 5vw, 5rem);
  padding-bottom: clamp(2.5rem, 5vw, 5rem);
}

.methodology-page .methodology-section.surface-section {
  margin-block: clamp(0.75rem, 1.5vw, 1.25rem);
  padding-inline: clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid rgba(182, 192, 206, 0.12);
  border-radius: calc(var(--radius, 18px) + 4px);
  background: rgba(18, 24, 34, 0.52);
}

.methodology-page .methodology-section.surface-section::before {
  display: none;
}

.methodology-track-section,
.methodology-boundary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  align-items: stretch;
}

.methodology-founder-card,
.methodology-standard-card {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.methodology-founder-card h2,
.methodology-section-heading h2,
.methodology-track-copy h2,
.methodology-boundary-grid h2 {
  margin: 0.45rem 0 1rem;
}

.methodology-founder-card p,
.methodology-section-heading p,
.methodology-track-copy p,
.methodology-spectrum p,
.methodology-definition p,
.methodology-integrity-note p {
  color: var(--muted);
  line-height: 1.72;
}

.methodology-standard-card {
  border-top: 3px solid var(--methodology-accent);
}

.methodology-standard-lead {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.methodology-standard-card.methodology-standard-lead blockquote {
  margin-bottom: 0;
  font-size: clamp(35px, 4vw, 50px);
  line-height: 1;
}

.methodology-check-list-featured {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}

.methodology-founder-transition {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

.methodology-founder-transition p {
  margin: 0;
}

.methodology-standard-card blockquote {
  margin: 1rem 0 1.5rem;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  font-weight: 700;
  line-height: 1.12;
}

.methodology-check-list,
.methodology-bullet-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.methodology-check-list li {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.methodology-check-list strong,
.methodology-bullet-list li::before {
  color: var(--methodology-accent);
}

.methodology-check-list span {
  color: var(--muted);
  line-height: 1.5;
}

.methodology-section-heading {
  max-width: 900px;
  margin-bottom: 2rem;
}

.methodology-data-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
}

.methodology-method-card {
  min-height: 220px;
  padding: 1.35rem;
}

.methodology-method-card:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -0.8rem;
  top: 50%;
  z-index: 2;
  color: var(--methodology-accent);
  font-size: 1.35rem;
  transform: translate(50%, -50%);
}

.methodology-card-number {
  display: block;
  color: var(--methodology-accent);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.methodology-method-card h3 {
  margin: 0.75rem 0 0.55rem;
}

.methodology-method-card p,
.methodology-target-grid p,
.methodology-context-stack p {
  color: var(--muted);
  line-height: 1.55;
}

.methodology-definition {
  margin-top: 1.25rem;
  padding: 1.35rem 1.5rem;
  border-left: 3px solid var(--methodology-accent);
  border-radius: 0 var(--radius, 18px) var(--radius, 18px) 0;
  background: rgba(255, 255, 255, 0.025);
}

.methodology-definition p {
  margin-bottom: 0;
}

.methodology-target-grid {
  margin-bottom: 1.25rem;
}

.methodology-target-grid .card {
  padding: 1.35rem;
}

.methodology-spectrum {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 1rem;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius, 18px);
  background: linear-gradient(135deg, rgba(37, 183, 211, 0.075), rgba(255, 255, 255, 0.015));
}

.methodology-spectrum h3 {
  margin: 0.45rem 0 0.65rem;
}

.methodology-spectrum-note {
  padding: 1.25rem;
  border-radius: 14px;
  background: rgba(7, 12, 20, 0.58);
}

.methodology-track-section {
  align-items: center;
}

.methodology-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.methodology-context-stack {
  display: grid;
  gap: 0.85rem;
}

.methodology-context-stack .card {
  padding: 1.2rem 1.35rem;
  border-left: 3px solid var(--methodology-accent);
}

.methodology-context-stack h3 {
  margin: 0.3rem 0;
}

.methodology-context-stack p {
  margin: 0;
}

.methodology-validation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.methodology-validation-grid .card {
  min-height: 180px;
  padding: 1.4rem;
  border-top: 3px solid var(--methodology-accent);
}

.methodology-integrity-note {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-top: 1.25rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.methodology-integrity-note p {
  margin: 0;
}

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

.methodology-boundary-grid > div {
  padding: clamp(1.4rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius, 18px);
}

.methodology-bullet-list {
  display: grid;
  gap: 0.8rem;
}

.methodology-bullet-list li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.5;
}

.methodology-bullet-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  font-weight: 800;
}

.methodology-resource-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.methodology-resource-links a {
  display: grid;
  gap: 0.45rem;
  min-height: 120px;
  padding: 1.25rem;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: border-color 160ms ease, transform 160ms ease;
}

.methodology-resource-links a:hover,
.methodology-resource-links a:focus-visible {
  border-color: var(--methodology-accent);
  transform: translateY(-2px);
}

.methodology-resource-links span {
  align-self: end;
  color: var(--muted);
  font-size: 0.86rem;
}

@media (max-width: 1050px) {
  .methodology-data-flow,
  .methodology-resource-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .methodology-method-card:not(:last-child)::after {
    display: none;
  }

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

@media (max-width: 760px) {
  .methodology-track-section,
  .methodology-boundary-grid,
  .methodology-standard-lead,
  .methodology-founder-transition,
  .methodology-spectrum,
  .methodology-data-flow,
  .methodology-validation-grid,
  .methodology-resource-links {
    grid-template-columns: 1fr;
  }

  .methodology-method-card,
  .methodology-validation-grid .card {
    min-height: 0;
  }

  .methodology-integrity-note {
    display: grid;
  }

  .methodology-actions .button {
    width: 100%;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% -10%, rgba(35, 166, 213, 0.10), transparent 30rem),
    var(--page);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:not(:disabled) {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--page);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 12, 18, 0.90);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.hero,
.content-section,
.membership-cta,
.page-hero,
.secondary-nav {
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-lockup,
.nav-link,
.mobile-nav-toggle,
.footer-links button {
  border: 0;
  background: transparent;
}

.brand-lockup {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
}

.brand-name,
.footer-brand {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.055em;
}

.brand-stripes {
  display: inline-grid;
  width: 28px;
  gap: 3px;
  transform: skewX(-18deg);
}

.brand-stripes i {
  display: block;
  height: 4px;
  border-radius: 999px;
}

.brand-stripes i:nth-child(1) { background: var(--blue); }
.brand-stripes i:nth-child(2) { width: 78%; background: var(--ember); }
.brand-stripes i:nth-child(3) { width: 58%; background: var(--gold); }

.global-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.nav-link.active {
  box-shadow: inset 0 -2px var(--blue);
}

.nav-link.account-link {
  margin-left: 8px;
  border: 1px solid var(--line-strong);
}

.account-nav-shell {
  position: relative;
}

.account-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.account-menu-chevron {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  transition: transform 160ms ease;
}

.account-link[aria-expanded="true"] .account-menu-chevron {
  transform: rotate(45deg);
}

.account-navigation-menu {
  position: absolute;
  z-index: 110;
  top: calc(100% + 10px);
  right: 0;
  width: 230px;
  padding: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(24, 34, 48, 0.985);
  box-shadow: var(--shadow);
}

.account-navigation-menu[hidden] {
  display: none !important;
}

.account-navigation-menu button {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.account-navigation-menu button:hover,
.account-navigation-menu button:focus-visible {
  background: var(--raised-2);
  color: var(--text);
}

.mobile-nav-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  border-radius: 9px;
  font-size: 24px;
}

.tab-content,
.tab-pane {
  margin: 0;
  padding: 0;
}

.route-page[hidden] {
  display: none !important;
}

.route-page {
  margin: 0;
  padding: 0;
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 60px;
  padding-block: 90px 80px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1,
h2,
.metric-value,
.price-placeholder,
.scorecard-metrics strong {
  font-family: var(--display);
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(58px, 8vw, 104px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.86;
  text-transform: uppercase;
}

h1 span {
  display: block;
  color: var(--blue);
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(35px, 4vw, 50px);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1;
}

h3 {
  margin-bottom: 12px;
  font-size: 21px;
  line-height: 1.25;
}

.hero-copy,
.page-hero > p,
.section-copy {
  max-width: 700px;
  color: var(--muted);
  font-size: 18px;
}

.hero-copy {
  max-width: 620px;
  font-size: clamp(18px, 2vw, 21px);
}

.hero-copy > span {
  display: block;
}

.hero-speed-copy {
  margin-top: 6px;
  color: var(--text);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
}

.button-primary {
  background: var(--blue);
  color: #061017;
  box-shadow: 0 8px 26px rgba(35, 166, 213, 0.18);
}

.button-primary:hover:not(:disabled) {
  background: #43b7df;
}

.button-light {
  border-color: rgba(255, 255, 255, 0.82);
  background: #f4f7fb;
  color: #09111b;
  box-shadow: 0 8px 26px rgba(244, 247, 251, 0.12);
}

.button-light:hover:not(:disabled) {
  background: #ffffff;
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.button-danger {
  border-color: rgba(255, 116, 99, 0.42);
  background: transparent;
  color: var(--danger);
}

.button-small {
  min-height: 44px;
  padding: 8px 14px;
}

.button-wide {
  width: 100%;
}

.hero-note,
.fine-print {
  margin-top: 18px;
  color: var(--quiet);
  font-size: 13px;
}

.home-hero {
  min-height: 0;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-items: start;
  gap: 52px;
  padding-block: 28px 52px;
}

.home-hero h1 {
  font-size: clamp(54px, 6.5vw, 88px);
}

.hero-race-week {
  min-width: 0;
}

.hero-race-stack {
  display: grid;
  gap: 12px;
}

.home-hero .race-card {
  padding: 17px 20px;
}

.home-hero .race-card h3 {
  margin-bottom: 0;
  font-size: 19px;
}

.home-hero .race-card .series-label {
  color: var(--blue);
}

.home-hero .race-details {
  margin-block: 10px 12px;
  padding-block: 9px;
}

.hero-visual {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(35, 166, 213, 0.08), transparent 45%),
    var(--panel);
  box-shadow: var(--shadow);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0 40%, var(--ember) 40% 72%, var(--gold) 72%);
}

.telemetry-grid {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom right, black, transparent 75%);
}

.track-orbit {
  position: absolute;
  border: 2px solid rgba(35, 166, 213, 0.48);
  border-radius: 52% 48% 62% 38% / 38% 56% 44% 62%;
  transform: rotate(-18deg);
}

.orbit-one {
  width: 310px;
  height: 190px;
  top: 86px;
  left: 72px;
  box-shadow: 0 0 40px rgba(35, 166, 213, 0.10);
}

.orbit-two {
  width: 248px;
  height: 142px;
  top: 112px;
  left: 103px;
  border-color: rgba(255, 90, 61, 0.35);
}

.pit-board {
  position: absolute;
  right: 28px;
  bottom: 28px;
  min-width: 152px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(9, 12, 18, 0.86);
  box-shadow: var(--shadow);
  font-family: var(--display);
}

.pit-board span,
.pit-board small {
  display: block;
  color: var(--muted);
  letter-spacing: 0.14em;
}

.pit-board strong {
  display: block;
  color: var(--text);
  font-size: 72px;
  line-height: 0.9;
}

.content-section {
  padding-block: 74px;
}

.surface-section {
  position: relative;
}

.surface-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc((100vw - 100%) / -2);
  border-block: 1px solid rgba(182, 192, 206, 0.08);
  background: rgba(18, 24, 34, 0.52);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-bottom: 8px;
}

.section-copy {
  margin-bottom: 0;
}

.rumblegrid-mark {
  display: inline;
  color: #6dc8e9;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.rumblegrid-mark sup {
  position: relative;
  top: -0.35em;
  margin-left: 2px;
  font-family: var(--body);
  font-size: 0.34em;
  font-weight: 700;
  letter-spacing: 0;
}

.rumblegrid-section {
  position: relative;
}

.rumblegrid-section::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 24px -28px;
  border: 1px solid rgba(35, 166, 213, 0.20);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 12%, rgba(35, 166, 213, 0.12), transparent 30rem),
    linear-gradient(135deg, rgba(24, 34, 48, 0.88), rgba(9, 12, 18, 0.92));
}

.rumblegrid-intro,
.rumblegrid-lab-header,
.rumblegrid-principle {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.rumblegrid-intro {
  margin-bottom: 30px;
}

.rumblegrid-intro h2,
.rumblegrid-lab-header h2 {
  max-width: 850px;
}

.rumblegrid-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
}

.rumblegrid-step {
  min-height: 220px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(18, 24, 34, 0.88);
}

.rumblegrid-step-featured {
  border-color: rgba(35, 166, 213, 0.42);
  background:
    linear-gradient(145deg, rgba(35, 166, 213, 0.14), transparent 65%),
    var(--raised);
  box-shadow: 0 16px 42px rgba(35, 166, 213, 0.10);
}

.rumblegrid-step-number {
  display: block;
  margin-bottom: 30px;
  color: var(--quiet);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.rumblegrid-step p,
.rumblegrid-category p,
.rumblegrid-principle p {
  margin-bottom: 0;
  color: var(--muted);
}

.rumblegrid-flow-arrow {
  align-self: center;
  color: var(--blue);
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
}

.rumblegrid-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border: 1px solid rgba(35, 166, 213, 0.42);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.rumblegrid-badge .rumblegrid-mark {
  font-family: var(--body);
  letter-spacing: 0;
}

.rumblegrid-badge-active {
  border-color: rgba(35, 166, 213, 0.58);
  background: rgba(35, 166, 213, 0.1);
  color: var(--blue);
}

.rumblegrid-badge-inactive {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

.overview-forecast-variants {
  min-height: 292px;
}


.race-week-edge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(35, 166, 213, 0.38);
  border-radius: var(--radius);
  background:
    linear-gradient(105deg, rgba(35, 166, 213, 0.15), rgba(35, 166, 213, 0.03) 55%, rgba(255, 90, 61, 0.06)),
    var(--panel);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
}

.race-week-edge-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(109, 200, 233, 0.62);
  border-radius: 50%;
  color: #081018;
  background: #6dc8e9;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 28px rgba(35, 166, 213, 0.22);
}

.race-week-edge-copy h3 {
  margin: 4px 0 5px;
  font-size: clamp(21px, 2vw, 27px);
}

.race-week-edge-copy p {
  max-width: 940px;
  margin: 0;
  color: var(--muted);
}

.rumblegrid-flow-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.rumblegrid-flow-compact .rumblegrid-step {
  min-height: 0;
  padding: 15px;
  background: var(--raised);
}

.rumblegrid-flow-compact .rumblegrid-step-number,
.rumblegrid-flow-compact .rumblegrid-flow-arrow {
  display: none;
}

.rumblegrid-flow-compact h3 {
  font-size: 17px;
}

.rumblegrid-flow-compact p {
  font-size: 13px;
  line-height: 1.5;
}

.rumblegrid-lab-header {
  margin-bottom: 30px;
}

.rumblegrid-category-grid {
  margin-top: 22px;
}

.rumblegrid-category {
  min-height: 280px;
  padding: 22px;
}

.rumblegrid-category h3 {
  margin-top: 22px;
}

.rumblegrid-principle {
  margin-top: 22px;
  padding: 30px;
  border-color: rgba(35, 166, 213, 0.30);
  background:
    linear-gradient(100deg, rgba(35, 166, 213, 0.10), rgba(255, 90, 61, 0.04)),
    var(--panel);
}

.rumblegrid-principle > div {
  max-width: 760px;
}

.rumblegrid-principle h3 {
  margin-top: 8px;
}

.trademark-notice {
  margin-top: 10px !important;
  color: var(--quiet) !important;
  font-size: 12px !important;
}

.trademark-notice .rumblegrid-mark {
  color: var(--muted);
  font-family: var(--body);
  font-size: inherit;
  letter-spacing: 0;
}

.grid {
  display: grid;
  gap: 18px;
}

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

.grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.race-card,
.metric-card,
.explore-card,
.featured-forecast,
.quick-links-card,
.type-specimen,
.account-card {
  padding: 24px;
}

.race-card::before,
.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--blue);
}

.race-card.series-nascar::before,
.metric-card.tone-gold::before { background: var(--gold); }
.race-card.series-f1::before,
.metric-card.tone-red::before { background: var(--red); }

.race-card-header,
.card-topline,
.pricing-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.series-label,
.specimen-label {
  color: var(--quiet);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.status-pill {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  flex: none;
  padding: 4px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.status-blue { border-color: rgba(35, 166, 213, 0.45); color: #6dc8e9; }
.status-gold { border-color: rgba(244, 197, 66, 0.45); color: var(--gold); }
.status-red { border-color: rgba(225, 6, 0, 0.52); color: #ff756f; }

.race-placeholder,
.empty-state {
  min-height: 126px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block: 22px;
  padding: 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--muted);
}

.race-placeholder p,
.empty-state p {
  margin-bottom: 0;
}

.race-details {
  margin-block: 16px 18px;
  padding-block: 15px;
  border-block: 1px solid var(--line);
}

.race-details p {
  margin-bottom: 0;
}

.race-venue {
  color: var(--text);
  font-weight: 700;
}

.race-time {
  margin-top: 4px !important;
  color: var(--muted);
  font-size: 14px;
}

.placeholder-title {
  color: var(--text);
  font-weight: 700;
}

.icon-mark {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--raised);
  color: var(--blue);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
}

.track-mark {
  min-width: 54px;
  height: 54px;
  border-radius: 50%;
  font-size: 28px;
}

.text-action {
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
}

.metric-value {
  margin: 12px 0 8px;
  font-size: 58px;
  font-weight: 700;
  line-height: 0.9;
}

.card-copy,
.explore-card p,
.type-specimen > p:last-child,
.account-card > p {
  color: var(--muted);
}

.explore-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.explore-card h3 {
  margin-top: 22px;
}

.explore-card .text-action {
  margin-top: auto;
}

.scorecard-preview {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.scorecard-summary,
.scorecard-metrics {
  padding: 28px;
}

.scorecard-summary h3 {
  margin-top: 18px;
}

.scorecard-summary p {
  margin-bottom: 0;
  color: var(--muted);
}

.scorecard-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.scorecard-metrics div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  background: var(--raised);
}

.scorecard-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.scorecard-metrics strong {
  font-size: 38px;
}

.membership-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-block: 44px 100px;
  padding: 36px;
  border: 1px solid rgba(35, 166, 213, 0.28);
  border-radius: 20px;
  background:
    linear-gradient(100deg, rgba(35, 166, 213, 0.11), rgba(255, 90, 61, 0.05)),
    var(--panel);
}

.membership-cta h2 {
  margin-bottom: 8px;
}

.membership-cta p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

.page-hero {
  padding-block: 82px 48px;
}

.compact-hero h1 {
  margin-bottom: 14px;
  font-size: clamp(54px, 7vw, 86px);
}

.compact-hero > .status-pill {
  margin-top: 10px;
}

.secondary-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  scrollbar-width: thin;
}

.series-navigation-shell {
  position: relative;
  width: min(calc(100% - 40px), var(--content));
  margin-inline: auto;
}

.series-page > .series-navigation-shell,
.route-page[data-view="lab"] > .secondary-nav {
  position: sticky;
  z-index: 90;
  top: 80px;
  margin-top: 12px;
}

.series-primary-nav {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: visible;
  margin: 0;
  background: rgba(17, 24, 34, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.series-primary-link {
  width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.series-nav-label-mobile {
  display: none;
}

.series-explore-chevron {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  transition: transform 160ms ease;
}

.series-explore-toggle[aria-expanded="true"] .series-explore-chevron {
  transform: rotate(45deg);
}

.series-explore-menu {
  position: absolute;
  z-index: 95;
  top: calc(100% + 8px);
  right: 0;
  width: min(460px, calc(100vw - 40px));
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(24, 34, 48, 0.985);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.series-explore-menu[hidden] {
  display: none !important;
}

.series-explore-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.series-explore-heading {
  grid-column: 1 / -1;
  margin: 0 4px 2px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

.series-explore-heading-lab {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.series-explore-link {
  min-width: 0;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
}

.series-explore-link:hover,
.series-explore-link.active {
  border-color: var(--line-strong);
  background: var(--raised-2);
}

.series-explore-link span,
.series-explore-link small {
  display: block;
}

.series-explore-link span {
  font-size: 14px;
  font-weight: 800;
}

.series-explore-link small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.secondary-link {
  min-height: 38px;
  flex: none;
  padding: 6px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.secondary-link.active {
  background: var(--raised);
  color: var(--text);
  box-shadow: inset 0 -2px var(--blue);
}

.secondary-link:not(:disabled) {
  cursor: pointer;
}

.secondary-link:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.lab-tab-panel[hidden] {
  display: none !important;
}

.lab-secondary-nav .secondary-link {
  flex: 1 1 0;
  text-align: center;
}

.lab-navigation-shell {
  position: sticky;
  z-index: 90;
  top: 80px;
  width: min(calc(100% - 40px), var(--content));
  margin: 12px auto 0;
}

.lab-secondary-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  overflow: visible;
  margin: 0;
  background: rgba(17, 24, 34, 0.96);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.lab-workspace-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.lab-menu-chevron {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  transition: transform 160ms ease;
}

.lab-workspace-menu-toggle[aria-expanded="true"] .lab-menu-chevron {
  transform: rotate(45deg);
}

.lab-workspace-menu {
  position: absolute;
  z-index: 95;
  top: calc(100% + 8px);
  width: min(460px, 100%);
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(24, 34, 48, 0.985);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.lab-workspace-menu[hidden] {
  display: none !important;
}

.lab-workspace-menu-nascar {
  left: 16.666%;
}

.lab-workspace-menu-f1 {
  right: 0;
}

.lab-workspace-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lab-workspace-menu-heading {
  grid-column: 1 / -1;
  margin: 0 4px 2px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.2;
}

.lab-workspace-research-heading {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.lab-workspace-menu-link {
  min-width: 0;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.lab-workspace-menu-link:hover,
.lab-workspace-menu-link.active {
  border-color: var(--line-strong);
  background: var(--raised-2);
}

.lab-workspace-menu-link span,
.lab-workspace-menu-link small {
  display: block;
}

.lab-workspace-menu-link span {
  font-size: 14px;
  font-weight: 800;
}

.lab-workspace-menu-link small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.lab-workspace-menu-nascar .lab-workspace-menu-link:hover {
  border-color: rgba(255, 202, 58, 0.55);
}

.lab-workspace-menu-f1 .lab-workspace-menu-link:hover {
  border-color: rgba(255, 90, 61, 0.58);
}

.lab-workspace-hero {
  padding-bottom: 28px;
}

.lab-workspace-shell {
  min-height: 260px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
}

.lab-workspace-shell h2 {
  margin: 8px 0;
}

.lab-workspace-shell p {
  max-width: 720px;
  margin: 0;
}

.lab-series-host-panel,
.lab-series-host {
  min-width: 0;
}

.lab-series-host > .series-tab-panel {
  display: block;
}

.series-tab-panel[hidden] {
  display: none !important;
}

.series-page-nascar .eyebrow,
.series-page-nascar .text-action { color: var(--gold); }
.series-page-nascar .secondary-link.active { box-shadow: inset 0 -2px var(--gold); }
.series-page-f1 .eyebrow,
.series-page-f1 .text-action { color: #ff756f; }
.series-page-f1 .secondary-link.active { box-shadow: inset 0 -2px var(--red); }

.series-layout {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.7fr);
}

.series-news-section {
  padding-top: 42px;
}

.news-refresh-button {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 100ms ease;
}

.news-refresh-button:hover:not(:disabled),
.news-refresh-button:focus-visible {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--text);
}

.series-page-nascar .news-refresh-button:hover:not(:disabled),
.series-page-nascar .news-refresh-button:focus-visible {
  border-color: var(--gold);
  background: rgba(244, 197, 66, 0.1);
}

.news-refresh-button:active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

.news-refresh-button-loading {
  cursor: wait;
  opacity: 0.78;
}

.news-refresh-button-complete {
  border-color: #57d68d;
  color: #57d68d;
}

.series-news-title-mobile {
  display: none;
}

.series-news-column-header,
.series-news-refresh-status,
.series-news-driver-line {
  display: flex;
  align-items: center;
}

.series-news-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.series-news-wire-card {
  min-width: 0;
  padding: 0;
  overflow: hidden;
}

.series-news-column-header {
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 15px;
  border-bottom: 1px solid var(--line);
}

.series-news-column-header h3 {
  margin: 5px 0 0;
  font-size: 25px;
}

.series-news-column-header > a {
  flex: none;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.series-page-nascar .series-news-column-header > a,
.series-page-nascar .series-news-headline > a,
.series-page-nascar .series-news-driver-name {
  color: var(--gold);
}

.series-news-refresh-status {
  gap: 7px;
  min-height: 38px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.series-news-refresh-status strong {
  color: var(--text);
}

.series-news-status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #57d68d;
  box-shadow: 0 0 0 5px rgba(87, 214, 141, 0.09);
}

.series-news-refresh-warning .series-news-status-dot {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(244, 197, 66, 0.08);
}

.series-news-refresh-loading .series-news-status-dot {
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.series-news-headlines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.series-news-output-shell > .shiny-html-output:empty::before,
.series-news-output-shell > .shiny-html-output.recalculating::before {
  content: "\231B  Loading headlines...";
  display: block;
  padding: 24px 20px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.02em;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

.series-news-headline {
  padding: 14px 20px 15px;
  border-bottom: 1px solid var(--line);
}

.series-news-headline:last-child {
  border-bottom: 0;
}

.series-news-headline > a {
  display: block;
  color: #7fd7f6;
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.series-news-headline > a:hover,
.series-news-driver-name:hover,
.series-news-column-header > a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.series-news-headline-meta {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.series-news-driver-update {
  padding-block: 13px;
}

.series-news-driver-line {
  flex-wrap: wrap;
  gap: 5px 8px;
  line-height: 1.25;
}

.series-news-driver-name {
  color: #7fd7f6;
  font-size: 14px;
  font-weight: 800;
}

.series-news-driver-line span {
  color: var(--text);
  font-family: var(--display);
  font-size: 17px;
  font-weight: 700;
}

.series-news-driver-snippet {
  margin: 7px 0 0;
  color: #c3cad5;
  font-size: 12px;
  line-height: 1.45;
}

.series-news-empty {
  padding: 28px 20px;
}

.series-news-empty h3 {
  margin-bottom: 8px;
}

.series-news-empty p {
  color: var(--muted);
  font-size: 12px;
}

.series-news-more {
  display: flex;
  justify-content: center;
  min-height: 42px;
  padding: 16px 20px 18px;
  border-top: 1px solid var(--line);
  background: rgba(9, 12, 18, 0.22);
}

.series-news-more .button {
  width: 100%;
  min-width: 0;
}

.series-news-more p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.quick-links-card {
  display: flex;
  flex-direction: column;
}

.quick-links-card button {
  min-height: 48px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.laboratory-shortcuts {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.laboratory-shortcuts h3 {
  margin-bottom: 8px;
}

.series-overview-hero {
  padding-block: 20px 12px;
}

.series-overview-hero h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 3.5vw, 46px);
}

.series-overview-hero > p {
  max-width: 880px;
  margin-bottom: 0;
}

.series-page .series-tab-panel[data-series-panel="overview"] > .content-section {
  padding-top: 22px;
  padding-bottom: 54px;
}

.series-page .series-tab-panel:not([data-series-panel="overview"]) > .content-section {
  padding-top: 20px;
}

/* Give every series destination the same title hierarchy as Overview. */
.series-page .series-tab-panel > .content-section:first-child > .section-heading:first-child h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 3.5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.86;
  text-transform: uppercase;
}

.series-page .series-tab-panel > .content-section:first-child > .section-heading:first-child .eyebrow {
  margin-bottom: 0;
  font-size: 18px;
}

.series-page .series-tab-panel > .lab-workspace-hero:first-child {
  padding-block: 20px 12px;
}

.series-page .series-tab-panel > .lab-workspace-hero:first-child h1 {
  font-size: clamp(32px, 3.5vw, 46px);
}

.series-page .series-tab-panel > .lab-workspace-hero:first-child > .eyebrow {
  margin-bottom: 0;
}

.lab-page .lab-tab-panel > .lab-workspace-hero:first-child {
  padding-block: 20px 12px;
}

.lab-page .lab-tab-panel > .lab-workspace-hero:first-child h1 {
  font-size: clamp(32px, 3.5vw, 46px);
}

.lab-page .lab-tab-panel > .lab-workspace-hero:first-child > .eyebrow {
  margin-bottom: 0;
}

.lab-page .lab-tab-panel > .page-hero:first-child {
  padding-top: 20px;
}

.lab-page .lab-tab-panel > .content-section:first-child {
  padding-top: 20px;
}

.lab-overview-hero {
  padding-bottom: 10px !important;
}

.lab-overview-hero > p {
  max-width: none;
  font-size: 17px;
  white-space: nowrap;
}

.lab-overview-section {
  padding-top: 10px !important;
}

.lab-overview-card {
  min-height: 230px;
  padding: 22px;
}

.lab-overview-card h3 {
  margin-top: 0;
}

.lab-overview-card > p {
  font-size: 14px;
  line-height: 1.55;
}

.lab-overview-links {
  display: grid;
  gap: 2px;
  width: 100%;
  margin-top: auto;
}

.lab-overview-link {
  min-height: 34px;
  padding: 3px 0;
  text-align: left;
}

@media (max-width: 760px) {
  .lab-overview-hero > p {
    white-space: normal;
  }
}

.series-page .series-tab-panel > .page-hero:first-child {
  padding-top: 20px;
}

.forecast-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 18px;
}

.forecast-mode-row .form-group,
.forecast-mode-row .shiny-options-group {
  margin: 0;
}

.forecast-mode-row .radio-inline,
.published-betting-mode-row .radio-inline {
  margin: 0 8px 0 0;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--raised);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.forecast-mode-row .radio-inline input,
.published-betting-mode-row .radio-inline input {
  margin-right: 6px;
  transform: scale(.85);
  transform-origin: center;
}

.forecast-signal-link {
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(244, 197, 66, 0.42);
  border-radius: 9px;
  background: rgba(244, 197, 66, 0.08);
  color: var(--gold);
  font-weight: 800;
}

.published-forecast-context {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.published-forecast-context h3 {
  margin: 5px 0 3px;
}

.published-forecast-context p,
.forecast-disclaimer,
.forecast-published-at {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.published-betting-board {
  display: grid;
  gap: 18px;
}

.published-betting-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.published-betting-mode-row .form-group,
.published-betting-mode-row .shiny-options-group {
  margin: 0;
}

.published-betting-context,
.published-betting-market-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.published-betting-context h3,
.published-betting-market-header h3 {
  margin: 4px 0 2px;
}

.published-betting-context p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.published-betting-market {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}

.published-betting-stage {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.published-betting-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 13px;
}

.published-betting-pick {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--raised);
}

.published-betting-role-most_likely {
  border-color: rgba(244, 197, 66, .48);
  box-shadow: inset 0 3px var(--gold);
}

.published-betting-role-actionable_value {
  border-color: rgba(56, 178, 122, .5);
  box-shadow: inset 0 3px var(--green);
}

.published-betting-role-speculative_long_shot {
  border-color: rgba(35, 166, 213, .48);
  box-shadow: inset 0 3px var(--blue);
}

.published-betting-role-no_play {
  border-color: rgba(174, 184, 199, .34);
}

.published-betting-role {
  color: var(--gold);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.published-betting-role-stack {
  display: grid;
  gap: 0;
}

.published-betting-pick-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.published-betting-unit-pill {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(35, 166, 213, .48);
  border-radius: 999px;
  background: rgba(35, 166, 213, .1);
  color: var(--blue);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1;
  text-transform: uppercase;
}

.published-betting-role-stack .published-betting-role + .published-betting-role {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.published-betting-role-label-actionable_value { color: var(--green); }
.published-betting-role-label-speculative_long_shot { color: var(--blue); }
.published-betting-role-label-no_play { color: var(--muted); }

.published-betting-pick h4 {
  margin: 6px 0 5px;
  font-size: 22px;
}

.published-betting-matchup-opponent {
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.published-betting-note {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.published-betting-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.published-betting-metrics span {
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  font-weight: 800;
}

.published-betting-metrics small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .07em;
}

.published-betting-odds {
  margin: 11px 0 0;
  color: var(--text-muted);
  font-size: 11px;
}

.published-betting-market .forecast-published-at {
  margin-top: 10px;
}

.published-podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.published-podium-pick {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--raised);
}

.published-podium-p1 {
  border-color: rgba(244, 197, 66, 0.5);
  box-shadow: inset 0 3px var(--gold);
}

.published-podium-position {
  color: var(--gold);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.published-podium-pick h4 {
  margin: 5px 0 2px;
  font-size: 22px;
}

.published-podium-pick > p {
  min-height: 32px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.published-podium-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.published-podium-metrics-single {
  grid-template-columns: minmax(0, 1fr);
}

.published-podium-selection .published-podium-position {
  color: var(--blue);
}

.series-page-f1 .published-podium-selection .published-podium-position {
  color: #ff756f;
}

.published-podium-metrics span {
  color: var(--text);
  font-weight: 800;
}

.published-podium-market {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.published-podium-metrics small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .08em;
}

.forecast-disclaimer {
  margin-top: 13px;
  color: var(--text);
}

.forecast-published-at {
  margin-top: 4px;
}

.rumblegrid-overview-details {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.rumblegrid-overview-details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.rumblegrid-overview-details p {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
}

.feed-explorer-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.62fr) minmax(0, 2.15fr);
  gap: 18px;
  align-items: start;
}

.feed-catalog-card {
  position: sticky;
  top: 92px;
}

.feed-card-heading h3 {
  margin-top: 8px;
}

.feed-catalog-card .form-group,
.feed-detail-card .form-group {
  margin-bottom: 16px;
}

.feed-catalog-card label,
.feed-detail-card label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.feed-catalog-card .form-control,
.feed-detail-card .form-control,
.feed-catalog-card .selectize-input,
.feed-detail-card .selectize-input,
.feed-catalog-card .selectize-dropdown,
.feed-detail-card .selectize-dropdown {
  border-color: var(--line-strong);
  background: var(--raised);
  color: var(--text);
}

.feed-catalog-card .selectize-dropdown-content,
.feed-detail-card .selectize-dropdown-content {
  max-height: 420px;
}

.feed-catalog-card .optgroup-header,
.feed-detail-card .optgroup-header {
  padding: 10px 12px 6px;
  background: #101722;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feed-catalog-card .option,
.feed-detail-card .option {
  padding: 9px 12px;
}

.feed-catalog-card .option.active,
.feed-detail-card .option.active {
  background: var(--blue-soft);
  color: var(--text);
}

.feed-help,
.feed-scope-note p,
.feed-path {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.feed-scope-note strong {
  color: var(--text);
}

.feed-endpoint-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.feed-endpoint-header h3 {
  margin: 8px 0;
  font-size: 34px;
}

.feed-endpoint-header code {
  color: var(--blue);
}

.feed-path {
  max-width: 78ch;
  margin: 10px 0 0;
  overflow-wrap: anywhere;
}

.feed-endpoint-stats {
  min-width: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.feed-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 18px;
  margin-block: 24px;
}

.feed-control-block {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.feed-control-block h4 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 23px;
}

.feed-inline-actions {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.feed-inline-actions .form-group {
  margin: 0;
}

.button-small {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 13px;
}

.button-quiet {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--muted);
}

.feed-empty-note {
  margin-top: 14px;
  padding: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
}

.feed-empty-note p {
  margin: 4px 0 0;
  font-size: 13px;
}

.feed-table-section {
  padding-top: 8px;
}

.feed-table-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.feed-table-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.feed-pagination {
  display: flex;
  gap: 8px;
}

.feed-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.feed-table-scroll .table {
  width: max-content;
  min-width: 100%;
  margin: 0;
  border-collapse: collapse;
  background: #0e141d;
  color: var(--text);
  font-size: 12px;
}

.feed-table-scroll .table th,
.feed-table-scroll .table td {
  max-width: 340px;
  padding: 9px 11px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
  vertical-align: top;
  white-space: normal;
}

.feed-table-scroll .table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--raised-2);
  color: var(--text);
  font-weight: 700;
}

.feed-table-scroll .table-striped > tbody > tr:nth-of-type(odd) {
  background: rgba(255, 255, 255, 0.022);
}

.feed-field-list,
.feed-request-log,
.feed-raw-preview {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.012);
}

.feed-field-list summary,
.feed-request-log summary,
.feed-raw-preview summary {
  min-height: 44px;
  padding: 12px 14px;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.feed-field-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 14px 14px;
}

.feed-field-chips code {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--raised);
  color: var(--blue);
  font-size: 11px;
}

.feed-request-log .feed-table-scroll {
  margin: 0 12px 12px;
}

.feed-raw-preview pre {
  max-height: 620px;
  margin: 0 12px 12px;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #070a0f;
  color: #cce8f3;
  font-size: 11px;
  white-space: pre;
}

.simple-feed-section {
  padding-top: 42px;
}

.simple-feed-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1.35fr) minmax(240px, 1fr) 150px;
  gap: 14px;
  align-items: end;
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.simple-feed-controls .form-group {
  margin: 0;
}

.simple-feed-controls label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.simple-feed-controls .form-control,
.simple-feed-controls .selectize-input,
.simple-feed-controls .selectize-dropdown {
  border-color: var(--line-strong);
  background: var(--raised);
  color: var(--text);
}

.simple-feed-controls .selectize-dropdown-content {
  max-height: 430px;
}

.simple-feed-controls .optgroup-header {
  padding: 10px 12px 6px;
  background: #101722;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.simple-feed-controls .option {
  padding: 9px 12px;
}

.simple-feed-controls .option.active {
  background: var(--blue-soft);
  color: var(--text);
}

.simple-feed-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin: 0 0 14px;
  color: var(--quiet);
  font-size: 12px;
}

.simple-feed-status strong {
  color: var(--text);
}

.simple-feed-status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(244, 197, 66, 0.08);
}

.simple-feed-status-good .simple-feed-status-dot {
  background: #57d68d;
  box-shadow: 0 0 0 5px rgba(87, 214, 141, 0.09);
}

.simple-feed-status-bad .simple-feed-status-dot {
  background: #ff756f;
  box-shadow: 0 0 0 5px rgba(255, 117, 111, 0.09);
}

.simple-feed-card {
  padding: 20px;
}

.simple-feed-heading {
  margin-bottom: 16px;
}

.simple-feed-heading h3 {
  margin: 6px 0 3px;
}

.simple-feed-heading .feed-card-subtitle {
  max-width: 84ch;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.simple-feed-note {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  background: rgba(244, 197, 66, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.simple-feed-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}

.simple-feed-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.simple-feed-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.simple-feed-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.simple-feed-table-wrap .table {
  width: max-content;
  min-width: 100%;
  margin: 0;
  border-collapse: collapse;
  background: #0e141d;
  color: var(--text);
  font-size: 13px;
}

.simple-feed-table-wrap .table th,
.simple-feed-table-wrap .table td {
  width: auto;
  min-width: max-content;
  max-width: none;
  padding: 10px 13px !important;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  background: transparent !important;
  color: inherit !important;
  overflow-wrap: normal;
  text-align: left !important;
  vertical-align: middle;
  white-space: nowrap;
  word-break: normal;
}

.simple-feed-table-wrap .table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--raised-2) !important;
  color: var(--text) !important;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: none;
}

.simple-feed-table-wrap .table tbody tr:hover {
  background: rgba(255, 255, 255, 0.028);
}

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

.display-sample {
  margin: 22px 0 14px;
  font-family: var(--display);
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.9;
}

.body-sample {
  max-width: 34ch;
  margin: 22px 0 14px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.55;
}

.token-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.color-token {
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.swatch {
  grid-row: 1 / 3;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
}

.color-token code {
  color: var(--muted);
  font-size: 13px;
}

.token-page { background: var(--page); }
.token-panel { background: var(--panel); }
.token-raised { background: var(--raised); }
.token-text { background: var(--text); }
.token-blue { background: var(--blue); }
.token-ember { background: var(--ember); }
.token-gold { background: var(--gold); }
.token-red { background: var(--red); }

.narrow-section {
  max-width: 760px;
}

.pricing-card {
  padding: 34px;
}

.price-placeholder {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.price-placeholder strong {
  font-size: 62px;
  line-height: 0.9;
}

.price-placeholder span,
.pricing-lead {
  color: var(--muted);
}

.feature-list {
  display: grid;
  gap: 12px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-list .icon-mark {
  min-width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--green);
  font-size: 15px;
}

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

.account-card {
  min-height: 300px;
}

.account-card h2 {
  font-size: 30px;
}

.account-card dl {
  margin: 24px 0;
}

.account-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.account-card dt {
  color: var(--muted);
}

.account-card dd {
  margin: 0;
  font-weight: 700;
}

.cancel-card {
  border-color: rgba(255, 116, 99, 0.25);
}

.account-page {
  --account-accent: #25b7d3;
}

.account-page section[id] {
  scroll-margin-top: 94px;
}

.account-hero {
  padding-top: 38px;
  padding-bottom: 46px;
}

.account-hero h1 {
  max-width: 760px;
  font-size: clamp(50px, 6vw, 82px);
}

.account-launch-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.account-launch-copy > p:not(.eyebrow) {
  max-width: 860px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.6;
}

.account-hero-actions,
.account-trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.account-hero-actions {
  gap: 12px;
  margin-top: 28px;
}

.account-trust-row {
  gap: 10px 24px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.account-trust-row span {
  position: relative;
  padding-left: 19px;
}

.account-trust-row span::before {
  content: "";
  position: absolute;
  top: 0.46em;
  left: 0;
  width: 8px;
  height: 8px;
  border: 2px solid var(--account-accent);
  border-radius: 50%;
}

.account-launch-card {
  padding: clamp(22px, 3vw, 30px);
  border-top: 3px solid var(--account-accent);
  background: linear-gradient(145deg, rgba(37, 183, 211, 0.10), var(--panel) 42%);
}

.account-launch-price-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.account-launch-price-row h2 {
  margin: 7px 0 0;
  font-size: clamp(30px, 3.2vw, 42px);
}

.account-launch-card > p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.account-launch-card .account-free-price {
  flex: none;
  font-size: clamp(58px, 6vw, 78px);
}

.account-launch-card .account-form-preview {
  margin-top: 20px;
}

.account-free-section {
  padding-top: 0;
  padding-bottom: 24px;
}

.account-free-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border: 1px solid rgba(37, 183, 211, 0.42);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 50%, rgba(37, 183, 211, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(37, 183, 211, 0.10), rgba(255, 255, 255, 0.018));
}

.account-free-banner h2 {
  margin: 7px 0 8px;
}

.account-free-banner p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
}

.account-free-price {
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(60px, 8vw, 96px);
  line-height: 0.8;
}

.account-plans-section {
  padding-top: 46px;
  padding-bottom: 38px;
}

.account-section-heading {
  align-items: end;
}

.account-billing-switch {
  display: inline-flex;
  flex: none;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--panel);
}

.account-cycle-option {
  cursor: pointer;
}

.account-cycle-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.account-cycle-option span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-cycle-option.active span,
.account-cycle-option input:focus-visible + span {
  background: var(--raised-2);
  color: var(--text);
  box-shadow: inset 0 -2px var(--account-accent);
}

.account-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.account-plan-card {
  min-height: 500px;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-top: 3px solid var(--account-accent);
}

.account-plan-nascar {
  border-top-color: var(--gold);
}

.account-plan-f1 {
  border-top-color: var(--red);
}

.account-plan-featured {
  border-color: rgba(37, 183, 211, 0.52);
  background: linear-gradient(180deg, rgba(37, 183, 211, 0.09), var(--panel) 34%);
}

.account-plan-badge {
  align-self: flex-start;
  margin: -12px 0 18px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--account-accent);
  color: #061118;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.account-plan-heading h3 {
  margin: 7px 0 0;
  font-size: 34px;
}

.account-plan-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 27px;
}

.account-plan-price strong {
  font-family: var(--display);
  font-size: clamp(48px, 5vw, 64px);
  line-height: 0.9;
}

.account-plan-price span,
.account-plan-followup,
.account-renewal-note {
  color: var(--muted);
}

.account-plan-followup {
  min-height: 42px;
  margin: 11px 0 0;
  font-size: 13px;
}

.account-plan-features {
  display: grid;
  gap: 12px;
  margin: 26px 0 30px;
  padding: 0;
  list-style: none;
}

.account-plan-features li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.account-plan-features li::before {
  content: "";
  position: absolute;
  top: 0.48em;
  left: 1px;
  width: 8px;
  height: 4px;
  border-bottom: 2px solid var(--account-accent);
  border-left: 2px solid var(--account-accent);
  transform: rotate(-45deg);
}

.account-plan-card .button {
  margin-top: auto;
}

.account-renewal-note {
  max-width: 920px;
  margin: 18px auto 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.account-promo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.018);
}

.account-promo-card h3 {
  margin: 5px 0 0;
}

.account-promo-form {
  display: flex;
  align-items: center;
  gap: 9px;
}

.account-promo-form input,
.account-form-preview input {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  background: var(--raised);
  color: var(--text);
  font: inherit;
}

.account-promo-form input {
  width: min(250px, 42vw);
  padding: 9px 12px;
}

.account-promo-form input:focus {
  border-color: var(--account-accent);
  box-shadow: 0 0 0 3px rgba(37, 183, 211, 0.12);
}

.account-access-section {
  padding-block: clamp(2.4rem, 4vw, 4.5rem);
}

.account-access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.account-services-section {
  padding-block: clamp(2.4rem, 4vw, 4.5rem);
}

.account-service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.account-access-card,
.account-service-card {
  padding: 28px;
}

.account-access-card h2,
.account-service-card h3 {
  margin: 8px 0 12px;
}

.account-access-card > p,
.account-service-card p {
  color: var(--muted);
}

.account-form-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.account-form-preview label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.account-form-preview input {
  width: 100%;
  padding: 9px 12px;
  opacity: 0.72;
}

.account-form-preview .button {
  grid-column: 1 / -1;
}

.account-auth-loading {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.account-auth-loading[hidden],
.account-auth-signed-out[hidden],
.account-auth-signed-in[hidden],
.account-auth-form[hidden] {
  display: none !important;
}

.account-auth-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: var(--account-accent);
  border-radius: 50%;
  animation: account-spin 0.8s linear infinite;
}

@keyframes account-spin {
  to { transform: rotate(360deg); }
}

.account-auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 20px;
  padding: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(4, 9, 15, 0.45);
}

.account-auth-mode {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.account-auth-mode.active {
  background: var(--raised-2);
  color: var(--text);
  box-shadow: inset 0 -2px var(--account-accent);
}

.account-auth-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.account-auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.account-auth-form input[type="text"],
.account-auth-form input[type="email"],
.account-auth-form input[type="password"] {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  background: var(--raised);
  color: var(--text);
  font: inherit;
}

.account-auth-form input:focus {
  border-color: var(--account-accent);
  box-shadow: 0 0 0 3px rgba(37, 183, 211, 0.12);
}

.account-auth-form .button,
.account-marketing-choice,
.account-forgot-password {
  grid-column: 1 / -1;
}

.account-marketing-choice {
  grid-template-columns: 18px minmax(0, 1fr) !important;
  align-items: start;
  gap: 9px !important;
  line-height: 1.45;
  cursor: pointer;
}

.account-marketing-choice input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--account-accent);
}

.account-forgot-password {
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.account-auth-signed-in {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(37, 183, 211, 0.35);
  border-radius: 12px;
  background: rgba(37, 183, 211, 0.07);
}

.account-auth-signed-in h3 {
  margin: 6px 0 2px;
}

.account-auth-email {
  margin: 0 0 16px !important;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.account-membership-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 13px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  font-size: 13px;
}

.account-membership-summary span {
  color: var(--muted);
}

.account-marketing-preference {
  margin: 0 0 16px;
}

.account-recovery-form {
  grid-template-columns: 1fr;
  margin: 14px 0 16px;
}

.account-auth-status {
  min-height: 20px;
  margin: 13px 0 0 !important;
  font-size: 12px;
  font-weight: 700;
}

.account-auth-status[data-tone="success"] { color: #62d6a5; }
.account-auth-status[data-tone="error"] { color: #ff9b90; }

.account-auth-status[data-tone="verification"] {
  min-height: 0;
  margin-top: 16px !important;
  padding: 14px 16px;
  border: 1px solid rgba(37, 183, 211, 0.72);
  border-left: 4px solid var(--account-accent);
  border-radius: 10px;
  background: rgba(37, 183, 211, 0.16);
  color: #f2fcff;
  box-shadow: 0 10px 24px rgba(5, 18, 28, 0.24);
  font-size: 14px;
  line-height: 1.5;
}

.account-auth-status[data-tone="confirmed"] {
  min-height: 0;
  margin-top: 16px !important;
  padding: 14px 16px;
  border: 1px solid rgba(98, 214, 165, 0.72);
  border-left: 4px solid #62d6a5;
  border-radius: 10px;
  background: rgba(98, 214, 165, 0.13);
  color: #effff8;
  box-shadow: 0 10px 24px rgba(5, 18, 28, 0.24);
  font-size: 14px;
  line-height: 1.5;
}

.account-auth-form[data-awaiting-verification="true"] [data-auth-submit] {
  border-color: var(--account-accent);
  background: rgba(139, 151, 166, 0.18);
  color: #aeb9c6;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.account-service-stack {
  display: grid;
  gap: 18px;
}

.account-service-card {
  min-height: 0;
}

.account-service-card .button {
  margin-top: 8px;
}

.account-action-notice {
  position: fixed;
  z-index: 140;
  right: 24px;
  bottom: 24px;
  width: min(420px, calc(100% - 40px));
  padding: 14px 16px;
  border: 1px solid rgba(37, 183, 211, 0.5);
  border-radius: 11px;
  background: #152434;
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.45;
}

.account-action-notice[hidden] {
  display: none !important;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #070a0f;
}

.footer-inner {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 14px;
}

.footer-brand {
  color: var(--text) !important;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  color: var(--quiet);
  font-size: 13px;
}

.footer-links button {
  min-height: 44px;
  padding: 8px 4px;
  color: var(--muted);
}

.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 4px;
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 70px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  .hero-visual {
    min-height: 360px;
  }

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

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

  .metric-card:last-child {
    grid-column: 1 / -1;
  }

  .scorecard-preview,
  .series-layout,
  .feed-explorer-layout,
  .series-news-columns {
    grid-template-columns: 1fr;
  }

  .simple-feed-controls {
    grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.8fr);
  }

  .simple-feed-page-size {
    grid-column: 1 / -1;
    width: 150px;
  }

  .feed-catalog-card {
    position: static;
  }

  .rumblegrid-flow {
    grid-template-columns: 1fr;
  }

  .rumblegrid-flow-arrow {
    justify-self: center;
    transform: rotate(90deg);
  }

  .rumblegrid-flow-compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .global-nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 20px;
    left: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--raised);
    box-shadow: var(--shadow);
  }

  .global-nav.open {
    display: flex;
  }

  .nav-link {
    text-align: left;
  }

  .nav-link.account-link {
    margin: 4px 0 0;
  }

  .section-heading,
  .membership-cta,
  .rumblegrid-intro,
  .rumblegrid-lab-header,
  .rumblegrid-principle,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .membership-cta .button {
    width: 100%;
  }

  .rumblegrid-intro .button,
  .rumblegrid-principle .button {
    width: 100%;
  }

  .footer-inner {
    justify-content: center;
    padding-block: 40px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .content-section.series-news-section {
    padding-top: 26px;
  }

  .series-news-section .section-heading {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
  }

  .series-news-section .section-heading > div {
    min-width: 0;
  }

  .series-news-title-desktop {
    display: none;
  }

  .series-news-title-mobile {
    display: inline;
  }

  .series-news-section .section-heading h2 {
    margin: 0;
    font-size: 32px;
    line-height: 1;
  }

  .series-news-section .section-heading .button {
    flex: none;
  }

  .race-week-edge {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 14px;
    padding: 20px;
  }

  .header-inner,
  .footer-inner,
  .hero,
  .content-section,
  .membership-cta,
  .page-hero,
  .secondary-nav,
  .series-navigation-shell,
  .lab-navigation-shell {
    width: min(calc(100% - 28px), var(--content));
  }

  .series-page > .series-navigation-shell {
    top: 76px;
  }

  .series-primary-nav {
    width: 100%;
    gap: 4px;
    padding: 6px;
  }

  .series-primary-link {
    min-height: 38px;
    padding: 5px 3px;
    font-size: 12px;
    gap: 3px;
  }

  .series-nav-label-desktop {
    display: none;
  }

  .series-nav-label-mobile {
    display: inline;
  }

  .series-explore-chevron {
    width: 14px;
    height: 14px;
    font-size: 11px;
  }

  .series-explore-menu {
    right: 0;
    left: 0;
    width: 100%;
  }

  .lab-navigation-shell {
    top: 76px;
  }

  .lab-secondary-nav {
    gap: 4px;
    padding: 5px;
  }

  .lab-secondary-nav .secondary-link {
    min-height: 38px;
    padding: 5px 4px;
    font-size: 12px;
  }

  .lab-menu-chevron {
    width: 14px;
    height: 14px;
    font-size: 11px;
  }

  .lab-workspace-menu {
    right: 0;
    left: 0;
    width: 100%;
  }

  .hero {
    min-height: auto;
    gap: 36px;
    padding-block: 58px;
  }

  .home-hero h1 {
    font-size: 54px;
  }

  .home-hero {
    gap: 26px;
    padding-block: 24px 42px;
  }

  h1 {
    font-size: 58px;
  }

  h2 {
    font-size: 37px;
  }

  .hero-visual {
    min-height: 300px;
  }

  .orbit-one {
    left: 24px;
  }

  .orbit-two {
    left: 54px;
  }

  .content-section {
    padding-block: 54px;
  }

  .rumblegrid-section::before {
    inset: 16px -8px;
    border-radius: 20px;
  }

  .grid-two,
  .grid-three,
  .grid-four,
  .typography-grid,
  .token-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .feed-detail-grid {
    grid-template-columns: 1fr;
  }

  .feed-endpoint-header,
  .feed-table-toolbar,
  .feed-inline-actions,
  .simple-feed-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .simple-feed-controls {
    grid-template-columns: 1fr;
  }

  .simple-feed-page-size {
    grid-column: auto;
    width: 100%;
  }

  .simple-feed-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .feed-endpoint-stats {
    min-width: 0;
    align-items: flex-start;
  }

  .metric-card:last-child {
    grid-column: auto;
  }

  .scorecard-metrics {
    grid-template-columns: 1fr;
  }

  .membership-cta {
    margin-bottom: 70px;
    padding: 26px;
  }

  .race-card-header,
  .pricing-header {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Descriptive-statistics workspaces migrated from the standalone series apps. */
.research-section {
  padding-top: 38px;
}

.research-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.research-section-tracks .research-workspace {
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
}

.research-section-tracks {
  position: relative;
}

.track-loading-notice {
  position: absolute;
  top: 150px;
  left: 50%;
  z-index: 20;
  width: min(390px, calc(100% - 40px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(17, 23, 34, 0.97);
  box-shadow: var(--shadow);
  color: var(--text);
}

.track-loading-notice[hidden] {
  display: none !important;
}

.track-loading-notice strong,
.track-loading-notice span {
  display: block;
}

.track-loading-notice span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.track-loading-hourglass {
  flex: none;
  margin: 0 !important;
  color: var(--gold) !important;
  font-size: 25px !important;
  animation: track-hourglass-pulse 1.1s ease-in-out infinite;
}

.route-loading-shell {
  min-height: min(72vh, 680px);
  display: grid;
  place-items: center;
}

.route-loading-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(460px, calc(100vw - 40px));
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(12, 17, 27, 0.92);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.route-loading-notice strong,
.route-loading-notice span {
  display: block;
}

.route-loading-notice span:not(.route-loading-hourglass) {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.route-loading-hourglass {
  color: var(--gold);
  font-size: 28px;
  line-height: 1;
  animation: track-hourglass-pulse 1.1s ease-in-out infinite;
}

.series-page-f1 .track-loading-hourglass {
  color: var(--red) !important;
}

.track-data-loading .research-workspace {
  opacity: 0.38;
  pointer-events: none;
  transition: opacity 160ms ease;
}

@keyframes track-hourglass-pulse {
  0%, 100% { transform: scale(0.92); opacity: 0.55; }
  50% { transform: scale(1.08); opacity: 1; }
}

.research-sidebar {
  position: sticky;
  top: 172px;
  padding: 22px;
  overflow: visible;
}

.research-sidebar h3 {
  margin: 0 0 18px;
  font-size: 20px;
}

.research-sidebar .form-group {
  margin-bottom: 17px;
}

.research-sidebar label {
  display: block;
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.research-sidebar select {
  width: 100%;
  min-height: 44px;
  padding: 8px 34px 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--raised);
  font-size: 13px;
}

.research-sidebar .selectize-input,
.research-sidebar .selectize-input .item,
.research-sidebar .selectize-dropdown .option {
  white-space: nowrap;
}

.research-sidebar .selectize-input .item {
  max-width: calc(100% - 22px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.research-section-tracks .research-sidebar .selectize-input,
.research-section-tracks .research-sidebar .selectize-dropdown .option {
  font-size: 13px;
}

.research-section-profile .research-sidebar .selectize-input,
.research-section-profile .research-sidebar .selectize-dropdown .option {
  font-size: 13px;
}

.research-sidebar .selectize-dropdown-content {
  max-height: none !important;
  overflow: visible !important;
}

.research-sidebar .selectize-dropdown {
  max-height: none !important;
  overflow: visible !important;
}

.research-control-note {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
}

.research-results {
  min-width: 0;
}

.research-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.research-section-nascar-drivers .research-metric-grid,
.research-section-f1-drivers .research-metric-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.research-section-nascar-drivers .research-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 0.82fr)) minmax(0, 1.35fr) minmax(0, 1fr);
}

.research-metric {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--raised);
  text-align: center;
}

.research-metric span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.research-metric strong {
  display: block;
  overflow: visible;
  color: var(--text);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 24px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.research-chart-grid,
.research-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.research-chart-grid-stacked,
.research-table-grid-stacked {
  grid-template-columns: minmax(0, 1fr);
}

.research-section-nascar-drivers .research-metric:last-child strong,
.research-section-f1-drivers .research-metric:last-child strong {
  font-size: 20px;
  line-height: 1.18;
}

.research-table-grid-stacked .research-table-card table {
  min-width: 0;
  table-layout: fixed;
}

.research-table-grid-stacked .research-table-card {
  overflow-x: hidden;
}

.research-table-grid-stacked .research-table-card th,
.research-table-grid-stacked .research-table-card td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(1),
.research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(1) { width: 14%; }
.research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(2),
.research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(2) { width: 9%; }
.research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(3),
.research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(3) { width: 41%; }
.research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(n+4),
.research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(n+4) { width: 12%; }

.research-table-grid-stacked .research-table-card:nth-child(2) td:not(:nth-child(3)) {
  white-space: nowrap;
  overflow-wrap: normal;
}

.research-section-tracks .research-table-grid-stacked .research-table-card:first-child th:nth-child(1),
.research-section-tracks .research-table-grid-stacked .research-table-card:first-child td:nth-child(1) { width: 36%; }
.research-section-tracks .research-table-grid-stacked .research-table-card:first-child th:nth-child(2),
.research-section-tracks .research-table-grid-stacked .research-table-card:first-child td:nth-child(2) { width: 14%; }
.research-section-tracks .research-table-grid-stacked .research-table-card:first-child th:nth-child(3),
.research-section-tracks .research-table-grid-stacked .research-table-card:first-child td:nth-child(3) { width: 18%; }
.research-section-tracks .research-table-grid-stacked .research-table-card:first-child th:nth-child(4),
.research-section-tracks .research-table-grid-stacked .research-table-card:first-child td:nth-child(4) { width: 14%; }
.research-section-tracks .research-table-grid-stacked .research-table-card:first-child th:nth-child(5),
.research-section-tracks .research-table-grid-stacked .research-table-card:first-child td:nth-child(5) { width: 18%; }

.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(1),
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(1) { width: 12%; }
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(2),
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(2) { width: 30%; }
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(3),
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(3) { width: 22%; }
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(4),
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(4) { width: 26%; }
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(5),
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(5) { width: 10%; }

.research-section-tracks .research-table-grid-stacked .research-table-card th,
.research-section-tracks .research-table-grid-stacked .research-table-card td {
  box-sizing: border-box;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal;
}

.research-section-tracks .research-table-grid-stacked .research-table-card:first-child th:nth-child(n+2),
.research-section-tracks .research-table-grid-stacked .research-table-card:first-child td:nth-child(n+2),
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) th:first-child,
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) td:first-child,
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) th:last-child,
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) td:last-child {
  text-align: center;
}

.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) th:first-child,
.research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) td:first-child,
.research-section-nascar-owners .research-table-grid-stacked .research-table-card:nth-child(2) th:first-child,
.research-section-nascar-owners .research-table-grid-stacked .research-table-card:nth-child(2) td:first-child {
  text-align: center !important;
}

.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(1),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(1),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(1),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(1) {
  width: 32%;
  text-align: left;
  overflow-wrap: normal;
}

.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(2),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(2),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(2),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(2) { width: 16%; }
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(3),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(3),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(3),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(3) { width: 20%; }
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(4),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(4),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(4),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(4) { width: 14%; }
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(5),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(5),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(5),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(5) { width: 18%; }

.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(n+2),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(n+2),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:nth-child(2) th,
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:nth-child(2) td {
  text-align: center;
}

.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(n+2),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:nth-child(2) th:not(:nth-child(3)) {
  text-align: center !important;
}

.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:first-child,
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(3) {
  text-align: left !important;
}

.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(2),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(4),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:nth-child(2) th,
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(2),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(4),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:nth-child(2) th {
  white-space: nowrap;
  overflow-wrap: normal;
}

.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(3),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(5),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(3),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(5) {
  overflow-wrap: normal;
  word-break: normal;
}

.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(3),
.research-section-nascar-drivers .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(3) {
  text-align: left;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(n+2),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child td:nth-child(n+2),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:nth-child(2) th,
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:nth-child(2) td {
  text-align: center;
}

.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:nth-child(n+2),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:nth-child(2) th:not(:nth-child(3)) {
  text-align: center !important;
}

.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th:first-child,
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child td:first-child,
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(3),
.research-section-f1-drivers .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(3) {
  text-align: left !important;
}

/* Owners and constructors use the completed driver-profile layout. */
.research-section-profile .research-metric-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.research-section-nascar-owners .research-metric-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) repeat(3, minmax(0, 1fr));
}

.research-section-team-profile .research-metric:first-child strong,
.research-section-team-profile .research-metric:nth-child(n+3) strong {
  font-size: 20px;
  line-height: 1.18;
}

.research-section-profile .research-table-grid-stacked .research-table-card:first-child th:nth-child(1),
.research-section-profile .research-table-grid-stacked .research-table-card:first-child td:nth-child(1) {
  width: 32%;
  text-align: left;
  overflow-wrap: normal;
}

.research-section-profile .research-table-grid-stacked .research-table-card:first-child th:nth-child(2),
.research-section-profile .research-table-grid-stacked .research-table-card:first-child td:nth-child(2) { width: 16%; }
.research-section-profile .research-table-grid-stacked .research-table-card:first-child th:nth-child(3),
.research-section-profile .research-table-grid-stacked .research-table-card:first-child td:nth-child(3) { width: 20%; }
.research-section-profile .research-table-grid-stacked .research-table-card:first-child th:nth-child(4),
.research-section-profile .research-table-grid-stacked .research-table-card:first-child td:nth-child(4) { width: 14%; }
.research-section-profile .research-table-grid-stacked .research-table-card:first-child th:nth-child(5),
.research-section-profile .research-table-grid-stacked .research-table-card:first-child td:nth-child(5) { width: 18%; }

.research-section-profile .research-table-grid-stacked .research-table-card:first-child th:nth-child(n+2),
.research-section-profile .research-table-grid-stacked .research-table-card:first-child td:nth-child(n+2),
.research-section-profile .research-table-grid-stacked .research-table-card:nth-child(2) th,
.research-section-profile .research-table-grid-stacked .research-table-card:nth-child(2) td {
  text-align: center;
}

.research-section-profile .research-table-grid-stacked .research-table-card:first-child th:nth-child(2),
.research-section-profile .research-table-grid-stacked .research-table-card:first-child th:nth-child(4),
.research-section-profile .research-table-grid-stacked .research-table-card:nth-child(2) th {
  white-space: nowrap;
  overflow-wrap: normal;
}

.research-section-profile .research-table-grid-stacked .research-table-card:first-child th:first-child,
.research-section-profile .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(3),
.research-section-profile .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(3) {
  text-align: left !important;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.research-section-team-profile .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(1),
.research-section-team-profile .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(1) { width: 10%; }
.research-section-team-profile .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(2),
.research-section-team-profile .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(2) { width: 8%; }
.research-section-team-profile .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(3),
.research-section-team-profile .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(3) { width: 29%; }
.research-section-team-profile .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(4),
.research-section-team-profile .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(4) {
  width: 23%;
  text-align: left !important;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
}
.research-section-team-profile .research-table-grid-stacked .research-table-card:nth-child(2) th:nth-child(n+5),
.research-section-team-profile .research-table-grid-stacked .research-table-card:nth-child(2) td:nth-child(n+5) { width: 10%; }

.research-results-more {
  margin-top: 10px;
  border-radius: 8px;
}

.research-chart-card,
.research-table-card,
.research-track-card {
  min-width: 0;
  overflow: hidden;
  padding: 18px;
}

.research-section-tracks .research-chart-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 28px;
  line-height: 1;
}

.research-section-tracks .research-chart-card {
  padding: 14px;
}

.research-chart-card .shiny-plot-output {
  width: 100% !important;
}

.research-chart-card .shiny-plot-output img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.research-primary-mobile,
.research-secondary-mobile,
.research-tertiary-mobile {
  display: none;
}

.research-table-card {
  overflow-x: auto;
}

.research-table-card h3 {
  margin: 0 0 14px;
}

.research-table-card table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  color: var(--text);
  font-size: 13px;
}

.research-table-card th,
.research-table-card td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.research-table-card th {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.research-track-card {
  display: grid;
  grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.3fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.research-track-card h3 {
  margin: 7px 0 0;
}

.research-track-card img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

.research-family-card {
  margin-bottom: 18px;
  padding: 24px;
}

.research-family-heading {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.research-family-heading h3 {
  margin: 0;
  font-size: 28px;
}

.research-family-heading p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
}

.research-family-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.research-family-chip {
  display: flex;
  width: 80%;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-self: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.research-family-chip.active {
  border-color: #ff4057;
  background: #d90b22;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(225, 6, 34, .18);
}

.research-family-chip.inactive {
  background: #101722;
}

.research-family-number {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  background: #243041;
}

.research-family-chip.active .research-family-number {
  background: rgba(255, 255, 255, .22);
}

.research-family-card-nascar .research-family-chip.active {
  border-color: #f5c542;
  background: #f5c542;
  color: #111722;
  box-shadow: 0 10px 24px rgba(245, 197, 66, .18);
}

.research-family-card-nascar .research-family-chip.active .research-family-number {
  background: rgba(17, 23, 34, .14);
}

.research-family-label {
  min-width: 0;
  line-height: 1.05;
}

.research-family-notes {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding-left: 25px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.55;
}

.research-family-notes strong {
  color: var(--text);
}

@media (max-width: 980px) {
  .research-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .research-section-nascar-drivers .research-metric-grid,
  .research-section-f1-drivers .research-metric-grid,
  .research-section-profile .research-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .research-chart-grid,
  .research-table-grid {
    grid-template-columns: 1fr;
  }

  .research-section-tracks .research-workspace {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .research-primary-desktop,
  .research-secondary-desktop,
  .research-tertiary-desktop {
    display: none;
  }

  .research-primary-mobile,
  .research-secondary-mobile,
  .research-tertiary-mobile {
    display: block;
  }

  .research-workspace {
    grid-template-columns: 1fr;
  }

  .research-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
  }

  .research-sidebar h3,
  .research-sidebar .form-group:first-of-type,
  .research-control-note {
    grid-column: 1 / -1;
  }

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

  .research-section-nascar-drivers .research-metric-grid,
  .research-section-f1-drivers .research-metric-grid,
  .research-section-profile .research-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .research-track-card {
    grid-template-columns: 1fr;
  }

  .research-chart-grid-stacked .research-chart-card .shiny-plot-output {
    height: 230px !important;
  }

  .research-chart-grid-stacked .research-chart-card:first-child .shiny-plot-output {
    height: 320px !important;
  }

  .research-chart-grid-stacked .research-chart-card:nth-child(2) .shiny-plot-output {
    height: 230px !important;
  }

  .research-chart-grid-stacked .research-chart-card:nth-child(3) .shiny-plot-output {
    height: 280px !important;
  }

  .research-section-tracks .research-chart-grid .research-chart-card .shiny-plot-output {
    height: 500px !important;
  }

  .research-section-tracks .research-sidebar .selectize-control,
  .research-section-tracks .research-sidebar .selectize-dropdown {
    width: 100% !important;
    max-width: 100%;
  }

  .research-section-tracks .research-sidebar .selectize-input,
  .research-section-tracks .research-sidebar .selectize-input input,
  .research-section-tracks .research-sidebar .selectize-dropdown .option {
    font-size: 16px !important;
  }

  .research-section-tracks .research-sidebar .selectize-dropdown .option {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .research-family-card {
    padding: 18px;
  }

  .research-family-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .research-family-chip {
    min-height: 35px;
    gap: 6px;
    padding: 5px 7px;
    font-size: 13px;
  }

  .research-family-number {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }
}

@media (max-width: 480px) {
  .research-sidebar {
    grid-template-columns: 1fr;
  }

  .research-sidebar h3,
  .research-sidebar .form-group,
  .research-control-note {
    grid-column: auto;
  }

  .research-metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .research-metric {
    padding: 13px;
  }

  .research-metric strong {
    font-size: 21px;
  }

  .research-table-grid-stacked .research-table-card {
    padding-inline: 10px;
  }

  .research-table-grid-stacked .research-table-card th,
  .research-table-grid-stacked .research-table-card td {
    padding: 8px 3px;
    font-size: 10px;
  }

  .research-section-nascar-drivers .research-table-grid-stacked .research-table-card:first-child th,
  .research-section-f1-drivers .research-table-grid-stacked .research-table-card:first-child th,
  .research-section-profile .research-table-grid-stacked .research-table-card:first-child th,
  .research-section-team-profile .research-table-grid-stacked .research-table-card:nth-child(2) th {
    font-size: 9px;
    letter-spacing: 0;
  }

  .research-section-tracks .research-table-grid-stacked .research-table-card th,
  .research-section-tracks .research-table-grid-stacked .research-table-card td {
    padding: 8px 3px !important;
  }

  .research-section-tracks .research-table-grid-stacked .research-table-card th {
    font-size: 9px;
    letter-spacing: 0;
  }

  .research-section-tracks .research-table-grid-stacked .research-table-card:first-child th:nth-child(n+2),
  .research-section-tracks .research-table-grid-stacked .research-table-card:first-child td:nth-child(n+2) {
    text-align: center !important;
  }

  .research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) th:first-child,
  .research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) td:first-child,
  .research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) th:last-child,
  .research-section-tracks .research-table-grid-stacked .research-table-card:nth-child(2) td:last-child {
    text-align: center !important;
  }
}

@media (max-width: 720px) {
  .forecast-mode-row {
    align-items: stretch;
    flex-direction: column;
  }

  .forecast-mode-row .shiny-options-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .forecast-mode-row .radio-inline {
    margin: 0;
  }

  .forecast-mode-row .radio-inline,
  .published-betting-mode-row .radio-inline {
    padding: 7px 9px;
    font-size: 13px;
  }

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

  .published-winner-pick {
    grid-column: 1 / -1;
  }

  .published-podium-selection {
    padding: 13px 11px;
  }

  .published-podium-selection h4 {
    font-size: clamp(17px, 5vw, 21px);
    line-height: 1.05;
  }

  .published-podium-pick > p {
    min-height: 0;
  }

  .published-podium-selection .published-podium-market {
    font-size: 10px;
    overflow-wrap: anywhere;
  }

  .published-betting-context,
  .published-betting-market-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .published-betting-mode-row {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .published-betting-mode-row .shiny-options-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .published-betting-mode-row .radio-inline {
    margin: 0;
  }

  .published-betting-market {
    padding: 14px 11px;
  }

  .published-betting-grid,
  .published-betting-count-1,
  .published-betting-count-2 {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }

  .published-betting-note {
    min-height: 0;
  }

  .published-betting-pick h4 {
    font-size: clamp(19px, 6vw, 24px);
  }
}

/* Published results and history */
.betting-history-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.012));
}

.betting-history-cta h3,
.betting-history-cta p {
  margin: 4px 0 0;
}

.betting-history-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 210px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-strong);
  color: var(--text);
  font-weight: 800;
}

.history-page-heading {
  margin-bottom: 22px;
}

.history-page-heading h2 {
  margin: 5px 0 6px;
  font-size: clamp(30px, 4vw, 48px);
}

.history-page-heading > p:last-child {
  margin: 0;
  color: var(--muted);
}

.history-breadcrumb {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.history-layout {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.history-settings {
  position: sticky;
  top: 18px;
  padding: 18px;
}

.history-settings h3 {
  margin: 7px 0 16px;
  font-size: 20px;
}

.history-settings .form-group {
  margin-bottom: 12px;
}

.history-settings label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.history-settings .form-control {
  min-height: 39px;
  font-size: 12px;
}

.history-settings .selectize-input,
.history-settings .selectize-input input,
.history-settings .selectize-dropdown .option {
  font-size: 12px;
}

.history-forecast-switch > label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.history-forecast-switch .form-group,
.history-forecast-switch .shiny-options-group {
  margin: 0;
}

.history-forecast-switch .radio-inline {
  margin: 0 6px 5px 0;
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--raised);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.history-forecast-switch .radio-inline input {
  margin-right: 5px;
  transform: scale(.82);
}

.history-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.betting-history-landing {
  display: grid;
  gap: 18px;
}

.history-loading-notice {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid rgba(35, 166, 213, .34);
  border-radius: 14px;
  background: rgba(35, 166, 213, .08);
}

.betting-history-landing:has(.recalculating) > .history-loading-notice {
  display: flex;
}

.history-loading-notice strong,
.history-loading-notice span {
  display: block;
}

.history-loading-notice span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.history-loading-hourglass {
  flex: 0 0 auto;
  color: var(--blue) !important;
  font-size: 24px !important;
  line-height: 1;
  animation: track-hourglass-pulse 1.1s ease-in-out infinite;
}

.betting-history-detail-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.history-detail-forecast-switch {
  display: block;
}

.history-detail-forecast-switch > .series-label {
  display: block;
  margin-bottom: 5px;
}

.history-detail-forecast-switch .form-group {
  width: 100%;
  margin: 0;
}

.history-back-button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--raised);
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
}

.history-scorecard {
  padding: 22px;
}

.history-scorecard h3 {
  margin: 6px 0 4px;
  font-size: clamp(23px, 3vw, 32px);
}

.history-scorecard > p {
  margin: 0 0 17px;
  color: var(--muted);
}

.history-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.history-scorecard-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.history-scorecard-table th,
.history-scorecard-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  text-align: center;
}

.history-scorecard-table th {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.history-scorecard-table th:first-child,
.history-scorecard-table td:first-child {
  text-align: left;
}

.history-scorecard-view {
  font-weight: 800;
}

.history-positive {
  color: #5fdda0 !important;
}

.history-negative {
  color: #ff7b86 !important;
}

.history-bets-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.history-bets-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.history-bets-heading h3 {
  margin: 5px 0 0;
  font-size: clamp(22px, 3vw, 30px);
}

.history-bet-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.history-bet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.history-bet-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.022);
}

.history-bet-win {
  border-color: rgba(95,221,160,.32);
}

.history-bet-loss {
  border-color: rgba(255,123,134,.22);
}

.history-bet-card-topline,
.history-bet-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.history-result-pill,
.history-stake-pill,
.history-variant-pill,
.history-stage-list span {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.history-bet-win .history-result-pill {
  color: #bff8dc;
  border-color: rgba(95,221,160,.58);
  background: rgba(24, 128, 82, .34);
  box-shadow: inset 0 0 0 1px rgba(95,221,160,.08);
}

.history-bet-loss .history-result-pill {
  color: #ffd0d4;
  border-color: rgba(255,123,134,.55);
  background: rgba(147, 39, 54, .35);
  box-shadow: inset 0 0 0 1px rgba(255,123,134,.07);
}

.history-variant-pill {
  color: var(--muted);
}

.history-bet-status-pills {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.history-stake-pill {
  color: var(--blue);
  border-color: rgba(35, 166, 213, .48);
  background: rgba(35, 166, 213, .1);
}

.history-bet-market {
  margin: 14px 0 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.history-bet-card h4 {
  margin: 0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.08;
}

.history-bet-role {
  min-height: 30px;
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 11px;
}

.history-bet-metrics {
  align-items: stretch;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.history-bet-metrics > span {
  display: grid;
  gap: 3px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.history-bet-metrics small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .08em;
}

.history-stage-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 11px;
}

.history-stage-list span {
  min-height: 20px;
  padding: 3px 7px;
  color: var(--muted);
  font-size: 8px;
}

.history-no-match {
  margin: 12px 0 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .history-layout {
    grid-template-columns: 1fr;
  }

  .history-settings {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
  }

  .history-settings > .series-label,
  .history-settings > h3 {
    grid-column: 1 / -1;
  }

  .history-settings .form-group {
    margin-bottom: 4px;
  }

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

@media (max-width: 720px) {
  .betting-history-cta {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  .betting-history-link {
    width: 100%;
    min-width: 0;
  }

  .history-settings {
    display: block;
    padding: 15px;
  }

  .betting-history-detail-controls,
  .history-detail-forecast-switch {
    align-items: stretch;
    flex-direction: column;
  }

  .history-scorecard,
  .history-bets-section {
    padding: 15px 11px;
  }

  .history-scorecard-table th,
  .history-scorecard-table td {
    padding: 9px 5px;
    font-size: 10px;
  }

  .history-scorecard-table th {
    font-size: 7.5px;
    letter-spacing: 0;
  }

  .history-bets-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .history-bet-grid {
    grid-template-columns: 1fr;
  }

  .history-bet-card {
    padding: 13px;
  }
}

.published-fantasy-shell {
  display: grid;
  gap: 18px;
}

.published-fantasy-context,
.published-fantasy-lineup-topline,
.published-fantasy-metrics,
.fantasy-history-result-topline,
.fantasy-history-metrics,
.fantasy-history-scorecard-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.published-fantasy-context {
  margin-bottom: 14px;
}

.published-fantasy-context h3,
.published-fantasy-lineup h4,
.fantasy-history-result h4 {
  margin: 3px 0 0;
}

.published-fantasy-context p,
.published-fantasy-reason,
.fantasy-history-note {
  color: var(--muted);
}

.published-fantasy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.published-fantasy-lineup,
.fantasy-history-result {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}

.published-fantasy-lineup {
  --fantasy-accent: #2ea8ff;
  box-shadow: inset 3px 0 0 var(--fantasy-accent);
}

.published-fantasy-lineup.fantasy-approach-split {
  --fantasy-accent: #2ea8ff;
  border-color: rgba(46, 168, 255, .34);
}

.published-fantasy-lineup.fantasy-approach-contrarian {
  --fantasy-accent: #b789ff;
  border-color: rgba(183, 137, 255, .34);
}

.published-fantasy-lineup.fantasy-approach-chaos {
  --fantasy-accent: #ff9f43;
  border-color: rgba(255, 159, 67, .36);
}

.published-fantasy-lineup.fantasy-approach-dominator {
  --fantasy-accent: #f6c744;
  border-color: rgba(246, 199, 68, .36);
}

.published-fantasy-lineup.fantasy-approach-balanced {
  --fantasy-accent: #36d1b4;
  border-color: rgba(54, 209, 180, .34);
}

.published-fantasy-lineup h4,
.published-fantasy-lineup .published-fantasy-script {
  color: var(--fantasy-accent);
}

.published-fantasy-lineup .published-fantasy-rank,
.published-fantasy-lineup .published-fantasy-reason {
  color: #f4f7fb;
}

.published-fantasy-rank,
.published-fantasy-script {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.published-fantasy-reason {
  min-height: 34px;
  margin: 5px 0 12px;
  font-size: 11px;
}

.published-fantasy-metrics,
.fantasy-history-metrics,
.fantasy-history-scorecard-metrics {
  justify-content: flex-start;
  flex-wrap: wrap;
  padding: 10px 0;
  border-block: 1px solid var(--line);
}

.published-fantasy-metrics span,
.fantasy-history-metrics span,
.fantasy-history-scorecard-metrics span {
  display: grid;
  gap: 2px;
  min-width: 90px;
  font-weight: 800;
}

.published-fantasy-metrics small,
.fantasy-history-metrics small,
.fantasy-history-scorecard-metrics small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .07em;
}

.published-fantasy-drivers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding-top: 12px;
}

.published-fantasy-drivers > div {
  display: grid;
  gap: 1px;
}

.published-fantasy-drivers strong {
  font-size: 12px;
}

.published-fantasy-drivers span,
.published-fantasy-drivers small {
  color: var(--muted);
  font-size: 9px;
}

.fantasy-download-button {
  align-self: center;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
}

.fantasy-mode-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.fantasy-mode-controls .form-group,
.fantasy-mode-controls .shiny-options-group {
  margin: 0;
}

.fantasy-mode-divider {
  width: 1px;
  height: 30px;
  margin: 0 4px;
  background: var(--line-strong);
}

.fantasy-history-layout {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: 16px;
}

.fantasy-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fantasy-history-scorecard > p {
  margin-bottom: 12px;
}

.fantasy-history-summary-wrap {
  display: grid;
  gap: 12px;
}

.fantasy-history-summary-table th,
.fantasy-history-summary-table td {
  font-size: 11px;
}

.fantasy-history-summary-table th:nth-child(n+4),
.fantasy-history-summary-table td:nth-child(n+4) {
  text-align: center;
}

.history-show-more {
  justify-self: start;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.035);
  color: #f4f7fb;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.fantasy-history-result {
  padding: 13px;
}

.fantasy-history-result .history-bet-market {
  margin: 0;
}

.fantasy-history-result .fantasy-history-metrics {
  padding-bottom: 0;
  border-bottom: 0;
}

.fantasy-history-roster {
  display: grid;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.fantasy-history-roster-heading,
.fantasy-history-roster-grid > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.fantasy-history-roster-heading span,
.fantasy-history-roster-grid span {
  color: var(--muted);
}

.fantasy-history-roster-heading {
  font-size: 11px;
}

.fantasy-history-roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
}

.fantasy-history-roster-grid > div {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.025);
  font-size: 10px;
}

.fantasy-history-note {
  margin: 12px 0 0;
  font-size: 10px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .fantasy-history-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .fantasy-mode-divider {
    width: 100%;
    height: 1px;
    margin: 2px 0;
  }

  .published-fantasy-context {
    align-items: flex-start;
    flex-direction: column;
  }

  .published-fantasy-grid,
  .fantasy-history-grid {
    grid-template-columns: 1fr;
  }

  .published-fantasy-drivers {
    grid-template-columns: 1fr 1fr;
  }

  .fantasy-history-roster-grid {
    grid-template-columns: 1fr;
  }
}
/* Betting Lab */
.betting-lab {
  position: relative;
  padding: clamp(1.25rem, 3vw, 2.75rem) 0 4rem;
}

.betting-lab-loading-notice {
  position: absolute;
  top: 150px;
  left: 50%;
  z-index: 30;
  width: min(420px, calc(100% - 40px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(17, 23, 34, .98);
  box-shadow: var(--shadow);
  color: var(--text);
}

.betting-lab-loading-notice[hidden] { display: none !important; }
.betting-lab-loading-notice strong,
.betting-lab-loading-notice span { display: block; }
.betting-lab-loading-notice span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.betting-lab-loading-hourglass {
  flex: none;
  margin: 0 !important;
  color: var(--gold) !important;
  font-size: 25px !important;
  animation: track-hourglass-pulse 1.1s ease-in-out infinite;
}
.betting-lab-f1 .betting-lab-loading-hourglass { color: var(--red) !important; }
.betting-lab-data-loading .betting-lab-layout {
  opacity: .34;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.betting-lab-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1600px;
  margin: 0 auto 1.5rem;
  padding: 0 clamp(1rem, 4vw, 3.5rem);
}

.betting-lab-hero h2 {
  margin: .25rem 0 .45rem;
  font: 800 clamp(2.2rem, 5vw, 4.6rem)/.95 "Barlow Condensed", sans-serif;
  letter-spacing: -.02em;
}

.betting-lab-hero p {
  max-width: 780px;
  margin: 0;
  color: #b8c4d5;
  font-size: .9rem;
  line-height: 1.65;
}

.betting-lab-hero-note {
  display: grid;
  flex: 0 0 270px;
  gap: .2rem;
  padding: 1rem 1.15rem;
  border: 1px solid #314157;
  border-radius: 14px;
  background: #111923;
}

.betting-lab-hero-note strong { color: #f4f7fb; }
.betting-lab-hero-note span { color: #91a0b5; font-size: .8rem; line-height: 1.45; }

.betting-lab-layout {
  display: grid;
  grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 3.5rem);
}

.betting-lab-controls {
  position: sticky;
  top: 1rem;
  padding: 1.15rem;
  border-color: #2c3a4e;
}

.betting-lab-control-heading h3,
.betting-lab-section-heading h3 {
  margin: .2rem 0 0;
  font: 700 1.55rem/1 "Barlow Condensed", sans-serif;
}

.betting-lab-event {
  display: grid;
  gap: .25rem;
  margin: 1rem 0;
  padding: .85rem;
  border: 1px solid #34445a;
  border-radius: 12px;
  background: #0d141e;
}

.betting-lab-event strong { font: 700 1.18rem/1.1 "Barlow Condensed", sans-serif; }
.betting-lab-event small { color: #9eacc0; line-height: 1.4; }

.betting-lab-controls .form-group { margin-bottom: 1rem; }
.betting-lab-controls .selectize-input,
.betting-lab-controls .selectize-dropdown { font-size: .76rem; }
.betting-lab-controls .control-label {
  display: grid;
  gap: .08rem;
  margin-bottom: .45rem;
  color: #edf2f9;
  font-size: .86rem;
  font-weight: 700;
}
.betting-lab-controls .control-label small { color: #8291a6; font-size: .7rem; font-weight: 500; }
.betting-lab-controls .checkbox { margin: .25rem 0; }
.betting-lab-controls .checkbox label { color: #c5cfdd; font-size: .78rem; line-height: 1.3; }
.betting-lab-controls .radio-inline { font-size: .78rem; }
.betting-lab-model-controls { padding-top: .25rem; border-top: 1px solid #283548; }
.betting-lab-selection-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-top: .2rem; }
.betting-lab-reset { width: 100%; margin-top: 0; font-size: .76rem; }
.betting-lab-method-note { margin: .9rem 0 0; color: #77879d; font-size: .72rem; line-height: 1.5; }

.betting-lab-results { min-width: 0; display: grid; gap: 1.15rem; }
.betting-lab-selection-status {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .72rem 1rem;
  border: 1px solid #2d4055;
  border-radius: 12px;
  background: #101925;
  color: #9fb0c5;
  font-size: .78rem;
}
.betting-lab-selection-status span:first-child { color: #f4f7fb; font-weight: 700; }
.betting-lab-alert { display: grid; gap: .15rem; padding: 1rem; border: 1px solid #7e5930; border-radius: 12px; background: #21190f; }
.betting-lab-alert span { color: #c8b18f; font-size: .82rem; }

.betting-lab-scorecard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .85rem;
}
.betting-lab-metric { display: grid; grid-template-rows: 28px auto 38px; gap: .2rem; min-height: 126px; padding: 1rem; }
.betting-lab-metric span { align-self: start; color: #8fa0b6; font-size: .69rem; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.betting-lab-metric strong { align-self: start; font: 800 2rem/1 "Barlow Condensed", sans-serif; }
.betting-lab-metric small { align-self: start; color: #74849a; font-size: .68rem; line-height: 1.35; }

.betting-lab-consensus {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  gap: 1.5rem;
  padding: 1.35rem;
  border-color: #365069;
  background: linear-gradient(130deg, #162131, #111822 62%);
}
.betting-lab-nascar .betting-lab-consensus { box-shadow: inset 4px 0 #f4c542; }
.betting-lab-f1 .betting-lab-consensus { box-shadow: inset 4px 0 #e10600; }
.betting-lab-consensus h3 { margin: .2rem 0; font: 800 2.45rem/1 "Barlow Condensed", sans-serif; }
.betting-lab-consensus p { margin: 0; color: #9cabc0; font-size: .82rem; }
.betting-lab-consensus-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.betting-lab-consensus-metrics > span {
  display: grid;
  gap: .15rem;
  padding: .75rem;
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  color: #f4f7fb;
  font: 700 1.05rem/1.1 "Barlow Condensed", sans-serif;
}
.betting-lab-consensus-metrics small { color: #8090a6; font: 700 .62rem/1.2 Inter, sans-serif; letter-spacing: .06em; }

.betting-lab-model-picks { padding: .25rem 0; }
.betting-lab-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.betting-lab-section-heading > small { max-width: 360px; color: #77879b; font-size: .72rem; text-align: right; }
.betting-lab-pick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.betting-lab-pick { display: grid; gap: .2rem; min-height: 105px; padding: .85rem; border: 1px solid #2b394d; border-radius: 12px; background: #111923; }
.betting-lab-pick > span { color: #8393a8; font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.betting-lab-pick strong { font: 700 1.22rem/1.05 "Barlow Condensed", sans-serif; }
.betting-lab-pick small { align-self: end; color: #728299; font-size: .67rem; }
.betting-lab-pick-finish { border-top-color: #23a6d5; }
.betting-lab-pick-probability { border-top-color: #42c78a; }
.betting-lab-pick-points { border-top-color: #b58cff; }
.betting-lab-nascar .betting-lab-pick-venue { border-top-color: #f4c542; }
.betting-lab-f1 .betting-lab-pick-venue { border-top-color: #e10600; }

.betting-lab-section-card { padding: 1.2rem; }
.betting-lab-live-pill { padding: .35rem .55rem; border: 1px solid #31516b; border-radius: 999px; color: #52b8df; font-size: .62rem; font-weight: 800; letter-spacing: .08em; }
.betting-lab-table-wrap { overflow-x: auto; }
.betting-lab-table { width: 100%; border-collapse: collapse; font-size: .76rem; }
.betting-lab-table th { padding: .65rem .45rem; border-bottom: 1px solid #3a4658; color: #91a0b5; font-size: .62rem; line-height: 1.25; letter-spacing: .05em; text-align: center; white-space: normal; }
.betting-lab-table th:nth-child(4),
.betting-lab-table th:nth-child(5),
.betting-lab-table th:nth-child(6),
.betting-lab-table th:last-child { width: 70px; }
.betting-lab-table th:nth-child(2), .betting-lab-table th:nth-child(3) { text-align: left; }
.betting-lab-table td { padding: .62rem .55rem; border-bottom: 1px solid #283445; color: #bdc8d7; text-align: center; }
.betting-lab-table td:nth-child(2), .betting-lab-table td:nth-child(3) { text-align: left; }
.betting-lab-table td:first-child { color: #f4f7fb; font-weight: 800; }
.betting-lab-table tr:last-child td { border-bottom: 0; }

.betting-lab-opportunity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.betting-lab-race-result-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; margin-bottom: .8rem; }
.betting-lab-race-result-summary > span { display: grid; gap: .2rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); color: var(--text); font: 800 1.05rem/1 "Barlow Condensed", sans-serif; }
.betting-lab-race-result-summary small { color: var(--muted); font: 700 .58rem/1 Inter, sans-serif; letter-spacing: .07em; }
.betting-lab-opportunity { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; padding: 1rem; border: 1px solid #2d644e; border-radius: 12px; background: #102019; }
.betting-lab-opportunity .series-label { grid-column: 1 / -1; }
.betting-lab-opportunity h4 { margin: .1rem 0; font: 800 1.5rem/1 "Barlow Condensed", sans-serif; }
.betting-lab-odds { color: #5ed59a; font: 800 1.35rem/1 "Barlow Condensed", sans-serif; }
.betting-lab-opportunity > div { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; margin-top: .45rem; }
.betting-lab-opportunity > div span { display: grid; gap: .1rem; padding: .45rem; border-radius: 8px; background: rgba(255,255,255,.04); font: 700 .88rem/1 "Barlow Condensed", sans-serif; }
.betting-lab-opportunity > div small { color: #7e9a8b; font: 700 .55rem/1 Inter, sans-serif; }
.betting-lab-result-pill { grid-column: 1 / -1; justify-self: start; margin-top: .3rem; padding: .3rem .5rem; border: 1px solid; border-radius: 999px; font-size: .65rem; font-weight: 800; letter-spacing: .06em; }
.betting-lab-result-pill.is-win { border-color: rgba(64, 205, 137, .52); background: rgba(64, 205, 137, .12); color: #64dea2; }
.betting-lab-result-pill.is-loss { border-color: rgba(244, 104, 118, .48); background: rgba(244, 104, 118, .1); color: #ff8c98; }
.betting-lab-no-play { padding: 1rem; border: 1px dashed #3a485a; border-radius: 12px; text-align: center; }
.betting-lab-no-play p { margin: .25rem 0 0; color: #8190a4; font-size: .78rem; }
.betting-lab-empty { color: #8493a8; }
.betting-lab-disclosure { padding: .9rem 1rem; }
.betting-lab-disclosure summary { cursor: pointer; font-weight: 700; }
.betting-lab-disclosure p { margin: .75rem 0 0; max-width: 980px; color: #95a4b8; font-size: .8rem; line-height: 1.6; }

@media (max-width: 1100px) {
  .betting-lab-scorecard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .betting-lab-pick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .betting-lab-consensus { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .betting-lab { padding-top: .8rem; }
  .betting-lab-hero { display: grid; gap: 1rem; padding: 0 .75rem; }
  .betting-lab-hero h2 { font-size: 2.7rem; }
  .betting-lab-hero-note { display: none; }
  .betting-lab-layout { grid-template-columns: 1fr; gap: 1rem; padding: 0 .65rem; }
  .betting-lab-controls { position: static; padding: .9rem; }
  .betting-lab-model-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .75rem; }
  .betting-lab-controls .checkbox label { font-size: .73rem; }
  .betting-lab-selection-status { display: grid; gap: .2rem; }
  .betting-lab-scorecard { gap: .55rem; }
  .betting-lab-metric { min-height: 108px; padding: .8rem; }
  .betting-lab-metric strong { font-size: 1.65rem; }
  .betting-lab-consensus { padding: 1rem; }
  .betting-lab-consensus h3 { font-size: 2rem; }
  .betting-lab-consensus-metrics { gap: .45rem; }
  .betting-lab-consensus-metrics > span { padding: .6rem; font-size: .9rem; }
  .betting-lab-pick-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .betting-lab-pick { min-height: 96px; padding: .7rem; }
  .betting-lab-section-card { padding: .85rem; }
  .betting-lab-table { min-width: 760px; font-size: .7rem; }
  .betting-lab-opportunity-grid { grid-template-columns: 1fr; }
  .betting-lab-race-result-summary { grid-template-columns: 1fr 1fr; }
  .betting-lab-section-heading { align-items: flex-start; }
  .betting-lab-section-heading > small { max-width: 180px; }
}

@media (max-width: 430px) {
  .betting-lab-model-controls { grid-template-columns: 1fr; }
  .betting-lab-pick-grid { grid-template-columns: 1fr; }
  .betting-lab-scorecard { grid-template-columns: 1fr 1fr; }
  .betting-lab-metric span { font-size: .6rem; }
  .betting-lab-consensus-metrics { grid-template-columns: 1fr 1fr; }
}

.methodology-page .methodology-hero {
  padding-top: 34px;
  padding-bottom: 0;
}

.methodology-page .methodology-section {
  padding-top: clamp(2rem, 4vw, 3.75rem);
  padding-bottom: clamp(2rem, 4vw, 3.75rem);
}

.methodology-page .methodology-hero + .methodology-section {
  padding-top: 24px;
}

@media (max-width: 760px) {
  .methodology-page .methodology-hero {
    padding-top: 24px;
    padding-bottom: 0;
  }

  .methodology-page .methodology-section {
    padding-top: 24px;
    padding-bottom: 32px;
  }

  .methodology-page .methodology-hero + .methodology-section {
    padding-top: 16px;
  }
}

@media (max-width: 980px) {
  .account-plan-grid,
  .account-access-grid,
  .account-launch-hero {
    grid-template-columns: 1fr;
  }

  .account-launch-hero {
    align-items: stretch;
  }

  .account-plan-card {
    min-height: 0;
  }

  .account-plan-card .button {
    margin-top: 8px;
  }
}

@media (max-width: 820px) {
  .account-nav-shell {
    position: static;
  }

  .account-link {
    width: 100%;
    justify-content: space-between;
  }

  .account-navigation-menu {
    position: static;
    width: 100%;
    margin-top: 5px;
    border-color: var(--line);
    box-shadow: none;
  }
}

@media (max-width: 760px) {
  .account-hero {
    padding-top: 32px;
    padding-bottom: 28px;
  }

  .account-hero-actions,
  .account-hero-actions .button,
  .account-promo-form,
  .account-promo-form input {
    width: 100%;
  }

  .account-free-banner,
  .account-promo-card,
  .account-section-heading,
  .account-launch-price-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-launch-hero {
    gap: 24px;
  }

  .account-launch-copy h1 {
    font-size: clamp(44px, 14vw, 62px);
  }

  .account-free-price {
    font-size: 64px;
  }

  .account-billing-switch {
    width: 100%;
  }

  .account-cycle-option {
    flex: 1;
  }

  .account-cycle-option span {
    justify-content: center;
    width: 100%;
    padding-inline: 8px;
  }

  .account-plan-card,
  .account-access-card,
  .account-service-card {
    padding: 22px;
  }

  .account-plan-price strong {
    font-size: 54px;
  }

  .account-form-preview {
    grid-template-columns: 1fr;
  }

  .account-auth-form {
    grid-template-columns: 1fr;
  }

  .account-membership-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .account-service-grid {
    grid-template-columns: 1fr;
  }

  .account-promo-form {
    align-items: stretch;
    flex-direction: column;
  }

  .account-action-notice {
    right: 16px;
    bottom: 16px;
    width: calc(100% - 32px);
  }
}

/* Fantasy Lab */
.fantasy-lab-loading-notice {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 80;
  width: min(430px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(17, 23, 34, .98);
  box-shadow: var(--shadow);
  color: var(--text);
}

.fantasy-lab-loading-notice[hidden] { display: none !important; }
.fantasy-lab-loading-notice strong,
.fantasy-lab-loading-notice span { display: block; }
.fantasy-lab-loading-notice span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.fantasy-lab-loading-hourglass {
  flex: none;
  margin: 0 !important;
  color: var(--gold) !important;
  font-size: 25px !important;
  animation: track-hourglass-pulse 1.1s ease-in-out infinite;
}
.series-page-f1 .fantasy-lab-loading-hourglass { color: var(--red) !important; }
.fantasy-lab-data-loading {
  opacity: .34;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.fantasy-lab-hero {
  padding-block: 24px 12px;
}

.fantasy-lab-hero > p {
  margin-bottom: 0;
}

.fantasy-lab-section {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-top: 8px;
  overflow: hidden;
}

.series-page .series-tab-panel[data-series-panel="lab-roster"] > .fantasy-lab-section {
  padding-top: 8px;
}

.fantasy-lab-section > .form-group.shiny-input-radiogroup {
  margin: 0 0 18px;
}

.fantasy-lab-section > .form-group .shiny-options-group {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.fantasy-lab-section > .form-group .radio-inline {
  margin: 0;
  padding: 0;
}

.fantasy-lab-section > .form-group .radio-inline input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fantasy-lab-section > .form-group .radio-inline span {
  display: block;
  padding: 9px 16px;
  border-radius: 9px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.fantasy-lab-section > .form-group .radio-inline:has(input:checked) span {
  color: var(--text);
  background: var(--panel-2);
  box-shadow: inset 0 -2px 0 var(--blue);
}

.fantasy-lab-workspace {
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 20px;
  align-items: start;
}

.fantasy-lab-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}

.fantasy-lab-sidebar h2,
.fantasy-lab-current h2,
.fantasy-lab-pool h2,
.fantasy-lab-saved-toolbar h2,
.fantasy-lab-exposure h2 {
  margin: 3px 0 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.fantasy-lab-help,
.fantasy-lab-pool-heading p,
.fantasy-lab-exposure-header p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.5;
}

.fantasy-lab-pool-instructions span {
  display: block;
}

.fantasy-lab-pool-instructions strong {
  color: var(--text);
  font-weight: 800;
}

.fantasy-lab-sidebar .form-group {
  margin: 4px 0 2px;
}

.fantasy-lab-sidebar .control-label,
.fantasy-lab-saved-toolbar .control-label {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .09em;
}

.fantasy-lab-sidebar .shiny-options-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 5px;
}

.fantasy-lab-sidebar .radio {
  margin: 0;
}

.fantasy-lab-sidebar .radio label {
  display: flex;
  justify-content: center;
  padding: 8px 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
}

.fantasy-lab-sidebar .radio input {
  margin: 0 5px 0 0;
}

.fantasy-lab-sidebar .button,
.fantasy-lab-sidebar .btn {
  width: 100%;
}

.fantasy-lab-secondary-actions {
  display: grid;
  gap: 6px;
}

.fantasy-lab-secondary-actions .btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: .72rem;
}

.fantasy-lab-portfolio-builder {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  min-width: 0;
}

.fantasy-lab-portfolio-builder h3 {
  margin: 0;
  font-size: 1.08rem;
}

.fantasy-lab-portfolio-builder .form-group {
  margin: 2px 0 0;
  min-width: 0;
}

.fantasy-lab-portfolio-builder .control-label {
  font-size: .62rem;
  line-height: 1.25;
}

.fantasy-lab-portfolio-builder .shiny-options-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
}

.fantasy-lab-portfolio-builder .radio-inline {
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 5px 3px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  text-align: center;
  background: var(--panel-2);
  font-size: .68rem;
  line-height: 1;
}

.fantasy-lab-portfolio-builder .radio-inline input {
  margin: 0 4px 0 0;
}

.fantasy-lab-percent-control {
  position: relative;
  min-width: 0;
}

.fantasy-lab-percent-control .form-group {
  margin: 0;
}

.fantasy-lab-percent-control input {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 34px;
  padding: 6px 28px 6px 9px;
  font-size: .72rem;
}

.fantasy-lab-percent-suffix {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: var(--muted);
  font-size: .72rem;
  pointer-events: none;
}

.fantasy-lab-portfolio-note {
  display: block;
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.45;
}

.fantasy-lab-generate {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 38px;
  padding: 7px 8px;
  font-size: .7rem;
  white-space: normal;
}

.fantasy-lab-status {
  margin: 2px 0 0;
  padding: 10px 11px;
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(34, 169, 218, .08);
  font-size: .75rem;
  line-height: 1.45;
}

.fantasy-lab-main {
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 20px;
}

.fantasy-lab-current,
.fantasy-lab-pool,
.fantasy-lab-saved-toolbar,
.fantasy-lab-exposure,
.fantasy-lab-saved-card {
  padding: 22px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.fantasy-lab-current-header,
.fantasy-lab-pool-heading,
.fantasy-lab-saved-toolbar,
.fantasy-lab-exposure-header,
.fantasy-lab-saved-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.fantasy-lab-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 8px;
}

.fantasy-lab-totals > span {
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--text);
  font-family: "Barlow Condensed", sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
}

.fantasy-lab-totals small {
  color: var(--muted);
  font-family: Inter, sans-serif;
  font-size: .56rem;
  letter-spacing: .08em;
}

.fantasy-lab-roster-list {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.fantasy-lab-roster-row {
  display: grid;
  grid-template-columns: 86px minmax(145px, 1fr) minmax(238px, 300px) 68px 72px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .015);
}

@media (min-width: 761px) {
  .fantasy-lab-section-f1 .fantasy-lab-roster-row {
    grid-template-columns: 100px minmax(145px, 1fr) minmax(238px, 300px) 68px 72px;
  }
}

.fantasy-lab-roster-row.empty {
  grid-template-columns: 90px 1fr;
  color: var(--muted);
  border-style: dashed;
}

.fantasy-lab-slot {
  color: var(--blue);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fantasy-lab-slot-short {
  display: none;
}

.fantasy-lab-roster-name {
  display: grid;
  min-width: 0;
}

.fantasy-lab-roster-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fantasy-lab-roster-name small {
  color: var(--muted);
  font-size: .66rem;
}

.fantasy-lab-action {
  min-height: 29px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: var(--panel-2);
  font: 700 .65rem/1 Inter, sans-serif;
  cursor: pointer;
}

.fantasy-lab-action:hover,
.fantasy-lab-action.active {
  color: var(--text);
  border-color: var(--blue);
}

.fantasy-lab-action.locked {
  color: #07131a;
  border-color: var(--blue);
  background: var(--blue);
}

.fantasy-lab-roster-row > .lock-toggle,
.fantasy-lab-roster-row > .remove {
  width: 100%;
  min-width: 0;
}

.fantasy-lab-action.excluded,
.fantasy-lab-action.remove:hover {
  color: #ffb2ad;
  border-color: rgba(242, 91, 80, .58);
  background: rgba(242, 91, 80, .1);
}

.fantasy-lab-mode-control {
  display: inline-flex;
  gap: 3px;
}

.fantasy-lab-mode-control .fantasy-lab-action {
  min-width: 28px;
  padding-inline: 6px;
}

.fantasy-lab-mode-control .active {
  color: #07131a;
  border-color: var(--blue);
  background: var(--blue);
}

.fantasy-lab-score-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(68px, 1fr));
  width: 100%;
  gap: 6px;
}

.fantasy-lab-score-control .fantasy-lab-projection-button {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-height: 42px;
  padding: 6px 7px;
}

.fantasy-lab-projection-button small {
  color: inherit;
  font-size: .5rem;
  letter-spacing: .07em;
}

.fantasy-lab-projection-button strong {
  color: inherit;
  font: 800 .82rem/1 "Barlow Condensed", sans-serif;
}

.fantasy-lab-table-wrap {
  max-width: 100%;
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.fantasy-lab-table {
  width: 100%;
  min-width: 690px;
  border-collapse: collapse;
  font-size: .76rem;
}

.fantasy-lab-table-f1 .fantasy-lab-table {
  min-width: 790px;
}

.fantasy-lab-table th {
  padding: 10px 8px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: .6rem;
  letter-spacing: .07em;
  text-align: center;
  white-space: nowrap;
}

.fantasy-lab-table th:nth-child(2),
.fantasy-lab-table td:nth-child(2) {
  text-align: left;
}

.fantasy-lab-table td {
  padding: 8px;
  border-top: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.fantasy-lab-table td:nth-child(2) {
  min-width: 155px;
  white-space: normal;
}

.fantasy-lab-table td:nth-child(2) strong,
.fantasy-lab-table td:nth-child(2) small,
.fantasy-lab-table-f1 td:nth-child(4) span,
.fantasy-lab-table-f1 td:nth-child(4) small {
  display: block;
}

.fantasy-lab-table td small {
  color: var(--muted);
  font-size: .62rem;
}

.fantasy-lab-table tr.selected {
  background: rgba(34, 169, 218, .06);
}

.fantasy-lab-table tr.excluded {
  opacity: .48;
}

.fantasy-lab-projection-cell .fantasy-lab-projection-button {
  min-width: 54px;
  color: var(--text);
  background: transparent;
  font-family: "Barlow Condensed", sans-serif;
  font-size: .82rem;
}

.fantasy-lab-projection-cell .fantasy-lab-projection-button.active {
  color: #07131a;
  border-color: var(--blue);
  background: var(--blue);
}

.fantasy-lab-add-cell .fantasy-lab-action + .fantasy-lab-action {
  margin-left: 4px;
}

.fantasy-lab-saved-shell {
  display: grid;
  gap: 18px;
}

.fantasy-lab-saved-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.fantasy-lab-saved-toolbar .form-group {
  margin: 0;
}

.fantasy-lab-export {
  min-height: 38px;
  padding: 7px 13px;
  font-size: .76rem;
}

.fantasy-lab-saved-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.fantasy-lab-delete-wrap {
  flex: 0 0 auto;
}

.fantasy-lab-delete-state {
  display: none;
}

.fantasy-lab-delete-all {
  box-sizing: border-box;
  min-height: 38px;
  padding: 7px 12px;
  border-color: rgba(255, 112, 112, .48);
  color: #ffb0b0;
  font-size: .72rem;
}

.fantasy-lab-delete-confirm {
  position: static;
  box-sizing: border-box;
  width: min(290px, calc(100vw - 40px));
  padding: 13px;
  border: 1px solid rgba(255, 112, 112, .48);
  border-radius: 10px;
  background: var(--panel-2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.fantasy-lab-delete-confirm strong {
  display: block;
  color: var(--text);
  font-size: .82rem;
}

.fantasy-lab-delete-confirm p {
  margin: 5px 0 11px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.4;
}

.fantasy-lab-delete-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.fantasy-lab-delete-confirm-actions .btn,
.fantasy-lab-delete-confirm-actions .fantasy-lab-action {
  box-sizing: border-box;
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  font-size: .68rem;
}

.fantasy-lab-exposure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 7px;
  margin-top: 16px;
}

.fantasy-lab-exposure-grid > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  font-size: .74rem;
}

.fantasy-lab-exposure-grid small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .6rem;
}

.fantasy-lab-saved-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.fantasy-lab-saved-top h3 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.fantasy-lab-saved-total-grid,
.fantasy-lab-saved-member-projections {
  display: grid;
  grid-template-columns: repeat(3, minmax(58px, 1fr));
  gap: 6px;
}

.fantasy-lab-saved-total-grid > span,
.fantasy-lab-saved-member-projections > span {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, .018);
  text-align: right;
}

.fantasy-lab-saved-total-grid > span.active,
.fantasy-lab-saved-member-projections > span.active {
  border-color: var(--blue);
  background: rgba(34, 169, 218, .12);
}

.fantasy-lab-saved-total-grid small,
.fantasy-lab-saved-member-projections small {
  color: var(--muted);
  font-size: .52rem;
  letter-spacing: .07em;
}

.fantasy-lab-saved-total-grid strong,
.fantasy-lab-saved-member-projections strong {
  color: var(--text);
  font-family: "Barlow Condensed", sans-serif;
  font-size: .86rem;
}

.fantasy-lab-saved-members {
  display: grid;
  gap: 5px;
  margin-top: 14px;
}

.fantasy-lab-saved-members > div {
  display: grid;
  grid-template-columns: 76px minmax(110px, 1fr) minmax(190px, 230px);
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  background: var(--panel-2);
  font-size: .72rem;
}

.fantasy-lab-saved-members span,
.fantasy-lab-saved-members small {
  color: var(--muted);
}

.fantasy-lab-saved-members > div > strong {
  align-self: center;
}

.fantasy-lab-saved-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

@media (max-width: 1040px) {
  .fantasy-lab-workspace {
    grid-template-columns: 1fr;
  }

  .fantasy-lab-sidebar {
    position: static;
  }

  .fantasy-lab-sidebar .shiny-options-group,
  .fantasy-lab-secondary-actions {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .fantasy-lab-current,
  .fantasy-lab-pool,
  .fantasy-lab-saved-toolbar,
  .fantasy-lab-exposure,
  .fantasy-lab-saved-card,
  .fantasy-lab-sidebar {
    padding: 17px;
  }

  .fantasy-lab-current-header,
  .fantasy-lab-pool-heading,
  .fantasy-lab-exposure-header {
    flex-direction: column;
  }

  .fantasy-lab-totals {
    width: 100%;
  }

  .fantasy-lab-roster-row {
    grid-template-columns: 68px minmax(110px, 1fr) 64px 70px;
  }

  .fantasy-lab-roster-row > .fantasy-lab-score-control {
    grid-column: 2 / 5;
    grid-row: 2;
  }

  .fantasy-lab-roster-row > .lock-toggle {
    grid-column: 3;
    grid-row: 1;
  }

  .fantasy-lab-roster-row > .remove {
    grid-column: 4;
    grid-row: 1;
  }

  .fantasy-lab-saved-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .fantasy-lab-saved-grid {
    grid-template-columns: 1fr;
  }

  .fantasy-lab-saved-top {
    align-items: center;
  }
}

@media (max-width: 460px) {
  .fantasy-lab-section {
    overflow: visible;
  }

  .fantasy-lab-current,
  .fantasy-lab-pool,
  .fantasy-lab-saved-toolbar,
  .fantasy-lab-exposure,
  .fantasy-lab-saved-card,
  .fantasy-lab-sidebar {
    padding: 13px;
  }

  .fantasy-lab-sidebar .shiny-options-group,
  .fantasy-lab-secondary-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .fantasy-lab-sidebar .shiny-options-group {
    width: min(100%, 216px);
  }

  .fantasy-lab-sidebar .radio label {
    min-height: 32px;
    padding: 6px 3px;
    font-size: .64rem;
  }

  .fantasy-lab-sidebar > .button,
  .fantasy-lab-sidebar > .btn,
  .fantasy-lab-sidebar .fantasy-lab-generate {
    width: min(100%, 205px);
    align-self: flex-start;
    min-height: 36px;
    padding: 6px 9px;
    font-size: .68rem;
  }

  .fantasy-lab-secondary-actions {
    width: min(100%, 270px);
  }

  .fantasy-lab-secondary-actions .btn {
    min-width: 0;
    padding-inline: 4px;
    font-size: .61rem;
  }

  .fantasy-lab-portfolio-builder .shiny-options-group {
    width: min(100%, 168px);
  }

  .fantasy-lab-portfolio-builder .radio-inline {
    min-height: 30px;
    padding: 4px 2px;
    font-size: .62rem;
  }

  .fantasy-lab-percent-control {
    width: min(100%, 150px);
  }

  .fantasy-lab-current-header {
    gap: 12px;
  }

  .fantasy-lab-totals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .fantasy-lab-totals > span,
  .fantasy-lab-totals > span:first-child {
    grid-column: auto;
    min-width: 0;
    padding: 7px 6px;
    font-size: .94rem;
  }

  .fantasy-lab-roster-row {
    grid-template-columns: 55px minmax(0, 1fr) 54px 60px;
    gap: 6px;
    padding: 8px;
  }

  .fantasy-lab-roster-row > .fantasy-lab-slot {
    grid-column: 1;
    grid-row: 1;
  }

  .fantasy-lab-roster-row > .fantasy-lab-roster-name {
    grid-column: 2;
    grid-row: 1;
  }

  .fantasy-lab-roster-row > .fantasy-lab-score-control {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 5px;
  }

  .fantasy-lab-score-control .fantasy-lab-projection-button {
    min-width: 0;
    min-height: 40px;
    padding: 5px 3px;
  }

  .fantasy-lab-roster-row > .lock-toggle,
  .fantasy-lab-roster-row > .remove {
    padding-inline: 3px;
    font-size: .57rem;
  }

  .fantasy-lab-roster-row.empty {
    grid-template-columns: 58px 1fr;
  }

  .fantasy-lab-section-f1 .fantasy-lab-roster-row.empty {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .fantasy-lab-section-f1 .fantasy-lab-slot-full {
    display: none;
  }

  .fantasy-lab-section-f1 .fantasy-lab-slot-short {
    display: inline;
  }

  .fantasy-lab-table-wrap,
  .fantasy-lab-table-f1 {
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .fantasy-lab-table,
  .fantasy-lab-table-f1 .fantasy-lab-table,
  .fantasy-lab-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .fantasy-lab-table thead {
    display: none;
  }

  .fantasy-lab-table tbody {
    display: grid;
    gap: 8px;
  }

  .fantasy-lab-table tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(255, 255, 255, .015);
  }

  .fantasy-lab-table td {
    min-width: 0 !important;
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .fantasy-lab-table td:nth-child(1) {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    text-align: right;
  }

  .fantasy-lab-table td:nth-child(2) {
    grid-column: 1 / 3;
    grid-row: 1;
    min-width: 0;
  }

  .fantasy-lab-table td:nth-child(2) > strong {
    font-size: .86rem;
    line-height: 1.2;
  }

  .fantasy-lab-table td:nth-child(3) {
    grid-column: 1 / 3;
    grid-row: 2;
    color: var(--muted);
    font-size: .68rem;
    text-align: left;
  }

  .fantasy-lab-table td:nth-child(4),
  .fantasy-lab-table td:nth-child(5),
  .fantasy-lab-table td:nth-child(6) {
    grid-row: 3;
  }

  .fantasy-lab-table td:nth-child(7) {
    grid-column: 1 / -1;
    grid-row: 4;
    text-align: right;
  }

  .fantasy-lab-table-nascar td:nth-child(4)::before,
  .fantasy-lab-table-nascar td:nth-child(5)::before,
  .fantasy-lab-table-nascar td:nth-child(6)::before,
  .fantasy-lab-table-f1 td:nth-child(5)::before,
  .fantasy-lab-table-f1 td:nth-child(6)::before,
  .fantasy-lab-table-f1 td:nth-child(7)::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .48rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-align: center;
  }

  .fantasy-lab-table-nascar td:nth-child(4)::before,
  .fantasy-lab-table-f1 td:nth-child(5)::before {
    content: "FLOOR";
  }

  .fantasy-lab-table-nascar td:nth-child(5)::before,
  .fantasy-lab-table-f1 td:nth-child(6)::before {
    content: "MEAN";
  }

  .fantasy-lab-table-nascar td:nth-child(6)::before,
  .fantasy-lab-table-f1 td:nth-child(7)::before {
    content: "CEILING";
  }

  .fantasy-lab-projection-cell .fantasy-lab-projection-button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 5px 2px;
  }

  .fantasy-lab-add-cell .fantasy-lab-action {
    min-width: 70px;
  }

  .fantasy-lab-table-f1 td:nth-child(4) {
    grid-column: 2 / 3;
    grid-row: 2;
    color: var(--muted);
    font-size: .62rem;
    text-align: left;
  }

  .fantasy-lab-table-f1 td:nth-child(3) {
    grid-column: 1;
  }

  .fantasy-lab-table-f1 td:nth-child(5),
  .fantasy-lab-table-f1 td:nth-child(6),
  .fantasy-lab-table-f1 td:nth-child(7) {
    grid-row: 3;
  }

  .fantasy-lab-table-f1 td:nth-child(5) {
    grid-column: 1;
  }

  .fantasy-lab-table-f1 td:nth-child(6) {
    grid-column: 2;
  }

  .fantasy-lab-table-f1 td:nth-child(7) {
    grid-column: 3;
  }

  .fantasy-lab-table-f1 td:nth-child(8) {
    grid-column: 1 / -1;
    grid-row: 4;
    text-align: right;
  }

  .fantasy-lab-saved-top {
    flex-direction: column;
    align-items: stretch;
  }

  .fantasy-lab-saved-total-grid {
    width: 100%;
  }

  .fantasy-lab-saved-members > div {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .fantasy-lab-saved-member-projections {
    grid-column: 1 / -1;
  }
}
