/* ==========================================================================
   Modello 4.4 (?v=40) - Responsive Desktop, Tablet & Mobile Design System
   Zero horizontal overflow, mobile bottom nav + model sheet, collision-proof
   distribution rulers, 4-card Set Your Bar with Max Cost Ceiling & dual Cards/Table
   ========================================================================== */

:root {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-tint: #f1f5f9;
  --bg-blue-soft: #eff6ff;
  --bg-green-soft: #ecfdf5;
  --bg-amber-soft: #fffbeb;
  --border-soft: #e2e8f0;
  --border-mid: #cbd5e1;
  --border-strong: #cbd5e1;
  --text-strong: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --green: #059669;
  --green-ink: #065f46;
  --amber: #d97706;
  --amber-ink: #92400e;
  --red: #dc2626;
  --shadow-card: 0 2px 6px rgba(15, 23, 42, 0.03), 0 10px 28px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 14px 36px rgba(37, 99, 235, 0.1), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-float: 0 16px 44px rgba(15, 23, 42, 0.06), 0 2px 10px rgba(37, 99, 235, 0.05);
  --radius-xl: 20px;
  --radius-lg: 15px;
  --radius-md: 11px;
  --radius-sm: 8px;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Plus Jakarta Sans", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  max-width: 100%;
  background: var(--bg-page);
  color: var(--text-body);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

body.sheet-lock {
  overflow: hidden;
}

body.sheet-lock #viewGuide {
  z-index: 280;
}

body.has-drawer {
  padding-bottom: 90px;
}

body.has-drawer-expanded {
  padding-bottom: 300px;
}

.ambient-mesh {
  position: fixed;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1280px, 100%);
  max-width: 100%;
  height: 520px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 22% 24%, rgba(37, 99, 235, 0.065), transparent 48%),
    radial-gradient(circle at 78% 18%, rgba(148, 163, 184, 0.07), transparent 46%);
  filter: blur(18px);
}

.category-icon-svg {
  color: #64748b;
  transition: color 0.14s ease;
}

.bench-rail-row.active .category-icon-svg,
.nav-pill.active .category-icon-svg {
  color: var(--primary);
}

.pk-pill.active .category-icon-svg {
  color: #ffffff;
}

.view-panel {
  min-width: 0;
  max-width: 100%;
}

main,
footer {
  position: relative;
  z-index: 1;
}

button,
input,
select {
  font-family: inherit;
}

button:active {
  transform: scale(0.98);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.hidden {
  display: none !important;
}

.container {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 639px) {
  .container {
    padding: 0 14px;
  }
}

.edge-fade-x {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.edge-fade-x::-webkit-scrollbar {
  display: none;
}

/* ---------------- MOTION KEYFRAMES ---------------- */
@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes softSwap {
  from {
    opacity: 0.4;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseHalo {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

@keyframes popCelebrate {
  0% {
    opacity: 0;
    transform: scale(0.94);
  }
  65% {
    transform: scale(1.015);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.anim-rise {
  animation: cardRise 0.38s var(--ease-spring) both;
}

.anim-soft-swap {
  animation: softSwap 0.25s var(--ease-spring) both;
}

.anim-pop {
  animation: popCelebrate 0.32s var(--ease-spring) both;
}

@media (prefers-reduced-motion: reduce) {
  .anim-rise,
  .anim-soft-swap,
  .anim-pop {
    animation: none !important;
  }
}

/* ---------------- OFFICIAL BRAND LOGOS ---------------- */
.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 9px;
  overflow: hidden;
}

.brand-logo-wrap.logo-tile {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.brand-logo-wrap.full-bleed {
  background: transparent;
}

.brand-logo-wrap.brand-monogram {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-logo-wrap img,
.brand-logo-wrap svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------------- SHARED PROGRESS BARS ---------------- */
.pod-bar-track {
  height: 6px;
  width: 100%;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.pod-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.65s var(--ease-spring);
}

/* ---------------- SUNLIT STICKY HEADER & MOBILE BOTTOM DOCK ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 150;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.header-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
  padding-top: 6px;
  padding-bottom: 6px;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-link:hover {
  text-decoration: none;
}

.site-logo-mark {
  display: inline-flex;
}

.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.14rem;
  letter-spacing: -0.03em;
  color: var(--text-strong);
}

.view-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  background: rgba(241, 245, 249, 0.92);
  padding: 4px;
  border-radius: 11px;
  border: 1px solid rgba(226, 232, 240, 0.7);
}

.nav-glider {
  position: absolute;
  top: 0;
  left: 0;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(37, 99, 235, 0.06);
  transition: transform 0.34s var(--ease-spring), width 0.34s var(--ease-spring), height 0.25s ease;
  pointer-events: none;
  z-index: 0;
}

.view-tab {
  position: relative;
  z-index: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s ease;
}

.view-tab:hover {
  color: var(--text-strong);
}

.view-tab.active {
  color: var(--primary);
  font-weight: 700;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.live-pulse-pill {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #ffffff;
  border: 1px solid var(--border-soft);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 960px) {
  .live-pulse-pill {
    display: none;
  }
}

/* Mobile Bottom App Dock (<= 639px) */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 639px) {
  .header-inner {
    min-height: 48px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .view-nav {
    display: none;
  }

  .live-pulse-pill {
    display: inline-flex;
    font-size: 0.68rem;
    padding: 3px 8px;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 220;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--border-soft);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
    padding: 4px 6px calc(5px + env(safe-area-inset-bottom, 0px));
  }

  .mob-nav-btn {
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 5px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 0.67rem;
    font-weight: 650;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease;
  }

  .mob-nav-btn svg {
    flex-shrink: 0;
    transition: transform 0.16s var(--ease-spring);
  }

  .mob-nav-btn.active {
    color: var(--primary);
    font-weight: 750;
    background: rgba(37, 99, 235, 0.07);
  }

  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  body.has-drawer {
    padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
  }

  body.has-drawer-expanded {
    padding-bottom: calc(360px + env(safe-area-inset-bottom, 0px));
  }
}

.meta-label {
  font-size: 0.77rem;
  color: var(--text-muted);
}

/* ---------------- BUTTONS & BADGES ---------------- */
.btn-outline-sm {
  background: var(--bg-card);
  color: var(--text-body);
  border: 1px solid var(--border-soft);
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 0.81rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.btn-outline-sm:hover {
  border-color: #93c5fd;
  color: var(--primary-dark);
  background: #ffffff;
  text-decoration: none;
}

.btn-outline-sm.active {
  background: var(--bg-blue-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 700;
}

.btn-solid-sm {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border: 1px solid #1d4ed8;
  padding: 6px 14px;
  border-radius: 9px;
  font-size: 0.81rem;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.btn-solid-sm:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  text-decoration: none;
}

.btn-link-sm {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  padding: 0;
}

.btn-link-sm:hover {
  text-decoration: underline;
}

.soft-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--text-body);
}

.soft-badge.blue {
  background: var(--bg-blue-soft);
  color: var(--primary-dark);
}

.soft-badge.green {
  background: var(--bg-green-soft);
  color: var(--green-ink);
}

.soft-badge.amber {
  background: var(--bg-amber-soft);
  color: var(--amber-ink);
}

.sync-toast {
  background: var(--bg-blue-soft);
  border-bottom: 1px solid #bfdbfe;
  color: var(--primary-dark);
  font-size: 0.84rem;
  padding: 9px 0;
}

.sync-toast-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* ---------------- HERO & SECTION HEADINGS ---------------- */
.guide-flow,
.view-pad {
  padding-top: 22px;
  padding-bottom: 72px;
}

@media (max-width: 639px) {
  .guide-flow,
  .view-pad {
    padding-top: 14px;
    padding-bottom: 32px;
  }
}

.guide-block {
  margin-bottom: 42px;
}

@media (max-width: 639px) {
  .guide-block {
    margin-bottom: 28px;
  }
}

.guide-block:last-child {
  margin-bottom: 0;
}

.hero-intro {
  max-width: 820px;
  margin-bottom: 14px;
}

@media (max-width: 639px) {
  .hero-intro {
    margin-bottom: 10px;
  }
}

.section-intro {
  margin-bottom: 14px;
}

.block-header-split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.page-h1 {
  font-family: var(--display);
  font-size: clamp(1.42rem, 2.8vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.13;
  color: var(--text-strong);
  margin: 0 0 4px;
}

.page-lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.sec-h2 {
  font-family: var(--display);
  font-size: clamp(1.16rem, 2.1vw, 1.32rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  margin: 0 0 2px;
}

.sec-lead {
  font-size: 0.89rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---------------- BLOCK 1: SPLIT MODEL STUDIO + MOBILE BOTTOM SHEET ---------------- */
.studio-shell {
  display: grid;
  grid-template-columns: 332px minmax(0, 1fr);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  overflow: visible;
}

.mobile-model-switcher,
.studio-sheet-backdrop,
.studio-sheet-topbar {
  display: none;
}

@media (max-width: 940px) {
  .studio-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .mobile-model-switcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    background: #f8fafc;
    border: none;
    border-bottom: 1px solid var(--border-soft);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 11px 14px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
  }

  .mobile-model-switcher:hover {
    background: #eff6ff;
  }

  .mms-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
  }

  .mms-rank-pill {
    font-size: 0.68rem;
    font-weight: 750;
    color: #334155;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
  }

  .mms-titles {
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .mms-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  .mms-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mms-right {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
  }

  .mms-score {
    font-family: var(--display);
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-strong);
    background: #ffffff;
    border: 1px solid var(--border-soft);
    padding: 3px 8px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
  }

  .mms-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 26px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 750;
    color: var(--primary-dark);
    background: var(--bg-blue-soft);
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    white-space: nowrap;
  }

  .studio-shell.sheet-open .studio-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 290;
    background: rgba(15, 23, 42, 0.46);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .studio-sidebar {
    display: none !important;
  }

  .studio-shell.sheet-open .studio-sidebar {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 300;
    max-height: min(82dvh, 660px);
    border-right: none;
    border-radius: 22px 22px 0 0;
    background: #ffffff;
    box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.24);
    padding-bottom: env(safe-area-inset-bottom, 12px);
    animation: cardRise 0.24s var(--ease-spring) both;
  }

  .studio-sheet-topbar {
    display: flex;
    flex-direction: column;
    padding: 8px 16px 10px;
    border-bottom: 1px solid var(--border-soft);
    background: #ffffff;
  }

  .studio-sheet-grabber {
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
    margin: 0 auto 8px;
  }

  .studio-sheet-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-strong);
  }

  .studio-sheet-count {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 6px;
  }

  .studio-sheet-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border-soft);
    background: #f8fafc;
    color: var(--text-body);
    font-size: 1.15rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
}

.studio-sidebar {
  background: #f8fafc;
  border-right: 1px solid var(--border-soft);
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 585px;
}

.studio-sidebar-head {
  padding: 13px 13px 10px;
  border-bottom: 1px solid var(--border-soft);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.studio-search-input {
  width: 100%;
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 0.84rem;
  color: var(--text-strong);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.studio-search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.studio-lab-rail {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.studio-lab-rail::-webkit-scrollbar {
  display: none;
}

.rail-lab-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 4px 10px 4px 6px;
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.16s var(--ease-spring);
}

.rail-lab-chip:first-child {
  padding: 4px 11px;
}

.rail-lab-chip:hover {
  border-color: #93c5fd;
  color: var(--primary-dark);
  background: #ffffff;
}

.rail-lab-chip.active {
  background: var(--text-strong);
  border-color: var(--text-strong);
  color: #ffffff;
  box-shadow: 0 3px 9px rgba(15, 23, 42, 0.14);
}

.studio-model-list {
  flex: 1;
  overflow-y: auto;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.studio-empty-list {
  padding: 22px 14px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.studio-model-row {
  display: grid;
  grid-template-columns: 27px 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 9px;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s var(--ease-spring);
}

.studio-model-row:hover {
  background: #ffffff;
  border-color: var(--border-soft);
}

.studio-model-row.active {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.11);
}

.smr-rank {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.studio-model-row.active .smr-rank {
  color: var(--primary);
}

.smr-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.smr-name {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.smr-sub {
  font-size: 0.69rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.smr-score {
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-strong);
  background: #e2e8f0;
  padding: 2px 7px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.studio-model-row.active .smr-score {
  background: var(--bg-blue-soft);
  color: var(--primary-dark);
}

/* Right Stage */
.studio-spotlight {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  justify-content: space-between;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 639px) {
  .studio-spotlight {
    padding: 13px 13px 15px;
    gap: 11px;
  }
}

.studio-hero-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  padding: 15px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

@media (max-width: 639px) {
  .studio-hero-card {
    padding: 13px 14px;
  }
}

.studio-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.specimen-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 210px;
}

.specimen-identity-copy {
  min-width: 0;
  flex: 1;
}

.specimen-title-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.specimen-model-title {
  font-family: var(--display);
  font-size: clamp(1.18rem, 2.2vw, 1.42rem);
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.03em;
  line-height: 1.14;
}

.specimen-meta-tag {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.specimen-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .specimen-header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.35fr;
  }
}

.studio-verdict-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.verdict-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--text-strong);
}

.verdict-chip.green {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.verdict-chip.blue {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.verdict-chip.amber {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.verdict-chip.slate {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
}

/* Live Distribution Rulers (Collision-Proof Milestones) */
.studio-rulers-box {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 13px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rulers-caption-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--text-body);
}

.dist-metric-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dist-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.dist-title-cluster {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.dist-metric-name {
  font-size: 0.83rem;
  font-weight: 750;
  color: var(--text-strong);
}

.dist-rank-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #ffffff;
  border: 1px solid var(--border-soft);
  padding: 1px 7px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.dist-score-cluster {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  flex-shrink: 0;
}

.dist-big-val {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.dist-big-val.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dist-denom {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-muted);
}

.dist-track-stage {
  position: relative;
  margin-bottom: 12px;
}

.dist-track-rail {
  position: relative;
  width: 100%;
  height: 22px;
  display: flex;
  align-items: center;
}

.dist-track-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.dist-track-fill {
  height: 100%;
  width: 0%;
  opacity: 0.26;
  border-radius: 999px;
  transition: width 0.52s var(--ease-spring);
}

.dist-landmark {
  position: absolute;
  top: 2px;
  height: 18px;
  border-left: 1.5px dashed #94a3b8;
  pointer-events: none;
  z-index: 1;
}

.dist-landmark-lbl {
  position: absolute;
  top: 20px;
  left: 0;
  transform: translateX(-50%);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
}

.dist-landmark.lm-right-edge .dist-landmark-lbl {
  transform: translateX(-88%);
}

.dist-landmark.lm-left-edge .dist-landmark-lbl {
  transform: translateX(-12%);
}

.dist-landmark.lm-anchor-end .dist-landmark-lbl {
  transform: translateX(-94%);
}

.dist-landmark.lm-anchor-start .dist-landmark-lbl {
  transform: translateX(-6%);
}

.dist-peer-dot {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 0;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease;
}

.dist-peer-dot:hover {
  background: var(--primary);
  z-index: 5;
}

.dist-peer-dot.is-self {
  opacity: 0;
  pointer-events: none;
}

.dist-active-pin {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 4.5px solid var(--primary);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
  z-index: 4;
  pointer-events: none;
  transition: left 0.52s var(--ease-spring);
}

.dist-mobile-foot {
  display: none;
}

/* Mobile (< 640px): clean bar + centered pin + subtle tick notches + non-overlapping footer line */
@media (max-width: 639px) {
  .studio-rulers-box {
    padding: 12px 13px 14px;
    gap: 14px;
  }

  .dist-metric-row {
    gap: 4px;
  }

  .dist-row-head .dist-rank-pill {
    display: none;
  }

  .dist-track-stage {
    margin-bottom: 0;
  }

  .dist-track-rail {
    height: 20px;
  }

  .dist-track-fill {
    opacity: 0.36;
  }

  .dist-peer-dot {
    display: none;
  }

  .dist-landmark {
    top: 50%;
    height: 12px;
    transform: translateY(-50%);
    border-left: 1.5px solid #94a3b8;
  }

  .dist-landmark-lbl {
    display: none;
  }

  .dist-mobile-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.69rem;
    line-height: 1.3;
  }

  .dist-mob-rank {
    font-weight: 700;
    color: var(--text-body);
    background: #ffffff;
    border: 1px solid var(--border-soft);
    padding: 1px 7px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .dist-mob-landmarks {
    font-weight: 600;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Compact 4-Tile Practical Specs Strip */
.studio-specs-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

@media (max-width: 680px) {
  .studio-specs-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.studio-spec-tile {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sst-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.sst-val {
  font-family: var(--display);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sst-sub {
  font-size: 0.67rem;
  color: var(--text-muted);
}

/* Inline Hover/Tap ? Metric Tooltips inside Model Studio */
.metric-tip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.metric-tip-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border-mid);
  background: #ffffff;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s var(--ease-spring);
}

.metric-tip-btn:hover,
.metric-tip-wrap:focus-within .metric-tip-btn,
.metric-tip-wrap.is-open .metric-tip-btn {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.metric-tip-pop {
  display: none;
  position: absolute;
  width: 248px;
  max-width: min(248px, 78vw);
  padding: 9px 11px;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.44;
  text-align: left;
  white-space: normal;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24), 0 2px 6px rgba(15, 23, 42, 0.12);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 60;
}

.metric-tip-pop.place-down-left {
  top: calc(100% + 7px);
  left: -6px;
}

.metric-tip-pop.place-up-left {
  bottom: calc(100% + 7px);
  left: -6px;
}

.metric-tip-pop.place-up-right {
  bottom: calc(100% + 7px);
  right: -6px;
  left: auto;
}

@media (max-width: 680px) {
  .studio-spec-tile:nth-child(odd) .metric-tip-pop {
    left: -6px;
    right: auto;
  }
  .studio-spec-tile:nth-child(even) .metric-tip-pop {
    right: -6px;
    left: auto;
  }
}

.metric-tip-wrap:hover .metric-tip-pop,
.metric-tip-wrap:focus-within .metric-tip-pop,
.metric-tip-wrap.is-open .metric-tip-pop {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dp-kicker {
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--primary);
  margin-bottom: 5px;
}

.unit-tip {
  font-size: 0.79rem;
  color: var(--amber-ink);
  background: var(--bg-amber-soft);
  padding: 8px 11px;
  border-radius: var(--radius-sm);
}

.unit-tip.green {
  color: var(--green-ink);
  background: var(--bg-green-soft);
}

/* ---------------- BLOCK 2: BENCHMARK STUDIO ---------------- */
.bench-studio-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  overflow: visible;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 960px) {
  .bench-studio-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

.bench-studio-sidebar {
  background: #f8fafc;
  border-right: 1px solid var(--border-soft);
  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  padding: 9px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

@media (max-width: 960px) {
  .bench-studio-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 10px 12px;
  }
}

.bench-rail-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 7px 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.14s var(--ease-spring);
}

@media (max-width: 960px) {
  .bench-rail-row {
    width: auto;
    flex-shrink: 0;
    scroll-snap-align: start;
    background: #ffffff;
    border-color: var(--border-soft);
    padding: 6px 11px;
    border-radius: 11px;
  }
}

.bench-rail-row:hover {
  background: #ffffff;
  border-color: var(--border-soft);
}

.bench-rail-row.active {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.11);
}

.brr-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.brr-title {
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bench-rail-row.active .brr-title {
  color: var(--primary-dark);
}

.brr-sub {
  font-size: 0.67rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bench-studio-stage {
  padding: 22px 26px;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 639px) {
  .bench-studio-stage {
    padding: 14px 13px 16px;
  }
}

.bench-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 26px;
  align-items: start;
}

.bench-stage-grid > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 880px) {
  .bench-stage-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

.bench-stage-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bl-title {
  margin: 8px 0 6px;
  font-family: var(--display);
  font-size: clamp(1.12rem, 2vw, 1.24rem);
  line-height: 1.22;
  color: var(--text-strong);
}

.bl-oneliner {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--text-body);
}

.clean-steps {
  margin: 10px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.c-step {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  background: var(--bg-page);
  padding: 7px 11px;
  border-radius: 9px;
  color: var(--text-body);
}

.c-step-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 0.69rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Clean 3-Row Human vs AI Scoreboard */
.bench-vs-box {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 11px 14px;
  margin: 12px 0 10px;
}

.bench-vs-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bvs-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bvs-label-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.79rem;
}

.bvs-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-body);
  font-weight: 600;
  min-width: 0;
}

.bvs-val {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.bvs-track {
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.bvs-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.6s var(--ease-spring);
}

.bvs-fill.muted {
  background: #cbd5e1;
}

.bvs-fill.human {
  background: #64748b;
}

.bvs-fill.leader {
  background: var(--primary);
}

.bench-catch-inline {
  margin: 10px 0 0;
  font-size: 0.79rem;
  color: var(--text-muted);
}

.bench-catch-inline strong {
  color: var(--text-strong);
}

/* Right Side Interactive Exhibits */
@keyframes diceRollToss {
  0% { transform: scale(1) rotate(0deg); }
  26% { transform: translateY(-4.5px) scale(1.13) rotate(-135deg); }
  62% { transform: translateY(-2.5px) scale(1.08) rotate(-295deg); }
  100% { transform: translateY(0) scale(1) rotate(-360deg); }
}

@keyframes diceLandSettle {
  0% { transform: scale(1.1); }
  55% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.exhibit-surface {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 16px 18px 17px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.025), 0 10px 26px rgba(15, 23, 42, 0.035);
}

@media (max-width: 639px) {
  .exhibit-surface {
    padding: 13px 13px 14px;
  }
}

.exhibit-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding-bottom: 10px;
  margin-bottom: 13px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--text-muted);
}

.exhibit-head-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.005em;
}

.exhibit-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.exhibit-dice-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  color: var(--text-body);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.exhibit-dice-btn:hover {
  background: var(--bg-blue-soft);
  border-color: #93c5fd;
  color: var(--primary-dark);
  box-shadow: 0 2px 7px rgba(37, 99, 235, 0.13);
}

.exhibit-dice-btn.is-rolling .dice-svg-icon {
  animation: diceRollToss 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.exhibit-dice-btn.is-settled .dice-svg-icon {
  animation: diceLandSettle 0.2s var(--ease-spring) both;
}

.dice-svg-icon {
  display: block;
  flex-shrink: 0;
}

.exhibit-source-link {
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 650;
  color: var(--primary);
}

.exhibit-body {
  min-width: 0;
}

.exhibit-stem {
  margin: 0 0 12px;
  font-size: 0.89rem;
  font-weight: 460;
  color: var(--text-strong);
  line-height: 1.6;
  letter-spacing: -0.006em;
}

/* Inline Math, Fractions, Radicals & Code Pills */
.ex-code,
.tok-code {
  font-family: var(--mono);
  font-size: 0.8em;
  font-weight: 560;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  padding: 1px 5.5px;
  border-radius: 5px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tok-repo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: baseline;
  font-family: var(--mono);
  font-size: 0.79em;
  font-weight: 650;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  padding: 1px 6px 1px 5px;
  border-radius: 5px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tok-path {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: baseline;
  font-family: var(--mono);
  font-size: 0.79em;
  line-height: 1.35;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  padding: 1px 6px 1px 5px;
  border-radius: 5px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tok-path .tok-svg {
  color: #64748b;
  flex-shrink: 0;
  transform: translateY(0.5px);
}

.tok-repo .tok-svg {
  color: #64748b;
  flex-shrink: 0;
  transform: translateY(0.5px);
}

.tok-path .tp-dir {
  color: #64748b;
  font-weight: 480;
}

.tok-path .tp-base {
  color: #0f172a;
  font-weight: 650;
}

.tok-cmd {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: baseline;
  font-family: var(--mono);
  font-size: 0.78em;
  font-weight: 540;
  line-height: 1.38;
  background: #0f172a;
  border: 1px solid #1e293b;
  color: #f8fafc;
  padding: 1.5px 7px 1.5px 6px;
  border-radius: 5.5px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tok-cmd-prompt {
  color: #94a3b8;
  font-weight: 800;
  user-select: none;
}

.tok-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  vertical-align: baseline;
  font-family: var(--mono);
  font-size: 0.78em;
  font-weight: 540;
  line-height: 1.38;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 2.5px solid #64748b;
  color: #0f172a;
  padding: 1px 7px 1px 5.5px;
  border-radius: 5px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tok-line-badge {
  color: #64748b;
  font-size: 0.86em;
  font-weight: 800;
  user-select: none;
}

/* Multi-line Terminal & Code Snippet Blocks */
.ex-snippet-box {
  margin: 0 0 12px;
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.5;
}

.ex-snippet-box.is-terminal {
  background: #0f172a;
  border: 1px solid #1e293b;
  color: #f1f5f9;
}

.ex-snippet-box.is-code {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

.esb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4.5px 10px;
  font-family: var(--sans);
  font-size: 0.68rem;
}

.ex-snippet-box.is-terminal .esb-head {
  background: #1e293b;
  border-bottom: 1px solid #334155;
  color: #94a3b8;
}

.ex-snippet-box.is-code .esb-head {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  color: #64748b;
}

.esb-kind {
  font-family: var(--mono);
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ex-snippet-box.is-terminal .esb-kind {
  color: #cbd5e1;
}

.ex-snippet-box.is-code .esb-kind {
  color: #475569;
}

.esb-label {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.esb-lines {
  padding: 7px 11px;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.esb-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.esb-line code {
  font-family: var(--mono);
  font-size: inherit;
}

.esb-prompt {
  color: #94a3b8;
  font-weight: 800;
  user-select: none;
  flex-shrink: 0;
}

.esb-line.is-comment {
  color: #94a3b8;
}

.esb-ln {
  color: #94a3b8;
  font-size: 0.7rem;
  min-width: 12px;
  text-align: right;
  user-select: none;
  flex-shrink: 0;
}

.math-expr {
  font-family: "STIX Two Math", "Cambria Math", "Times New Roman", Georgia, serif;
  font-size: 1.03em;
  line-height: 1.25;
  color: inherit;
  display: inline;
}

.math-expr var {
  font-style: italic;
}

.math-expr .math-rm,
.math-expr .math-op {
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.92em;
}

.math-expr .math-op {
  padding-right: 1px;
}

.math-expr .math-cal {
  font-style: italic;
  font-weight: 600;
}

.math-expr .math-sym {
  font-style: normal;
  padding: 0 1px;
}

.math-expr sup,
.math-expr sub {
  font-size: 0.74em;
  line-height: 0;
}

.math-overbar {
  text-decoration: overline;
}

.math-frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
  margin: 0 2px;
  font-size: 0.88em;
  line-height: 1.1;
}

.math-frac .mf-num {
  padding: 0 3px 1px;
  border-bottom: 1.15px solid currentColor;
}

.math-frac .mf-den {
  padding: 1px 3px 0;
}

.math-sqrt {
  display: inline-flex;
  align-items: stretch;
  vertical-align: middle;
  margin: 0 1px;
}

.math-sqrt .ms-rad {
  font-style: normal;
  font-size: 1.06em;
  line-height: 1;
  margin-right: 1px;
  display: inline-flex;
  align-items: center;
}

.math-sqrt .ms-body {
  border-top: 1.15px solid currentColor;
  padding: 1px 2px 0;
}

/* Visual Frames */
.exhibit-visual-frame {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 12px 11px;
  margin-bottom: 13px;
}

.exhibit-visual-frame.is-screenshot {
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border-color: var(--border-mid);
}

.exhibit-visual-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.evc-tag {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary-dark);
  background: var(--bg-blue-soft);
  padding: 2px 7px;
  border-radius: 999px;
}

.evc-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.exhibit-diagram-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  overflow: hidden;
}

.exhibit-diagram-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 204px;
}

.exam-table-scroll {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
}

.exam-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.exam-data-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.71rem;
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.exam-data-table td {
  padding: 5.5px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-strong);
}

.exam-data-table tbody tr:last-child td {
  border-bottom: none;
}

.exam-data-table tr.is-highlight-row td {
  background: #eff6ff;
  font-weight: 650;
}

.exam-data-table td.is-missing-cell {
  color: #b45309;
  background: #fffbeb !important;
  font-weight: 800;
}

.vision-shot-window {
  display: flex;
  flex-direction: column;
}

.vision-shot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 11px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border-soft);
}

.vision-dots {
  display: inline-flex;
  gap: 5px;
}

.vision-dots i {
  width: 7.5px;
  height: 7.5px;
  border-radius: 50%;
  background: #cbd5e1;
  display: block;
}

.vision-url {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vision-tag {
  font-size: 0.65rem;
  font-weight: 750;
  color: var(--amber-ink);
  background: var(--bg-amber-soft);
  border: 1px solid #fde68a;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.vision-shot-canvas {
  padding: 11px 13px;
  background: #fcfcfd;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vision-shot-q {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.8rem;
  color: #1e293b;
  line-height: 1.45;
}

.vision-baked-opts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.7rem;
  color: #334155;
  padding-top: 2px;
}

@media (max-width: 580px) {
  .vision-baked-opts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Unified Clean Keycap Choice Rows */
.exhibit-choices-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
}

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

@media (max-width: 540px) {
  .exhibit-choices-list.two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

.exhibit-choice-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 8.5px 11px;
  text-align: left;
  font-size: 0.83rem;
  font-weight: 480;
  color: var(--text-strong);
  line-height: 1.44;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.exhibit-choice-btn:hover {
  background: #f8fafc;
  border-color: #93c5fd;
}

.ecb-key {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.71rem;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.exhibit-choice-btn:hover .ecb-key {
  background: var(--bg-blue-soft);
  border-color: #bfdbfe;
  color: var(--primary-dark);
}

.ecb-text {
  min-width: 0;
  flex: 1;
}

.exhibit-choice-btn.is-correct {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
  font-weight: 560;
}

.exhibit-choice-btn.is-correct .ecb-key {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.exhibit-choice-btn.is-wrong {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.exhibit-choice-btn.is-wrong .ecb-key {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.exhibit-choice-btn.is-answer-hint {
  background: #f0fdf4;
  border-color: #86efac;
  color: #065f46;
}

.exhibit-choice-btn.is-answer-hint .ecb-key {
  background: #dcfce7;
  border-color: #86efac;
  color: #065f46;
}

.exhibit-choice-btn.is-inspected {
  background: #fffbeb;
  border-color: #fcd34d;
  color: var(--amber-ink);
}

.exhibit-choice-btn.is-inspected .ecb-key {
  background: #fef3c7;
  border-color: #fcd34d;
  color: var(--amber-ink);
}

/* Segmented Switcher */
.exhibit-seg-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 10px;
  margin-bottom: 11px;
}

.exhibit-seg-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7.5px;
  padding: 6.5px 8px;
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.exhibit-seg-btn:hover {
  color: var(--text-strong);
}

.exhibit-seg-btn.active {
  background: #ffffff;
  color: var(--text-strong);
  border-color: var(--border-soft);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Understated Insight Note */
.exhibit-insight {
  margin-top: 12px;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 0.81rem;
  line-height: 1.54;
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  color: var(--text-body);
}

.exhibit-insight.green {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #065f46;
}

.exhibit-insight.amber {
  background: #fffbeb;
  border-color: #fde68a;
  color: var(--amber-ink);
}

.exhibit-insight.slate {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--text-strong);
}

/* 1. SWE-bench Multi-File Walkthrough */
.swe-files-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding: 7px 10px;
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
}

.swe-files-lbl {
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-right: 2px;
}

.swe-file-chip {
  font-size: 0.74rem;
  padding: 2px 7px 2px 6px;
  background: #ffffff;
}

.swe-result-card {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  padding: 12px 13px;
}

.swe-attempt-desc {
  margin: 0 0 9px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-body);
}

.omni-reply-quote {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 520;
  line-height: 1.52;
  color: var(--text-strong);
}

.swe-checks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.swe-check-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  line-height: 1.42;
  color: var(--text-strong);
}

.swe-status-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: 1px;
}

.swe-status-pill.pass {
  background: #dcfce7;
  color: #065f46;
}

.swe-status-pill.fail {
  background: #fee2e2;
  color: #991b1b;
}

/* 2. ARC-AGI-2 Spacious Playable Grid */
.arc-stage-box {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  padding: 11px 12px;
}

.arc-stage-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.arc-examples-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 580px) {
  .arc-examples-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

.arc-example-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.arc-pair-grids {
  display: flex;
  align-items: center;
  gap: 8px;
}

.arc-arrow {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.arc-rule-hint {
  font-size: 0.72rem;
  font-weight: 520;
  color: var(--text-muted);
  text-align: center;
}

.arc-quiz-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.arc-test-input {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.arc-options-pair {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.arc-choice-card {
  background: #ffffff;
  border: 1.5px solid var(--border-soft);
  border-radius: 10px;
  padding: 7px 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.arc-choice-card:hover {
  border-color: #93c5fd;
  background: #f8fafc;
}

.arc-choice-card.picked-wrong {
  border-color: #fca5a5;
  background: #fef2f2;
}

.arc-choice-card.picked-right {
  border-color: #6ee7b7;
  background: #ecfdf5;
}

.arc-choice-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-strong);
}

.arc-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 21px);
  grid-template-rows: repeat(3, 21px);
  gap: 2px;
  background: #cbd5e1;
  padding: 3px;
  border-radius: 6px;
}

.arc-px-0 { background: #ffffff; }
.arc-px-1 { background: #2563eb; }
.arc-px-2 { background: #dc2626; }
.arc-px-3 { background: #16a34a; }
.arc-px-4 { background: #eab308; }
.arc-px-5 { background: #64748b; }
.arc-px-6 { background: #db2777; }
.arc-px-7 { background: #ea580c; }
.arc-px-8 { background: #06b6d4; }
.arc-px-9 { background: #991b1b; }

/* 3. LiveBench Cost Receipt */
.receipt-bars-wrap {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  padding: 12px 13px 5px;
}

.cost-bar-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) minmax(80px, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 0.8rem;
}

@media (max-width: 640px) {
  .cost-bar-row {
    grid-template-columns: 1fr auto;
    gap: 5px 8px;
  }

  .cost-bar-track {
    grid-column: 1 / -1;
    order: 3;
  }
}

.cost-bar-track {
  background: #e2e8f0;
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
}

.cost-bar-fill {
  height: 100%;
  width: 0%;
  min-width: 6px;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.72s var(--ease-spring);
}

.cost-bar-fill.amber {
  background: linear-gradient(90deg, #fbbf24, #d97706);
}

.cost-bar-fill.green {
  background: linear-gradient(90deg, #34d399, #059669);
}

.cost-bar-fill.blue {
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

/* 4. Terminal-Bench Rules & 5. HLE Funnel */
.tbench-rules-stack {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tbench-rule-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  padding: 8.5px 11px;
  font-size: 0.81rem;
  line-height: 1.46;
  color: var(--text-body);
}

.hle-funnel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

@media (max-width: 580px) {
  .hle-funnel-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hle-stage-card {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hle-stage-step {
  font-size: 0.69rem;
  font-weight: 700;
  color: var(--text-muted);
}

.hle-stage-num {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.12;
}

.hle-stage-desc {
  font-size: 0.76rem;
  color: var(--text-body);
  line-height: 1.4;
}

/* 6. Arena AI Blind Vote Cards */
.arena-vote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 620px) {
  .arena-vote-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.vote-option-card {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  padding: 12px 13px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.vote-option-card:hover {
  background: #ffffff;
  border-color: #93c5fd;
}

.vote-option-card.voted-wrong {
  border-color: #fcd34d;
  background: #fffbeb;
}

.vote-option-card.voted-right {
  border-color: #6ee7b7;
  background: #ecfdf5;
}

.voc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.voc-head strong {
  font-size: 0.83rem;
  color: var(--text-strong);
}

.voc-cta {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--bg-blue-soft);
  padding: 2px 8px;
  border-radius: 999px;
}

.voc-body {
  font-size: 0.79rem;
  line-height: 1.5;
  color: var(--text-body);
  white-space: pre-line;
}

/* 7. AA-LCR 3 Scattered Pages Strip */
.lcr-pages-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 620px) {
  .lcr-pages-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.lcr-page-card {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-top: 2.5px solid #94a3b8;
  border-radius: 9px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lcr-page-tag {
  font-size: 0.68rem;
  font-weight: 750;
  color: var(--text-muted);
}

.lcr-page-text {
  font-size: 0.77rem;
  color: var(--text-strong);
  line-height: 1.42;
}

.bench-leaders-card {
  margin-top: 12px;
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bench-leaders-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.bench-leaders-titles {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.bench-leaders-title {
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--text-strong);
}

.bench-leaders-unit {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.top-models-strip {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.mini-model-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text-body);
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  font-size: 0.77rem;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.mini-model-chip:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: #f8fbff;
}

.mmc-rank {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: var(--bg-blue-soft);
  padding: 1px 6px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.mmc-name {
  color: var(--text-strong);
  font-weight: 700;
}

.mmc-score {
  font-family: var(--display);
  font-weight: 750;
  color: var(--text-body);
  font-variant-numeric: tabular-nums;
}

.mmc-chevron {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-muted);
  margin-left: 1px;
  transition: color 0.14s ease;
}

.mini-model-chip:hover .mmc-chevron,
.equiv-logo-card:hover .mmc-chevron {
  color: var(--primary);
}

/* ---------------- VIEW 2: SET YOUR BAR ---------------- */
.bar-studio-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 639px) {
  .bar-studio-panel {
    padding: 12px 13px;
    gap: 10px;
    margin-bottom: 14px;
  }
}

.bar-presets-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.bar-presets-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1 1 0%;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 760px) {
  .bar-presets-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding-bottom: 2px;
  }
}


.bar-preset-chip {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  color: var(--text-body);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.77rem;
  font-weight: 650;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.bar-preset-chip:hover {
  border-color: #93c5fd;
  color: var(--text-strong);
  background: #ffffff;
}

.bar-preset-chip.active {
  background: var(--bg-blue-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
  font-weight: 700;
}

.bar-preset-chip.reset-chip {
  color: var(--text-muted);
}

.bar-mobile-bar {
  display: none;
}

.bar-collapsible-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 639px) {
  .bar-mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 11px;
    background: var(--bg-page);
    border: 1px solid var(--border-soft);
    border-radius: 11px;
  }

  .bar-mobile-summary-wrap {
    min-width: 0;
    flex: 1;
  }

  .bar-mob-stat {
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--text-body);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .bar-mob-formula {
    color: var(--text-muted);
    font-size: 0.75rem;
  }

  .bar-mobile-tune-btn {
    flex-shrink: 0;
    padding: 5px 11px;
    font-size: 0.76rem;
  }

  .bar-collapsible-body {
    display: none;
  }

  .bar-collapsible-body.is-expanded {
    display: flex;
  }

  .bar-desktop-summary {
    display: none;
  }
}

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

@media (max-width: 1080px) {
  .bar-sliders-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }
}

@media (max-width: 639px) {
  .bar-sliders-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
  }
}

.bar-slider-box {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.bar-cost-seg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.bar-cost-seg-btn {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  color: var(--text-body);
  border-radius: 8px;
  padding: 5px 6px;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.bar-cost-seg-btn:hover {
  border-color: #93c5fd;
  color: var(--text-strong);
  background: #ffffff;
}

.bar-cost-seg-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2);
}

.bar-slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.bar-slider-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--text-strong);
  cursor: pointer;
}

.bar-slider-val {
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--primary-dark);
  background: #ffffff;
  border: 1px solid var(--border-soft);
  padding: 1px 8px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.bar-range-input {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
  margin: 2px 0 0;
  height: 22px;
}

.bar-slider-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.67rem;
  font-weight: 650;
  color: var(--text-muted);
}

.bar-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.bar-toggles-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.bar-toggle-pill {
  background: var(--bg-page);
  border: 1.5px solid var(--border-soft);
  color: var(--text-body);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.77rem;
  font-weight: 650;
  cursor: pointer;
}

.bar-toggle-pill:hover {
  border-color: #93c5fd;
  color: var(--text-strong);
  background: #ffffff;
}

.bar-toggle-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.bar-toggle-pill.subtle-toggle.active {
  background: var(--text-strong);
  border-color: var(--text-strong);
  color: #ffffff;
}

.bar-live-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bar-active-formula {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--text-muted);
}

.bar-pass-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 0.81rem;
  font-weight: 650;
  color: var(--text-body);
}

.bar-pass-count {
  font-family: var(--display);
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.bar-empty-state {
  grid-column: 1 / -1;
  background: var(--bg-card);
  border: 1px dashed var(--border-mid);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.bar-empty-state strong {
  color: var(--text-strong);
  font-size: 0.96rem;
}

.gates-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 14px;
}

@media (max-width: 560px) {
  .gates-cards-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
}

.gate-model-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 11px;
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.gate-model-card.passes-gate {
  border-color: #6ee7b7;
}

.gate-model-card.fails-gate {
  opacity: 0.48;
  box-shadow: none;
  background: var(--bg-tint);
}

.mini-stat-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-page);
  padding: 9px 11px;
  border-radius: 9px;
  margin: 8px 0;
}

.msb-row {
  display: grid;
  grid-template-columns: 44px 1fr 38px;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
}

.msb-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.msb-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.65s var(--ease-spring);
}

/* ---------------- VIEW 3: FIND MY MODEL ---------------- */
.picker-stage {
  max-width: 1080px;
  width: 100%;
  min-width: 0;
  margin: 0 auto;
}

.picker-controls-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 18px 22px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 639px) {
  .picker-controls-panel {
    padding: 13px 13px;
    margin-bottom: 14px;
    gap: 12px;
  }
}

.picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

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

.picker-row-label {
  font-size: 0.81rem;
  font-weight: 750;
  color: var(--text-strong);
  min-width: 140px;
}

.picker-pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 639px) {
  .picker-goals-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }

  .picker-goals-grid .pk-pill {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    padding: 9px 10px;
    font-size: 0.76rem;
    line-height: 1.24;
    border-radius: 12px;
  }

  .picker-budgets-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    overflow: visible;
  }

  .picker-budgets-rail .pk-pill {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.24;
    padding: 8px 9px;
    font-size: 0.76rem;
    border-radius: 12px;
  }

  .picker-budgets-rail .pk-pill:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.pk-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-page);
  border: 1.5px solid var(--border-soft);
  color: var(--text-body);
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 650;
  cursor: pointer;
}

.pk-pill:hover {
  border-color: #93c5fd;
  color: var(--text-strong);
  background: #ffffff;
}

.pk-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}

.picker-result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .picker-result-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

.picker-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  padding: 22px 24px;
  min-width: 0;
}

@media (max-width: 639px) {
  .picker-card {
    padding: 15px 14px;
  }
}

.picker-winner-hero {
  background: #f8fafc;
  border-radius: 14px;
  padding: 15px 17px;
  margin-bottom: 14px;
  border: 1px solid var(--border-soft);
}

@media (max-width: 639px) {
  .picker-winner-hero {
    padding: 13px 13px;
  }
}

.picker-winner-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}

.picker-winner-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.picker-winner-copy {
  min-width: 0;
}

.picker-winner-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.32rem, 2.5vw, 1.72rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-strong);
  line-height: 1.12;
}

.picker-winner-sub {
  font-size: 0.81rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.podium-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 13px;
}

@media (max-width: 560px) {
  .podium-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.podium-metric-tile {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
}

.pm-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pm-value {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.pm-value.muted {
  color: var(--text-muted);
}

.pm-subnote {
  font-size: 0.66rem;
  font-weight: 650;
  color: var(--text-muted);
}

.picker-api-line {
  margin-bottom: 14px;
}

.picker-cta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 520px) {
  .picker-cta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .picker-primary-cta,
  .picker-source-cta {
    grid-column: 1 / -1;
  }
}

.picker-proof-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

/* Scannable "Why it wins" Bullet List */
.picker-why-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.picker-why-item {
  position: relative;
  padding: 8px 11px 8px 24px;
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  font-size: 0.83rem;
  line-height: 1.46;
  color: var(--text-body);
}

.picker-why-item::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.picker-why-item strong {
  color: var(--text-strong);
  font-weight: 750;
}

.picker-equiv-section {
  margin-top: 15px;
}

.equiv-cards-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.equiv-logo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  padding: 9px 12px;
  cursor: pointer;
}

.equiv-logo-card:hover {
  background: #ffffff;
  border-color: #93c5fd;
}

.equiv-card-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.equiv-card-titles {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.equiv-card-name {
  font-size: 0.85rem;
  color: var(--text-strong);
  display: block;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.equiv-card-plan {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.equiv-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}


.picker-runnerup-section {
  padding-top: 13px;
  border-top: 1px solid var(--border-soft);
}

.picker-runnerup-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--bg-page);
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--border-soft);
}

.picker-compare-pair-btn {
  margin-top: 9px;
  width: 100%;
  justify-content: center;
}

/* ---------------- VIEW 4: ALL MODELS (MOBILE CARDS + STICKY TABLE) ---------------- */
.mx-stage {
  min-width: 0;
  max-width: 100%;
}

.mx-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.mx-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 12px 15px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.mx-controls-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.mx-controls-selects {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.mx-filter-rail {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 760px) {
  .mx-filter-rail {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
}

.mx-chip {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  color: var(--text-body);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}

.mx-chip:hover {
  border-color: #93c5fd;
  color: var(--text-strong);
}

.mx-chip.active {
  background: var(--text-strong);
  border-color: var(--text-strong);
  color: #ffffff;
}

.mx-search {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  color: var(--text-strong);
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 0.83rem;
  width: 240px;
  max-width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (max-width: 639px) {
  .mx-search {
    flex: 1 1 100%;
    width: 100%;
  }

  .mx-controls-selects {
    width: 100%;
    justify-content: space-between;
  }
}

.mx-search:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.mx-mobile-view-switch,
.mx-mobile-sort-bar,
.mx-cards-list {
  display: none;
}

@media (max-width: 639px) {
  .mx-mobile-view-switch {
    display: inline-flex;
    background: var(--bg-page);
    border: 1px solid var(--border-soft);
    border-radius: 9px;
    padding: 2px;
    gap: 2px;
  }

  .mx-vmode-btn {
    background: transparent;
    border: none;
    border-radius: 7px;
    padding: 5px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
  }

  .mx-vmode-btn.active {
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
  }

  .mx-mobile-sort-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-top: 6px;
    border-top: 1px solid var(--border-soft);
  }

  .mx-mob-sort-lbl {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
  }

  .mx-mob-sort-select {
    flex: 1;
    min-width: 0;
    padding: 6px 9px;
    font-size: 0.78rem;
  }

  .mx-mob-dir-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  .mx-stage.mx-mode-cards .mx-cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mx-stage.mx-mode-cards .mx-table-wrap,
  .mx-stage.mx-mode-cards .mx-explainer-bar {
    display: none;
  }
}

/* Mobile Leaderboard Cards (All Models View) */
.mx-mcard {
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: 14px;
  padding: 13px 13px 11px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.mx-mcard.is-selected {
  border-color: #93c5fd;
}

.mx-mcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mx-mcard-id {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.mx-mcard-rank {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 22px;
}

.mx-mcard-titles {
  min-width: 0;
  flex: 1;
}

.mx-mcard-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.mx-mcard-name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.2;
}

.mx-mcard-sub {
  display: block;
  font-size: 0.71rem;
  color: var(--text-muted);
}

.mx-mcard-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 4px 9px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.mx-mcard-score strong {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.mx-mcard-score span {
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--text-muted);
}

.mx-mcard-sort-highlight {
  font-size: 0.75rem;
  color: var(--primary-dark);
  background: var(--bg-blue-soft);
  padding: 4px 9px;
  border-radius: 8px;
}

.mx-mcard-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 7px 9px;
}

.mx-mcard-stat {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mx-mcard-stat span {
  font-size: 0.66rem;
  font-weight: 650;
  color: var(--text-muted);
}

.mx-mcard-stat strong {
  font-family: var(--display);
  font-size: 0.81rem;
  font-weight: 800;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mx-mcard-details {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.76rem;
}

.mx-mcard-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
}

@media (max-width: 400px) {
  .mx-mcard-detail-grid {
    grid-template-columns: 1fr;
  }
}

.mx-mcard-detail-grid span {
  color: var(--text-muted);
}

.mx-mcard-explain {
  margin: 0;
  color: var(--text-body);
  line-height: 1.44;
}

.mx-mcard-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid #f1f5f9;
}

.mx-mcard-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mx-explainer-bar {
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 13px 16px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--text-strong);
}

.mx-explainer-copy {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.mx-table-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.mx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  font-variant-numeric: tabular-nums;
}

.mx-table th {
  background: var(--bg-page);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.74rem;
  text-align: left;
  padding: 12px 11px;
  border-bottom: 1px solid var(--border-soft);
  cursor: default;
  white-space: nowrap;
  user-select: none;
}

.mx-table th[data-mxsort] {
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.mx-table th[data-mxsort]:hover {
  color: var(--text-strong);
  background: var(--bg-tint);
}

.mx-table th[data-mxsort].is-sorted {
  color: var(--primary-dark);
  background: var(--bg-blue-soft);
}

.mx-sort-arrow {
  display: inline-block;
  margin-left: 3px;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--primary);
}

.mx-sort-hint {
  display: inline-block;
  margin-left: 3px;
  font-size: 0.7rem;
  color: #94a3b8;
  opacity: 0;
  transition: opacity 0.14s ease;
}

.mx-table th[data-mxsort]:hover .mx-sort-hint {
  opacity: 1;
}

.mx-table td {
  padding: 10px 11px;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
  color: var(--text-body);
}

.mx-table tr {
  transition: background 0.15s ease;
}

.mx-table tr:hover {
  background: #f8fafc;
}

.mx-table tr.mx-selected-row {
  background: var(--bg-blue-soft);
}

/* Sticky Model column on Tablet/Mobile Table mode */
@media (max-width: 1080px) {
  .mx-table th.col-model,
  .mx-table td.col-model {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #ffffff;
    box-shadow: 3px 0 8px rgba(15, 23, 42, 0.05);
  }

  .mx-table th.col-model {
    background: var(--bg-page);
    z-index: 5;
  }

  .mx-table tr.mx-selected-row td.col-model {
    background: var(--bg-blue-soft);
  }
}

.mx-model-identity {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mx-cell-btn {
  background: none;
  border: 1px solid transparent;
  color: inherit;
  font: inherit;
  padding: 4px 7px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.14s ease;
}

.mx-cell-btn:hover {
  background: #dbeafe;
  color: var(--primary-dark);
}

.mx-cell-btn.active-cell {
  border-color: var(--primary);
  background: #ffffff;
  color: var(--primary-dark);
  font-weight: 750;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.12);
}

.clean-mini-bar {
  display: inline-block;
  width: 48px;
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.clean-mini-bar > i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.6s var(--ease-spring);
}

/* ---------------- STICKY COMPARE BAR ---------------- */
.compare-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 230;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-strong);
  border-top: 1px solid var(--border-mid);
  box-shadow: 0 -10px 32px rgba(15, 23, 42, 0.09);
}

@media (max-width: 639px) {
  .compare-drawer {
    bottom: calc(57px + env(safe-area-inset-bottom, 0px));
  }
}

.drawer-bar {
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.drawer-left,
.drawer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.drawer-left {
  flex: 1;
  overflow: hidden;
}

.drawer-label {
  font-size: 0.82rem;
  flex-shrink: 0;
}

.drawer-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex-wrap: nowrap;
}

.cmp-pill {
  background: var(--bg-blue-soft);
  border: 1px solid #bfdbfe;
  color: var(--primary-dark);
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cmp-pill button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-weight: 800;
}

.drawer-body {
  padding: 12px 0 18px;
  border-top: 1px solid var(--border-soft);
  max-height: 62dvh;
  overflow-y: auto;
}

.cmp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

@media (max-width: 639px) {
  .cmp-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding-bottom: 4px;
  }

  .cmp-col {
    flex: 0 0 84vw;
    max-width: 310px;
    scroll-snap-align: center;
  }
}

.cmp-col {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 14px;
  font-size: 0.82rem;
}

.cmp-col-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.cmp-col-id {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.cmp-col-titles {
  min-width: 0;
}

.cmp-col-name {
  font-size: 0.96rem;
  color: var(--text-strong);
  display: block;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmp-col-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cmp-col-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border-soft);
  padding-top: 9px;
}

.cmp-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.cmp-row span {
  color: var(--text-muted);
}

.cmp-col-foot {
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cmp-score-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 4px 9px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.cmp-score-badge strong {
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.05;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.cmp-score-badge span {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ---------------- ARCHIVE VAULT & SNAPSHOT TIME-MACHINE ---------------- */
.studio-archive-divider {
  margin: 8px 6px 4px;
  padding: 6px 6px 3px;
  border-top: 1px dashed var(--border-mid);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--amber-ink);
}

.studio-model-row.archived-row {
  opacity: 0.84;
}

.studio-model-row.archived-row .smr-rank {
  color: var(--amber-ink);
  font-size: 0.65rem;
}

.studio-archived-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: var(--amber-ink);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 12px;
  font-size: 0.78rem;
}

.mx-chip.archive-chip {
  background: var(--bg-amber-soft);
  border-color: #fde68a;
  color: var(--amber-ink);
}

.mx-chip.archive-chip.active {
  background: var(--amber-ink);
  border-color: var(--amber-ink);
  color: #ffffff;
}

.mx-snapshot-select {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  color: var(--text-strong);
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 0.79rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mx-snapshot-select:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.mx-successor-btn {
  border: 1px solid #fde68a;
  cursor: pointer;
}

.mx-successor-btn:hover {
  border-color: var(--amber);
}

/* ---------------- PROMO VS. POST-PROMO STANDARD PRICING ---------------- */
.rail-lab-chip.archive-rail-chip {
  background: var(--bg-amber-soft);
  border-color: #fde68a;
  color: var(--amber-ink);
  padding: 4px 10px;
}

.rail-lab-chip.archive-rail-chip:hover {
  border-color: var(--amber);
  background: #fef3c7;
  color: var(--amber-ink);
}

.rail-lab-chip.archive-rail-chip.active {
  background: var(--amber-ink);
  border-color: var(--amber-ink);
  color: #ffffff;
  box-shadow: 0 3px 9px rgba(146, 64, 14, 0.2);
}

.mx-chip.std-rate-toggle {
  background: #ffffff;
  border: 1.5px dashed #f59e0b;
  color: var(--amber-ink);
}

.mx-chip.std-rate-toggle:hover {
  background: var(--bg-amber-soft);
  border-color: var(--amber);
  color: var(--amber-ink);
}

.mx-chip.std-rate-toggle.active {
  background: var(--amber-ink);
  border-style: solid;
  border-color: var(--amber-ink);
  color: #ffffff;
}

.bar-toggle-pill.amber-toggle.active {
  background: var(--amber-ink);
  border-color: var(--amber-ink);
  color: #ffffff;
}

.mx-rate-cell {
  align-items: flex-start;
  text-align: left;
  padding: 5px 8px;
}

.mx-rate-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.25;
}

.mx-rate-top {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 650;
  color: var(--text-strong);
}

.promo-rate-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: var(--amber-ink);
  white-space: nowrap;
}

.mx-std-subline {
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--amber-ink);
  white-space: nowrap;
}

.mx-blended-note {
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--primary-dark);
  white-space: nowrap;
}

.sst-promo-line {
  margin-top: 2px;
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--amber-ink);
  line-height: 1.3;
}

/* ---------------- FOOTER ---------------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-card);
  padding: 22px 0 38px;
  font-size: 0.79rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  line-height: 1.65;
}

.site-footer a {
  color: #475569;
  text-decoration: none;
  transition: color 0.14s ease;
}

.site-footer a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer a strong {
  color: var(--text-strong);
  font-weight: 700;
}

.site-footer a:hover strong {
  color: var(--primary);
}

/* ---------------- DESKTOP HOVER POPOVERS + TOUCH POPOVER ENGINE ---------------- */
.has-hovertip {
  position: relative;
}

.has-hovertip::after {
  display: none;
  content: attr(data-hovertip);
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(276px, 80vw);
  padding: 8px 11px;
  border-radius: 9px;
  background: #0f172a;
  color: #f8fafc;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  line-height: 1.42;
  text-align: left;
  white-space: normal;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.24), 0 2px 6px rgba(15, 23, 42, 0.12);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 95;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.has-hovertip::before {
  display: none;
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 95;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.has-hovertip.tip-align-left::after {
  left: 0;
  transform: none;
}

.has-hovertip.tip-align-left::before {
  left: 22px;
  transform: none;
}

.has-hovertip.tip-align-right::after {
  left: auto;
  right: 0;
  transform: none;
}

.has-hovertip.tip-align-right::before {
  left: auto;
  right: 18px;
  transform: none;
}

/* Only show CSS ::after hovertips on true pointer-hover devices; touch devices use #touchTipPopover */
@media (hover: hover) and (pointer: fine) {
  .has-hovertip:hover::after,
  .has-hovertip:hover::before,
  .has-hovertip:focus-visible::after,
  .has-hovertip:focus-visible::before {
    display: block;
    opacity: 1;
    visibility: visible;
  }
}

.touch-tip-popover {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: calc(74px + env(safe-area-inset-bottom, 0px));
  max-width: 440px;
  margin: 0 auto;
  z-index: 420;
  padding: 10px 12px;
  border-radius: 11px;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  font-family: var(--sans);
  font-size: 0.77rem;
  font-weight: 500;
  line-height: 1.44;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.3), 0 3px 10px rgba(15, 23, 42, 0.16);
  pointer-events: auto;
  animation: softSwap 0.16s var(--ease-spring) both;
}

body.has-drawer .touch-tip-popover {
  bottom: calc(134px + env(safe-area-inset-bottom, 0px));
}

.ttp-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ttp-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.ttp-title {
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 750;
  color: #ffffff;
}

.ttp-body {
  color: #e2e8f0;
}

.ttp-close {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #cbd5e1;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.96rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------------- BENCHMARK STUDIO SEO GUIDE LINKS & DEDICATED SEO PAGES ---------------- */
.bench-stage-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bench-guide-cta {
  padding: 5px 12px;
  font-size: 0.76rem;
  border-radius: 8px;
}

.bench-seo-card-link {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 10px 13px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.bench-seo-card-link:hover {
  text-decoration: none;
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}

.bscl-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bscl-copy strong {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--primary-dark);
}

.bscl-copy span {
  font-size: 0.74rem;
  color: var(--text-body);
  line-height: 1.38;
}

.bscl-arrow {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-dark);
  flex-shrink: 0;
}

/* Dedicated SEO Benchmark Guide Page */
.seo-guide-main {
  padding-top: 20px;
  padding-bottom: 72px;
}

@media (max-width: 639px) {
  .seo-guide-main {
    padding-top: 14px;
    padding-bottom: 40px;
  }
}

.seo-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.seo-breadcrumb a {
  color: var(--text-muted);
}

.seo-breadcrumb a:hover {
  color: var(--primary);
}

.seo-breadcrumb-cur {
  color: var(--text-strong);
  font-weight: 700;
}

.seo-hero-shell {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-float);
  padding: 24px 28px;
  margin-bottom: 18px;
}

@media (max-width: 639px) {
  .seo-hero-shell {
    padding: 16px 15px;
  }
}

.seo-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.seo-hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.seo-hero-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.seo-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr);
  gap: 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .seo-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

.seo-h1 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.14;
  color: var(--text-strong);
  margin: 0 0 10px;
}

.seo-lead {
  font-size: 0.96rem;
  line-height: 1.58;
  color: var(--text-body);
  margin: 0 0 14px;
}

.seo-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

@media (max-width: 680px) {
  .seo-quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.seo-stat-tile {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 11px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.seo-stat-lbl {
  font-size: 0.69rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.seo-stat-val {
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.seo-stat-sub {
  font-size: 0.69rem;
  color: var(--text-muted);
}

.seo-jump-rail {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.seo-jump-lbl {
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--text-muted);
  white-space: nowrap;
  margin-right: 4px;
}

.seo-jump-pill {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  color: var(--text-body);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.seo-jump-pill:hover {
  border-color: #93c5fd;
  color: var(--primary-dark);
  background: #ffffff;
  text-decoration: none;
}

.seo-section {
  margin-bottom: 32px;
  scroll-margin-top: 76px;
}

.seo-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 22px 26px;
}

@media (max-width: 639px) {
  .seo-section-card {
    padding: 16px 14px;
  }
}

.seo-sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.seo-h2 {
  font-family: var(--display);
  font-size: clamp(1.18rem, 2.2vw, 1.42rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-strong);
  margin: 0 0 4px;
}

.seo-sec-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.seo-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 820px) {
  .seo-pipeline-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.seo-pipe-card {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.seo-pipe-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.seo-pipe-title {
  font-size: 0.9rem;
  font-weight: 750;
  color: var(--text-strong);
}

.seo-pipe-body {
  font-size: 0.83rem;
  line-height: 1.52;
  color: var(--text-body);
  margin: 0;
}

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

@media (max-width: 780px) {
  .seo-tiers-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.seo-tier-card {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.seo-tier-card.tier-green {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.seo-tier-card.tier-blue {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.seo-tier-card.tier-amber {
  background: #fffbeb;
  border-color: #fde68a;
}

.seo-tier-score {
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-strong);
}

.seo-tier-title {
  font-size: 0.84rem;
  font-weight: 750;
  color: var(--text-strong);
}

.seo-tier-desc {
  font-size: 0.8rem;
  line-height: 1.46;
  color: var(--text-body);
  margin: 0;
}

/* Audit Deep-Dive Grid */
.seo-audit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 880px) {
  .seo-audit-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.seo-audit-card {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.seo-audit-card h3 {
  font-family: var(--display);
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-strong);
  margin: 6px 0 4px;
}

.seo-audit-card p {
  font-size: 0.82rem;
  line-height: 1.52;
  color: var(--text-body);
  margin: 0;
}

/* Case Explorer Filter & Cards */
.seo-case-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.seo-case-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.seo-cases-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.seo-case-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 18px 20px;
}

@media (max-width: 639px) {
  .seo-case-card {
    padding: 14px 13px;
  }
}

.seo-case-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.seo-case-title-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.seo-case-num {
  font-family: var(--display);
  font-size: 0.73rem;
  font-weight: 800;
  background: var(--bg-blue-soft);
  color: var(--primary-dark);
  padding: 2px 8px;
  border-radius: 999px;
}

.seo-case-title {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-strong);
  margin: 0;
}

.seo-dual-patches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 11px;
}

@media (max-width: 820px) {
  .seo-dual-patches {
    grid-template-columns: minmax(0, 1fr);
  }
}

.seo-patch-col {
  background: #f8fafc;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 9px;
}

.seo-patch-col.is-weak {
  border-top: 3px solid #f87171;
}

.seo-patch-col.is-strong {
  border-top: 3px solid #10b981;
}

.seo-patch-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
}

.seo-patch-badge.weak {
  color: #991b1b;
}

.seo-patch-badge.strong {
  color: #065f46;
}

/* FAQ Grid */
.seo-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 820px) {
  .seo-faq-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.seo-faq-item {
  background: var(--bg-page);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  padding: 15px 17px;
}

.seo-faq-item h3 {
  font-family: var(--display);
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--text-strong);
  margin: 0 0 6px;
}

.seo-faq-item p {
  font-size: 0.83rem;
  line-height: 1.54;
  color: var(--text-body);
  margin: 0;
}

.seo-bottom-cta {
  background: linear-gradient(90deg, #eff6ff 0%, #ecfdf5 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------------- HEADER EDITORIAL LINKS, BLOG, FIRST-MENTION HOVER & GLOSSARY ---------------- */
.header-resource-links {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.header-nav-link {
  font-size: 0.81rem;
  font-weight: 650;
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.header-nav-link:hover {
  color: var(--text-strong);
  background: var(--bg-tint);
  text-decoration: none;
}

.header-nav-link.active {
  color: var(--primary-dark);
  background: var(--bg-blue-soft);
  font-weight: 750;
}

@media (max-width: 639px) {
  .header-nav-link {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
}

.editorial-main {
  padding-top: 26px;
  padding-bottom: 76px;
}

@media (max-width: 639px) {
  .editorial-main {
    padding-top: 16px;
    padding-bottom: 42px;
  }
}

.blog-index-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.blog-minimal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}

.blog-minimal-h1 {
  font-family: var(--display);
  font-size: clamp(1.48rem, 2.8vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text-strong);
  margin: 0;
}

.blog-glossary-link {
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.blog-glossary-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.blog-posts-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.blog-post-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 24px;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-post-row:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

@media (max-width: 639px) {
  .blog-post-row {
    padding: 16px 15px;
    gap: 6px;
  }
}

.bpr-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-muted);
}

.bpr-title {
  font-family: var(--display);
  font-size: clamp(1.14rem, 2.2vw, 1.38rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.24;
  color: var(--text-strong);
  margin: 0;
  transition: color 0.15s ease;
}

.blog-post-row:hover .bpr-title {
  color: var(--primary-dark);
}

.bpr-summary {
  font-size: 0.9rem;
  line-height: 1.56;
  color: var(--text-body);
  margin: 0;
}

.editorial-back-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--text-muted);
  text-decoration: none;
}

.editorial-back-link:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Long-Form Blog Article Shell */
.article-shell {
  max-width: 740px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  padding: 30px 40px 32px;
}

@media (max-width: 680px) {
  .article-shell {
    padding: 18px 16px 22px;
  }
}

.article-header {
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.article-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.article-date-meta {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.article-h1 {
  font-family: var(--display);
  font-size: clamp(1.46rem, 2.9vw, 2.08rem);
  font-weight: 800;
  letter-spacing: -0.033em;
  line-height: 1.18;
  color: var(--text-strong);
  margin: 0;
}

.article-prose {
  font-size: 1rem;
  line-height: 1.72;
  color: #1e293b;
}

.article-prose p {
  margin: 0 0 16px;
}

.article-prose h2 {
  font-family: var(--display);
  font-size: clamp(1.18rem, 2.1vw, 1.38rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--text-strong);
  margin: 28px 0 10px;
  scroll-margin-top: 76px;
}

.article-prose ul,
.article-prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.article-prose li {
  line-height: 1.66;
}

.article-prose li strong {
  color: var(--text-strong);
}

.article-prose code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: #f1f5f9;
  border: 1px solid var(--border-soft);
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--text-strong);
}

/* Subtle Typographic First-Mention Glossary Underline & Hover/Tap Preview Card */
.glossary-term {
  color: inherit;
  background: transparent;
  border-bottom: 1.5px dotted #94a3b8;
  padding-bottom: 1px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.glossary-term:hover,
.glossary-term.is-open {
  color: var(--primary-dark);
  background: rgba(37, 99, 235, 0.07);
  border-bottom-style: solid;
  border-bottom-color: var(--primary);
  text-decoration: none;
}

.glossary-popover {
  position: fixed;
  z-index: 460;
  background: #0f172a;
  color: #f8fafc;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.28), 0 4px 10px rgba(15, 23, 42, 0.14);
  animation: softSwap 0.16s var(--ease-spring) both;
}

.gp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.gp-title {
  font-family: var(--display);
  font-size: 0.84rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.25;
}

.gp-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cbd5e1;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gp-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.gp-body {
  font-size: 0.79rem;
  line-height: 1.5;
  color: #e2e8f0;
  margin: 0 0 8px;
}

.gp-foot {
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.gp-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: #93c5fd;
  text-decoration: none;
}

.gp-link:hover {
  color: #bfdbfe;
  text-decoration: underline;
}

.article-quiet-foot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
}

.article-quiet-foot a {
  color: var(--text-body);
  text-decoration: none;
}

.article-quiet-foot a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Dedicated A-to-Z Glossary Page */
.glossary-shell {
  max-width: 900px;
  margin: 0 auto;
}

.glossary-minimal-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 14px;
}

.glossary-toolbar {
  position: sticky;
  top: 64px;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 11px 14px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

@media (max-width: 639px) {
  .glossary-toolbar {
    top: 52px;
    padding: 9px 11px;
  }
}

.glossary-search-input {
  width: 100%;
}

.glossary-alpha-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.glossary-groups-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.glossary-letter-heading {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 1.5px solid #dbeafe;
}

.glossary-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 760px) {
  .glossary-cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.glossary-term-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 13px;
  box-shadow: var(--shadow-card);
  padding: 15px 17px;
  scroll-margin-top: 150px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.glossary-term-card.is-highlighted {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.14);
}

.gtc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.gtc-head h3 {
  font-family: var(--display);
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--text-strong);
  margin: 0;
  line-height: 1.28;
}

.gtc-anchor {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg-page);
}

.gtc-anchor:hover {
  color: var(--primary-dark);
  background: var(--bg-blue-soft);
  text-decoration: none;
}

.gtc-short {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-strong);
  margin: 0 0 6px;
}

.gtc-detail {
  font-size: 0.81rem;
  line-height: 1.55;
  color: var(--text-body);
  margin: 0;
}



