
:root {
  color-scheme: dark;
  --bg: #09090b;
  --bg-subtle: #0e0e11;
  --card: #121216;
  --card-hover: #18181d;
  --surface-2: #222228;
  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.055);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #fafafa;
  --text-secondary: #d4d4d8;
  --text-muted: #a1a1aa;
  --text-dim: #94949f;
  --emerald: #22c55e;
  --emerald-text: #4ade80;
  --emerald-bg: rgba(34, 197, 94, 0.11);
  --amber: #f59e0b;
  --amber-text: #fbbf24;
  --amber-bg: rgba(245, 158, 11, 0.11);
  --indigo: #818cf8;
  --indigo-bg: rgba(129, 140, 248, 0.12);
  --focus-ring: #e4e4e7;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 10px;
  --target-size: 24px;
}

@property --fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Text', 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(64px + env(safe-area-inset-top, 0px));
}

body {
  min-height: 100dvh;
  overflow-wrap: break-word;
  background:
    radial-gradient(960px 380px at 50% -180px, rgba(255, 255, 255, 0.045), transparent 72%),
    var(--bg);
}

h1, h2, h3 { text-wrap: balance; font-weight: 700; }
:lang(zh-CN) h1, :lang(zh-CN) h2, :lang(zh-CN) h3 { letter-spacing: -0.005em; }
p, li { text-wrap: pretty; }
img, svg { max-inline-size: 100%; }
:where(a, code) { overflow-wrap: anywhere; }

a { color: inherit; text-decoration: none; }

::placeholder {
  color: var(--text-dim);
  opacity: 1;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

:where(button, a, summary) {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.ui-ico {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: -0.15em;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px));
}

/* Horizontal Scrollability Fade Affordance (scroll-driven + IO fallback) */
.scroll-fade-x {
  --fade-size: 2.25rem;
  --fade-dir: right;
  --fade-start-pos: 0;
  --fade-end-pos: 100%;
  scroll-padding-inline: var(--fade-size);
  mask:
    linear-gradient(black, black) no-clip subtract,
    linear-gradient(to var(--fade-dir), black, transparent) var(--fade-start-pos) 0 / var(--fade-start) 100% no-repeat no-clip,
    linear-gradient(to var(--fade-dir), transparent, black) var(--fade-end-pos) 0 / var(--fade-end) 100% no-repeat no-clip;
  transition: --fade-start 0.2s, --fade-end 0.2s;
}

@supports (animation-timeline: scroll()) {
  .scroll-fade-x {
    animation: rf-fade-start linear both, rf-fade-end linear both;
    animation-timeline: scroll(self inline);
    animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
  }
}

.scroll-fade-x.more-start { --fade-start: var(--fade-size); }
.scroll-fade-x.more-end { --fade-end: var(--fade-size); }

@keyframes rf-fade-start {
  to { --fade-start: var(--fade-size); }
}

@keyframes rf-fade-end {
  from { --fade-end: var(--fade-size); }
}

/* ============================================================================
   1. NAVBAR & BUTTONS
   ============================================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(9, 9, 11, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  max-width: 1320px;
}

.navbar-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text);
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--text);
  color: #09090b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.brand-tld {
  color: var(--text-dim);
  font-weight: 500;
}

.cmdk-trigger {
  flex: 1 1 180px;
  min-width: 150px;
  max-width: 300px;
  min-height: 34px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px 0 11px;
  color: var(--text-dim);
  font-size: 0.82rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.14s, color 0.14s, background 0.14s, scale 0.12s;
}

.cmdk-trigger-lead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cmdk-label-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cmdk-trigger:hover {
  border-color: var(--border-strong);
  background: var(--card);
  color: var(--text-secondary);
}

.cmdk-trigger:active { scale: 0.98; }

.kbd-shortcut {
  font-size: 0.69rem;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-dim);
  flex-shrink: 0;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  min-width: 0;
}

.nav-badges-link,
.nav-sponsor-btn,
.shortlist-nav-btn {
  padding: 0 8px;
  font-size: 0.78rem;
}

.nav-mobile-menu {
  display: none;
  position: relative;
  flex-shrink: 0;
}

.nav-mobile-summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
}

.nav-mobile-summary::-webkit-details-marker { display: none; }

.nav-mobile-summary:hover {
  background: var(--card-hover);
  border-color: var(--border-strong);
  color: var(--text);
}

.nav-mobile-menu[open] .nav-mobile-summary {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text);
}

.nav-mobile-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(260px, calc(100dvw - 24px));
  max-height: 75dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border-radius: 12px;
  background: #121216;
  border: 1px solid var(--border-strong);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-mobile-panel a,
.nav-mobile-panel button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.nav-mobile-panel a:hover,
.nav-mobile-panel button:hover {
  background: var(--card-hover);
  color: var(--text);
}

.nav-mobile-divider {
  height: 1px;
  margin: 5px 6px;
  background: var(--border);
}

.submit-mob { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.81rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, scale 0.12s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--card-hover);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn:active { scale: 0.97; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; scale: 1; }

.btn-primary {
  background: var(--text);
  border-color: var(--text);
  color: #09090b;
  font-weight: 600;
}

.btn-primary:hover {
  background: #e4e4e7;
  border-color: #e4e4e7;
  color: #09090b;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: transparent;
  color: var(--text);
}

.btn-amber {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

.btn-amber:hover {
  background: var(--card-hover);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-sm {
  min-height: 29px;
  padding: 0 10px;
  font-size: 0.76rem;
  border-radius: 7px;
}

.btn-icon {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  background: var(--bg-subtle);
  gap: 2px;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  transition: background 0.14s, color 0.14s;
}

.lang-switch a:hover { color: var(--text-secondary); }

.lang-switch a.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}

/* ============================================================================
   2. HERO, LIVE SIGNAL TELEMETRY DECK & EDITORIAL FILTER BAR
   ============================================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nowrap { white-space: nowrap; }

.hero {
  position: relative;
  padding: 28px 0 14px;
}

.hero-home {
  padding: 36px 0 14px;
}

.hero-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 368px;
  gap: 32px;
  align-items: center;
}

.hero-stage.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.hero-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  margin-bottom: 18px;
}

.hero-copy {
  min-width: 0;
  max-width: 680px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  flex-shrink: 0;
  animation: heroLivePulse 2.4s ease-out infinite;
}

@keyframes heroLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot {
    animation: none;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  }
}

.hero h1 {
  font-size: clamp(1.75rem, 1.25rem + 1.5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

.hero-home h1 {
  font-size: clamp(2.15rem, 1.45rem + 2.25vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.034em;
  line-height: 1.09;
  color: var(--text);
}

:lang(zh-CN) .hero-home h1 {
  letter-spacing: -0.02em;
  line-height: 1.16;
}

.hero p {
  color: var(--text-muted);
  font-size: 0.96rem;
  line-height: 1.62;
  margin-top: 12px;
  max-width: 560px;
}

/* Hero Search Row */
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  max-width: 560px;
}

.hero-search {
  flex: 1 1 320px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 5px 0 13px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.hero-search:focus-within {
  border-color: rgba(250, 250, 250, 0.38);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.hero-search-ico {
  display: inline-flex;
  align-items: center;
  color: var(--text-dim);
  flex-shrink: 0;
}

.hero-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

.hero-search-input::placeholder {
  color: var(--text-dim);
}

.hero-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.hero-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 13px;
  border-radius: 7px;
  border: 0;
  background: var(--text);
  color: #09090b;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.12s ease, transform 0.1s ease;
}

.hero-search-btn:hover {
  background: #e4e4e7;
}

.hero-search-btn:active {
  transform: scale(0.97);
}

/* Right-Column Live Momentum Telemetry Module */
.hero-signal-board {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
}

.hero-signal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}

.hero-signal-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.hero-signal-fresh {
  font-size: 0.71rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.hero-signal-list {
  display: flex;
  flex-direction: column;
}

.hero-signal-row {
  display: grid;
  grid-template-columns: 20px 24px minmax(0, 1fr) 52px auto;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.12s ease;
}

.hero-signal-row:last-child {
  border-bottom: none;
}

.hero-signal-row:hover {
  background: var(--card-hover);
}

.hero-sig-rank {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-dim);
}

.hero-sig-rank.rank-num-1 { color: var(--amber-text); }
.hero-sig-rank.rank-num-2 { color: var(--text-secondary); }
.hero-sig-rank.rank-num-3 { color: #fb923c; }

.hero-sig-avatar-wrap {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;
}

.hero-sig-avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-sig-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hero-sig-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.hero-sig-sub {
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.hero-sig-spark {
  display: inline-flex;
  align-items: center;
  width: 52px;
  height: 20px;
}

.hero-sig-spark svg {
  width: 52px;
  height: 20px;
}

.hero-sig-val {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  text-align: right;
}

.hero-sig-val.is-vel {
  color: var(--emerald-text);
}

.hero-signal-empty {
  padding: 18px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.hero-signal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  font-size: 0.71rem;
  color: var(--text-dim);
}

.hero-signal-link {
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.12s ease;
}

.hero-signal-link:hover {
  color: var(--emerald-text);
}

/* Structural Control Dock between Hero Stage and Directory Board */
.hero-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 26px;
  padding-top: 18px;
  margin-bottom: 14px;
  border-top: 1px solid var(--border);
}

.hero-dock .license-toggle {
  margin-bottom: 0;
  min-height: 34px;
  padding: 0 12px;
}

/* Sleek Segmented Timeframe Control (zero double-border noise) */
.timeframe-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 3px;
  flex-wrap: nowrap;
}
.tf-short { display: none; }

.radar-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.09), rgba(56, 189, 248, 0.05));
}
.radar-banner-icon {
  color: var(--emerald-text);
  flex-shrink: 0;
  margin-top: 2px;
}
.radar-banner-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.radar-banner-sub {
  font-size: 0.79rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 3px;
}

.timeframe-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 31px;
  padding: 0 11px;
  border-radius: 6px;
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  transition: background 0.14s, color 0.14s, scale 0.12s;
}

.timeframe-tab .ui-ico { opacity: 0.62; }
.timeframe-tab:hover { color: var(--text); }
.timeframe-tab:hover .ui-ico { opacity: 0.9; }
.timeframe-tab:active { scale: 0.97; }

.timeframe-tab.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.timeframe-tab.active .ui-ico { opacity: 1; color: var(--emerald-text); }

/* Clean Underline Category Navigation (GitHub / Vercel / Linear style) */
.category-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}

.category-bar::-webkit-scrollbar { display: none; }

.cat-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 11px 8px;
  border-radius: 6px 6px 0 0;
  font-size: 0.81rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: color 0.14s, background 0.14s;
}

.cat-pill .ui-ico { opacity: 0.58; transition: opacity 0.14s; }

.cat-pill:hover {
  color: var(--text);
}

.cat-pill:hover .ui-ico { opacity: 0.9; }

.cat-pill.active {
  color: var(--text);
  font-weight: 600;
}

.cat-pill.active .ui-ico {
  opacity: 1;
  color: var(--text);
}

.cat-pill.active::after {
  content: "";
  position: absolute;
  inset-inline: 8px;
  inset-block-end: 0;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--text);
}

/* Featured Row */
.featured-section { margin: 8px 0 18px; }

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(265px, 100%), 1fr));
  gap: 12px;
}

.featured-card {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.045), var(--card));
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: var(--radius);
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: border-color 0.14s;
}

.featured-card:hover { border-color: rgba(245, 158, 11, 0.45); }

.badge-featured {
  display: inline-flex;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--amber-bg);
  color: var(--amber-text);
}

/* ============================================================================
   3. BOARD GRID & CONTAINER-RESPONSIVE LEADERBOARD
   ============================================================================ */
.board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 284px;
  gap: 18px;
  align-items: start;
  padding-bottom: 56px;
}

.board-card {
  container: board / inline-size;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.board-header {
  display: grid;
  grid-template-columns: 36px minmax(200px, 1fr) 86px 82px 92px 112px;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-size: 0.71rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.repo-row {
  display: grid;
  grid-template-columns: 36px minmax(200px, 1fr) 86px 82px 92px 112px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 10px;
  transition: background 0.12s;
}

.repo-row:last-child { border-bottom: none; }
.repo-row:hover { background: var(--card-hover); }

.repo-row-sponsored {
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.07), var(--card));
  box-shadow: inset 2px 0 0 var(--indigo);
}

.repo-row-sponsored > .repo-main {
  grid-column: 2 / -2;
}

.col-stars {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.col-stars .ui-ico { color: var(--text-dim); }

.col-vel { text-align: right; }
.col-action-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  text-align: right;
}

/* Minimalist Rank Numerals (no chunky bordered boxes) */
.rank-badge {
  width: 28px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
}

.rank-1 { background: rgba(245, 158, 11, 0.13); color: #fbbf24; font-weight: 700; }
.rank-2 { background: rgba(255, 255, 255, 0.08); color: #e4e4e7; font-weight: 700; }
.rank-3 { background: rgba(251, 146, 60, 0.13); color: #fb923c; font-weight: 700; }

.repo-main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.avatar-wrap {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.repo-info { min-width: 0; flex: 1; }

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

.repo-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  word-break: break-word;
  transition: color 0.12s;
}

.repo-name:hover { color: #ffffff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.35); }
.repo-owner { color: var(--text-dim); font-weight: 400; }

.repo-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  font-size: 0.73rem;
  color: var(--text-dim);
}

/* Soft Borderless Chip (eliminates visual box clutter) */
.mini-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 0.71rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s, color 0.12s;
}

.mini-tag .ui-ico { opacity: 0.7; }

a.mini-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.lang-meta-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.73rem;
}

.lang-meta-link:hover { color: var(--text); }

.lang-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 5px;
  flex-shrink: 0;
}

.vel-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--emerald-bg);
  color: var(--emerald-text);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.indexed-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.brief-row-btn {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
  min-height: 28px;
  padding: 0 9px;
  font-size: 0.74rem;
}

.brief-row-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* Container overrides strictly AFTER base leaderboard classes */
@container board (inline-size < 780px) {
  .board-header {
    grid-template-columns: 34px minmax(190px, 1fr) 80px 78px 86px;
  }
  .board-header .col-action,
  .board-header .col-action-cell { display: none; }
  .repo-row {
    grid-template-columns: 34px minmax(190px, 1fr) 80px 78px 86px;
  }
  .repo-row .col-action-cell {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
  }
  .repo-row-sponsored > .repo-main {
    grid-column: 2 / -1;
  }
}

@container board (inline-size < 640px) {
  .board-header { display: none; }

  .repo-row {
    grid-template-columns: 24px 34px minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto auto;
    align-items: center;
    padding: 14px 14px;
    column-gap: 10px;
    row-gap: 8px;
  }

  .repo-row:active { background: var(--card-hover); }

  .repo-main,
  .repo-info {
    display: contents;
  }

  .col-rank {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
  }

  .rank-badge {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
  }

  .repo-row .avatar-wrap {
    grid-column: 2;
    grid-row: 1;
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .repo-title-line {
    grid-column: 3;
    grid-row: 1;
    min-width: 0;
    gap: 4px;
  }

  .repo-name {
    display: block;
    min-width: 0;
    max-width: 100%;
    font-size: 0.93rem;
    font-weight: 600;
    line-height: 1.25;
  }

  .repo-owner {
    display: block;
    font-size: 0.71rem;
    line-height: 1.25;
    color: var(--text-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .repo-slash { display: none; }

  .col-stars {
    grid-column: 4;
    grid-row: 1;
    align-self: center;
    font-size: 0.81rem;
    color: var(--text-secondary);
  }

  .repo-desc {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 0;
    font-size: 0.83rem;
    line-height: 1.54;
    color: var(--text-muted);
    -webkit-line-clamp: 2;
  }

  .meta-tags {
    grid-column: 1 / 4;
    grid-row: 3;
    margin-top: 0;
    gap: 7px;
    min-width: 0;
  }

  .col-vel {
    grid-column: 4;
    grid-row: 3;
    justify-self: end;
    align-self: center;
  }

  .col-vel .vel-pill {
    padding: 2px 7px;
    font-size: 0.71rem;
  }

  .col-spark {
    display: none;
  }
  .col-action-cell {
    grid-column: 1 / -1;
    grid-row: 4;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
  }

  .repo-row-sponsored {
    grid-template-rows: auto auto;
  }
  .repo-row-sponsored .col-action-cell {
    display: none;
  }
  .repo-row-sponsored .repo-title-line {
    grid-column: 3 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .repo-row-sponsored .repo-desc {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* ============================================================================
   4. SIDEBAR & SELF-SERVE PROMO CARD
   ============================================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 74px;
}

.side-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  min-inline-size: 0;
}

.side-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sponsor-item {
  display: block;
  padding: 11px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: border-color 0.14s;
}

.sponsor-item:last-child { margin-bottom: 0; }
.sponsor-item:hover { border-color: var(--border-strong); }

.topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
}

.topic-cloud .mini-tag {
  padding: 4px 9px;
  font-size: 0.75rem;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.side-links { display: flex; flex-direction: column; gap: 2px; }
.side-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: 7px;
  transition: background 0.12s, color 0.12s;
}
.side-links a > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-links a > span:last-child {
  flex-shrink: 0;
}
.side-links a:hover { background: rgba(255, 255, 255, 0.045); color: var(--text); }

/* Refined Monochromatic Promo Card */
.promo-card {
  container: promo / inline-size;
  background:
    radial-gradient(260px 130px at 100% 0%, rgba(255, 255, 255, 0.055), transparent 72%),
    var(--card);
  border: 1px solid rgba(255, 255, 255, 0.11);
}

.promo-head { margin-bottom: 8px; }

.promo-eyebrow {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.promo-eyebrow > * {
  min-width: 0;
}

.promo-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
}

.promo-desc {
  font-size: 0.79rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 10px;
}

.promo-tiers {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.promo-tier {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.14s;
}
.promo-tier:hover { border-color: var(--border-strong); }

.promo-tier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--text);
}

.promo-price {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}

.promo-tier-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 5px 0 11px;
  line-height: 1.48;
}

@container promo (inline-size >= 480px) {
  .promo-tiers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .promo-desc {
    grid-column: 1 / -1;
    margin-bottom: 2px;
  }
}

/* ============================================================================
   5. DETAIL PAGE, COMPARISON TABLE, FAQ & README
   ============================================================================ */
.detail-wrap { padding: 22px 0 60px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  transition: color 0.14s;
}
.back-link:hover { color: var(--text); }

.detail-card { padding: 20px; }
.detail-section { margin-top: 14px; padding: 20px; }

.detail-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.detail-head-id {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  flex: 1 1 280px;
}

.detail-avatar {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  font-size: 1.05rem;
}

.detail-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.section-head-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.section-head-title .ui-ico { color: var(--text-muted); }
.section-head-sub { font-size: 0.81rem; color: var(--text-muted); margin-top: 3px; }

.review-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.review-status-pill.is-ai {
  color: var(--emerald-text);
  background: var(--emerald-bg);
  border-color: rgba(34, 197, 94, 0.25);
}

.review-status-pill.is-excerpt {
  color: var(--text-muted);
  background: var(--bg-subtle);
}

.review-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.review-section {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.review-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px 0;
  font-size: 0.87rem;
  font-weight: 650;
  color: var(--text);
}

.inline-code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  font-size: 0.84em;
  padding: 1px 5px;
  margin: 0 1px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid var(--border);
  color: var(--text);
  word-break: break-word;
}

.review-section-body {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.78;
  white-space: pre-line;
  margin: 0;
}

.review-section-body + .review-section-body {
  margin-top: 10px;
}

.review-prose {
  font-size: 0.89rem;
  color: var(--text-muted);
  line-height: 1.75;
  white-space: pre-line;
  margin-top: 10px;
  overflow-wrap: anywhere;
}

.use-case-box {
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.verdict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 10px;
  margin-top: 14px;
}

.verdict-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.verdict-card.is-adopt {
  border-left: 3px solid var(--emerald);
}

.verdict-card.is-skip {
  border-left: 3px solid var(--amber);
}

.verdict-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.verdict-card.is-adopt .verdict-head { color: var(--emerald-text); }
.verdict-card.is-skip .verdict-head { color: var(--amber-text); }

.verdict-body {
  font-size: 0.835rem;
  line-height: 1.68;
  color: var(--text-secondary);
  margin: 0;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 10px;
  margin-top: 14px;
}

.highlight-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
  font-size: 0.825rem;
  color: var(--text-secondary);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  min-width: 0;
}

.highlight-text {
  min-width: 0;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

.highlight-label {
  color: var(--text);
  font-weight: 650;
}

.brief-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-embed-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.badge-seg {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
  margin-top: 10px;
}

.badge-seg-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s;
}

.badge-seg-btn:hover { color: var(--text); }
.badge-seg-btn.active {
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
}

.badge-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  overflow: hidden;
}

.badge-preview-stage img,
.badge-gen-preview img {
  max-width: 100%;
  height: auto;
  display: block;
}

.badge-copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.badge-copy-row + .badge-preview-stage {
  margin-top: 10px;
}

.claim-strip {
  margin-top: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--bg-subtle);
}

.alt-title {
  font-size: clamp(1.26rem, 1rem + 1.4vw, 1.62rem);
  font-weight: 700;
  line-height: 1.26;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.stat-label { font-size: 0.73rem; color: var(--text-dim); margin-bottom: 4px; }
.stat-value { font-size: 1.15rem; font-weight: 700; }

.health-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.health-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 13px;
}

.code-panel {
  background: #0a0a0d;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 13px 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 0.8rem;
  line-height: 1.62;
  color: #e4e4e7;
  margin-top: 10px;
}

.code-panel-scroll { white-space: pre; }
.code-panel-wrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 360px;
  overflow-y: auto;
}

.hl-com { color: #71717a; font-style: italic; }
.hl-str { color: #86efac; }
.hl-flg { color: #fde68a; }
.hl-kw  { color: #93c5fd; font-weight: 600; }

/* Responsive Comparison Table (Sticky Row Header + Mobile Stacked Cards via @container) */
.cmp-scroll {
  overflow-x: auto;
  max-inline-size: 100%;
  margin-top: 12px;
  container: cmp / inline-size;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--bg-subtle);
}

.cmp-table {
  width: 100%;
  min-width: 540px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}

.cmp-table th {
  text-align: left;
  padding: 9px 11px;
  font-size: 0.72rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  white-space: nowrap;
}

.cmp-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: var(--card);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  vertical-align: top;
}

.cmp-table tr.cmp-row-self th,
.cmp-table tr.cmp-row-self td {
  background: #141916;
}

.cmp-table td {
  padding: 10px 11px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.cmp-table tr:last-child th,
.cmp-table tr:last-child td {
  border-bottom: none;
}

@container cmp (inline-size < 560px) {
  .cmp-table { min-width: 0; display: block; }
  .cmp-table thead { display: none; }
  .cmp-table tbody { display: flex; flex-direction: column; gap: 10px; }

  .cmp-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
    padding: 12px 13px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--bg-subtle);
  }

  .cmp-table tbody tr.cmp-row-self {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.05);
  }

  .cmp-table tbody th {
    position: static;
    grid-column: 1 / -1;
    padding: 0 0 8px;
    background: transparent !important;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    white-space: normal;
  }

  .cmp-table tbody td {
    display: block;
    padding: 0;
    border: none;
    background: transparent !important;
    font-size: 0.82rem;
    min-width: 0;
  }

  .cmp-table tbody td::before {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
    font-size: 0.69rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 2px;
  }

  .cmp-table tbody td:nth-child(2)::before { content: var(--lbl-stars); }
  .cmp-table tbody td:nth-child(3)::before { content: var(--lbl-growth); }
  .cmp-table tbody td:nth-child(4)::before { content: var(--lbl-lang); }
  .cmp-table tbody td:nth-child(5)::before { content: var(--lbl-license); }
  .cmp-table tbody td:nth-child(6) {
    grid-column: 1 / -1;
    max-width: none !important;
    padding-top: 6px;
    border-top: 1px dashed var(--border);
  }
  .cmp-table tbody td:nth-child(6)::before { content: var(--lbl-focus); }
}

.faq-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.faq-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.faq-q { font-weight: 600; font-size: 0.87rem; color: var(--text); }
.faq-a { font-size: 0.82rem; color: var(--text-muted); margin-top: 5px; line-height: 1.6; }

.readme-collapse summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.readme-collapse summary::-webkit-details-marker { display: none; }
.readme-hint {
  font-size: 0.77rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.readme-chevron { display: inline-flex; transition: transform 0.18s ease; }
.readme-collapse[open] .readme-chevron { transform: rotate(180deg); }
.readme-body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.md-h { margin: 16px 0 8px; font-size: 0.98rem; font-weight: 700; color: var(--text); }
.md-p { margin-bottom: 10px; font-size: 0.85rem; color: var(--text-muted); line-height: 1.68; }
.md-ul { margin: 6px 0 12px 18px; color: var(--text-muted); font-size: 0.84rem; line-height: 1.65; }
.md-code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 0.82em; color: var(--text); }
.md-link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
button.md-link { background: none; border: none; padding: 0; font: inherit; cursor: pointer; display: inline; }
.rf-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================================
   6. NATIVE TOP-LAYER DIALOGS, FORMS & TOAST
   ============================================================================ */
dialog.rf-dialog {
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #121216;
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.78);
  max-width: calc(100dvw - 24px);
  max-height: 88dvh;
  overflow: hidden;
}

dialog.rf-dialog:modal {
  overscroll-behavior: contain;
}

dialog.rf-dialog::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

dialog.rf-dialog[open] {
  display: flex;
  flex-direction: column;
}

@media (prefers-reduced-motion: no-preference) {
  dialog.rf-dialog {
    opacity: 0;
    translate: 0 12px;
    transition: opacity 0.16s ease, translate 0.2s cubic-bezier(0.16, 1, 0.3, 1), display 0.16s, overlay 0.16s;
    transition-behavior: allow-discrete;
  }
  dialog.rf-dialog[open] {
    opacity: 1;
    translate: 0 0;
  }
  @starting-style {
    dialog.rf-dialog[open] {
      opacity: 0;
      translate: 0 12px;
    }
  }
}

dialog.cmdk-dialog {
  margin: 10dvh auto auto;
  width: 560px;
  background: #111114;
}

.cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cmdk-input {
  flex: 1;
  min-width: 0;
  height: 50px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.94rem;
  font-family: inherit;
}

.cmdk-input:focus,
.cmdk-input:focus-visible { outline: none; }
.cmdk-input-wrap:focus-within { box-shadow: inset 0 -1px 0 var(--border-strong); }

.cmdk-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  flex-shrink: 0;
}

.cmdk-results {
  flex: 1;
  min-height: 0;
  max-height: 380px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 6px;
}

.cmdk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 9px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s;
}
.cmdk-item:hover, .cmdk-item.active { background: var(--card-hover); }

dialog.modal-dialog {
  margin: auto;
  width: 492px;
}

.modal-box {
  display: flex;
  flex-direction: column;
  max-height: 88dvh;
  min-height: 0;
  padding: 20px 22px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

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

.modal-title { font-size: 1.02rem; font-weight: 700; }

.success-banner {
  background: var(--emerald-bg);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--emerald-text);
  padding: 11px 15px;
  border-radius: 9px;
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.form-group { margin-top: 13px; }
.form-label { display: block; font-size: 0.78rem; font-weight: 500; color: var(--text-muted); margin-bottom: 5px; }
.form-control {
  width: 100%;
  min-height: 38px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--text);
  font-size: 0.86rem;
  font-family: inherit;
  transition: border-color 0.14s, background-color 0.14s, box-shadow 0.14s;
}
.form-control:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}
textarea.form-control {
  min-height: 86px;
  padding: 9px 11px;
  line-height: 1.55;
  resize: vertical;
}

select,
select.form-control,
select.input {
  color-scheme: dark;
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 14px 14px;
  padding-right: 34px;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

select:hover,
select.form-control:hover,
select.input:hover {
  background-color: var(--card-hover);
  border-color: var(--border-strong);
}

select:focus,
select.form-control:focus,
select.input:focus {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

select option {
  background-color: #141419;
  color: #fafafa;
}

/* Desktop fine-pointer branded top-layer select menu (preserves native mobile pickers) */
@media (hover: hover) and (pointer: fine) {
  @supports (appearance: base-select) {
    select,
    select.form-control,
    select.input,
    select::picker(select),
    select.form-control::picker(select),
    select.input::picker(select) {
      appearance: base-select;
    }

    select,
    select.form-control,
    select.input {
      display: inline-flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding-right: 11px;
      background-image: none;
    }

    select::picker-icon,
    select.form-control::picker-icon,
    select.input::picker-icon {
      content: "";
      width: 14px;
      height: 14px;
      flex-shrink: 0;
      margin-inline-start: auto;
      background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
      transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    }

    select:open::picker-icon,
    select.form-control:open::picker-icon,
    select.input:open::picker-icon {
      transform: rotate(180deg);
    }

    select::picker(select),
    select.form-control::picker(select),
    select.input::picker(select) {
      background: #141419;
      color: var(--text);
      border: 1px solid rgba(255, 255, 255, 0.14);
      border-radius: 10px;
      padding: 5px;
      margin-block: 4px;
      min-inline-size: anchor-size(width);
      max-block-size: 320px;
      box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.04);
    }

    select option,
    select.form-control option,
    select.input option {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      border-radius: 6px;
      font-size: 0.85rem;
      line-height: 1.35;
      color: var(--text);
      background: transparent;
      cursor: pointer;
      transition: background 0.1s ease, color 0.1s ease;
    }

    select option:hover,
    select option:focus-visible,
    select.form-control option:hover,
    select.form-control option:focus-visible,
    select.input option:hover,
    select.input option:focus-visible {
      background: rgba(255, 255, 255, 0.07);
      outline: none;
    }

    select option:checked,
    select.form-control option:checked,
    select.input option:checked {
      background: rgba(34, 197, 94, 0.14);
      color: var(--emerald-text);
      font-weight: 600;
    }

    select option::checkmark,
    select.form-control option::checkmark,
    select.input option::checkmark {
      content: "✓";
      color: var(--emerald-text);
      font-weight: 700;
      order: 2;
      margin-inline-start: auto;
    }
  }
}
.form-error { margin-top: 10px; font-size: 0.8rem; color: #f87171; display: none; }

.toast {
  position: fixed;
  inset: auto 22px 22px auto;
  margin: 0;
  border: none;
  z-index: 100;
  contain: layout style;
  background: var(--text);
  color: #09090b;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 10px 16px;
  border-radius: 9px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast[popover] {
  inset: auto 22px 22px auto;
  margin: 0;
  border: none;
  overflow: visible;
}
.toast.show,
.toast:popover-open.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================================
   7. DIRECTORY FOOTER
   ============================================================================ */
.footer {
  border-top: 1px solid var(--border);
  background: #070709;
  padding: 42px 0 max(36px, env(safe-area-inset-bottom, 0px));
  color: var(--text-dim);
  font-size: 0.81rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.footer-grid > * {
  min-width: 0;
}

.footer-brand-desc {
  color: var(--text-muted);
  font-size: 0.81rem;
  line-height: 1.65;
  margin-top: 10px;
  max-width: 340px;
}

.footer-trust {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 0.73rem;
  color: var(--text-muted);
}

.footer-lang-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 12px;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.footer-lang-row a {
  color: var(--text-muted);
  transition: color 0.14s;
}

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

.footer-inline-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}

.footer-col-title {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 10px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-links a,
.footer-links button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--text-muted);
  font-size: 0.81rem;
  background: none;
  border: none;
  padding: 3px 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: color 0.14s;
}

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

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  font-size: 0.76rem;
  color: var(--text-dim);
}

.footer-bottom a { white-space: nowrap; }

/* ============================================================================
   7B. GROWTH MODULES: NEWSLETTER, TRACK SPONSORS, AFFILIATES, /ADVERTISE, /BADGES
   ============================================================================ */
.nl-strip {
  margin: 26px 0 36px;
  padding: 20px 22px;
  border-radius: 12px;
  background:
    radial-gradient(360px 140px at 0% 0%, rgba(34, 197, 94, 0.06), transparent 72%),
    var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.nl-copy { flex: 1 1 280px; min-width: 0; }
.nl-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.nl-title { font-size: 1.02rem; font-weight: 700; color: var(--text); }
.nl-sub { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }

.nl-form {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1 1 300px;
  max-width: 440px;
}
.nl-input { flex: 1; min-width: 0; }
.nl-submit { flex-shrink: 0; }

.track-partner-card {
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.07), var(--card));
  border: 1px solid rgba(129, 140, 248, 0.24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.infra-offer-strip {
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 9px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.adv-hero { padding: 6px 0 8px; }
.adv-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

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

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

.adv-tier-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}

.adv-tier-featured {
  border-color: rgba(255, 255, 255, 0.22);
  background:
    radial-gradient(280px 120px at 100% 0%, rgba(255, 255, 255, 0.06), transparent 72%),
    var(--card);
}

.adv-tier-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.adv-tier-price-row h3 { font-size: 0.98rem; }
.adv-price { font-size: 1.05rem; font-weight: 700; color: var(--text); white-space: nowrap; }

.adv-track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 10px;
  margin-top: 14px;
}

.adv-track-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 13px 14px;
}

.adv-track-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.adv-track-meta {
  display: flex;
  gap: 7px;
  margin-top: 6px;
  font-size: 0.74rem;
  color: var(--text-dim);
}

.badge-gen-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge-gen-preview {
  margin-top: 16px;
  min-height: 136px;
  padding: 18px 14px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.vs-side-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.category-bar-row .category-bar {
  flex: 1;
  min-width: 0;
  border-bottom: none;
}

.license-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 10px;
  margin-bottom: 6px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.license-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.license-toggle.active {
  border-color: rgba(74, 222, 128, 0.4);
  background: var(--emerald-bg);
  color: var(--emerald-text);
  font-weight: 600;
}

.board-pagination {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 14px;
  z-index: 200;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.82rem;
  font-weight: 600;
  transition: top 0.12s ease;
}
.skip-link:focus-visible {
  top: 12px;
}

.active-filter-bar {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.8rem;
}

.active-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 500;
}
.active-filter-pill:hover {
  border-color: var(--text-dim);
}
.active-filter-pill.is-emerald {
  color: var(--emerald-text);
  border-color: rgba(74, 222, 128, 0.35);
}

.dev-snippets-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 780px) {
  .dev-snippets-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.dev-snippet-box {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.dev-snippet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.dev-feed-card {
  display: block;
  transition: border-color 0.14s, background 0.14s;
}
.dev-feed-card:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
}

/* ============================================================================
   8. VIEWPORT RESPONSIVE OVERRIDES (STRICT DESCENDING CASCADE)
   ============================================================================ */
@media (max-width: 1180px) {
  .nav-badges-link { display: none; }
  .nav-mobile-menu { display: block; }
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 18px;
  }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-brand-desc { max-width: 100%; }
}

@media (max-width: 980px) {
  .hero-stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .hero-signal-board {
    display: none;
  }
  .board-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding-bottom: 42px;
  }
  .health-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
  }
  .sidebar > .promo-card { grid-column: 1 / -1; }
  .cmdk-trigger { max-width: 240px; }
}

@media (max-width: 900px) {
  .adv-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .nav-sponsor-btn,
  .shortlist-nav-label { display: none; }
  .cmdk-trigger {
    min-width: 130px;
    max-width: 240px;
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 16px;
  }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-brand-desc { max-width: 100%; }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: calc(60px + env(safe-area-inset-top, 0px));
  }
  .navbar-inner {
    min-height: 52px;
    padding-block: 6px;
    gap: 6px;
    justify-content: flex-start;
  }
  .brand { font-size: 0.9rem; gap: 6px; }
  .brand-mark { width: 24px; height: 24px; font-size: 0.78rem; }
  .brand-tld { display: none; }

  .cmdk-trigger {
    flex: 0 0 auto;
    margin-inline-start: auto;
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    justify-content: center;
    background: var(--card);
    color: var(--text-secondary);
  }
  .cmdk-trigger-lead { gap: 0; }
  .cmdk-label-text, .kbd-shortcut, .nav-sponsor-btn, .nav-badges-link, .submit-desk, .shortlist-nav-label { display: none; }
  .submit-mob { display: inline; }

  .nav-actions { gap: 4px; }
  .lang-switch { padding: 2px; gap: 1px; }
  .lang-switch a { min-height: 30px; padding: 0 6px; font-size: 0.71rem; }
  .shortlist-nav-btn { min-height: 34px; padding: 0 7px; gap: 4px; }
  .nav-mobile-summary { min-width: 34px; width: 34px; min-height: 34px; padding: 0; }
  .nav-actions .btn-primary { min-height: 34px; padding: 0 9px; font-size: 0.75rem; gap: 4px; }

  .hero { padding: 18px 0 10px; }
  .hero-home { padding: 20px 0 10px; }
  .hero-eyebrow { font-size: 0.72rem; margin-bottom: 8px; }
  .hero h1 { font-size: clamp(1.45rem, 1.15rem + 1.4vw, 1.8rem); line-height: 1.18; }
  .hero-home h1 { font-size: clamp(1.78rem, 1.35rem + 2.1vw, 2.2rem); line-height: 1.15; }
  .hero p { font-size: 0.86rem; line-height: 1.58; margin-top: 8px; }
  .hero-actions { margin-top: 14px; }
  .hero-search { height: 42px; }
  .hero-search-input { font-size: 16px; }
  .hero-dock {
    margin-top: 16px;
    padding-top: 12px;
    margin-bottom: 10px;
    gap: 8px;
  }
  .hero-dock .license-toggle {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.73rem;
  }

  /* Single-row sleek segmented bar on mobile — compact 5-tab layout without wrapping */
  .timeframe-tabs {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
  }
  .timeframe-tab {
    padding: 4px 2px;
    font-size: 0.74rem;
    min-height: 34px;
    gap: 2px;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .timeframe-tab .ui-ico { display: none; }
  .tf-full { display: none; }
  .tf-short { display: inline; }

  .radar-banner {
    padding: 10px 12px;
    gap: 8px;
  }

  .category-bar {
    margin-inline: -14px;
    padding-inline: 14px;
  }
  .category-bar-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border-bottom: none;
  }
  .category-bar-row .category-bar {
    border-bottom: 1px solid var(--border);
  }
  .license-toggle {
    align-self: flex-start;
    margin-bottom: 0;
  }
  .cat-pill {
    min-height: 38px;
    padding: 0 10px 8px;
    font-size: 0.8rem;
  }

  .sidebar {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: max(14px, env(safe-area-inset-left, 0px)) max(14px, env(safe-area-inset-right, 0px));
  }
  .detail-wrap { padding: 12px 0 42px; }
  .detail-card { padding: 15px; }
  .detail-section { margin-top: 12px; padding: 15px; }
  .detail-avatar { width: 42px; height: 42px; border-radius: 9px; font-size: 0.95rem; }

  .detail-head-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .detail-head-actions .btn {
    flex: 1 1 150px;
    white-space: normal;
    text-align: center;
    line-height: 1.28;
    padding: 8px 12px;
  }

  .modal-box .btn,
  .promo-card .btn,
  .claim-strip .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    padding-block: 9px;
  }

  .health-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .health-item { padding: 10px 11px; }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }
  .stat-box { padding: 11px 12px; }
  .stat-value { font-size: 1.04rem; }

  .brief-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .brief-actions .btn { width: 100%; }

  .badge-embed-head > div:first-child { width: 100%; }
  .badge-seg {
    width: auto;
    max-width: 100%;
    display: inline-flex;
    flex-wrap: wrap;
  }
  .badge-seg-btn {
    min-width: 0;
    padding: 6px 9px;
    font-size: 0.72rem;
    text-align: center;
  }
  .badge-preview-stage { width: 100%; }
  .badge-copy-row {
    flex-direction: column;
    align-items: stretch;
  }
  .badge-copy-row .btn { width: 100%; }

  .claim-strip { padding: 14px 15px; }
  .claim-strip .btn { width: 100%; }

  .nl-strip { padding: 16px 15px; margin: 18px 0 26px; }
  .nl-form { width: 100%; max-width: 100%; flex-direction: column; }
  .nl-submit { width: 100%; }
  .track-partner-card .btn,
  .infra-offer-strip .btn { width: 100%; }
  .adv-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vs-cards-grid,
  .dev-snippets-grid { grid-template-columns: minmax(0, 1fr); }

  /* Mobile Top-Docked Search Sheet */
  dialog.cmdk-dialog {
    margin: 0;
    width: 100dvw;
    max-width: 100dvw;
    max-height: 82dvh;
    border-radius: 0 0 16px 16px;
    border-top: none;
    border-inline: none;
    padding-top: env(safe-area-inset-top, 0px);
  }
  .cmdk-input { height: 52px; font-size: 16px; }
  .cmdk-close-btn {
    min-height: 36px;
    min-width: 44px;
    font-size: 0.8rem;
  }
  .cmdk-results {
    max-height: none;
    padding: 8px 10px max(12px, env(safe-area-inset-bottom, 0px));
  }
  .cmdk-item {
    min-height: 54px;
    padding: 10px 12px;
  }

  /* Mobile Bottom-Sheet Form Modals */
  dialog.modal-dialog {
    margin: auto 0 0 0;
    width: 100dvw;
    max-width: 100dvw;
    max-height: 92dvh;
    border-radius: 18px 18px 0 0;
    border-bottom: none;
    border-inline: none;
  }

  dialog.modal-dialog::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 99px;
    background: var(--border-strong);
    margin: 9px auto 2px;
    flex-shrink: 0;
  }

  .modal-box {
    max-height: calc(92dvh - 16px);
    padding: 12px 16px max(20px, env(safe-area-inset-bottom, 0px));
  }

  .form-control { font-size: 16px; min-height: 44px; }

  .toast,
  .toast[popover] {
    inset: auto 14px max(16px, env(safe-area-inset-bottom, 0px)) 14px;
    width: auto;
    max-width: calc(100dvw - 28px);
    text-align: center;
  }
}

@media (max-width: 640px) and (max-height: 560px) {
  dialog.modal-dialog {
    max-height: 96dvh;
  }
  .modal-box {
    max-height: calc(96dvh - 14px);
    padding: 10px 14px max(14px, env(safe-area-inset-bottom, 0px));
  }
  .modal-box .form-group {
    margin-top: 9px;
  }
}

@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  dialog.cmdk-dialog { translate: 0 -14px; }
  dialog.cmdk-dialog[open] { opacity: 1; translate: 0 0; }
  @starting-style {
    dialog.cmdk-dialog[open] { opacity: 0; translate: 0 -14px; }
  }
  dialog.modal-dialog { translate: 0 32px; }
  dialog.modal-dialog[open] { opacity: 1; translate: 0 0; }
  @starting-style {
    dialog.modal-dialog[open] { opacity: 0; translate: 0 32px; }
  }
}

@media (max-width: 560px) {
  .footer {
    padding: 26px 0 max(26px, env(safe-area-inset-bottom, 0px));
  }
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
    padding-bottom: 20px;
  }
  .footer-links {
    gap: 2px;
  }
  .footer-links a,
  .footer-links button {
    min-height: 30px;
    padding: 3px 0;
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 16px;
  }
}

@media (max-width: 430px) {
  .container {
    padding-inline: max(12px, env(safe-area-inset-left, 0px)) max(12px, env(safe-area-inset-right, 0px));
  }
  .category-bar {
    margin-inline: -12px;
    padding-inline: 12px;
  }
  .navbar-inner { gap: 5px; }
  .brand { font-size: 0.86rem; gap: 5px; }
  .brand-mark { width: 22px; height: 22px; font-size: 0.76rem; border-radius: 6px; }
  .cmdk-trigger { width: 34px; min-width: 34px; min-height: 34px; }
  .lang-switch a { padding: 0 5px; font-size: 0.69rem; }
  .shortlist-nav-btn { padding: 0 6px; gap: 3px; }
  .nav-actions .btn-primary { padding: 0 8px; font-size: 0.74rem; }
  .nav-actions .btn-primary .ui-ico { display: none; }
}

@media (max-width: 370px) {
  .navbar-inner { gap: 4px; }
  .nav-actions { gap: 3px; }
  .brand { font-size: 0.82rem; gap: 4px; }
  .brand-mark { width: 21px; height: 21px; font-size: 0.74rem; border-radius: 6px; }
  .cmdk-trigger { width: 32px; min-width: 32px; min-height: 32px; }
  .nav-mobile-summary { width: 32px; min-width: 32px; min-height: 32px; }
  .shortlist-nav-btn { padding: 0 5px; }
  .lang-switch a { padding: 0 4px; font-size: 0.68rem; }
  .nav-actions .btn-primary { padding: 0 7px; font-size: 0.72rem; }
  .timeframe-tab { font-size: 0.7rem; padding: 4px 2px; }
}

/* ============================================================================
   8. ENGINEERING HEALTH, DEPLOY CHIPS, UPVOTE, CATALOG GRIDS & ADAPTIVE BADGES
   ============================================================================ */
.health-pill {
  font-weight: 700;
  letter-spacing: 0.01em;
}
.health-emerald {
  color: var(--emerald-text);
  border-color: rgba(34, 197, 94, 0.32);
  background: var(--emerald-bg);
}
.health-indigo {
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.34);
  background: var(--indigo-bg);
}
.health-amber {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(245, 158, 11, 0.11);
}
.health-score-val {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 800;
}
.deploy-chip {
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.health-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 10px 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.health-factor { min-inline-size: 0; }
.health-factor-head {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.health-track {
  height: 5px;
  border-radius: 99px;
  background: var(--bg-subtle);
  overflow: clip;
}
.health-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #22c55e, #4ade80);
}

.upvote-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-block-size: 34px;
  transition: border-color 0.14s, background 0.14s, color 0.14s;
}
.upvote-btn.is-upvoted,
.upvote-btn[aria-pressed="true"] {
  border-color: rgba(34, 197, 94, 0.55);
  background: var(--emerald-bg);
  color: var(--emerald-text);
}
.upvote-arrow { font-size: 0.68rem; line-height: 1; }
.upvote-count { font-weight: 700; }

.badge-preview-stage.is-light,
.badge-gen-preview.is-light {
  background: #ffffff;
  color: #09090b;
  color-scheme: only light;
  border-color: #d4d4d8;
}

.catalog-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 14px;
}
.catalog-card-li { min-inline-size: 0; display: flex; }
.catalog-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-inline-size: 0;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.14s, transform 0.14s;
}
.catalog-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.catalog-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.catalog-count { font-size: 0.74rem; color: var(--emerald-text); font-weight: 600; }
.catalog-count.is-empty { color: var(--text-dim); font-weight: 500; }
.catalog-card-title {
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.35;
  color: var(--text);
}
.catalog-card-vendor {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.catalog-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 8px;
  flex: 1;
}
.catalog-preview-chips {
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.why-switch-box {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.62;
}

.star-chart-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.star-range-seg {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}
.star-range-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, color 0.14s;
}
.star-range-btn:hover { color: var(--text); }
.star-range-btn.is-active {
  background: var(--surface-2);
  color: var(--emerald-text);
  font-weight: 700;
}

.vs-chart-figure {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.vs-chart-figure svg {
  display: block;
  margin-inline: auto;
}
.vs-chart-caption {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* Secondary Filter Chip Row (Deploy Signals, Language, Health/Upvotes Sort) */
.filter-chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 2px 0 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filter-chip-row::-webkit-scrollbar { display: none; }
.filter-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dim);
  flex-shrink: 0;
  margin-inline-end: 2px;
}
.filter-sep {
  width: 1px;
  height: 14px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 4px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.filter-chip.active {
  border-color: rgba(34, 197, 94, 0.45);
  background: var(--emerald-bg);
  color: var(--emerald-text);
  font-weight: 600;
}
.filter-chip-reset {
  border-style: dashed;
  color: var(--text-dim);
}

/* Interactive /vs Comparison Picker Form */
.vs-picker-form {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 12px;
  align-items: end;
}
.vs-picker-field { min-width: 0; }
.vs-picker-field .field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.vs-picker-field select.input {
  width: 100%;
  min-height: 40px;
  padding-left: 12px;
  border-radius: 9px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
}
.vs-picker-swap { padding-bottom: 4px; }
.vs-picker-submit { min-width: 152px; }
@media (max-width: 780px) {
  .vs-picker-form {
    grid-template-columns: 1fr;
  }
  .vs-picker-swap {
    padding-bottom: 0;
    justify-self: center;
  }
}

/* Local Shortlist Trigger, Row Toggle & Top-Layer Slide-Out Modal Drawer */
.shortlist-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-inline: 9px;
}
.shortlist-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.shortlist-count.has-items {
  background: var(--emerald-bg);
  border-color: rgba(34, 197, 94, 0.45);
  color: var(--emerald-text);
}
.shortlist-row-btn {
  min-inline-size: 30px;
  min-block-size: 30px;
  padding: 0 8px;
  color: var(--text-dim);
}
.shortlist-row-btn.is-saved {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
}

dialog.shortlist-drawer {
  margin: 0 0 0 auto;
  width: min(440px, 92dvw);
  max-width: 100dvw;
  height: 100svh;
  max-height: 100svh;
  border-radius: 14px 0 0 14px;
  border-right: 0;
  border-top: 0;
  border-bottom: 0;
}
@media (prefers-reduced-motion: no-preference) {
  dialog.shortlist-drawer { translate: 24px 0; }
  dialog.shortlist-drawer[open] { opacity: 1; translate: 0 0; }
  @starting-style {
    dialog.shortlist-drawer[open] { opacity: 0; translate: 24px 0; }
  }
}
.shortlist-sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.shortlist-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.shortlist-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 20px;
}
.shortlist-empty {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.65;
  padding: 20px 14px;
  border-radius: 10px;
  border: 1px dashed var(--border);
  text-align: center;
}
.shortlist-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shortlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
}
.shortlist-item-info { min-width: 0; flex: 1; }
.shortlist-item-name {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shortlist-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.shortlist-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px max(16px, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: #0e0e11;
}
.shortlist-copy-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.copy-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--text);
  color: #09090b;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.16s ease;
}
.copy-tip.visible {
  opacity: 1;
}
@media (max-width: 640px) {
  .shortlist-nav-label { display: none; }
}
.upcoming-alts-details {
  margin-top: 22px;
  padding: 14px 18px;
}
.upcoming-alts-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}
.upcoming-alts-summary::-webkit-details-marker { display: none; }
.upcoming-alts-summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-dim);
  flex-shrink: 0;
}
.upcoming-alts-details[open] .upcoming-alts-summary::after {
  content: "−";
}
.upcoming-alts-summary:hover {
  color: var(--text);
}
.upcoming-alts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  list-style: none;
}
.upcoming-alt-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}
a.upcoming-alt-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* ============================================================================
   8B. BREADCRUMBS, AEO TELEMETRY TABLES, MIGRATOR, AD PREVIEW, /SUBMIT & LEGAL
   ============================================================================ */
.breadcrumb {
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  padding: 0;
  margin: 0;
}
.breadcrumb-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.breadcrumb-list a {
  color: var(--text-muted);
  transition: color 0.12s;
}
.breadcrumb-list a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.breadcrumb-list [aria-current="page"] {
  color: var(--text-secondary);
  font-weight: 500;
}
.breadcrumb-sep {
  color: var(--text-dim);
  opacity: 0.55;
  user-select: none;
}

/* AEO & Telemetry Semantic Comparison Table */
.aeo-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) var(--bg-subtle);
}
.aeo-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.aeo-table thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.71rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.aeo-table tbody th,
.aeo-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  color: var(--text-secondary);
  line-height: 1.5;
}
.aeo-table tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.aeo-table tbody tr:last-child th,
.aeo-table tbody tr:last-child td {
  border-bottom: none;
}
.aeo-table tbody tr:hover {
  background: var(--card-hover);
}
.aeo-table a {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}
.aeo-table td:first-child a,
.aeo-table th:first-child a {
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}
.aeo-table a:hover {
  color: var(--emerald-text);
  text-decoration-color: var(--emerald-text);
}

/* /badges OSSInsight 1-Click Migrator & Live Indexed/Unindexed Status Bar */
.oss-migrator-box {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 12px;
  background:
    radial-gradient(320px 140px at 0% 0%, rgba(245, 158, 11, 0.08), transparent 72%),
    var(--card);
  border: 1px solid rgba(245, 158, 11, 0.28);
}
.oss-migrator-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  margin-top: 10px;
}
.oss-migrator-row .form-control {
  flex: 1 1 240px;
  min-width: 0;
}
.badge-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.badge-status-bar {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 0.81rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.badge-status-bar.is-indexed {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.08);
  color: var(--text);
}
.badge-status-bar.is-unindexed {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(245, 158, 11, 0.09);
  color: var(--text);
}
.badge-status-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

/* /advertise Glama-Style 1:1 Live Preview Card & Trust Badges */
.ad-preview-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
}
.ad-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
  margin-top: 14px;
}
.ad-preview-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.ad-preview-controls .form-group {
  margin-top: 0;
}
.ad-preview-stage {
  min-width: 0;
  padding: 16px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.placement-only-badge {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 100%;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--emerald-text);
  background: var(--emerald-bg);
  border: 1px solid rgba(34, 197, 94, 0.3);
  white-space: normal;
}
.placement-only-badge .ui-ico {
  flex-shrink: 0;
  margin-top: 2px;
}
.waitlist-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--amber-text);
  background: var(--amber-bg);
  border: 1px solid rgba(245, 158, 11, 0.34);
  white-space: nowrap;
}

/* Standalone /submit Page Layout */
.submit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}
.submit-tier-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  min-width: 0;
}
.submit-tier-card.is-featured {
  border-color: rgba(245, 158, 11, 0.32);
  background:
    radial-gradient(280px 120px at 100% 0%, rgba(245, 158, 11, 0.065), transparent 72%),
    var(--card);
}

/* Trust, Methodology, About & Legal Pages */
.legal-prose {
  max-width: 820px;
  color: var(--text-secondary);
  font-size: 0.89rem;
  line-height: 1.75;
}
.legal-prose h2 {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  margin: 24px 0 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.legal-prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.legal-prose h3 {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
  margin: 16px 0 6px;
}
.legal-prose p {
  margin-bottom: 11px;
  color: var(--text-secondary);
}
.legal-prose ul,
.legal-prose ol {
  margin: 8px 0 14px 20px;
  color: var(--text-secondary);
}
.legal-prose li {
  margin-bottom: 6px;
}
.legal-prose a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}
.legal-prose a:hover {
  color: var(--emerald-text);
  text-decoration-color: var(--emerald-text);
}

.trust-provenance-bar {
  margin-top: 14px;
  padding: 10px 13px;
  border-radius: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.trust-provenance-bar a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}
.trust-provenance-bar a:hover {
  color: var(--text);
}

.cta-bridge-strip {
  margin-top: 18px;
  padding: 15px 18px;
  border-radius: 12px;
  background:
    radial-gradient(280px 110px at 100% 0%, rgba(34, 197, 94, 0.06), transparent 72%),
    var(--card);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
}
.cta-bridge-strip > div {
  max-width: 100%;
  min-width: 0;
}
.cta-bridge-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
}
.cta-bridge-strip .btn,
.submit-grid .btn,
.oss-migrator-row .btn,
.badge-status-actions .btn {
  white-space: normal;
  text-align: center;
  line-height: 1.32;
  max-width: 100%;
  padding-block: 9px;
}

@media (max-width: 820px) {
  .submit-grid,
  .ad-preview-grid,
  .adv-tiers-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .oss-migrator-box,
  .ad-preview-box,
  .submit-tier-card,
  .cta-bridge-strip {
    padding: 14px 15px;
  }
  .badge-styles-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .oss-migrator-row .btn,
  .cta-bridge-strip > div,
  .cta-bridge-strip .btn,
  .cta-bridge-actions,
  .cta-bridge-actions .btn,
  .submit-grid .btn,
  .badge-status-actions,
  .badge-status-actions .btn {
    width: 100%;
    max-width: 100%;
  }
}

/* ============================================================================
   9. COARSE POINTER TOUCH TARGETS (MUST REMAIN AT BOTTOM OF STYLESHEET)
   ============================================================================ */
@media (pointer: coarse) {
  :root {
    --target-size: 44px;
  }
  .btn { min-height: 44px; padding: 8px 14px; }
  .btn-sm { min-height: 40px; padding: 6px 12px; font-size: 0.8rem; }
  .btn-icon { min-width: 44px; min-height: 44px; }
  .navbar .btn-primary { min-height: 38px; padding: 0 11px; }
  .navbar .shortlist-nav-btn { min-height: 38px; min-width: 36px; padding: 0 9px; }
  .navbar .nav-mobile-summary { min-height: 38px; min-width: 36px; width: 36px; padding: 0; }
  .navbar .cmdk-trigger { min-height: 38px; min-width: 36px; }
  .navbar .lang-switch a { min-height: 34px; padding: 0 7px; }
  .timeframe-tab { min-height: 38px; }
  .cat-pill { min-height: 42px; }
  .topic-cloud .mini-tag { min-height: 36px; padding: 6px 10px; }
  .upvote-btn,
  .shortlist-row-btn {
    min-height: 40px;
    min-block-size: 40px;
    min-width: 40px;
    min-inline-size: 40px;
  }
  .filter-chip { min-height: 36px; padding: 0 12px; }
  .star-range-btn { min-height: 36px; padding: 6px 11px; }
  .badge-seg-btn { min-height: 36px; padding: 6px 11px; }
  .license-toggle { min-height: 36px; padding: 0 12px; }
  .nav-mobile-panel a,
  .nav-mobile-panel button { min-height: 42px; }
  .breadcrumb-list a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
  }
}

@media (pointer: coarse) and (max-width: 680px) {
  .navbar .btn-primary { min-height: 38px; padding: 0 9px; }
  .navbar .shortlist-nav-btn { min-height: 38px; min-width: 36px; padding: 0 7px; }
  .navbar .cmdk-trigger { min-height: 38px; min-width: 36px; width: 36px; padding: 0; }
  .navbar .lang-switch a { min-height: 34px; padding: 0 6px; }
}

@media (pointer: coarse) and (max-width: 430px) {
  .navbar .btn-primary { min-height: 36px; padding: 0 8px; }
  .navbar .shortlist-nav-btn { min-height: 36px; min-width: 36px; padding: 0 6px; }
  .navbar .nav-mobile-summary { min-height: 36px; min-width: 34px; width: 34px; }
  .navbar .cmdk-trigger { min-height: 36px; min-width: 34px; width: 34px; padding: 0; }
  .navbar .lang-switch a { min-height: 32px; padding: 0 5px; }
}
