/* PredictStamp global UI — mobile-first (see AGENTS.md §7) */
:root {
  --pr-glow: rgba(99, 102, 241, 0.35);
  --pr-glow-emerald: rgba(16, 185, 129, 0.3);
  --pr-bottom-nav-height: 3.75rem;
  --pr-touch-min: 2.75rem;
  --pr-safe-bottom: env(safe-area-inset-bottom, 0px);
  --pr-safe-top: env(safe-area-inset-top, 0px);
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body.has-mobile-nav {
  padding-bottom: calc(var(--pr-bottom-nav-height) + var(--pr-safe-bottom));
}

body.pr-nav-open {
  overflow: hidden;
}

/* Top navbar — fixed so it stays visible (sticky breaks with html/body height: 100%) */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding-top: var(--pr-safe-top);
}

body:has(.site-header) {
  padding-top: calc(3.5rem + var(--pr-safe-top));
}

@media (min-width: 768px) {
  body.has-mobile-nav {
    padding-bottom: 0;
  }
}

.pr-page,
.about-page {
  --about-glow: var(--pr-glow);
  --about-glow-emerald: var(--pr-glow-emerald);
}

/* Layout — full-bleed breakout (safe when parent is narrower than viewport) */
.pr-full-bleed {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc((100% - 100vw) / 2);
}

body:has(.about-page) .about-full-bleed {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.pr-page {
  min-width: 0;
}

.about-section-nav {
  position: fixed;
  top: calc(3.5rem + var(--pr-safe-top));
  left: 0;
  right: 0;
  z-index: 49;
  min-height: 2.75rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgb(15 23 42 / 0.08);
  isolation: isolate;
  transform: translateZ(0);
}

html.dark .about-section-nav {
  background-color: #0f172a;
  border-bottom-color: #334155;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.35);
}

/* About page: solid header over long-scroll sections */
body:has(.about-page) .site-header {
  background-color: #ffffff;
  transform: translateZ(0);
}

html.dark body:has(.about-page) .site-header {
  background-color: #0f172a;
}

body:has(.about-page) main {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  padding-top: 3.25rem;
}

body:has(.about-page) .about-page > .mx-auto.max-w-6xl {
  padding-inline: 1rem;
}

@media (min-width: 640px) {
  body:has(.about-page) .about-page > .mx-auto.max-w-6xl {
    padding-inline: 1.5rem;
  }
}

@media (min-width: 1024px) {
  body:has(.about-page) .about-page > .mx-auto.max-w-6xl {
    padding-inline: 2rem;
  }
}

body:has(.about-page) .about-page [id^="about-"] {
  scroll-margin-top: 6.75rem;
}

.pr-page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 10% -5%, rgba(99, 102, 241, 0.07), transparent 50%),
    radial-gradient(ellipse 50% 40% at 95% 5%, rgba(16, 185, 129, 0.06), transparent 45%);
}

html.dark .pr-page-bg {
  background:
    radial-gradient(ellipse 70% 50% at 10% -5%, rgba(99, 102, 241, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 40% at 95% 5%, rgba(16, 185, 129, 0.08), transparent 45%);
}

/* Mesh & orbs */
.pr-mesh,
.about-mesh {
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, var(--pr-glow), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, var(--pr-glow-emerald), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(139, 92, 246, 0.2), transparent 55%);
}

.pr-grid-bg,
.about-grid-bg {
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

html.dark .pr-grid-bg,
html.dark .about-grid-bg {
  background-image:
    linear-gradient(rgba(129, 140, 248, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(129, 140, 248, 0.06) 1px, transparent 1px);
}

.pr-orb,
.about-orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(60px);
  animation: pr-float 18s ease-in-out infinite;
  pointer-events: none;
}

.pr-orb--slow,
.about-orb--slow {
  animation-duration: 24s;
  animation-direction: reverse;
}

@keyframes pr-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -16px) scale(1.05); }
  66% { transform: translate(-16px, 12px) scale(0.95); }
}

/* Typography */
.pr-gradient-text,
.about-gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #059669 50%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html.dark .pr-gradient-text,
html.dark .about-gradient-text {
  background: linear-gradient(135deg, #a5b4fc 0%, #6ee7b7 45%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.pr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4f46e5;
}

html.dark .pr-eyebrow { color: #818cf8; }

.pr-eyebrow-dot {
  position: relative;
  display: flex;
  height: 0.5rem;
  width: 0.5rem;
}

.pr-eyebrow-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #34d399;
  animation: pr-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  opacity: 0.75;
}

.pr-eyebrow-dot::after {
  content: "";
  position: relative;
  display: block;
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 9999px;
  background: #10b981;
}

@keyframes pr-ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}

/* Hero */
.pr-hero {
  position: relative;
  margin-bottom: 2.5rem;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.85);
  padding: 2rem 1.5rem;
  box-shadow: 0 4px 24px -4px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
}

html.dark .pr-hero {
  border-color: rgba(71, 85, 105, 0.6);
  background: rgba(30, 41, 59, 0.85);
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.35);
}

@media (min-width: 640px) {
  .pr-hero { padding: 2.5rem 2rem; }
}

.pr-hero--compact {
  margin-bottom: 2rem;
  padding: 1.75rem 1.5rem;
}

@media (min-width: 640px) {
  .pr-hero--compact { padding: 2rem 2rem; }
}

.pr-hero-title {
  margin-top: 0.75rem;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #0f172a;
}

html.dark .pr-hero-title { color: #f8fafc; }

@media (min-width: 640px) {
  .pr-hero-title { font-size: 2.25rem; }
}

.pr-hero--compact .pr-hero-title {
  font-size: 1.75rem;
}

@media (min-width: 640px) {
  .pr-hero--compact .pr-hero-title { font-size: 2rem; }
}

.pr-hero-desc {
  margin-top: 0.75rem;
  max-width: 42rem;
  font-size: 0.9375rem;
  line-height: 1.625;
  color: #475569;
}

html.dark .pr-hero-desc { color: #94a3b8; }

@media (min-width: 640px) {
  .pr-hero-desc { font-size: 1rem; }
}

/* Market detail hero */
.pr-market-hero-image {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: #fff;
  padding: 0.375rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

html.dark .pr-market-hero-image {
  border-color: rgba(100, 116, 139, 0.55);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.pr-market-hero-image--fallback {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

html.dark .pr-market-hero-image--fallback {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

@media (min-width: 640px) {
  .pr-market-hero-image {
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 1.125rem;
    padding: 0.5rem;
  }
}

@media (min-width: 768px) {
  .pr-market-hero-image {
    width: 7.5rem;
    height: 7.5rem;
  }
}

/* Profile header */
.pr-profile-header {
  position: relative;
  margin-bottom: 2rem;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 24px -6px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(8px);
}

html.dark .pr-profile-header {
  border-color: rgba(71, 85, 105, 0.65);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 4px 24px -6px rgba(0, 0, 0, 0.45);
}

.pr-profile-header-banner {
  height: 5.5rem;
  background:
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.35), transparent 55%),
    radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.28), transparent 50%),
    linear-gradient(135deg, #eef2ff 0%, #ecfdf5 45%, #f8fafc 100%);
}

html.dark .pr-profile-header-banner {
  background:
    radial-gradient(circle at 15% 50%, rgba(99, 102, 241, 0.4), transparent 55%),
    radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.25), transparent 50%),
    linear-gradient(135deg, #1e1b4b 0%, #134e4a 45%, #0f172a 100%);
}

.pr-profile-header-body {
  padding: 0 1.25rem 1.25rem;
}

@media (min-width: 640px) {
  .pr-profile-header-body {
    padding: 0 1.75rem 1.5rem;
  }
}

.pr-profile-header-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .pr-profile-header-main {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.25rem;
  }
}

.pr-profile-avatar {
  flex-shrink: 0;
  width: 5.5rem;
  height: 5.5rem;
  margin-top: -2.75rem;
  padding: 0.2rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #6366f1, #10b981);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.pr-profile-avatar-wrap {
  flex-shrink: 0;
}

.pr-profile-avatar-form {
  margin-top: -2.75rem;
}

.pr-profile-avatar--preview {
  margin-top: 0;
}

.pr-profile-avatar--editable {
  position: relative;
  display: block;
  cursor: pointer;
}

.pr-profile-avatar--editable:focus-within .pr-profile-avatar-edit {
  opacity: 1;
  transform: scale(1);
}

.pr-profile-avatar-edit {
  position: absolute;
  right: 0.125rem;
  bottom: 0.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 2px solid #fff;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  opacity: 0.92;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

html.dark .pr-profile-avatar-edit {
  border-color: #0f172a;
}

.pr-profile-avatar-edit svg {
  width: 0.95rem;
  height: 0.95rem;
}

.pr-profile-avatar--editable:hover .pr-profile-avatar-edit {
  opacity: 1;
  transform: scale(1.05);
}

.pr-profile-avatar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 9999px;
  border: 3px solid #fff;
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  font-size: 1.75rem;
  font-weight: 800;
  color: #1e40af;
}

.pr-user-avatar-img.pr-profile-avatar-media,
.pr-user-avatar-fallback.pr-profile-avatar-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9999px;
}

.pr-user-avatar-fallback.pr-profile-avatar-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
}

html.dark .pr-profile-avatar-inner {
  border-color: #0f172a;
  background: linear-gradient(145deg, #1e3a8a, #312e81);
  color: #bfdbfe;
}

.pr-profile-identity {
  min-width: 0;
  flex: 1;
  padding-top: 0.25rem;
}

@media (min-width: 640px) {
  .pr-profile-identity {
    padding-top: 0.5rem;
  }
}

.pr-profile-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #0f172a;
}

html.dark .pr-profile-name {
  color: #f8fafc;
}

@media (min-width: 640px) {
  .pr-profile-name {
    font-size: 1.875rem;
  }
}

.pr-profile-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.pr-profile-handle {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #64748b;
}

html.dark .pr-profile-handle {
  color: #94a3b8;
}

.pr-profile-badge-pending {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgb(254 243 199);
  color: rgb(146 64 14);
}

html.dark .pr-profile-badge-pending {
  background: rgba(180, 83, 9, 0.35);
  color: rgb(253 230 138);
}

.pr-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0.875rem 0 0;
  padding: 0;
}

.pr-profile-stat {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin: 0;
}

.pr-profile-stat dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 800;
  color: #0f172a;
}

html.dark .pr-profile-stat dd {
  color: #f8fafc;
}

.pr-profile-stat dt {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

html.dark .pr-profile-stat dt {
  color: #94a3b8;
}

.pr-profile-stat--muted {
  display: block;
}

.pr-profile-stat--muted dt {
  font-weight: 500;
  color: #64748b;
}

.pr-profile-bio {
  margin: 0.875rem 0 0;
  max-width: 40rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #475569;
}

html.dark .pr-profile-bio {
  color: #94a3b8;
}

.pr-profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  margin-top: 1.25rem;
  padding-top: 1.125rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.pr-profile-follow form {
  display: inline;
}

.pr-profile-follow .btn-primary,
.pr-profile-follow .btn-secondary {
  min-height: var(--pr-touch-min, 2.75rem);
  padding-inline: 1rem;
}

html.dark .pr-profile-actions {
  border-top-color: rgba(71, 85, 105, 0.65);
}

.pr-profile-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding-inline: 0.875rem;
}

.pr-profile-action-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.pr-profile-search {
  position: relative;
  flex: 1 1 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .pr-profile-search {
    flex: 1 1 12rem;
    max-width: 16rem;
  }
}

.pr-profile-search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.pr-profile-search-input {
  width: 100%;
  min-height: var(--pr-touch-min, 2.75rem);
  padding: 0.625rem 0.875rem 0.625rem 2.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  background: #f8fafc;
  font-size: 0.875rem;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.pr-profile-search-input:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

html.dark .pr-profile-search-input {
  border-color: #334155;
  background: #1e293b;
  color: #f8fafc;
}

html.dark .pr-profile-search-input:focus {
  border-color: #818cf8;
  background: #0f172a;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

.pr-profile-search-input::placeholder {
  color: #94a3b8;
}

@media (max-width: 639px) {
  .pr-profile-header {
    margin-bottom: 1.25rem;
    border-radius: 1rem;
  }

  .pr-profile-header-banner {
    height: 4.5rem;
  }

  .pr-profile-avatar,
  .pr-profile-avatar-form {
    width: 4.75rem;
    height: 4.75rem;
    margin-top: -2.375rem;
  }

  .pr-profile-avatar--preview {
    margin-top: 0;
  }

  .pr-profile-avatar-inner {
    font-size: 1.5rem;
  }

  .pr-profile-name {
    font-size: 1.375rem;
  }

  .pr-profile-actions {
    margin-top: 1rem;
    padding-top: 1rem;
  }
}

/* User avatars — shared across forum, forecasts, nav, search */
.x-tweet-avatar .pr-user-avatar-img,
.x-tweet-avatar .pr-user-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.x-tweet-avatar .pr-user-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pr-user-avatar-ring {
  display: flex;
  overflow: hidden;
  border-radius: 9999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}

html.dark .pr-user-avatar-ring {
  background: rgba(30, 58, 138, 0.55);
  color: #bfdbfe;
}

.pr-user-avatar-ring--xs {
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
}

.pr-user-avatar-ring--sm {
  width: 2rem;
  height: 2rem;
  font-size: 0.8125rem;
}

.pr-user-avatar-ring--md {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 0.875rem;
}

.pr-user-avatar-ring .pr-user-avatar-img,
.pr-user-avatar-ring .pr-user-avatar-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pr-user-avatar-ring .pr-user-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pr-mobile-nav-user-avatar .pr-user-avatar-img,
.pr-mobile-nav-user-avatar .pr-user-avatar-fallback,
.navbar-user-avatar .pr-user-avatar-img,
.navbar-user-avatar .pr-user-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.pr-mobile-nav-user-avatar .pr-user-avatar-fallback,
.navbar-user-avatar .pr-user-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.x-user-search-avatar .pr-user-avatar-img,
.x-user-search-avatar .pr-user-avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.x-user-search-avatar .pr-user-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pr-hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pr-hero-row {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .pr-hero-row {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

/* Cards & panels */
.pr-glass,
.about-glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

html.dark .pr-glass,
html.dark .about-glass {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(71, 85, 105, 0.5);
}

.pr-card,
.about-card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.25s ease;
}

.pr-card:hover,
.about-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.15);
}

html.dark .pr-card:hover,
html.dark .about-card:hover {
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.45);
}

.pr-panel {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

html.dark .pr-panel {
  border-color: #334155;
  background: rgba(30, 41, 59, 0.9);
}

.pr-stat-card {
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.9);
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

html.dark .pr-stat-card {
  border-color: #334155;
  background: rgba(30, 41, 59, 0.9);
}

.pr-stat-label {
  font-size: 0.875rem;
  color: #64748b;
}

.pr-stat-value {
  margin-top: 0.25rem;
  font-size: 1.875rem;
  font-weight: 700;
}

/* Tables — horizontal scroll on narrow screens */
.pr-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.08);
}

@media (max-width: 639px) {
  .pr-table-wrap table th,
  .pr-table-wrap table td {
    padding: 0.625rem 0.75rem;
    white-space: nowrap;
  }
}

html.dark .pr-table-wrap {
  border-color: #334155;
  background: rgba(30, 41, 59, 0.95);
}

.pr-table-wrap table thead {
  background: rgba(248, 250, 252, 0.95);
}

html.dark .pr-table-wrap table thead {
  background: rgba(51, 65, 85, 0.5);
}

.pr-table-wrap tbody tr {
  transition: background-color 0.15s ease;
}

.pr-table-wrap tbody tr:hover {
  background: rgba(248, 250, 252, 0.8);
}

html.dark .pr-table-wrap tbody tr:hover {
  background: rgba(51, 65, 85, 0.4);
}

/* Section headings */
.pr-section-head {
  margin-bottom: 1.25rem;
}

.pr-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
}

html.dark .pr-section-title { color: #f1f5f9; }

@media (min-width: 640px) {
  .pr-section-title { font-size: 1.25rem; }
}

.pr-section-desc {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #64748b;
}

html.dark .pr-section-desc {
  color: #94a3b8;
}

/* Breadcrumbs */
.pr-breadcrumbs {
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.pr-breadcrumbs a {
  font-weight: 500;
  color: #64748b;
  transition: color 0.15s;
}

.pr-breadcrumbs a:hover { color: #4f46e5; }

html.dark .pr-breadcrumbs a:hover { color: #818cf8; }

/* Filter pills */
.pr-filter-pill {
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pr-filter-pill.is-active {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.pr-filter-pill:not(.is-active) {
  background: #f1f5f9;
  color: #475569;
}

.pr-filter-pill:not(.is-active):hover {
  background: #e2e8f0;
}

html.dark .pr-filter-pill:not(.is-active) {
  background: #334155;
  color: #cbd5e1;
}

html.dark .pr-filter-pill:not(.is-active):hover {
  background: #475569;
}

/* Accordion (FAQ) */
.pr-accordion-item {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

html.dark .pr-accordion-item {
  border-color: #334155;
  background: rgba(30, 41, 59, 0.95);
}

.pr-accordion-item:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 12px -2px rgba(79, 70, 229, 0.12);
}

html.dark .pr-accordion-item:hover {
  border-color: #4338ca;
}

.pr-accordion-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 500;
  color: #0f172a;
  transition: background-color 0.15s;
}

html.dark .pr-accordion-trigger { color: #f1f5f9; }

.pr-accordion-trigger:hover {
  background: rgba(248, 250, 252, 0.8);
}

html.dark .pr-accordion-trigger:hover {
  background: rgba(51, 65, 85, 0.4);
}

/* Empty states */
.pr-empty {
  border-radius: 1rem;
  border: 2px dashed #cbd5e1;
  background: rgba(248, 250, 252, 0.8);
  padding: 3rem 1.5rem;
  text-align: center;
  color: #64748b;
}

html.dark .pr-empty {
  border-color: #475569;
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
}

/* Feed layout (Forum, Forecasts) */
.pr-feed-shell {
  margin-left: auto;
  margin-right: auto;
  max-width: 36rem;
}

.pr-feed-header {
  position: sticky;
  top: 3.5rem;
  z-index: 10;
  border-radius: 1rem 1rem 0 0;
  border: 1px solid #e2e8f0;
  border-bottom: none;
  background: rgba(255, 255, 255, 0.92);
  padding: 1.25rem 1rem;
  backdrop-filter: blur(12px);
}

html.dark .pr-feed-header {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.92);
}

.pr-feed-body {
  min-height: 50vh;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.95);
}

html.dark .pr-feed-body {
  border-color: #334155;
  background: rgba(30, 41, 59, 0.95);
}

.pr-feed-body > * + * {
  border-top: 1px solid #e2e8f0;
}

html.dark .pr-feed-body > * + * {
  border-color: #334155;
}

/* Feed sort tabs (Recent / Hot / Following) */
.pr-feed-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: none;
  min-height: 2.25rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  white-space: nowrap;
  transition: background-color 150ms, color 150ms;
}

.pr-feed-tab:hover { background: #f1f5f9; color: #334155; }
.pr-feed-tab.is-active { background: #eef2ff; color: #4f46e5; }

html.dark .pr-feed-tab { color: #94a3b8; }
html.dark .pr-feed-tab:hover { background: #1e293b; color: #e2e8f0; }
html.dark .pr-feed-tab.is-active { background: rgba(79, 70, 229, 0.25); color: #a5b4fc; }

/* Resolving-soon urgency rail */
.pr-resolving-soon {
  border: 1px solid #e2e8f0;
  border-top: none;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.875rem 1rem 1rem;
}

html.dark .pr-resolving-soon {
  border-color: #334155;
  background: rgba(30, 41, 59, 0.95);
}

.pr-resolving-soon-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.625rem;
  margin-bottom: 0.625rem;
}

.pr-resolving-soon-title { font-size: 0.875rem; font-weight: 700; color: #0f172a; }
html.dark .pr-resolving-soon-title { color: #f1f5f9; }
.pr-resolving-soon-sub { font-size: 0.75rem; color: #94a3b8; }

.pr-resolving-soon-rail {
  display: flex;
  gap: 0.625rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}

.pr-resolving-soon-rail::-webkit-scrollbar { display: none; }

.pr-resolving-soon-card {
  scroll-snap-align: start;
  flex: 0 0 13.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-height: 4.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.875rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: border-color 150ms, transform 150ms;
}

.pr-resolving-soon-card:hover { border-color: #c7d2fe; transform: translateY(-1px); }

html.dark .pr-resolving-soon-card {
  border-color: #334155;
  background: #0f172a;
}

.pr-resolving-soon-deadline {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #64748b;
}

.pr-resolving-soon-deadline.is-urgent { color: #dc2626; }
html.dark .pr-resolving-soon-deadline.is-urgent { color: #f87171; }

.pr-resolving-soon-q {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1e293b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html.dark .pr-resolving-soon-q { color: #e2e8f0; }

/* @mention links inside user-generated text */
.pr-mention {
  font-weight: 600;
  color: #4f46e5;
}

.pr-mention:hover { text-decoration: underline; }
html.dark .pr-mention { color: #a5b4fc; }

/* CTA band */
.pr-cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid rgba(199, 210, 254, 0.8);
  padding: 2rem 1.5rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.9), rgba(255, 255, 255, 0.95), rgba(209, 250, 229, 0.3));
}

html.dark .pr-cta-band {
  border-color: rgba(67, 56, 202, 0.4);
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.5), rgba(30, 41, 59, 0.95), rgba(6, 78, 59, 0.2));
}

/* Buttons enhancement */
.btn-primary {
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
}

.btn-secondary {
  transition: transform 0.15s ease, background-color 0.15s, border-color 0.15s;
}

.btn-secondary:hover {
  transform: translateY(-1px);
}

/* Scroll reveal */
[data-pr-reveal],
[data-about-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-pr-reveal].is-visible,
[data-about-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-pr-reveal][data-delay="1"],
[data-about-reveal][data-delay="1"] { transition-delay: 0.08s; }
[data-pr-reveal][data-delay="2"],
[data-about-reveal][data-delay="2"] { transition-delay: 0.16s; }
[data-pr-reveal][data-delay="3"],
[data-about-reveal][data-delay="3"] { transition-delay: 0.24s; }
[data-pr-reveal][data-delay="4"],
[data-about-reveal][data-delay="4"] { transition-delay: 0.32s; }

/* About-page specific aliases */
.about-progress { transform-origin: left center; transition: transform 0.15s ease-out; }
.about-nav-pill { transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.about-nav-pill.is-active {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.about-toggle-track { transition: background-color 0.3s ease; }
.about-toggle-knob { transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
.about-domain-pill { transition: all 0.25s ease; }
.about-domain-pill.is-active,
.about-domain-pill:hover { transform: scale(1.04); }
.about-question-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.about-bounce { animation: pr-bounce 2s ease-in-out infinite; }

@keyframes pr-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(6px); opacity: 1; }
}

.about-por-pillar {
  cursor: pointer;
  width: 100%;
}

.about-por-pillar:not([class*="ring-2"]):hover {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  .pr-orb, .about-orb, .about-bounce,
  [data-pr-reveal], [data-about-reveal] {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .pr-card:hover, .about-card:hover,
  .about-por-pillar:not([class*="ring-2"]):hover,
  .btn-primary:hover, .btn-secondary:hover {
    transform: none !important;
  }
}

/* ── Mobile-first: touch targets & action bars ── */

.pr-touch-target,
.forum-action,
.forecast-action,
.vote-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--pr-touch-min);
  min-width: var(--pr-touch-min);
}

.pr-action-bar {
  display: flex;
  width: 100%;
  max-width: none;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

@media (min-width: 640px) {
  .pr-action-bar {
    max-width: 28rem;
  }
}

/* Show hover-only affordances on touch devices */
@media (hover: none) {
  .pr-card-hover-reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .pr-card:hover,
  .about-card:hover {
    transform: none;
  }
}

/* Form inputs — 16px prevents iOS zoom on focus */
@media (max-width: 767px) {
  .form-input,
  .form-select,
  .form-textarea {
    font-size: 1rem;
    line-height: 1.5rem;
  }

  .btn-primary,
  .btn-secondary {
    min-height: var(--pr-touch-min);
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
  }
}

/* Filter toolbar — stack on mobile */
.pr-filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .pr-filter-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
  }
}

.pr-filter-grid .form-select {
  width: 100%;
}

@media (min-width: 640px) {
  .pr-filter-grid .form-select {
    width: auto;
    min-width: 8rem;
  }
}

/* ── Desktop top navbar links ── */

.pr-nav-link {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pr-nav-link:hover {
  background: #f1f5f9;
  color: #4338ca;
}

.pr-nav-link.is-active {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
}

html.dark .pr-nav-link {
  color: #cbd5e1;
}

html.dark .pr-nav-link:hover {
  background: #1e293b;
  color: #a5b4fc;
}

html.dark .pr-nav-link.is-active {
  background: rgba(49, 46, 129, 0.4);
  color: #c7d2fe;
}

.pr-nav-dropdown-link.is-active {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
}

html.dark .pr-nav-dropdown-link.is-active {
  background: rgba(49, 46, 129, 0.4);
  color: #c7d2fe;
}

/* ── Mobile top navbar & drawer ── */

@media (max-width: 767px) {
  .site-header {
    border-bottom-color: #cbd5e1 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  }

  html.dark .site-header {
    border-bottom-color: #334155 !important;
    background: #0f172a !important;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 4px 12px -2px rgba(0, 0, 0, 0.35);
  }

  .site-header .pr-nav-logo {
    font-size: 1.125rem;
    letter-spacing: -0.02em;
  }
}

.pr-nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--pr-touch-min);
  min-height: var(--pr-touch-min);
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.pr-nav-icon-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #4f46e5;
}

.pr-nav-icon-btn.is-active,
.pr-nav-icon-btn[aria-expanded="true"] {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.15);
}

html.dark .pr-nav-icon-btn {
  border-color: #475569;
  background: #1e293b;
  color: #e2e8f0;
}

html.dark .pr-nav-icon-btn:hover {
  background: #334155;
  border-color: #64748b;
  color: #a5b4fc;
}

html.dark .pr-nav-icon-btn.is-active,
html.dark .pr-nav-icon-btn[aria-expanded="true"] {
  background: rgba(49, 46, 129, 0.45);
  border-color: #6366f1;
  color: #c7d2fe;
}

.pr-nav-badge {
  position: absolute;
  right: 0.375rem;
  top: 0.375rem;
  display: flex;
  height: 1rem;
  min-width: 1rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #dc2626;
  padding: 0 0.25rem;
  font-size: 0.5625rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  box-shadow: 0 0 0 2px #fff;
}

html.dark .pr-nav-badge {
  box-shadow: 0 0 0 2px #0f172a;
}

/* Drawer backdrop */
.pr-mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 48;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

html.dark .pr-mobile-nav-backdrop {
  background: rgba(0, 0, 0, 0.65);
}

/* Drawer panel */
.pr-mobile-nav-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 49;
  display: flex;
  flex-direction: column;
  width: min(100%, 20rem);
  height: 100%;
  height: 100dvh;
  padding-top: var(--pr-safe-top);
  background: #ffffff;
  box-shadow: -8px 0 32px -4px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

html.dark .pr-mobile-nav-panel {
  background: #0f172a;
  box-shadow: -8px 0 32px -4px rgba(0, 0, 0, 0.5);
}

.pr-mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

html.dark .pr-mobile-nav-header {
  border-bottom-color: #334155;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

.pr-mobile-nav-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.75rem;
  -webkit-overflow-scrolling: touch;
}

.pr-mobile-nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
}

html.dark .pr-mobile-nav-user {
  border-color: #4338ca;
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.35) 0%, rgba(30, 41, 59, 0.9) 100%);
}

.pr-mobile-nav-user-avatar {
  display: flex;
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 9999px;
  background: #4f46e5;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.pr-mobile-nav-section {
  margin-top: 0.5rem;
}

.pr-mobile-nav-section-label {
  padding: 0.5rem 0.75rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

html.dark .pr-mobile-nav-section-label {
  color: #94a3b8;
}

.pr-mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--pr-touch-min);
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1e293b;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pr-mobile-nav-link:hover {
  background: #f1f5f9;
  color: #4f46e5;
}

.pr-mobile-nav-link.is-active {
  background: #eef2ff;
  color: #4338ca;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px #c7d2fe;
}

html.dark .pr-mobile-nav-link {
  color: #f1f5f9;
}

html.dark .pr-mobile-nav-link:hover {
  background: #1e293b;
  color: #a5b4fc;
}

html.dark .pr-mobile-nav-link.is-active {
  background: rgba(49, 46, 129, 0.4);
  color: #c7d2fe;
  box-shadow: inset 0 0 0 1px #6366f1;
}

.pr-mobile-nav-link-icon {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  background: #f1f5f9;
  color: #475569;
}

.pr-mobile-nav-link.is-active .pr-mobile-nav-link-icon {
  background: #4f46e5;
  color: #fff;
}

html.dark .pr-mobile-nav-link-icon {
  background: #334155;
  color: #cbd5e1;
}

html.dark .pr-mobile-nav-link.is-active .pr-mobile-nav-link-icon {
  background: #6366f1;
  color: #fff;
}

.pr-mobile-nav-link-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

.pr-mobile-nav-link-badge {
  margin-left: auto;
  border-radius: 9999px;
  background: #4f46e5;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
}

.pr-mobile-nav-footer {
  padding: 0.75rem 1rem calc(0.75rem + var(--pr-safe-bottom));
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

html.dark .pr-mobile-nav-footer {
  border-top-color: #334155;
  background: #1e293b;
}

.pr-mobile-nav-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  transition: all 0.15s ease;
}

.pr-mobile-nav-lang-btn.is-active {
  border-color: #818cf8;
  background: #eef2ff;
  color: #4338ca;
}

html.dark .pr-mobile-nav-lang-btn {
  border-color: #475569;
  background: #0f172a;
  color: #e2e8f0;
}

html.dark .pr-mobile-nav-lang-btn.is-active {
  border-color: #6366f1;
  background: rgba(49, 46, 129, 0.45);
  color: #c7d2fe;
}

/* Bottom tab navigation (phones only) */
.pr-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: calc(var(--pr-bottom-nav-height) + var(--pr-safe-bottom));
  padding-bottom: var(--pr-safe-bottom);
  border-top: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 -4px 20px -4px rgba(15, 23, 42, 0.12);
}

html.dark .pr-bottom-nav {
  border-top-color: #475569;
  background: #0f172a;
  box-shadow: 0 -4px 20px -4px rgba(0, 0, 0, 0.45);
}

body:has(.about-page) .pr-bottom-nav {
  display: none;
}

body:has(.about-page).has-mobile-nav {
  padding-bottom: 0;
}

.pr-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1875rem;
  min-width: var(--pr-touch-min);
  min-height: var(--pr-touch-min);
  padding: 0.375rem 0.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #475569;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
  position: relative;
}

.pr-bottom-nav-item.is-active {
  color: #4338ca;
}

.pr-bottom-nav-item.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1.75rem;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: #4f46e5;
}

.pr-bottom-nav-item.is-active .pr-bottom-nav-icon-wrap {
  background: #eef2ff;
  color: #4338ca;
}

html.dark .pr-bottom-nav-item {
  color: #94a3b8;
}

html.dark .pr-bottom-nav-item.is-active {
  color: #a5b4fc;
}

html.dark .pr-bottom-nav-item.is-active::before {
  background: #818cf8;
}

html.dark .pr-bottom-nav-item.is-active .pr-bottom-nav-icon-wrap {
  background: rgba(49, 46, 129, 0.5);
  color: #c7d2fe;
}

.pr-bottom-nav-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  color: inherit;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pr-bottom-nav-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Compact page shell on phones */
@media (max-width: 639px) {
  .pr-hero {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1rem;
    border-radius: 1rem;
  }

  .pr-hero--compact {
    margin-bottom: 1.25rem;
    padding: 1.125rem 1rem;
  }

  .pr-hero-title {
    font-size: 1.5rem;
  }

  .pr-hero--compact .pr-hero-title {
    font-size: 1.375rem;
  }

  .pr-panel {
    border-radius: 0.875rem;
  }

  .pr-stat-card {
    padding: 1rem;
  }

  .pr-stat-value {
    font-size: 1.5rem;
  }

  .pr-empty {
    padding: 2rem 1rem;
  }

  .pr-feed-header {
    top: calc(3.5rem + var(--pr-safe-top));
    padding: 1rem 0.875rem;
    border-radius: 0.875rem 0.875rem 0 0;
  }
}

/* Horizontal pill scrollers */
.pr-scroll-x {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.125rem;
}

.pr-scroll-x::-webkit-scrollbar {
  display: none;
}

/* Challenge create */
.challenge-create-header {
  max-width: 40rem;
}

.challenge-create-title {
  margin-top: 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: #0f172a;
}

html.dark .challenge-create-title {
  color: #f8fafc;
}

@media (min-width: 640px) {
  .challenge-create-title {
    font-size: 2rem;
  }
}

.challenge-create-desc {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #64748b;
}

html.dark .challenge-create-desc {
  color: #94a3b8;
}

.challenge-create-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 1rem;
  border: 1px solid #fcd34d;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #92400e;
}

html.dark .challenge-create-alert {
  border-color: #b45309;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.35) 0%, rgba(146, 64, 14, 0.2) 100%);
  color: #fde68a;
}

.challenge-create-alert-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  color: #d97706;
}

html.dark .challenge-create-alert-icon {
  color: #fbbf24;
}

.challenge-create-steps {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 22rem;
}

.challenge-create-step-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  text-align: center;
}

.challenge-create-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 2px solid #cbd5e1;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

html.dark .challenge-create-step-badge {
  border-color: #475569;
  background: #1e293b;
  color: #94a3b8;
}

.challenge-create-step-item.is-active .challenge-create-step-badge {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
}

.challenge-create-step-item.is-complete .challenge-create-step-badge {
  border-color: #10b981;
  background: #10b981;
  color: #fff;
}

.challenge-create-step-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.2;
}

.challenge-create-step-item.is-active .challenge-create-step-label,
.challenge-create-step-item.is-complete .challenge-create-step-label {
  color: #0f172a;
}

html.dark .challenge-create-step-item.is-active .challenge-create-step-label,
html.dark .challenge-create-step-item.is-complete .challenge-create-step-label {
  color: #e2e8f0;
}

.challenge-create-step-connector {
  flex: 0 0 2.5rem;
  height: 2px;
  margin-top: -1.125rem;
  background: #e2e8f0;
  transition: background 0.2s;
}

html.dark .challenge-create-step-connector {
  background: #334155;
}

.challenge-create-step-connector.is-complete {
  background: #10b981;
}

.challenge-create-step-panel,
.challenge-create-events {
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .challenge-create-step-panel,
  .challenge-create-events {
    padding: 1.5rem;
  }
}

.challenge-create-step-hint {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #64748b;
}

.challenge-create-step-hint.is-success {
  color: #059669;
}

html.dark .challenge-create-step-hint {
  color: #94a3b8;
}

html.dark .challenge-create-step-hint.is-success {
  color: #34d399;
}

.challenge-create-step-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

html.dark .challenge-create-step-actions {
  border-top-color: #334155;
}

@media (min-width: 480px) {
  .challenge-create-step-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .challenge-create-step-actions .btn-primary,
  .challenge-create-step-actions .btn-secondary {
    min-width: 9rem;
  }
}

.challenge-create-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .challenge-create-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
  }
}

.challenge-create-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
}

@media (min-width: 1024px) {
  .challenge-create-sidebar {
    position: sticky;
    top: 5rem;
    flex: 0 0 17.5rem;
    width: 17.5rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
  }
}

.challenge-create-events {
  flex: 1;
  min-width: 0;
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .challenge-create-sidebar,
  .challenge-create-events {
    padding: 1.5rem;
  }
}

.challenge-create-panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
}

html.dark .challenge-create-panel-title {
  color: #f1f5f9;
}

.challenge-create-panel-desc {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #64748b;
}

html.dark .challenge-create-panel-desc {
  color: #94a3b8;
}

.challenge-create-sidebar-head,
.challenge-create-events-head {
  margin-bottom: 0.25rem;
}

.challenge-create-events-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.challenge-create-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

html.dark .challenge-create-label {
  color: #cbd5e1;
}

.challenge-create-field + .challenge-create-field {
  margin-top: 0.25rem;
}

.challenge-create-opponents {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: 14rem;
  overflow-y: auto;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.375rem;
}

html.dark .challenge-create-opponents {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.5);
}

.challenge-create-opponent {
  display: flex;
  cursor: pointer;
  align-items: center;
  gap: 0.625rem;
  border-radius: 0.5rem;
  padding: 0.5rem 0.625rem;
  transition: background-color 0.15s ease;
}

.challenge-create-opponent:hover {
  background: #fff;
}

html.dark .challenge-create-opponent:hover {
  background: rgba(51, 65, 85, 0.6);
}

.challenge-create-opponent:has(input:checked) {
  background: #eef2ff;
  box-shadow: inset 0 0 0 1px #c7d2fe;
}

html.dark .challenge-create-opponent:has(input:checked) {
  background: rgba(49, 46, 129, 0.35);
  box-shadow: inset 0 0 0 1px #4338ca;
}

.challenge-create-opponent input[type="checkbox"] {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  accent-color: #4f46e5;
}

.challenge-create-opponent-avatar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  font-size: 0.6875rem;
  font-weight: 700;
  color: #fff;
}

.challenge-create-opponent-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}

html.dark .challenge-create-opponent-name {
  color: #e2e8f0;
}

.challenge-create-opponents-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.75rem;
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #64748b;
}

html.dark .challenge-create-opponents-empty {
  border-color: #475569;
  background: rgba(15, 23, 42, 0.4);
  color: #94a3b8;
}

.challenge-create-sidebar-foot {
  margin-top: auto;
  padding-top: 0.5rem;
}

.challenge-create-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 0.125rem;
  border-radius: 9999px;
  background: #eef2ff;
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #4338ca;
}

html.dark .challenge-create-counter {
  background: rgba(49, 46, 129, 0.45);
  color: #c7d2fe;
}

.challenge-create-counter-value {
  font-size: 1rem;
  font-weight: 700;
}

.challenge-create-counter-sep,
.challenge-create-counter-label {
  font-weight: 500;
  opacity: 0.85;
}

.challenge-create-progress {
  margin-top: 0.75rem;
  height: 0.25rem;
  overflow: hidden;
  border-radius: 9999px;
  background: #e2e8f0;
}

html.dark .challenge-create-progress {
  background: #334155;
}

.challenge-create-progress-bar {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #4f46e5, #6366f1);
  transition: width 0.25s ease;
}

.challenge-create-error {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #dc2626;
}

.challenge-create-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.challenge-create-selected:empty {
  display: none;
}

.challenge-create-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 0.25rem;
  border-radius: 9999px;
  background: #eef2ff;
  padding: 0.25rem 0.25rem 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #3730a3;
}

html.dark .challenge-create-chip {
  background: rgba(49, 46, 129, 0.5);
  color: #c7d2fe;
}

.challenge-create-chip-text {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.challenge-create-chip-remove {
  display: flex;
  border-radius: 9999px;
  padding: 0.25rem;
  color: inherit;
  transition: background-color 0.15s ease;
}

.challenge-create-chip-remove:hover {
  background: #c7d2fe;
}

html.dark .challenge-create-chip-remove:hover {
  background: rgba(67, 56, 202, 0.6);
}

.challenge-create-search {
  position: relative;
  margin-top: 1rem;
}

.challenge-create-search-icon {
  pointer-events: none;
  position: absolute;
  left: 0.875rem;
  top: 50%;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  color: #94a3b8;
}

.challenge-create-search-input {
  padding-left: 2.5rem !important;
}

.challenge-create-market-list {
  margin-top: 1.25rem;
  min-height: 10rem;
}

.challenge-create-market-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .challenge-create-market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .challenge-create-market-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.challenge-create-market-empty {
  padding: 2.5rem 1.5rem;
}

/* Challenge leaderboard */
.challenge-leaderboard-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #0f172a;
}

html.dark .challenge-leaderboard-title {
  color: #f8fafc;
}

.challenge-leaderboard-stat {
  min-width: 5.5rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.75);
  padding: 0.625rem 0.875rem;
}

html.dark .challenge-leaderboard-stat {
  border-color: rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.45);
}

.challenge-leaderboard-stat-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

html.dark .challenge-leaderboard-stat-label {
  color: #94a3b8;
}

.challenge-leaderboard-stat-value {
  margin-top: 0.125rem;
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.challenge-leaderboard-table thead th {
  padding: 0.875rem 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  background: rgba(248, 250, 252, 0.85);
}

html.dark .challenge-leaderboard-table thead th {
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.55);
}

.challenge-leaderboard-table tbody td {
  padding: 0.875rem 1rem;
  vertical-align: middle;
}

.challenge-leaderboard-row {
  border-top: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

html.dark .challenge-leaderboard-row {
  border-top-color: #334155;
}

.challenge-leaderboard-row:hover {
  background: rgba(248, 250, 252, 0.85);
}

html.dark .challenge-leaderboard-row:hover {
  background: rgba(30, 41, 59, 0.55);
}

.challenge-leaderboard-row.is-you {
  background: rgba(238, 242, 255, 0.85);
  box-shadow: inset 3px 0 0 #4f46e5;
}

html.dark .challenge-leaderboard-row.is-you {
  background: rgba(49, 46, 129, 0.25);
}

.challenge-leaderboard-row.is-gold {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
}

.challenge-leaderboard-row.is-silver {
  background: linear-gradient(90deg, rgba(241, 245, 249, 0.9) 0%, rgba(255, 255, 255, 0) 100%);
}

.challenge-leaderboard-row.is-bronze {
  background: linear-gradient(90deg, rgba(255, 237, 213, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
}

html.dark .challenge-leaderboard-row.is-gold {
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.35) 0%, rgba(15, 23, 42, 0) 100%);
}

.challenge-leaderboard-rank {
  display: inline-flex;
  min-width: 2rem;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}

.challenge-leaderboard-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.challenge-leaderboard-avatar {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
}

.challenge-leaderboard-name {
  display: block;
  font-weight: 600;
  color: #0f172a;
}

.challenge-leaderboard-name:hover {
  color: #4338ca;
}

html.dark .challenge-leaderboard-name {
  color: #f8fafc;
}

html.dark .challenge-leaderboard-name:hover {
  color: #a5b4fc;
}

.challenge-leaderboard-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
}

.challenge-leaderboard-badge.is-pending {
  background: #fef3c7;
  color: #92400e;
}

.challenge-leaderboard-badge.is-you {
  background: #eef2ff;
  color: #4338ca;
}

html.dark .challenge-leaderboard-badge.is-pending {
  background: rgba(120, 53, 15, 0.45);
  color: #fde68a;
}

html.dark .challenge-leaderboard-badge.is-you {
  background: rgba(49, 46, 129, 0.45);
  color: #c7d2fe;
}

.challenge-leaderboard-points,
.challenge-leaderboard-total {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.challenge-leaderboard-points.is-realized,
.challenge-leaderboard-points.is-positive,
.challenge-leaderboard-total.is-positive {
  color: #059669;
}

.challenge-leaderboard-points.is-negative,
.challenge-leaderboard-total.is-negative {
  color: #e11d48;
}

html.dark .challenge-leaderboard-points.is-realized,
html.dark .challenge-leaderboard-points.is-positive,
html.dark .challenge-leaderboard-total.is-positive {
  color: #34d399;
}

html.dark .challenge-leaderboard-points.is-negative,
html.dark .challenge-leaderboard-total.is-negative {
  color: #fb7185;
}

.challenge-leaderboard-total {
  display: inline-flex;
  min-width: 3rem;
  justify-content: flex-end;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: rgba(241, 245, 249, 0.9);
}

html.dark .challenge-leaderboard-total {
  background: rgba(30, 41, 59, 0.85);
}

.challenge-leaderboard-card {
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  background: rgba(255, 255, 255, 0.85);
  padding: 1rem;
}

html.dark .challenge-leaderboard-card {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.55);
}

.challenge-leaderboard-card.is-you {
  border-color: #818cf8;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.challenge-leaderboard-rank-mobile {
  display: inline-flex;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #f1f5f9;
  font-size: 0.875rem;
  font-weight: 700;
  color: #475569;
}

html.dark .challenge-leaderboard-rank-mobile {
  background: #334155;
  color: #e2e8f0;
}

.challenge-leaderboard-mini-stat {
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.625rem 0.75rem;
}

html.dark .challenge-leaderboard-mini-stat {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.65);
}

.challenge-leaderboard-mini-stat p:first-child {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.challenge-leaderboard-mini-stat p:last-child {
  margin-top: 0.125rem;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.challenge-leaderboard-mini-stat .is-realized,
.challenge-leaderboard-mini-stat .is-positive {
  color: #059669;
}

.challenge-leaderboard-mini-stat .is-negative {
  color: #e11d48;
}

html.dark .challenge-leaderboard-mini-stat .is-realized,
html.dark .challenge-leaderboard-mini-stat .is-positive {
  color: #34d399;
}

html.dark .challenge-leaderboard-mini-stat .is-negative {
  color: #fb7185;
}

.challenge-event-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  min-height: 2.25rem;
}

.challenge-event-filter-count {
  display: inline-flex;
  min-width: 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.08);
  padding: 0.0625rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.challenge-event-filter.is-active .challenge-event-filter-count {
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}

html.dark .challenge-event-filter-count {
  background: rgba(255, 255, 255, 0.1);
}

.challenge-event-card-wrap {
  display: block;
}

.challenge-event-card-wrap[style*='display: none'] {
  display: none !important;
}

/* Market picker cards */
.challenge-market-card-check {
  pointer-events: none;
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.375rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: transparent;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

html.dark .challenge-market-card-check {
  border-color: #475569;
  background: #1e293b;
}

.challenge-market-card:has(.peer:checked) .challenge-market-card-check {
  border-color: #4f46e5;
  background: #4f46e5;
  color: #fff;
}

.challenge-market-card-inner {
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: 1rem;
  border-radius: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.challenge-market-card:has(.peer:checked) .challenge-market-card-inner {
  border-color: #818cf8;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.challenge-market-card:hover .challenge-market-card-inner {
  transform: translateY(-2px);
}

.challenge-market-card-top {
  display: flex;
  gap: 0.75rem;
  padding-right: 1.75rem;
}

.challenge-market-card-thumb {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid #f1f5f9;
  background: #fff;
  padding: 0.25rem;
}

html.dark .challenge-market-card-thumb {
  border-color: #475569;
  background: rgba(255, 255, 255, 0.9);
}

.challenge-market-card-thumb--fallback {
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}

html.dark .challenge-market-card-thumb--fallback {
  background: linear-gradient(135deg, #334155, #475569);
  color: #cbd5e1;
}

.challenge-market-card-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
}

html.dark .challenge-market-card-title {
  color: #f1f5f9;
}

.challenge-market-card:has(.peer:checked) .challenge-market-card-title {
  color: #4338ca;
}

html.dark .challenge-market-card:has(.peer:checked) .challenge-market-card-title {
  color: #a5b4fc;
}

.challenge-market-card-odds {
  display: flex;
  gap: 0.375rem;
  margin-top: 0.875rem;
}

.challenge-market-card-odd {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.5rem 0.25rem;
}

html.dark .challenge-market-card-odd {
  border-color: #475569;
  background: rgba(51, 65, 85, 0.45);
}

.challenge-market-card-odd--yes {
  border-color: #a7f3d0;
  background: #ecfdf5;
}

html.dark .challenge-market-card-odd--yes {
  border-color: rgba(6, 95, 70, 0.5);
  background: rgba(6, 78, 59, 0.35);
}

.challenge-market-card-odd--no {
  border-color: #fecdd3;
  background: #fff1f2;
}

html.dark .challenge-market-card-odd--no {
  border-color: rgba(190, 18, 60, 0.45);
  background: rgba(136, 19, 55, 0.35);
}

.challenge-market-card-odd-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.challenge-market-card-odd--yes .challenge-market-card-odd-label {
  color: #047857;
}

.challenge-market-card-odd--no .challenge-market-card-odd-label {
  color: #be123c;
}

.challenge-market-card-odd-value {
  margin-top: 0.125rem;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}

html.dark .challenge-market-card-odd-value {
  color: #f1f5f9;
}

.challenge-market-card-odd--yes .challenge-market-card-odd-value {
  color: #065f46;
}

.challenge-market-card-odd--no .challenge-market-card-odd-value {
  color: #9f1239;
}

.challenge-market-card-no-odds {
  margin-top: 0.875rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.challenge-market-card-foot {
  margin-top: auto;
  padding-top: 0.875rem;
}

.challenge-market-card-date {
  margin-bottom: 0.375rem;
  font-size: 0.6875rem;
  color: #64748b;
}

.challenge-market-card-countdown {
  display: inline-block;
  margin-bottom: 0.5rem;
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.challenge-market-card-countdown--urgent {
  background: #fef3c7;
  color: #b45309;
}

.challenge-market-card-countdown--soon {
  background: #ffedd5;
  color: #c2410c;
}

.challenge-market-card-countdown--past {
  background: #f1f5f9;
  color: #64748b;
}

.challenge-market-card-countdown--normal,
.challenge-market-card-countdown--resolved {
  background: #dbeafe;
  color: #1d4ed8;
}

html.dark .challenge-market-card-countdown--normal,
html.dark .challenge-market-card-countdown--resolved {
  background: rgba(30, 58, 138, 0.45);
  color: #93c5fd;
}

.challenge-market-card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.375rem;
  font-size: 0.6875rem;
  color: #94a3b8;
}

.challenge-market-card-volume {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.challenge-market-card-badges {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.challenge-market-card-badge {
  border-radius: 9999px;
  background: #f1f5f9;
  padding: 0.125rem 0.5rem;
  font-weight: 500;
  color: #64748b;
}

html.dark .challenge-market-card-badge {
  background: #334155;
  color: #cbd5e1;
}

.challenge-market-card-badge--poly {
  background: #eef2ff;
  color: #4338ca;
}

html.dark .challenge-market-card-badge--poly {
  background: rgba(49, 46, 129, 0.45);
  color: #c7d2fe;
}

.challenge-market-card-badge--kalshi {
  background: #ecfdf5;
  color: #047857;
}

html.dark .challenge-market-card-badge--kalshi {
  background: rgba(6, 78, 59, 0.4);
  color: #6ee7b7;
}

/* ── Forum — Twitter / X layout ── */
:root {
  --x-blue: #1d9bf0;
  --x-blue-hover: #1a8cd8;
  --x-green: #00ba7c;
  --x-pink: #f91880;
  --x-border: #eff3f4;
  --x-hover: rgba(0, 0, 0, 0.06);
  --x-hover-strong: rgba(0, 0, 0, 0.09);
  --x-muted: #536471;
  --x-column: 37.5rem;
  --x-sidebar-left: 17.25rem;
  --x-sidebar-right: 21.875rem;
  --x-action-reply-bg: rgba(29, 155, 240, 0.14);
  --x-action-repost-bg: rgba(0, 186, 124, 0.14);
  --x-action-like-bg: rgba(0, 186, 124, 0.14);
  --x-action-dislike-bg: rgba(244, 63, 94, 0.14);
  --x-action-bookmark-bg: rgba(29, 155, 240, 0.14);
}

html.dark {
  --x-border: #2f3336;
  --x-hover: rgba(231, 233, 234, 0.06);
  --x-hover-strong: rgba(231, 233, 234, 0.1);
  --x-muted: #71767b;
  --x-action-reply-bg: rgba(29, 155, 240, 0.22);
  --x-action-repost-bg: rgba(0, 186, 124, 0.2);
  --x-action-like-bg: rgba(0, 186, 124, 0.2);
  --x-action-dislike-bg: rgba(244, 63, 94, 0.22);
  --x-action-bookmark-bg: rgba(29, 155, 240, 0.22);
}

.x-forum-layout {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  min-height: calc(100vh - 3.5rem);
  max-width: 68.75rem;
  margin-inline: auto;
}

.x-forum-sidebar {
  flex-shrink: 0;
  position: sticky;
  top: 3.5rem;
  align-self: flex-start;
  height: calc(100vh - 3.5rem);
  overflow-y: auto;
  padding-top: 0.25rem;
}

.x-forum-sidebar--left {
  display: none;
  width: var(--x-sidebar-left);
  padding-right: 0.5rem;
}

.x-forum-sidebar--right {
  display: none;
  width: var(--x-sidebar-right);
  padding-left: 0.5rem;
}

@media (min-width: 1024px) {
  .x-forum-sidebar--left {
    display: block;
  }
}

@media (min-width: 1280px) {
  .x-forum-sidebar--right {
    display: block;
  }
}

.x-forum-main {
  flex-shrink: 0;
  width: 100%;
  max-width: var(--x-column);
  min-height: calc(100vh - 3.5rem);
  border-inline: 1px solid var(--x-border);
  background: #fff;
}

html.dark .x-forum-main {
  background: #000;
}

@media (min-width: 640px) {
  .x-forum-main {
    width: var(--x-column);
  }
}

.x-forum-header {
  position: sticky;
  top: 3.5rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.3125rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--x-border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
}

.x-forum-tabs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.x-forum-tabs::-webkit-scrollbar { display: none; }

.x-forum-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex: none;
  min-height: 2rem;
  padding: 0.3125rem 0.8125rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #536471;
  white-space: nowrap;
  transition: background-color 150ms, color 150ms;
}

.x-forum-tab:hover { background: #f1f5f9; color: #0f1419; }
.x-forum-tab.is-active { background: #eef2ff; color: #4f46e5; }

html.dark .x-forum-tab { color: #71767b; }
html.dark .x-forum-tab:hover { background: #16181c; color: #e7e9ea; }
html.dark .x-forum-tab.is-active { background: rgba(79, 70, 229, 0.25); color: #a5b4fc; }

.x-forum-load-more {
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #94a3b8;
}

html.dark .x-forum-header {
  background: rgba(0, 0, 0, 0.65);
}

.x-forum-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f1419;
}

html.dark .x-forum-header h1 {
  color: #e7e9ea;
}

.x-forum-compose {
  border-bottom: 1px solid var(--x-border);
  padding: 0.625rem 1rem;
  transition: background-color 0.2s ease;
}

.x-forum-compose:focus-within {
  background: rgba(29, 155, 240, 0.04);
}

html.dark .x-forum-compose:focus-within {
  background: rgba(29, 155, 240, 0.08);
}

.x-forum-compose .x-compose-textarea {
  width: 100%;
  min-height: 3.25rem;
  resize: none;
  border: 0;
  background: transparent;
  padding: 0.625rem 0 0;
  font-size: 1.25rem;
  line-height: 1.5;
  color: #0f1419;
  outline: none;
  box-shadow: none;
}

html.dark .x-forum-compose .x-compose-textarea {
  color: #e7e9ea;
}

.x-forum-compose .x-compose-textarea::placeholder {
  color: #536471;
}

html.dark .x-forum-compose .x-compose-textarea::placeholder {
  color: #71767b;
}

.x-forum-compose-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--x-border);
}

.x-forum-compose-icons {
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.x-forum-compose-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  color: var(--x-blue);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.x-forum-compose-icon:hover {
  background: var(--x-action-reply-bg);
  color: var(--x-blue-hover);
  transform: scale(1.06);
}

.x-forum-compose-icon:active {
  transform: scale(0.96);
}

.x-forum-compose-icon.is-active {
  background: var(--x-action-reply-bg);
  color: var(--x-blue-hover);
}

.x-forum-compose-icon.is-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

/* Compose poll builder */
.x-compose-poll {
  margin-top: 0.75rem;
  padding: 0.875rem;
  border: 1px solid var(--x-border);
  border-radius: 1rem;
  background: var(--x-hover);
}

.x-compose-poll-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.x-compose-poll-option-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.x-compose-poll-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--x-border);
  border-radius: 9999px;
  background: var(--x-bg, #fff);
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--x-text, #0f1419);
  outline: none;
}

.x-compose-poll-input:focus {
  border-color: var(--x-blue);
  box-shadow: 0 0 0 1px var(--x-blue);
}

.x-compose-poll-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  color: var(--x-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.x-compose-poll-remove:hover {
  background: rgba(244, 33, 46, 0.1);
  color: #f4212e;
}

.x-compose-poll-remove svg {
  width: 1rem;
  height: 1rem;
}

.x-compose-poll-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--x-border);
}

.x-compose-poll-add {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--x-blue);
}

.x-compose-poll-add:hover {
  text-decoration: underline;
}

.x-compose-poll-duration {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--x-muted);
}

.x-compose-poll-select {
  border: 1px solid var(--x-border);
  border-radius: 9999px;
  background: transparent;
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
  color: inherit;
}

/* Poll display on posts */
.x-poll {
  margin-top: 0.75rem;
}

.x-poll-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.x-poll-option-form {
  display: block;
}

.x-poll-option {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.375rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--x-blue);
  border-radius: 9999px;
  background: transparent;
  color: var(--x-blue);
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  overflow: hidden;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

button.x-poll-option:hover,
a.x-poll-option:hover {
  background: var(--x-action-reply-bg);
}

.x-poll-option--result {
  border-color: var(--x-border);
  color: var(--x-text, #0f1419);
  cursor: default;
}

.x-poll-option--result.is-selected {
  border-color: var(--x-blue);
  color: var(--x-blue);
  font-weight: 700;
}

.x-poll-option-bar {
  position: absolute;
  inset: 0 auto 0 0;
  background: rgba(29, 155, 240, 0.12);
  border-radius: 9999px;
  transition: width 0.25s ease;
}

.x-poll-option--result.is-selected .x-poll-option-bar {
  background: rgba(29, 155, 240, 0.2);
}

.x-poll-option-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.x-poll-option-label {
  min-width: 0;
}

.x-poll-option-pct {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.x-poll-meta {
  margin-top: 0.625rem;
  font-size: 0.8125rem;
  color: var(--x-muted);
}

.x-forum-post-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0 1.125rem;
  border-radius: 9999px;
  border: none;
  background: #0f1419;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.x-forum-post-btn--ready:not(:disabled) {
  box-shadow: 0 2px 10px rgba(15, 20, 25, 0.18);
}

.x-forum-post-btn--ready:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 20, 25, 0.22);
}

.x-forum-post-btn:hover:not(:disabled) {
  background: #272c30;
}

.x-forum-post-btn:active:not(:disabled) {
  transform: translateY(0);
}

.x-forum-post-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #0f1419;
  color: #fff;
}

html.dark .x-forum-post-btn:disabled {
  background: #eff3f4;
  color: #0f1419;
}

html.dark .x-forum-post-btn {
  background: #eff3f4;
  color: #0f1419;
}

html.dark .x-forum-post-btn:hover:not(:disabled) {
  background: #d7dbdc;
}

html.dark .x-forum-post-btn--ready:not(:disabled) {
  box-shadow: 0 2px 12px rgba(231, 233, 234, 0.12);
}

html.dark .x-forum-post-btn--ready:hover:not(:disabled) {
  box-shadow: 0 4px 16px rgba(231, 233, 234, 0.18);
}

.x-forum-feed {
  min-height: 50vh;
}

.x-forum-login-banner {
  border-bottom: 1px solid var(--x-border);
  padding: 1rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--x-muted);
}

.x-forum-login-banner a {
  color: var(--x-blue);
  font-weight: 700;
}

.x-forum-login-banner a:hover {
  text-decoration: underline;
}

/* Tweet card */
.x-tweet {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--x-border);
  transition: background-color 0.2s ease;
  cursor: pointer;
  position: relative;
}

@media (hover: hover) {
  .x-tweet:hover {
    background: var(--x-hover-strong);
  }

  .x-tweet:hover .x-tweet-avatar {
    box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.28);
  }
}

.x-tweet-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: #cfd9de;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f1419;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

a.x-tweet-avatar:hover {
  transform: scale(1.04);
}

html.dark .x-tweet-avatar {
  background: #333639;
  color: #e7e9ea;
}

.x-tweet-body {
  min-width: 0;
  flex: 1;
}

.x-tweet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.x-tweet-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem;
  min-width: 0;
  font-size: 0.9375rem;
  line-height: 1.25;
}

.x-tweet-name {
  font-weight: 700;
  color: #0f1419;
  text-decoration: none;
  transition: color 0.15s ease;
}

.x-tweet-name:hover {
  text-decoration: underline;
  color: #0f1419;
}

.x-tweet-handle,
.x-tweet-time {
  color: var(--x-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.x-tweet-handle:hover,
.x-tweet-time:hover {
  text-decoration: underline;
  color: var(--x-blue);
}

html.dark .x-tweet-name {
  color: #e7e9ea;
}

html.dark .x-tweet-name:hover {
  color: #e7e9ea;
}

.x-tweet-dot {
  color: var(--x-muted);
}

.x-tweet-more {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  margin: -0.375rem -0.5rem 0 0;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--x-muted);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.x-tweet-more:hover,
.x-tweet-menu.is-open .x-tweet-more {
  background: var(--x-action-reply-bg);
  color: var(--x-blue);
}

.x-tweet-more:active {
  transform: scale(0.94);
}

.x-tweet-menu {
  position: relative;
  flex-shrink: 0;
}

.x-tweet-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 30;
  min-width: 13.5rem;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--x-border);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 20, 25, 0.18);
}

html.dark .x-tweet-menu-dropdown {
  background: #16181c;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.x-tweet-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: none;
  background: transparent;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #0f1419;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

html.dark .x-tweet-menu-item {
  color: #e7e9ea;
}

.x-tweet-menu-item svg {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  color: var(--x-muted);
  transition: color 0.2s ease;
}

.x-tweet-menu-item:hover {
  background: var(--x-hover-strong);
}

.x-tweet-menu-item:hover svg {
  color: var(--x-blue);
}

.x-tweet-menu-item--danger {
  color: rgb(190 18 60);
}

.x-tweet-menu-item--danger svg {
  color: rgb(190 18 60);
}

html.dark .x-tweet-menu-item--danger {
  color: rgb(251 113 133);
}

html.dark .x-tweet-menu-item--danger svg {
  color: rgb(251 113 133);
}

.x-tweet-menu-item--danger:hover {
  background: rgba(244, 63, 94, 0.12);
  color: rgb(159 18 57);
}

html.dark .x-tweet-menu-item--danger:hover {
  background: rgba(244, 63, 94, 0.18);
  color: rgb(254 205 211);
}

html.dark .x-tweet-menu-item--danger:hover {
  background: rgba(244, 63, 94, 0.18);
  color: rgb(254 205 211);
}

/* In-app confirm dialog (forum delete, etc.) */
.x-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.x-confirm-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(15, 20, 25, 0.45);
  cursor: pointer;
}

html.dark .x-confirm-backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.x-confirm-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 20rem;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid var(--x-border);
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 20px 40px rgba(15, 20, 25, 0.22);
}

html.dark .x-confirm-panel {
  background: #16181c;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

.x-confirm-title {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0f1419;
}

html.dark .x-confirm-title {
  color: #e7e9ea;
}

.x-confirm-text {
  margin-top: 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--x-muted);
}

.x-confirm-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.x-confirm-btn {
  flex: 1;
  min-height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.x-confirm-btn:active {
  transform: scale(0.98);
}

.x-confirm-btn--cancel {
  background: #fff;
  border-color: var(--x-border);
  color: #0f1419;
}

.x-confirm-btn--cancel:hover {
  background: var(--x-hover-strong);
}

html.dark .x-confirm-btn--cancel {
  background: #16181c;
  color: #e7e9ea;
}

html.dark .x-confirm-btn--cancel:hover {
  background: var(--x-hover-strong);
}

.x-confirm-btn--danger {
  background: rgb(190 18 60);
  color: #fff;
}

.x-confirm-btn--danger:hover {
  background: rgb(159 18 57);
}

.x-tweet-repost-label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.25rem;
  padding-left: 2.125rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--x-muted);
}

.x-tweet-text {
  margin-top: 0.25rem;
  white-space: pre-wrap;
  font-size: 0.9375rem;
  line-height: 1.3125;
  color: #0f1419;
}

html.dark .x-tweet-text {
  color: #e7e9ea;
}

.x-tweet-media {
  display: block;
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--x-border);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
  .x-tweet-media:hover {
    border-color: rgba(29, 155, 240, 0.35);
    box-shadow: 0 4px 16px rgba(15, 20, 25, 0.1);
  }

  .x-tweet-media:hover img {
    transform: scale(1.02);
  }
}

.x-tweet-media img {
  width: 100%;
  max-height: 24rem;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.x-tweet-quote {
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--x-border);
  padding: 0.75rem 1rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) {
  .x-tweet-quote:hover {
    background: var(--x-hover);
    border-color: rgba(29, 155, 240, 0.25);
  }
}

/* Action bar — Twitter order & colors */
.x-tweet-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  margin-top: 0.75rem;
  margin-left: -0.5rem;
  color: var(--x-muted);
}

.x-tweet-actions > div,
.x-tweet-actions > form,
.x-tweet-actions .x-tweet-votes {
  display: contents;
}

.x-tweet-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0 0.5625rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--x-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.x-tweet-action:focus-visible {
  outline: 2px solid var(--x-blue);
  outline-offset: 2px;
}

.x-tweet-action svg {
  width: 1.1875rem;
  height: 1.1875rem;
  transition: transform 0.15s ease;
}

@media (hover: hover) {
  .x-tweet-action:not(.is-disabled):hover svg {
    transform: scale(1.08);
  }
}

.x-tweet-action--reply:hover {
  color: var(--x-blue);
  background: var(--x-action-reply-bg);
}

.x-tweet-action--repost:hover,
.x-tweet-action--repost.is-active {
  color: var(--x-green);
  background: var(--x-action-repost-bg);
}

.x-tweet-action--like:hover,
.x-tweet-action--like.is-active {
  color: rgb(4 120 87);
  background: var(--x-action-like-bg);
}

.x-tweet-action--dislike:hover,
.x-tweet-action--dislike.is-active {
  color: rgb(190 18 60);
  background: var(--x-action-dislike-bg);
}

.x-tweet-action--like.is-active svg,
.x-tweet-action--dislike.is-active svg {
  fill: currentColor;
}

.x-tweet-action--bookmark:hover,
.x-tweet-action--bookmark.is-active {
  color: var(--x-blue);
  background: var(--x-action-bookmark-bg);
}

.x-tweet-action--bookmark.is-active svg {
  fill: currentColor;
}

.x-tweet-action--share:hover {
  color: var(--x-blue);
  background: var(--x-action-reply-bg);
}

.x-tweet-action.is-active .x-tweet-action-count,
.x-tweet-action:hover .x-tweet-action-count {
  color: inherit;
}

.x-tweet-action.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.x-tweet-action-count {
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* Inline reply composer (Twitter-style) */
.x-inline-reply {
  position: relative;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.x-inline-reply--open {
  margin-top: 0;
  padding-top: 0;
}

.x-inline-reply-line {
  position: absolute;
  left: -2.75rem;
  top: 0;
  bottom: 50%;
  width: 2px;
  background: var(--x-border);
  border-radius: 1px;
}

.x-inline-reply-inner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.x-inline-reply-success {
  margin-top: 0.5rem;
  padding: 0.5rem 0;
}

.x-thread-reply-composer {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--x-border);
}

/* Comment thread rows */
.x-comment {
  cursor: default;
  border-bottom: 1px solid var(--x-border);
}

.x-comment:hover {
  background: var(--x-hover);
}

.x-comment--nested {
  border-bottom: none;
  padding-left: 0;
}

.x-comment--nested .x-tweet-avatar {
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
}

.x-comment-replies {
  margin-top: 0.25rem;
  padding-left: 0;
  border-left: 2px solid var(--x-border);
  margin-left: 1.25rem;
}

.x-comment-thread > .x-comment:last-child {
  border-bottom: none;
}

.x-comment .x-tweet-head {
  margin-bottom: 0.125rem;
}

.x-comment .x-tweet-text {
  margin-bottom: 0.25rem;
}

/* Left nav */
.x-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.x-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.75rem;
  border-radius: 9999px;
  font-size: 1.25rem;
  font-weight: 400;
  color: #0f1419;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

html.dark .x-nav-link {
  color: #e7e9ea;
}

.x-nav-link:hover {
  background: var(--x-hover-strong);
}

.x-nav-link:active {
  transform: scale(0.98);
}

.x-nav-link.is-active {
  font-weight: 700;
  background: var(--x-hover);
}

.x-nav-link.is-active:hover {
  background: var(--x-hover-strong);
}

.x-nav-link svg {
  width: 1.625rem;
  height: 1.625rem;
  flex-shrink: 0;
}

.x-nav-link span {
  display: none;
}

@media (min-width: 1280px) {
  .x-nav-link span {
    display: inline;
  }
}

.x-nav-post-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 15rem;
  min-height: 3.25rem;
  margin-top: 1rem;
  border: none;
  border-radius: 9999px;
  background: var(--x-blue);
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 10px rgba(29, 155, 240, 0.28);
}

.x-nav-post-btn:hover {
  background: var(--x-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(29, 155, 240, 0.35);
}

.x-nav-post-btn:active {
  transform: translateY(0);
}

/* Right sidebar widgets */
.x-widget {
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: 1rem;
  background: #f7f9f9;
}

html.dark .x-widget {
  background: #16181c;
}

.x-widget-head {
  padding: 0.75rem 1rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f1419;
}

html.dark .x-widget-head {
  color: #e7e9ea;
}

.x-widget-item {
  display: block;
  padding: 0.875rem 1rem;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.15s ease;
  border-left: 3px solid transparent;
}

.x-widget-item:hover {
  background: var(--x-hover-strong);
  border-left-color: var(--x-blue);
}

.x-widget-item:hover .x-widget-title {
  color: var(--x-blue);
}

.x-widget-label {
  font-size: 0.8125rem;
  color: var(--x-muted);
}

.x-widget-title {
  margin-top: 0.125rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f1419;
  transition: color 0.2s ease;
}

html.dark .x-widget-title {
  color: #e7e9ea;
}

html.dark .x-widget-item:hover .x-widget-title {
  color: #60a5fa;
}

.x-widget-meta {
  margin-top: 0.125rem;
  font-size: 0.8125rem;
  color: var(--x-muted);
}

.x-search-box {
  position: sticky;
  top: 0.75rem;
  z-index: 5;
  margin-bottom: 1rem;
}

.x-user-search-form {
  position: relative;
}

.x-user-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 1.125rem;
  height: 1.125rem;
  transform: translateY(-50%);
  color: var(--x-muted);
  pointer-events: none;
}

#user-search-dropdown {
  position: relative;
}

.x-user-search-dropdown {
  position: absolute;
  top: 0.375rem;
  left: 0;
  right: 0;
  z-index: 10;
  overflow: hidden;
  border: 1px solid var(--x-border);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 20, 25, 0.12);
}

html.dark .x-user-search-dropdown {
  background: #16181c;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.x-user-search-list {
  margin: 0;
  padding: 0.375rem 0;
  list-style: none;
}

.x-user-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.x-user-search-item:hover {
  background: rgba(29, 155, 240, 0.08);
}

.x-user-search-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  font-size: 0.875rem;
  font-weight: 700;
  color: #1d4ed8;
}

html.dark .x-user-search-avatar {
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  color: #bfdbfe;
}

.x-user-search-meta {
  min-width: 0;
}

.x-user-search-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f1419;
}

html.dark .x-user-search-name {
  color: #e7e9ea;
}

.x-user-search-handle {
  display: block;
  font-size: 0.8125rem;
  color: var(--x-muted);
}

.x-user-search-more,
.x-user-search-empty {
  display: block;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--x-border);
  font-size: 0.8125rem;
  color: var(--x-blue);
  text-decoration: none;
}

.x-user-search-empty {
  color: var(--x-muted);
}

.x-user-search-more:hover {
  background: rgba(29, 155, 240, 0.08);
}

.x-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  background: #eff3f4;
  font-size: 0.9375rem;
  color: #0f1419;
  outline: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.x-search-input:hover {
  background: #e7ecee;
}

.x-search-input:focus {
  background: #fff;
  border-color: var(--x-blue);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.18);
}

html.dark .x-search-input {
  background: #202327;
  color: #e7e9ea;
}

html.dark .x-search-input:hover {
  background: #2a2f34;
}

html.dark .x-search-input:focus {
  background: #16181c;
  border-color: var(--x-blue);
  box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.25);
}

.x-search-input::placeholder {
  color: var(--x-muted);
}

.x-forum-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--x-muted);
}

.x-forum-empty-title {
  font-size: 1.9375rem;
  font-weight: 800;
  color: #0f1419;
}

html.dark .x-forum-empty-title {
  color: #e7e9ea;
}

.x-forum-empty-sub {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
}

/* Post detail — thread view */
.x-thread-header {
  position: sticky;
  top: 3.5rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 3.3125rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--x-border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
}

html.dark .x-thread-header {
  background: rgba(0, 0, 0, 0.65);
}

.x-thread-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.125rem;
  height: 2.125rem;
  margin-left: -0.5rem;
  border-radius: 9999px;
  color: #0f1419;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

html.dark .x-thread-back {
  color: #e7e9ea;
}

.x-thread-back:hover {
  background: var(--x-hover-strong);
  color: var(--x-blue);
}

.x-thread-back:active {
  transform: scale(0.94);
}

.x-thread-back svg {
  width: 1.25rem;
  height: 1.25rem;
}

.x-thread-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f1419;
}

html.dark .x-thread-title {
  color: #e7e9ea;
}

.x-thread-replies-label {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--x-border);
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f1419;
}

html.dark .x-thread-replies-label {
  color: #e7e9ea;
}

@media (max-width: 639px) {
  .x-forum-header {
    top: calc(3.5rem + var(--pr-safe-top));
  }

  .x-thread-header {
    top: calc(3.5rem + var(--pr-safe-top));
  }
}

body:has(.x-forum-layout) footer {
  display: none;
}

body.x-forum-page {
  background: #fff;
}

html.dark body.x-forum-page {
  background: #000;
}

body.x-forum-page .pr-page-bg {
  display: none;
}

@media (min-width: 640px) {
  body:has(.x-forum-layout) footer {
    display: block;
  }
}

/* Instagram-style vote reactions preview + sheet */
.pr-vote-reactions-preview {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.375rem;
}

.forecast-vote-section .pr-vote-reactions-preview,
.vote-block--vertical .pr-vote-reactions-preview {
  align-items: center;
  text-align: center;
}

.x-tweet-reactions {
  margin-top: 0.25rem;
}

.pr-vote-reactions-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.125rem 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.pr-vote-reactions-row:hover .pr-vote-reactions-text {
  color: rgb(51 65 85);
}

html.dark .pr-vote-reactions-row:hover .pr-vote-reactions-text {
  color: rgb(226 232 240);
}

.pr-vote-reactions-text {
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: rgb(100 116 139);
}

html.dark .pr-vote-reactions-text {
  color: rgb(148 163 184);
}

.pr-vote-reactions-text strong {
  font-weight: 700;
  color: rgb(15 23 42);
}

html.dark .pr-vote-reactions-text strong {
  color: rgb(241 245 249);
}

.pr-vote-reactions-row--dislikes .pr-vote-reactions-text strong {
  color: rgb(185 28 28);
}

html.dark .pr-vote-reactions-row--dislikes .pr-vote-reactions-text strong {
  color: rgb(252 165 165);
}

.pr-vote-avatar-stack {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
}

.pr-vote-avatar-stack-item {
  display: inline-flex;
  margin-left: -0.375rem;
  border: 2px solid #fff;
  border-radius: 9999px;
}

html.dark .pr-vote-avatar-stack-item {
  border-color: rgb(15 23 42);
}

.pr-vote-avatar-stack-item:first-child {
  margin-left: 0;
}

.pr-vote-sheet {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 640px) {
  .pr-vote-sheet {
    align-items: center;
    padding: 1rem;
  }
}

.pr-vote-sheet-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(15, 20, 25, 0.45);
  cursor: pointer;
}

html.dark .pr-vote-sheet-backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.pr-vote-sheet-panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: 26rem;
  max-height: min(75vh, 32rem);
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.25rem 1.25rem 0 0;
  border: 1px solid rgb(226 232 240);
  background: #fff;
  box-shadow: 0 20px 40px rgba(15, 20, 25, 0.22);
}

html.dark .pr-vote-sheet-panel {
  border-color: rgb(51 65 85);
  background: rgb(15 23 42);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.55);
}

@media (min-width: 640px) {
  .pr-vote-sheet-panel {
    border-radius: 1.25rem;
  }
}

.pr-vote-sheet-handle {
  width: 2.5rem;
  height: 0.25rem;
  margin: 0.625rem auto 0;
  border-radius: 9999px;
  background: rgb(203 213 225);
}

@media (min-width: 640px) {
  .pr-vote-sheet-handle {
    display: none;
  }
}

.pr-vote-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem 0.5rem;
}

.pr-vote-sheet-title {
  font-size: 1rem;
  font-weight: 800;
  color: rgb(15 23 42);
}

html.dark .pr-vote-sheet-title {
  color: rgb(241 245 249);
}

.pr-vote-sheet-close {
  display: inline-flex;
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: rgb(100 116 139);
  cursor: pointer;
}

.pr-vote-sheet-close:hover {
  background: rgb(241 245 249);
  color: rgb(51 65 85);
}

html.dark .pr-vote-sheet-close:hover {
  background: rgb(30 41 59);
  color: rgb(226 232 240);
}

.pr-vote-sheet-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem 0.75rem;
  border-bottom: 1px solid rgb(226 232 240);
}

html.dark .pr-vote-sheet-tabs {
  border-bottom-color: rgb(51 65 85);
}

.pr-vote-sheet-tab {
  display: inline-flex;
  flex: 1;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  border: 1px solid rgb(226 232 240);
  border-radius: 9999px;
  background: rgb(248 250 252);
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(71 85 105);
  cursor: pointer;
}

html.dark .pr-vote-sheet-tab {
  border-color: rgb(51 65 85);
  background: rgb(30 41 59);
  color: rgb(203 213 225);
}

.pr-vote-sheet-tab.is-active {
  border-color: rgb(167 243 208);
  background: rgb(236 253 245);
  color: rgb(4 120 87);
}

html.dark .pr-vote-sheet-tab.is-active {
  border-color: rgb(6 95 70);
  background: rgba(6, 78, 59, 0.35);
  color: rgb(110 231 183);
}

.pr-vote-sheet-tab--dislikes.is-active {
  border-color: rgb(254 202 202);
  background: rgb(254 242 242);
  color: rgb(185 28 28);
}

html.dark .pr-vote-sheet-tab--dislikes.is-active {
  border-color: rgb(127 29 29);
  background: rgba(69, 10, 10, 0.35);
  color: rgb(252 165 165);
}

.pr-vote-sheet-tab-count {
  font-variant-numeric: tabular-nums;
}

.pr-vote-sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.25rem 0 0.75rem;
}

.pr-vote-sheet-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pr-vote-sheet-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  color: inherit;
  text-decoration: none;
}

.pr-vote-sheet-user:hover {
  background: rgb(248 250 252);
}

html.dark .pr-vote-sheet-user:hover {
  background: rgb(30 41 59);
}

.pr-vote-sheet-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgb(100 116 139);
}

html.dark .pr-vote-sheet-empty {
  color: rgb(148 163 184);
}

