:root {
  --background: hsl(220 20% 98%);
  --foreground: hsl(220 25% 15%);
  --card: #ffffff;
  --card-alt: hsl(220 15% 97%);
  --border: hsl(220 15% 90%);
  --primary: hsl(245 45% 45%);
  --primary-hover: hsl(245 45% 40%);
  --secondary: hsl(220 15% 94%);
  --muted: hsl(220 15% 96%);
  --muted-foreground: hsl(220 10% 50%);
  --accent: hsl(245 40% 92%);
  --accent-foreground: hsl(245 45% 35%);
  --value: hsl(160 60% 40%);
  --value-soft: hsl(160 40% 95%);
  --danger: hsl(0 70% 55%);
  --ring: hsl(245 45% 45%);
  --radius-sm: 0.625rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.25rem;
  --shadow-sm: 0 1px 2px 0 hsl(220 25% 15% / 0.03);
  --shadow-md: 0 4px 6px -1px hsl(220 25% 15% / 0.05), 0 2px 4px -2px hsl(220 25% 15% / 0.03);
  --shadow-lg: 0 10px 15px -3px hsl(220 25% 15% / 0.06), 0 4px 6px -4px hsl(220 25% 15% / 0.03);
  --shadow-card: 0 1px 3px 0 hsl(220 25% 15% / 0.04), 0 1px 2px -1px hsl(220 25% 15% / 0.02);
  --shadow-card-hover: 0 4px 12px 0 hsl(220 25% 15% / 0.08), 0 2px 4px -1px hsl(220 25% 15% / 0.03);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

html {
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  color: var(--foreground);
  line-height: 1.45;
  background-color: var(--background);
  background-image:
    radial-gradient(1200px 500px at 12% -8%, hsl(245 52% 94% / 0.7), transparent 65%),
    radial-gradient(900px 450px at 100% 0%, hsl(220 40% 94% / 0.75), transparent 70%),
    linear-gradient(180deg, hsl(220 20% 99%), hsl(220 18% 97%));
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand strong {
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.02em;
}

a,
button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 18px;
}

.content {
  display: grid;
  gap: 16px;
}

.app-footer {
  margin-top: 22px;
  padding-bottom: 6px;
}

.app-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}

.app-footer-disclaimer {
  margin: 0;
  flex: 1;
  min-width: 0;
  color: var(--muted-foreground);
  font-size: 0.79rem;
  line-height: 1.45;
}

.app-footer-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-footer-age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid hsl(0 70% 55% / 0.25);
  background: hsl(0 70% 55% / 0.12);
  color: hsl(0 70% 45%);
  font-weight: 700;
}

.app-footer-copyright {
  font-weight: 500;
}

.js .content {
  opacity: 1;
  transition: opacity 180ms ease;
}

.js.is-page-ready .content {
  opacity: 1;
}

.js.is-page-exiting .content {
  opacity: 0;
  transition-duration: 160ms;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -18px 24px;
  padding: 0 18px;
  border-bottom: 1px solid hsl(220 15% 88% / 0.75);
  background: hsl(220 20% 98% / 0.9);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 4px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand strong {
  font-size: 2.08rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin-left: auto;
}

.nav-logout-form {
  margin: 0;
  display: inline-flex;
}

.nav-tab-button {
  line-height: 1.2;
  cursor: pointer;
  font: inherit;
}

.nav-user-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 190px;
  border-radius: 999px;
  border: 1px solid hsl(220 15% 88%);
  background: hsl(0 0% 100% / 0.9);
  color: hsl(220 13% 38%);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-user-trigger {
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.nav-user-trigger:hover {
  border-color: hsl(245 42% 64% / 0.48);
  background: hsl(255 70% 97% / 0.98);
  transform: translateY(-1px);
}

.nav-user-trigger:focus-visible {
  outline: none;
  border-color: hsl(255 58% 54% / 0.72);
  box-shadow: 0 0 0 3px hsl(255 60% 52% / 0.2);
}

.nav-tab {
  text-decoration: none;
  color: hsl(220 14% 45%);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.nav-tab:hover {
  color: var(--foreground);
  border-color: hsl(220 15% 88%);
  background: hsl(220 16% 95%);
  transform: translateY(-1px);
}

.nav-tab.is-active {
  color: var(--accent-foreground);
  background: var(--accent);
  border-color: hsl(245 45% 45% / 0.16);
  box-shadow: var(--shadow-sm);
}

.nav-tab-with-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--value);
  color: hsl(0 0% 100%);
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

body.is-account-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.is-comparison-modal-open {
  overflow: hidden;
  overscroll-behavior: none;
}

.account-modal-overlay[hidden],
.account-modal[hidden] {
  display: none !important;
}

.comparison-overlay[hidden],
.comparison-modal[hidden] {
  display: none !important;
}

.account-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: hsl(220 20% 12% / 0.42);
  backdrop-filter: blur(6px);
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 91;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.account-modal-panel {
  width: min(1080px, 100%);
  max-height: min(90vh, 760px);
  max-height: min(90dvh, 760px);
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: 20px;
  border: 1px solid hsl(220 15% 86% / 0.9);
  background: linear-gradient(180deg, hsl(0 0% 100%), hsl(220 20% 98%));
  box-shadow: 0 22px 50px hsl(220 25% 10% / 0.28);
  padding: 16px;
  display: grid;
  gap: 12px;
  position: relative;
}

.account-modal-close {
  position: sticky;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--foreground);
  cursor: pointer;
  z-index: 2;
}

.account-modal-head {
  display: grid;
  gap: 4px;
  padding-left: 2px;
}

.account-modal-kicker {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.account-modal-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.account-modal-head p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.account-modal-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: hsl(0 0% 100% / 0.96);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.account-modal-section h3 {
  margin: 0;
  font-size: 0.95rem;
}

.account-modal-accordion {
  padding: 0;
  overflow: hidden;
}

.account-modal-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.account-modal-summary::-webkit-details-marker {
  display: none;
}

.account-modal-summary::after {
  content: "+";
  color: var(--muted-foreground);
  font-size: 1.05rem;
  line-height: 1;
}

.account-modal-accordion[open] .account-modal-summary::after {
  content: "-";
}

.account-modal-content {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 10px;
}

.account-modal-section p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

.account-modal-form {
  display: grid;
  gap: 10px;
}

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

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

.account-subsection-title {
  margin: 2px 0 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: hsl(220 16% 34%);
}

.account-modal-toggle {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: hsl(220 20% 98%);
  font-size: 0.82rem;
}

.account-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.flash-stack {
  display: grid;
  gap: 8px;
}

.flash {
  margin: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-weight: 500;
}

.flash-success {
  border-color: hsl(160 50% 45% / 0.3);
  background: hsl(160 70% 95%);
  color: hsl(160 70% 23%);
}

.flash-info {
  border-color: hsl(220 15% 86%);
  background: hsl(220 20% 95%);
  color: hsl(220 20% 30%);
}

.flash-warning {
  border-color: hsl(35 70% 58% / 0.32);
  background: hsl(45 100% 94%);
  color: hsl(35 70% 28%);
}

.flash-error {
  border-color: hsl(0 70% 60% / 0.28);
  background: hsl(0 100% 96%);
  color: hsl(0 70% 33%);
}

.flash-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.flash-action-form {
  margin: 0;
}

.flash-action-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: hsl(35 70% 22%);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.page-header {
  max-width: 820px;
  padding: 14px 2px 8px;
}

.page-kicker {
  margin: 0 0 7px;
  color: hsl(220 12% 48%);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.12;
}

.page-header p {
  margin: 11px 0 0;
  color: var(--muted-foreground);
  font-size: 1rem;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-card);
}

.panel-filters {
  border-radius: var(--radius-lg);
}

.filters {
  display: grid;
  gap: 11px;
}

.filters-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px;
  border-radius: 12px;
  border: 1px solid hsl(220 15% 90% / 0.8);
  background: linear-gradient(180deg, hsl(0 0% 100%), hsl(220 24% 98%));
}

.filter-field-action {
  align-content: start;
}

.filter-label {
  color: var(--muted-foreground);
  font-size: 0.77rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 600;
}

.filter-field input,
.filter-field select {
  width: 100%;
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: hsl(0 0% 100% / 0.95);
  color: var(--foreground);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.filter-field input:focus,
.filter-field select:focus,
.event-picker-search:focus,
.kelly-form input:focus {
  outline: none;
  border-color: hsl(245 45% 45% / 0.5);
  box-shadow: 0 0 0 3px hsl(245 45% 45% / 0.15);
}

.filters-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.filters-actions-row .js-filter-chip {
  min-height: 40px;
  border-color: var(--border);
  background: hsl(0 0% 100% / 0.96);
  color: var(--foreground);
}

.filters-actions-row .js-filter-chip:hover {
  border-color: hsl(245 42% 64% / 0.48);
  background: hsl(255 70% 97% / 0.98);
}

.filters-actions-row .js-filter-chip:focus-visible {
  outline: none;
  border-color: hsl(255 58% 54% / 0.72);
  box-shadow: 0 0 0 3px hsl(255 60% 52% / 0.2);
}

.filters-actions-row .js-filter-chip.is-selected {
  border-color: hsl(255 58% 54% / 0.7);
  background: hsl(257 76% 90% / 0.96);
  color: hsl(258 65% 28%);
  box-shadow: 0 0 0 1px hsl(255 58% 54% / 0.24), var(--shadow-sm);
}

.filters-actions-row .js-filter-chip.is-selected:hover {
  border-color: hsl(255 58% 50% / 0.82);
  background: hsl(257 80% 87% / 0.98);
}

#explorer-filters .filters-actions-row > a.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.filters-advanced {
  border-top: 1px solid hsl(220 15% 90% / 0.9);
  padding-top: 10px;
  display: grid;
  gap: 10px;
}

.filters-advanced.is-hidden {
  display: none;
}

.filters-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.filters-count {
  margin: 6px 0 0;
  color: var(--muted-foreground);
  font-size: 0.86rem;
}

.filters-count-row {
  margin: 6px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filters-footnote {
  margin: 2px 0 0;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.45;
}

.ranked-filters-summary {
  margin-top: 4px;
}

.probability-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.probability-presets .btn {
  padding: 5px 9px;
  font-size: 0.76rem;
}

.probability-presets .js-proba-min-preset.is-selected {
  border-color: hsl(255 58% 54% / 0.7);
  background: hsl(257 76% 90% / 0.96);
  color: hsl(258 65% 28%);
  box-shadow: 0 0 0 1px hsl(255 58% 54% / 0.24), var(--shadow-sm);
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.checkbox-inline input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--foreground);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 12px;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

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

.btn-lg {
  padding: 11px 18px;
  font-size: 0.95rem;
}

.btn-primary {
  color: hsl(0 0% 100%);
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
}

.btn-secondary {
  color: var(--accent-foreground);
  border-color: hsl(245 45% 45% / 0.2);
  background: hsl(245 45% 95% / 0.9);
}

.btn-secondary:hover {
  border-color: hsl(245 45% 45% / 0.34);
  background: hsl(245 42% 93% / 0.98);
}

.btn-ghost {
  border-color: var(--border);
  background: hsl(0 0% 100% / 0.9);
}

.btn-ghost:hover {
  border-color: hsl(245 45% 45% / 0.28);
  background: hsl(245 40% 95% / 0.65);
}

.combination-toggle.is-selected {
  border-color: hsl(160 52% 36% / 0.32);
  background: hsl(160 42% 92%);
  color: hsl(160 62% 24%);
}

.combination-toggle[aria-pressed="true"] {
  box-shadow: inset 0 0 0 1px hsl(160 46% 36% / 0.16);
}

.bet-like-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-color: hsl(220 15% 84%);
  background: hsl(0 0% 100% / 0.96);
  color: hsl(220 18% 30%);
}

.bet-like-btn:hover {
  border-color: hsl(34 78% 48% / 0.42);
  background: hsl(38 100% 97%);
}

.bet-like-btn.is-liked {
  border-color: hsl(34 82% 50% / 0.38);
  background: hsl(39 95% 92%);
  color: hsl(28 78% 28%);
}

.bet-like-btn.is-login-prompt {
  border-style: dashed;
}

.bet-like-btn.is-loading {
  opacity: 0.72;
}

.bet-like-btn-label {
  min-width: 0;
}

.bet-like-btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: hsl(220 18% 94%);
  color: hsl(220 18% 34%);
  font-size: 0.76rem;
  font-weight: 700;
  flex: 0 0 auto;
}

.bet-like-btn.is-liked .bet-like-btn-count {
  background: hsl(34 88% 86%);
  color: hsl(28 78% 24%);
}

.btn-values-toggle {
  display: inline-flex;
  align-items: center;
  max-width: 640px;
  text-align: left;
  white-space: nowrap;
  line-height: 1.35;
  min-height: 40px;
}

.favorites-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.favorites-filter-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: min(380px, 82vw);
  border: 1px solid hsl(220 15% 86%);
  border-radius: 12px;
  background: hsl(0 0% 100% / 0.98);
  color: hsl(220 14% 32%);
  box-shadow: var(--shadow-md);
  padding: 9px 10px;
  font-size: 0.76rem;
  line-height: 1.45;
  z-index: 8;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  pointer-events: none;
}

.favorites-filter-wrap:hover .favorites-filter-tooltip,
.favorites-filter-wrap:focus-within .favorites-filter-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid transparent;
}

.badge-info {
  color: var(--accent-foreground);
  background: var(--accent);
  border-color: hsl(245 45% 45% / 0.12);
}

.badge-value {
  color: var(--value);
  background: var(--value-soft);
  border-color: hsl(160 60% 40% / 0.22);
}

.badge-warning {
  color: hsl(34 72% 30%);
  background: hsl(40 95% 92%);
  border-color: hsl(40 78% 54% / 0.28);
}

.badge-danger {
  color: hsl(0 62% 42%);
  background: hsl(0 88% 95%);
  border-color: hsl(0 72% 55% / 0.22);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
}

.panel-head span {
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.panel-head-tight {
  margin-bottom: 6px;
}

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

.pinned-match-callout {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid hsl(160 30% 82%);
  border-radius: 18px;
  background:
    radial-gradient(320px 140px at 100% -30%, hsl(160 50% 90% / 0.62), transparent 70%),
    linear-gradient(180deg, hsl(160 35% 98%), hsl(220 22% 98%));
}

.pinned-match-copy {
  display: grid;
  gap: 6px;
}

.pinned-match-note {
  margin: 0;
}

.pinned-match-grid {
  grid-template-columns: minmax(0, 1fr);
}

.match-card {
  border: 1px solid hsl(220 15% 88%);
  background: linear-gradient(180deg, hsl(0 0% 100%), hsl(220 18% 98%));
  border-radius: 20px;
  padding: 14px;
  display: grid;
  gap: 11px;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.match-card-tone-a {
  background:
    radial-gradient(260px 120px at 100% -20%, hsl(245 65% 93% / 0.75), transparent 72%),
    linear-gradient(180deg, hsl(0 0% 100%), hsl(220 20% 98%));
}

.match-card-tone-b {
  background:
    radial-gradient(280px 130px at -10% -10%, hsl(220 50% 92% / 0.75), transparent 70%),
    linear-gradient(180deg, hsl(0 0% 100%), hsl(220 22% 98%));
}

.match-card-tone-c {
  background:
    radial-gradient(300px 140px at 50% -30%, hsl(245 45% 93% / 0.62), transparent 70%),
    linear-gradient(180deg, hsl(0 0% 100%), hsl(220 18% 98%));
}

.match-card[role="button"] {
  cursor: pointer;
}

.match-card:hover {
  border-color: hsl(245 45% 45% / 0.38);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.match-card.is-pinned-match {
  border-color: hsl(160 34% 76%);
}

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

.match-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.match-date {
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.match-community-likes {
  white-space: nowrap;
  background: hsl(14 100% 95%);
  color: hsl(12 62% 34%);
  border-color: hsl(14 72% 84%);
}

.match-card h3,
.market-mobile-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.match-card h3 span,
.market-mobile-card h3 span {
  color: var(--muted-foreground);
  font-size: 0.88rem;
  font-weight: 500;
}

.one-x2-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.one-x2-cell {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 12px;
  background: hsl(220 15% 97% / 0.96);
  padding: 8px;
  display: grid;
  gap: 4px;
}

.one-x2-cell small {
  color: var(--muted-foreground);
  font-size: 0.73rem;
}

.one-x2-cell strong {
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.one-x2-cell span {
  color: hsl(220 18% 36%);
  font-size: 0.75rem;
}

.event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.event-item {
  border: 1px solid hsl(220 15% 89%);
  border-radius: 12px;
  background: linear-gradient(180deg, hsl(0 0% 100%), hsl(220 16% 98%));
  padding: 8px;
  display: grid;
  gap: 8px;
}

.event-market {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.event-selection {
  margin: 2px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
}

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

.event-metrics span,
.market-mobile-metrics span {
  display: grid;
  gap: 2px;
  padding: 7px;
  border: 1px solid hsl(220 15% 88%);
  border-radius: 10px;
  background: hsl(0 0% 100% / 0.92);
}

.event-metrics small,
.market-mobile-metrics small {
  color: var(--muted-foreground);
  font-size: 0.67rem;
  letter-spacing: 0.03em;
}

.event-metrics strong,
.market-mobile-metrics strong {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.86rem;
}

.match-foot,
.market-mobile-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.match-favorite-form {
  margin: 0;
}

.match-foot .btn {
  width: 100%;
  min-height: 40px;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.favorite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid hsl(220 15% 85%);
  background: hsl(0 0% 100% / 0.95);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.favorite-btn:hover {
  transform: translateY(-1px);
  border-color: hsl(0 70% 55% / 0.36);
  background: hsl(0 100% 98%);
}

.favorite-btn:focus-visible {
  outline: none;
  border-color: hsl(0 70% 55% / 0.55);
  box-shadow: 0 0 0 3px hsl(0 75% 58% / 0.16);
}

.favorite-icon {
  width: 20px;
  height: 20px;
  display: block;
}

.favorite-icon path {
  fill: transparent;
  stroke: hsl(220 14% 48%);
  stroke-width: 1.7;
  transition: fill 140ms ease, stroke 140ms ease;
}

.favorite-btn.is-favorited .favorite-icon path {
  fill: hsl(0 85% 55%);
  stroke: hsl(0 85% 55%);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: hsl(0 0% 100% / 0.96);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

th,
td {
  text-align: left;
  padding: 10px 11px;
  border-bottom: 1px solid hsl(220 15% 92%);
  font-size: 0.88rem;
}

th {
  color: hsl(220 18% 42%);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: hsl(220 15% 96% / 0.88);
}

tbody tr:hover {
  background: hsl(245 40% 96% / 0.72);
}

.sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sort-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sort-indicator {
  font-size: 0.62rem;
  opacity: 0.45;
}

.sort-link.is-asc .sort-indicator,
.sort-link.is-desc .sort-indicator {
  opacity: 1;
  color: var(--primary);
}

.sort-link.is-none .sort-indicator {
  opacity: 0;
}

.match-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  text-align: left;
}

.empty,
.empty-block {
  color: var(--muted-foreground);
  font-style: italic;
}

.empty {
  text-align: center;
}

.empty-block {
  border: 1px dashed hsl(220 15% 86%);
  border-radius: 12px;
  padding: 11px;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.pager a {
  text-decoration: none;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: hsl(0 0% 100% / 0.95);
  padding: 8px 10px;
  transition: border-color 140ms ease, background 140ms ease;
}

.pager a:hover {
  border-color: hsl(245 45% 45% / 0.35);
  background: hsl(245 40% 95% / 0.8);
}

.pager span {
  color: var(--muted-foreground);
  font-size: 0.88rem;
}

.event-picker {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-alt);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.event-picker-accordion {
  padding: 0;
  overflow: hidden;
}

.event-picker-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 10px 12px;
}

.event-picker-summary::-webkit-details-marker {
  display: none;
}

.event-picker-summary::after {
  content: "+";
  color: var(--muted-foreground);
  font-size: 1.05rem;
  line-height: 1;
}

.event-picker-accordion[open] .event-picker-summary::after {
  content: "-";
}

.event-picker-body {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding: 10px;
}

.event-picker-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.event-picker-head strong {
  font-size: 0.86rem;
}

.event-picker-reset {
  border: 1px solid hsl(220 15% 84%);
  border-radius: 999px;
  background: hsl(0 0% 100%);
  color: hsl(220 14% 36%);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.event-picker-reset:hover {
  border-color: hsl(0 72% 52% / 0.45);
  background: hsl(0 100% 98%);
  color: hsl(0 62% 36%);
}

.event-picker-hint {
  color: var(--muted-foreground);
  font-size: 0.74rem;
}

.event-picker-search {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 9px;
  font-size: 0.88rem;
  background: hsl(0 0% 100% / 0.94);
}

.event-picker-list {
  display: grid;
  gap: 6px;
}

.event-picker-select {
  width: 100%;
  min-height: 190px;
  border: 1px solid hsl(220 15% 84%);
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  font-size: 0.85rem;
  line-height: 1.35;
}

.event-picker-select option {
  padding: 4px 6px;
}

.event-picker-list-static {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.event-picker--teams {
  grid-column: 1 / -1;
}

.event-picker-list-teams {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.event-picker-list-group {
  display: grid;
  gap: 6px;
  align-content: start;
}

.event-picker-group-label {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  font-weight: 600;
}

.event-option {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid hsl(220 15% 88%);
  border-radius: 10px;
  padding: 7px 9px;
  background: #fff;
  font-size: 0.85rem;
}

.event-option input {
  margin: 0;
}

.event-picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.event-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.74rem;
  background: hsl(245 45% 95%);
  color: var(--accent-foreground);
  border: 1px solid hsl(245 45% 45% / 0.16);
}

.event-chip.is-empty {
  background: hsl(220 16% 95%);
  color: var(--muted-foreground);
  border-color: hsl(220 15% 88%);
}

.simu-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
  gap: 12px;
  align-items: start;
}

.simu-main {
  display: grid;
  gap: 12px;
}

.simu-filters {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 14px;
  background: hsl(220 20% 99%);
  padding: 10px;
}

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

.simu-main-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.simu-main-head h2,
.simu-side-head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.simu-main-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

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

.simu-match-accordion {
  display: grid;
  gap: 8px;
}

.simu-match-summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  gap: 8px;
}

.simu-match-summary::-webkit-details-marker {
  display: none;
}

.simu-match-summary::after {
  content: "▾";
  justify-self: end;
  color: var(--muted-foreground);
  font-size: 0.88rem;
  line-height: 1;
  transition: transform 140ms ease;
}

.simu-match-accordion[open] .simu-match-summary::after {
  transform: rotate(180deg);
}

.simu-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.simu-event-list > li {
  padding-right: 10px;
}

.simu-event-group {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 12px;
  background: hsl(0 0% 100% / 0.96);
  overflow: hidden;
}

.simu-event-group-head {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 0.82rem;
  color: hsl(245 45% 34%);
  background: hsl(245 42% 95%);
}

.simu-event-group-head-main {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.simu-event-group-head::-webkit-details-marker {
  display: none;
}

.simu-event-group-head::after {
  content: "▾";
  color: var(--muted-foreground);
  font-size: 0.78rem;
  line-height: 1;
  transition: transform 140ms ease;
}

.simu-event-group[open] .simu-event-group-head::after {
  transform: rotate(180deg);
}

.simu-event-group-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  display: grid;
  gap: 6px;
}

.simu-event-state {
  border: 1px dashed hsl(220 15% 86%);
  border-radius: 10px;
  background: hsl(220 20% 99%);
  color: var(--muted-foreground);
  font-size: 0.82rem;
  padding: 10px;
}

.simu-event-state.is-loading {
  color: hsl(245 45% 38%);
}

.simu-event-state.is-error {
  border-color: hsl(0 70% 60% / 0.32);
  color: hsl(0 68% 38%);
}

.simu-event-btn {
  width: 100%;
  border: 1px solid hsl(220 15% 88%);
  border-radius: 12px;
  padding: 8px 9px;
  background: hsl(0 0% 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.simu-event-btn:hover {
  border-color: hsl(245 45% 45% / 0.45);
  background: hsl(245 50% 97% / 0.7);
}

.simu-event-btn.is-selected {
  border-color: hsl(245 50% 45% / 0.72);
  background: hsl(245 55% 94% / 0.92);
  box-shadow: 0 0 0 1px hsl(245 50% 45% / 0.22);
}

.simu-event-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.simu-event-copy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.simu-event-copy strong {
  font-size: 0.84rem;
  line-height: 1.2;
}

.simu-event-copy small {
  color: var(--muted-foreground);
  font-size: 0.76rem;
  line-height: 1.25;
}

.simu-event-stats {
  display: grid;
  gap: 2px;
  text-align: right;
  font-size: 0.74rem;
  color: hsl(220 16% 36%);
  white-space: nowrap;
  flex: 0 0 auto;
  margin-right: 2px;
}

.simu-event-likes {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  background: hsl(40 100% 93%);
  color: hsl(28 72% 28%);
  border: 1px solid hsl(40 74% 82%);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.simu-side {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 10px;
}

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

.simu-side-head-tools {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.simu-side-close {
  display: none;
  border: 1px solid hsl(220 15% 84%);
  border-radius: 999px;
  background: hsl(0 0% 100%);
  color: hsl(220 14% 38%);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
}

.simu-empty {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.simu-warning {
  margin: 0;
  color: hsl(12 74% 38%);
  font-size: 0.8rem;
  line-height: 1.35;
  background: hsl(12 85% 96%);
  border: 1px solid hsl(12 70% 84%);
  border-radius: 10px;
  padding: 8px 10px;
}

.simu-selection-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
  max-height: 340px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
  padding-right: 10px;
}

.simu-selection-group {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 12px;
  background: hsl(0 0% 100% / 0.96);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.simu-selection-group.is-warning {
  border-color: hsl(14 65% 74%);
  background: hsl(15 85% 97%);
}

.simu-selection-group-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.simu-selection-group-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.simu-selection-group-title strong {
  font-size: 0.82rem;
  line-height: 1.25;
}

.simu-selection-group-title small {
  color: var(--muted-foreground);
  font-size: 0.73rem;
}

.simu-selection-group-metrics {
  color: hsl(220 16% 34%);
  font-size: 0.73rem;
  text-align: right;
  line-height: 1.3;
  max-width: 48%;
}

.simu-selection-group-actions {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
}

.simu-selection-match-link {
  white-space: nowrap;
}

.simu-selection-events {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.simu-selection-event-item {
  border: 1px solid hsl(220 15% 91%);
  border-radius: 10px;
  background: hsl(0 0% 100% / 0.85);
  padding: 6px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.simu-selection-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.simu-selection-copy strong {
  font-size: 0.82rem;
  line-height: 1.25;
}

.simu-selection-copy small {
  color: var(--muted-foreground);
  font-size: 0.75rem;
  line-height: 1.25;
}

.simu-remove-btn {
  border: 1px solid hsl(220 15% 84%);
  border-radius: 9px;
  background: #fff;
  color: hsl(220 14% 38%);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 7px;
  cursor: pointer;
  white-space: nowrap;
}

.simu-remove-btn:hover {
  border-color: hsl(0 70% 55% / 0.5);
  color: hsl(0 72% 42%);
}

.simu-summary {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 12px;
  background: hsl(220 20% 98%);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.simu-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.86rem;
}

.simu-summary-row span {
  color: var(--muted-foreground);
}

.simu-summary-row strong {
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.simu-kelly-btn {
  width: 100%;
}

.simu-calculator-actions {
  display: grid;
  gap: 8px;
}

.simu-kelly-note {
  margin: -2px 0 0;
  color: var(--muted-foreground);
  font-size: 0.78rem;
  line-height: 1.35;
}

.simu-mobile-widget,
.simu-mobile-backdrop {
  display: none;
}

.auth-layout {
  display: flex;
  justify-content: center;
  padding: 4px 0 10px;
}

.auth-card {
  width: min(440px, 100%);
  border: 1px solid hsl(220 15% 87%);
  border-radius: 20px;
  background:
    radial-gradient(460px 180px at 100% -18%, hsl(245 65% 94% / 0.62), transparent 70%),
    linear-gradient(180deg, hsl(0 0% 100%), hsl(220 18% 98%));
  padding: 18px;
  box-shadow: var(--shadow-card-hover);
  display: grid;
  gap: 14px;
}

.auth-card-header {
  display: grid;
  gap: 8px;
}

.auth-card-header h1 {
  margin: 0;
  font-size: clamp(1.66rem, 3.5vw, 2rem);
}

.auth-card-header p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.93rem;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-field span {
  color: hsl(220 15% 38%);
  font-size: 0.82rem;
  font-weight: 600;
}

.auth-input {
  width: 100%;
  border: 1px solid hsl(220 15% 84%);
  border-radius: 12px;
  background: hsl(0 0% 100%);
  color: var(--foreground);
  padding: 10px 11px;
  font-size: 0.92rem;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.auth-input:focus {
  outline: none;
  border-color: hsl(245 45% 45% / 0.5);
  box-shadow: 0 0 0 3px hsl(245 45% 45% / 0.15);
}

.field-help {
  color: var(--muted-foreground);
  font-size: 0.76rem;
  line-height: 1.4;
}

.field-help ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.form-errors {
  border: 1px solid hsl(0 70% 60% / 0.32);
  background: hsl(0 100% 96%);
  border-radius: 12px;
  color: hsl(0 70% 33%);
  font-size: 0.85rem;
  padding: 9px 10px;
  display: grid;
  gap: 4px;
}

.form-errors p {
  margin: 0;
}

.form-error {
  color: hsl(0 70% 38%);
  font-size: 0.77rem;
}

.auth-footnote {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.86rem;
}

.auth-footnote a {
  color: hsl(245 45% 40%);
  font-weight: 600;
}

.auth-inline-link {
  margin: -4px 0 0;
  font-size: 0.83rem;
}

.auth-inline-link a {
  color: hsl(245 45% 40%);
  font-weight: 600;
}

.market-mobile-list {
  display: none;
}

.ranked-markets-mobile-list {
  margin-top: 10px;
}

.market-mobile-card.ranked-mobile-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
}

.ranked-mobile-main {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 3px;
}

.ranked-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.ranked-mobile-match {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.ranked-mobile-event {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.3;
}

.ranked-mobile-side {
  flex: 0 0 auto;
  display: grid;
  gap: 6px;
  align-content: start;
  justify-items: end;
}

.ranked-mobile-proba {
  font-size: 0.8rem;
  padding: 5px 10px;
}

.ranked-mobile-side .btn {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 0.82rem;
}

.market-table-actions {
  display: inline-grid;
  gap: 6px;
  justify-items: stretch;
  min-width: 188px;
}

.community-count-row {
  margin-top: 8px;
}

.community-list {
  display: grid;
  gap: 8px;
}

.community-panel {
  max-width: 1140px;
  margin-inline: auto;
}

.community-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  border: 1px solid hsl(220 15% 88%);
  border-radius: 14px;
  background:
    radial-gradient(320px 110px at 100% -26%, hsl(41 100% 92% / 0.4), transparent 72%),
    linear-gradient(180deg, hsl(0 0% 100%), hsl(220 18% 98%));
  padding: 10px 12px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  cursor: pointer;
}

.community-card:hover {
  border-color: hsl(220 22% 82%);
  box-shadow: 0 12px 30px hsl(220 28% 84% / 0.32);
  transform: translateY(-1px);
}

.community-card:focus-visible {
  outline: 2px solid hsl(245 58% 47% / 0.34);
  outline-offset: 3px;
}

.community-topline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.community-rank-index {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: hsl(245 52% 94%);
  color: hsl(245 52% 28%);
  font-size: 0.72rem;
  font-weight: 700;
}

.community-rank-likes {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: hsl(40 100% 93%);
  color: hsl(28 72% 28%);
  font-size: 0.72rem;
  font-weight: 700;
}

.community-card-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.community-match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.community-kickoff {
  color: var(--muted-foreground);
  font-size: 0.76rem;
  white-space: nowrap;
}

.community-match-title {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.2;
}

.community-market-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.community-selection-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.community-selection-market,
.community-selection-pick {
  margin: 0;
}

.community-selection-pick {
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
}

.community-selection-market {
  color: var(--muted-foreground);
  font-size: 0.74rem;
  line-height: 1.2;
}

.community-selection-proba {
  flex: 0 0 auto;
  border: 1px solid hsl(196 58% 80%);
  background: hsl(196 78% 97%);
  color: hsl(197 70% 29%);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
}

.community-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.community-card-actions .btn {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 0.78rem;
}

.community-card-actions .btn-primary {
  min-width: 92px;
}

@media (min-width: 920px) {
  .community-list {
    gap: 10px;
  }

  .community-card {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "topline topline topline"
      "match kickoff actions"
      "market market actions"
      "pick proba actions";
    align-items: center;
    gap: 6px 14px;
    padding: 12px 14px;
  }

  .community-topline {
    grid-area: topline;
    align-self: start;
    padding-bottom: 2px;
  }

  .community-card-main {
    display: contents;
  }

  .community-match-row,
  .community-selection-row {
    display: contents;
  }

  .community-match-title {
    grid-area: match;
    font-size: 1rem;
  }

  .community-kickoff {
    grid-area: kickoff;
    justify-self: end;
    font-size: 0.78rem;
  }

  .community-market-row {
    grid-area: market;
    min-width: 0;
  }

  .community-selection-pick {
    grid-area: pick;
    font-size: 0.92rem;
  }

  .community-selection-proba {
    grid-area: proba;
    justify-self: end;
    align-self: center;
  }

  .community-card-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: center;
    min-width: 0;
  }

  .community-card-actions .btn {
    min-height: 34px;
    padding: 5px 12px;
    justify-content: center;
  }

  .community-open-btn {
    display: none;
  }

  .community-card-actions .bet-like-btn {
    min-width: 126px;
  }

  .community-selection-market {
    font-size: 0.75rem;
  }

  .community-card:hover .community-match-title {
    color: hsl(245 48% 34%);
  }

  .community-card:hover .community-selection-pick {
    color: hsl(245 44% 26%);
  }
}

#ranked-markets-filters .filters-actions-row > a.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.home-stack {
  display: grid;
  gap: clamp(28px, 3.6vw, 42px);
}

.content > .home-stack:first-child {
  margin-top: 8px;
}

.content > .flash-stack + .home-stack {
  margin-top: 10px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--accent);
  color: var(--accent-foreground);
  border: 1px solid hsl(245 45% 45% / 0.18);
  font-size: 0.74rem;
  font-weight: 600;
}

.home-hero {
  display: grid;
  gap: 14px;
  padding-top: 2px;
  text-align: center;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.04;
}

.home-hero h1 span {
  color: var(--primary);
}

.home-hero p {
  margin: 0;
  max-width: 760px;
  margin-inline: auto;
  color: var(--muted-foreground);
  font-size: clamp(0.98rem, 1.8vw, 1.14rem);
}

.home-cta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 900px;
  width: 100%;
  margin-inline: auto;
  margin-top: 12px;
}

.home-cta-grid.is-single {
  grid-template-columns: minmax(260px, 380px);
  justify-content: center;
}

.home-cta-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  text-align: center;
  text-decoration: none;
}

.home-cta-card.btn-ghost {
  background: hsl(0 0% 100% / 0.98);
  border-color: hsl(220 15% 86%);
}

.home-section {
  display: grid;
  gap: 16px;
}

.home-section-header {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 8px;
}

.home-section-header h2 {
  margin: 0;
  font-size: clamp(1.26rem, 2.35vw, 1.72rem);
}

.home-section-subtitle {
  margin: 0;
  max-width: 820px;
  color: var(--muted-foreground);
  font-size: 0.98rem;
  line-height: 1.5;
}

.home-block-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.home-account-cards {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.home-block-card {
  min-height: 156px;
}

.home-block-card p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.88rem;
}

.home-panel-actions {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

.home-panel-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(360px, 100%);
}

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

.system-panel {
  display: grid;
  gap: 12px;
}

.system-stat-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.system-metric {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1;
}

.system-metric-caption {
  margin: -6px 0 0;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.system-meter {
  height: 10px;
  border-radius: 999px;
  background: hsl(220 18% 93%);
  overflow: hidden;
}

.system-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, hsl(245 52% 62%), hsl(204 82% 54%));
}

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

.system-substats div,
.system-inline-stats div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, hsl(0 0% 100%), hsl(220 20% 97%));
  border: 1px solid hsl(220 15% 91%);
}

.system-substats dt,
.system-inline-stats dt {
  color: var(--muted-foreground);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.system-substats dd,
.system-inline-stats dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.system-inline-stats dd {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.4rem;
  line-height: 1;
}

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

.system-check-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid hsl(220 15% 90%);
  background: linear-gradient(180deg, hsl(0 0% 100%), hsl(220 22% 98%));
}

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

.system-check-head h3 {
  margin: 0;
  font-size: 0.98rem;
}

.system-check-ok,
.system-check-error,
.system-section-note {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
}

.system-check-ok,
.system-section-note {
  color: var(--muted-foreground);
}

.system-check-error {
  color: var(--danger);
}

.system-table-wrap {
  width: 100%;
}

.system-table {
  min-width: 760px;
}

.history-overview-panel,
.history-strategy-panel,
.history-threshold-panel,
.history-detail-panel {
  display: grid;
  gap: 12px;
}

.history-summary-grid,
.history-strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.history-stat-card,
.history-strategy-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid hsl(220 15% 90%);
  background: linear-gradient(180deg, hsl(0 0% 100%), hsl(220 22% 98%));
}

.history-strategy-card.is-selected {
  border-color: hsl(255 58% 54% / 0.45);
  box-shadow: 0 0 0 1px hsl(255 58% 54% / 0.18), var(--shadow-sm);
}

.history-calculator-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.history-strategy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.history-strategy-head h3,
.history-strategy-head p,
.history-threshold-note,
.history-settlement-note {
  margin: 0;
}

.history-strategy-head h3 {
  font-size: 1rem;
}

.history-strategy-head p,
.history-threshold-note,
.history-settlement-note {
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.45;
}

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

.history-strategy-stats div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid hsl(220 15% 91%);
  background: hsl(0 0% 100% / 0.92);
}

.history-strategy-stats dt {
  color: var(--muted-foreground);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-strategy-stats dd {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.18rem;
  line-height: 1;
}

.history-curve-wrap {
  display: grid;
  gap: 8px;
}

.history-curve {
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: linear-gradient(180deg, hsl(220 28% 98%), hsl(220 32% 96%));
}

.history-curve-zero {
  stroke: hsl(220 12% 70%);
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.history-curve-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-curve-area {
  opacity: 0.18;
}

.history-curve.is-positive .history-curve-line {
  stroke: hsl(150 58% 36%);
}

.history-curve.is-positive .history-curve-area {
  fill: hsl(150 58% 36%);
}

.history-curve.is-negative .history-curve-line {
  stroke: hsl(0 74% 54%);
}

.history-curve.is-negative .history-curve-area {
  fill: hsl(0 74% 54%);
}

.history-curve-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.history-curve-meta strong {
  color: var(--foreground);
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.96rem;
}

.history-threshold-active {
  background: hsl(252 70% 97% / 0.88);
}

.history-table-wrap table,
.history-threshold-table {
  min-width: 980px;
}

.history-table small {
  color: var(--muted-foreground);
}

.history-settlement-note {
  display: block;
  margin-top: 4px;
}

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

.faq-overview {
  display: grid;
  gap: 10px;
}

.faq-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.faq-overview-card {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 14px;
  background: linear-gradient(180deg, hsl(220 24% 99%), hsl(220 28% 97%));
  padding: 12px;
  display: grid;
  gap: 8px;
}

.faq-overview-card h2,
.faq-overview-card p {
  margin: 0;
}

.faq-overview-card h2 {
  font-size: 0.96rem;
}

.faq-overview-card p {
  color: var(--muted-foreground);
  font-size: 0.86rem;
  line-height: 1.5;
}

.faq-category {
  display: grid;
  gap: 10px;
}

.faq-category-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-accordion-list {
  display: grid;
  gap: 8px;
}

.faq-accordion-item {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 14px;
  background: linear-gradient(180deg, hsl(0 0% 100%), hsl(220 18% 98%));
  padding: 0 12px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.faq-accordion-item[open] {
  border-color: hsl(245 45% 45% / 0.38);
  box-shadow: var(--shadow-sm);
}

.faq-accordion-summary {
  list-style: none;
  cursor: pointer;
  margin: 0;
  padding: 11px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.faq-accordion-summary::-webkit-details-marker {
  display: none;
}

.faq-accordion-summary::after {
  content: "▾";
  color: var(--muted-foreground);
  font-size: 0.86rem;
  line-height: 1;
  transition: transform 140ms ease;
}

.faq-accordion-item[open] .faq-accordion-summary::after {
  transform: rotate(180deg);
}

.faq-accordion-answer {
  padding: 0 0 11px;
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.87rem;
  line-height: 1.5;
}

.faq-accordion-answer p {
  margin: 0;
}

.faq-answer-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.faq-answer-note {
  font-size: 0.82rem;
}

.faq-calculators {
  display: grid;
  gap: 10px;
}

.faq-calculator-answer {
  display: grid;
  gap: 8px;
}

.faq-calculator-answer p {
  margin: 0;
}

.faq-calculator-list-label {
  margin: 1px 0 0;
}

.faq-calculator-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.faq-vocabulary {
  display: grid;
  gap: 10px;
}

.faq-vocabulary-list {
  margin: 0;
  display: grid;
  gap: 8px;
}

.faq-vocabulary-item {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 12px;
  background: hsl(220 20% 99%);
  padding: 9px 10px;
}

.faq-vocabulary-item dt {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.faq-vocabulary-item dd {
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 0.84rem;
  line-height: 1.46;
}

.faq-responsible {
  border-color: hsl(35 70% 58% / 0.35);
  background:
    radial-gradient(260px 130px at 100% 0%, hsl(45 100% 90% / 0.6), transparent 72%),
    linear-gradient(180deg, hsl(0 0% 100%), hsl(45 100% 97%));
}

.faq-responsible-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.faq-responsible-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid hsl(35 70% 58% / 0.45);
  background: hsl(45 100% 92%);
  color: hsl(35 70% 30%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.faq-responsible-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.faq-responsible-content h3 {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.02rem;
}

.faq-responsible-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.74rem;
  font-weight: 700;
  background: hsl(45 100% 92%);
  color: hsl(35 70% 28%);
  border: 1px solid hsl(35 70% 58% / 0.4);
}

.faq-responsible-content p {
  margin: 0;
  color: hsl(220 14% 38%);
  font-size: 0.87rem;
  line-height: 1.5;
}

.faq-responsible-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.faq-responsible-links a {
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-responsible-links a:hover {
  color: var(--primary-hover);
}

.faq-contact {
  border-style: dashed;
  border-color: hsl(220 14% 84%);
  background: hsl(220 20% 99%);
}

.faq-contact-text {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.87rem;
  line-height: 1.5;
}

.faq-contact-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-contact-link:hover {
  color: var(--primary-hover);
}

.market-mobile-card {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(180deg, hsl(0 0% 100%), hsl(220 20% 98%));
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 10px;
}

.market-mobile-card[role="button"] {
  cursor: pointer;
}

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

.market-mobile-label {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

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

.value-positive {
  color: var(--value);
  font-weight: 600;
}

.value-negative {
  color: var(--danger);
  font-weight: 600;
}

.probability-gradual {
  --interest-hue: 214;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.6ch;
  padding: 2px 7px;
  border-radius: 7px;
  border: 1px solid hsl(var(--interest-hue) 56% 44% / var(--gradual-border-alpha, 0.16));
  background: hsl(var(--interest-hue) 84% var(--gradual-bg-light, 97%) / var(--gradual-bg-alpha, 0.09));
  color: hsl(var(--interest-hue) 58% var(--gradual-text-light, 36%));
  font-weight: var(--gradual-weight, 620);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.probability-gradual.is-interest-high {
  box-shadow: inset 0 0 0 1px hsl(214 64% 40% / 0.22);
}

.probability-gradual.is-interest-medium {
  box-shadow: inset 0 0 0 1px hsl(214 54% 46% / 0.16);
}

.probability-gradual.is-interest-low {
  opacity: 0.82;
}

.kelly-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: hsl(220 25% 15% / 0.42);
}

.comparison-overlay {
  position: fixed;
  inset: 0;
  z-index: 64;
  background: hsl(220 25% 15% / 0.42);
}

.kelly-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(640px, 100%);
  height: 100vh;
  z-index: 70;
  background: linear-gradient(180deg, hsl(220 20% 99%), hsl(220 18% 97%));
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 30px hsl(220 25% 15% / 0.2);
  transform: translateX(100%);
  opacity: 0.98;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
}

.comparison-modal {
  position: fixed;
  inset: 0;
  z-index: 72;
  display: grid;
  place-items: center;
  padding: 20px;
  overflow: auto;
}

.comparison-panel {
  width: min(980px, 100%);
  max-height: min(88vh, 820px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable both-edges;
  border-radius: 18px;
  border: 1px solid hsl(220 15% 86%);
  background: linear-gradient(180deg, hsl(0 0% 100%), hsl(220 18% 97%));
  box-shadow: 0 28px 56px hsl(220 25% 10% / 0.3);
  padding: 14px;
  display: grid;
  gap: 10px;
}

#comparison-content {
  display: grid;
  gap: 10px;
  padding-inline-end: 14px;
}

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

.comparison-kicker {
  margin: 0 0 3px;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.comparison-head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.comparison-head p {
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.comparison-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--foreground);
  cursor: pointer;
}

.comparison-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.comparison-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.comparison-tab {
  border: 1px solid hsl(220 15% 86%);
  border-radius: 10px;
  background: hsl(0 0% 100% / 0.9);
  color: hsl(220 16% 36%);
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.comparison-tab:hover {
  border-color: hsl(245 45% 45% / 0.35);
  background: hsl(245 48% 96%);
}

.comparison-tab.is-active {
  border-color: hsl(245 45% 45% / 0.52);
  background: hsl(245 56% 93%);
  color: hsl(245 45% 28%);
}

.comparison-window-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.comparison-window-tab {
  border: 1px solid hsl(220 15% 86%);
  border-radius: 10px;
  background: hsl(0 0% 100% / 0.9);
  color: hsl(220 16% 36%);
  padding: 6px 8px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.comparison-window-tab:hover {
  border-color: hsl(245 45% 45% / 0.35);
  background: hsl(245 48% 96%);
}

.comparison-window-tab.is-active {
  border-color: hsl(245 45% 45% / 0.52);
  background: hsl(245 56% 93%);
  color: hsl(245 45% 28%);
}

.comparison-window-hint {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.comparison-view {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: hsl(0 0% 100% / 0.95);
  padding: 10px;
  display: grid;
  gap: 10px;
}

.comparison-view[hidden] {
  display: none !important;
}

.comparison-summary,
.comparison-disclaimer {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.8rem;
  line-height: 1.45;
}

.comparison-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.comparison-category {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 10px;
  background: hsl(220 20% 99%);
  overflow: hidden;
}

.comparison-category-head,
.comparison-category-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  background: hsl(220 18% 96%);
}

.comparison-category-summary {
  cursor: pointer;
  list-style: none;
}

.comparison-category-summary::-webkit-details-marker {
  display: none;
}

.comparison-category-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
}

.comparison-category-count {
  color: var(--muted-foreground);
  font-size: 0.72rem;
  font-weight: 600;
}

.comparison-category-body {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.comparison-metrics .comparison-category-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.comparison-metric {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 10px;
  background: hsl(220 20% 99%);
  padding: 8px;
  display: grid;
  gap: 5px;
}

.comparison-metric-head {
  display: block;
}

.comparison-metric-label {
  display: block;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}

.comparison-metric-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.comparison-metric-value {
  font-size: 0.76rem;
  color: var(--muted-foreground);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.comparison-metric-value.is-home {
  text-align: left;
}

.comparison-metric-value.is-away {
  text-align: right;
}

.comparison-balance {
  display: flex;
  height: 12px;
  border-radius: 999px;
  background: hsl(220 16% 93%);
  overflow: hidden;
}

.comparison-balance-fill {
  display: block;
  height: 100%;
  flex: 0 0 auto;
}

.comparison-balance-fill.is-home {
  background: linear-gradient(90deg, hsl(208 72% 52%), hsl(208 78% 62%));
  border-right: 1px solid hsl(0 0% 100% / 0.7);
}

.comparison-balance-fill.is-away {
  background: linear-gradient(90deg, hsl(18 80% 62%), hsl(18 82% 52%));
}

.comparison-metric-foot {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 0.74rem;
}

.comparison-team-title {
  margin: 0;
}

.comparison-team-title {
  font-size: 0.9rem;
}

.comparison-team-windows {
  display: grid;
  gap: 8px;
}

.comparison-team-advanced {
  display: grid;
  gap: 8px;
}

.comparison-team-windows .comparison-category-body,
.comparison-team-advanced .comparison-category-body {
  grid-template-columns: 1fr;
}

.comparison-window-card {
  border: 1px solid hsl(220 15% 89%);
  border-radius: 10px;
  background: hsl(0 0% 100%);
  padding: 8px;
  display: grid;
  gap: 6px;
}

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

.comparison-window-head h4 {
  margin: 0;
  font-size: 0.82rem;
}

.comparison-window-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.comparison-window-cell {
  border: 1px solid hsl(220 15% 90%);
  border-radius: 8px;
  background: hsl(220 14% 97%);
  padding: 6px;
  display: grid;
  gap: 2px;
}

.comparison-window-cell small {
  color: var(--muted-foreground);
  font-size: 0.7rem;
}

.comparison-window-cell strong {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.8rem;
}

.kelly-drawer.is-open {
  transform: none;
  opacity: 1;
}

.kelly-drawer.is-simulation-kelly .kelly-kicker,
.kelly-drawer.is-simulation-kelly #kelly-subtitle,
.kelly-drawer.is-simulation-kelly .kelly-summary,
.kelly-drawer.is-simulation-kelly .kelly-market-section {
  display: none;
}

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

.kelly-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kelly-kicker {
  margin: 0 0 3px;
  color: var(--muted-foreground);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kelly-head h2 {
  margin: 0;
  font-size: 1.06rem;
}

.kelly-share-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: hsl(245 45% 35%);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.kelly-share-link-btn:hover,
.kelly-share-link-btn:focus-visible {
  border-color: hsl(245 55% 64%);
  background: hsl(245 70% 98%);
  transform: translateY(-1px);
}

.kelly-share-link-btn:focus-visible {
  outline: 2px solid hsl(245 58% 47% / 0.25);
  outline-offset: 2px;
}

.kelly-share-link-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.kelly-head p {
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.kelly-share-feedback {
  min-height: 1.1em;
}

.kelly-close {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--foreground);
  cursor: pointer;
}

.kelly-summary,
.kelly-market-section,
.kelly-calc,
.kelly-results {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: hsl(0 0% 100% / 0.96);
  padding: 10px;
  box-shadow: var(--shadow-sm);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.summary-date {
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.kelly-selection-spotlight {
  display: grid;
  gap: 10px;
  border: 1px solid hsl(40 64% 84%);
  border-radius: 14px;
  background:
    radial-gradient(260px 100px at 100% 0, hsl(41 100% 92% / 0.54), transparent 72%),
    linear-gradient(180deg, hsl(46 100% 98%), hsl(0 0% 100%));
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}

.kelly-selection-spotlight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.kelly-selection-spotlight-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.kelly-selection-spotlight-kicker {
  margin: 0;
  color: hsl(28 58% 34%);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kelly-selection-spotlight-total {
  font-size: 0.74rem;
}

.kelly-selection-spotlight-copy strong {
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 0.96rem;
}

.kelly-selection-spotlight-copy span {
  color: var(--muted-foreground);
  font-size: 0.82rem;
}

.kelly-community-top {
  display: grid;
  gap: 8px;
}

.kelly-community-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid hsl(220 15% 88%);
  border-radius: 12px;
  background: hsl(0 0% 100% / 0.92);
  padding: 8px 10px;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.kelly-community-row:hover {
  border-color: hsl(35 78% 62%);
  background: hsl(46 100% 97%);
}

.kelly-community-row.is-active {
  border-color: hsl(35 78% 62%);
  box-shadow: 0 0 0 1px hsl(35 78% 62% / 0.18);
}

.kelly-community-row.is-liked {
  border-color: hsl(352 52% 78%);
  background: hsl(352 100% 98%);
}

.kelly-community-row-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.kelly-community-row-main strong {
  font-size: 0.87rem;
  line-height: 1.25;
}

.kelly-community-row-main span {
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.kelly-community-row-side {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  justify-items: end;
}

.kelly-community-row-likes {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: hsl(40 100% 93%);
  color: hsl(28 72% 28%);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.kelly-community-row-tag {
  color: hsl(352 68% 36%);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.match-community-likes,
.simu-event-group-likes {
  white-space: nowrap;
  border-radius: 999px;
  background: hsl(14 100% 95%);
  color: hsl(12 62% 34%);
  border: 1px solid hsl(14 72% 84%);
  font-size: 0.72rem;
  font-weight: 700;
}

.match-community-likes {
  padding: 4px 8px;
}

.simu-event-group-head-main {
  min-width: 0;
}

.simu-event-group-likes {
  padding: 3px 7px;
}

.drawer-hint {
  margin: 0 0 8px;
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

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

.drawer-filter-label {
  color: var(--muted-foreground);
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.drawer-filter-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.drawer-hint-scale {
  margin-top: -3px;
  font-size: 0.74rem;
}

.drawer-history {
  display: grid;
  gap: 8px;
}

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

.drawer-history-team {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 10px;
  background: hsl(220 20% 99%);
  padding: 8px;
}

.drawer-history-team-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 7px;
}

.drawer-history-team-head h4 {
  margin: 0;
  font-size: 0.82rem;
  color: hsl(245 45% 32%);
}

.drawer-history-filter {
  display: grid;
  gap: 3px;
  color: var(--muted-foreground);
  font-size: 0.73rem;
}

.drawer-history-filter select {
  min-width: 116px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--foreground);
  padding: 5px 7px;
  font-size: 0.76rem;
}

.drawer-history-table-wrap {
  border: 1px solid hsl(220 15% 90%);
  border-radius: 8px;
  background: #fff;
}

.drawer-history-table th,
.drawer-history-table td {
  padding: 6px 7px;
  font-size: 0.76rem;
}

.drawer-reliability-badge {
  white-space: nowrap;
}

.drawer-reliability-badge.is-high {
  background: hsl(140 72% 93%);
  color: hsl(142 62% 25%);
}

.drawer-reliability-badge.is-medium {
  background: hsl(47 100% 90%);
  color: hsl(36 72% 33%);
}

.drawer-reliability-badge.is-low {
  background: hsl(4 82% 93%);
  color: hsl(358 62% 38%);
}

.drawer-explainability-targets {
  display: grid;
  gap: 8px;
}

.drawer-explain-target {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 10px;
  background: hsl(220 20% 99%);
  padding: 8px;
}

.drawer-explain-target-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.drawer-explain-target-head h4 {
  margin: 0;
  font-size: 0.85rem;
}

.drawer-explain-target-lambda {
  color: var(--muted-foreground);
  font-size: 0.76rem;
}

.drawer-explain-target-summary {
  margin: 6px 0;
  color: var(--muted-foreground);
  font-size: 0.78rem;
}

.drawer-explain-reasons {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.drawer-explain-reason {
  border: 1px solid hsl(220 15% 89%);
  border-radius: 8px;
  background: #fff;
  padding: 7px;
}

.drawer-explain-reason-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 4px;
}

.drawer-explain-reason-head strong {
  font-size: 0.8rem;
}

.drawer-explain-impact {
  display: inline-flex;
  align-items: center;
  border: 1px solid hsl(220 15% 80%);
  border-radius: 999px;
  padding: 2px 8px;
  background: hsl(220 20% 97%);
  color: hsl(220 20% 35%);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.drawer-explain-impact.is-up {
  border-color: hsl(208 50% 74%);
  background: hsl(208 70% 95%);
  color: hsl(208 58% 33%);
}

.drawer-explain-impact.is-down {
  border-color: hsl(34 50% 74%);
  background: hsl(37 90% 94%);
  color: hsl(32 55% 34%);
}

.drawer-explain-proof,
.drawer-explain-implication,
.drawer-explain-decision {
  margin: 0;
  font-size: 0.76rem;
}

.drawer-explain-proof {
  color: var(--foreground);
}

.drawer-explain-implication,
.drawer-explain-decision {
  color: var(--muted-foreground);
}

.drawer-explainability-disclaimer {
  margin: 8px 0 0;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.drawer-state {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.drawer-error {
  color: var(--danger);
}

.drawer-groups {
  display: grid;
  gap: 8px;
  max-height: clamp(220px, 42vh, 440px);
  overflow: auto;
  scrollbar-gutter: stable both-edges;
  padding-right: 10px;
}

.drawer-group {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 11px;
  background: hsl(220 20% 99%);
  overflow: hidden;
}

.drawer-group-head {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.84rem;
  color: hsl(245 45% 35%);
  padding: 8px 10px;
  background: hsl(245 40% 94%);
}

.drawer-group-head::-webkit-details-marker {
  display: none;
}

.drawer-table-wrap {
  overflow-x: hidden;
  border: 0;
  border-radius: 0;
}

.drawer-table {
  min-width: 100%;
}

.drawer-table th,
.drawer-table td {
  padding: 7px 8px;
  font-size: 0.77rem;
  vertical-align: top;
  white-space: normal;
  line-height: 1.2;
}

.drawer-head-short {
  display: none;
}

.drawer-sort-label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.drawer-market-table {
  width: 100%;
  table-layout: fixed;
}

.drawer-market-table th {
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.drawer-market-table th:nth-child(1),
.drawer-market-table td:nth-child(1) {
  width: 34%;
}

.drawer-market-table th:nth-child(2),
.drawer-market-table td:nth-child(2) {
  width: 16%;
  text-align: center;
}

.drawer-market-table th:nth-child(3),
.drawer-market-table td:nth-child(3) {
  width: 14%;
  text-align: center;
}

.drawer-market-table th:nth-child(4),
.drawer-market-table td:nth-child(4) {
  width: 16%;
  text-align: center;
}

.drawer-market-table.has-action-column th:nth-child(1),
.drawer-market-table.has-action-column td:nth-child(1) {
  width: 31%;
}

.drawer-market-table.has-action-column th:nth-child(2),
.drawer-market-table.has-action-column td:nth-child(2) {
  width: 15%;
}

.drawer-market-table.has-action-column th:nth-child(3),
.drawer-market-table.has-action-column td:nth-child(3) {
  width: 13%;
}

.drawer-market-table.has-action-column th:nth-child(4),
.drawer-market-table.has-action-column td:nth-child(4) {
  width: 16%;
}

.drawer-market-table.has-action-column th:nth-child(5),
.drawer-market-table.has-action-column td:nth-child(5) {
  width: 25%;
}

.drawer-table-sort-head .sort-link:focus-visible {
  outline: 2px solid hsl(245 58% 47% / 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}

.drawer-table-sort-head .sort-link {
  min-width: 0;
  flex-wrap: wrap;
  gap: 3px;
}

.drawer-table td small {
  color: var(--muted-foreground);
}

.drawer-event-copy {
  display: grid;
  gap: 2px;
}

.drawer-event-cell .drawer-event-title-desktop,
.drawer-event-cell .drawer-event-subtitle-desktop {
  display: block;
}

.drawer-event-cell .drawer-event-subtitle-desktop {
  margin-top: 2px;
}

.drawer-event-cell .drawer-event-title-mobile {
  display: none;
}

.drawer-table-action-cell {
  width: auto;
  white-space: normal;
}

.drawer-table-actions {
  display: grid;
  gap: 6px;
}

.drawer-table-action-btn {
  width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  padding: 6px 7px;
  font-size: 0.74rem;
}

.drawer-table tbody tr.js-kelly-bet-row {
  cursor: pointer;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.drawer-table tbody tr.js-kelly-bet-row:hover {
  background: hsl(245 52% 96%);
}

.drawer-table tbody tr.js-kelly-bet-row:focus-visible {
  outline: 2px solid hsl(245 58% 47% / 0.45);
  outline-offset: -2px;
}

.drawer-table tbody tr.js-kelly-bet-row.is-selected {
  background: hsl(245 52% 92%);
  box-shadow: inset 3px 0 0 hsl(245 58% 47%);
}

.drawer-table tbody tr.js-kelly-bet-row.is-selected td {
  background: hsl(245 58% 95%);
}

@media (max-width: 1100px) {
  .drawer-history-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .drawer-market-table th,
  .drawer-market-table td {
    padding: 6px 5px;
  }

  .drawer-market-table th {
    font-size: 0.68rem;
    letter-spacing: 0.02em;
  }

  .drawer-head-full {
    display: none;
  }

  .drawer-head-short {
    display: inline;
  }

  .drawer-market-table.has-action-column th:nth-child(1),
  .drawer-market-table.has-action-column td:nth-child(1) {
    width: 30%;
  }

  .drawer-market-table.has-action-column th:nth-child(2),
  .drawer-market-table.has-action-column td:nth-child(2) {
    width: 14%;
  }

  .drawer-market-table.has-action-column th:nth-child(3),
  .drawer-market-table.has-action-column td:nth-child(3) {
    width: 14%;
  }

  .drawer-market-table.has-action-column th:nth-child(4),
  .drawer-market-table.has-action-column td:nth-child(4) {
    width: 15%;
  }

  .drawer-market-table.has-action-column th:nth-child(5),
  .drawer-market-table.has-action-column td:nth-child(5) {
    width: 27%;
  }

  .drawer-table-action-btn {
    font-size: 0.7rem;
    padding: 6px 5px;
  }
}

@media (max-width: 440px) {
  .drawer-table-wrap {
    overflow: visible;
  }

  .drawer-market-table,
  .drawer-market-table thead,
  .drawer-market-table tbody,
  .drawer-market-table tr,
  .drawer-market-table th,
  .drawer-market-table td {
    display: block;
    width: auto !important;
  }

  .drawer-market-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }

  .drawer-market-table tbody {
    display: grid;
    gap: 8px;
  }

  .drawer-market-table tbody tr.js-kelly-bet-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid hsl(220 15% 88%);
    border-radius: 12px;
    background: hsl(0 0% 100% / 0.98);
  }

  .drawer-table tbody tr.js-kelly-bet-row:hover {
    background: hsl(245 52% 96%);
  }

  .drawer-table tbody tr.js-kelly-bet-row.is-selected {
    background: hsl(245 52% 92%);
    box-shadow: inset 3px 0 0 hsl(245 58% 47%);
  }

  .drawer-market-table tbody tr.js-kelly-bet-row td {
    padding: 0;
    border: 0;
    min-width: 0;
  }

  .drawer-event-cell {
    grid-column: 1 / -1;
  }

  .drawer-event-cell::before {
    content: none;
  }

  .drawer-event-cell .drawer-event-title-desktop,
  .drawer-event-cell .drawer-event-title-mobile {
    font-size: 0.84rem;
    line-height: 1.25;
  }

  .drawer-event-cell .drawer-event-subtitle-desktop {
    font-size: 0.73rem;
    line-height: 1.25;
  }

  .drawer-event-cell .drawer-event-title-desktop,
  .drawer-event-cell .drawer-event-subtitle-desktop {
    display: none;
  }

  .drawer-event-cell .drawer-event-title-mobile {
    display: block;
    font-size: 0.82rem;
    line-height: 1.3;
  }

  .drawer-metric-cell,
  .drawer-table-action-cell {
    display: grid;
    gap: 3px;
    align-content: start;
  }

  .drawer-metric-cell::before,
  .drawer-table-action-cell::before {
    content: attr(data-label);
    display: block;
    color: var(--muted-foreground);
    font-size: 0.61rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .drawer-table-action-cell::before {
    text-align: center;
  }

  .drawer-table-action-cell {
    grid-column: 1 / -1;
    padding-top: 2px;
  }

  .drawer-table-actions {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  }

  .drawer-table-action-btn {
    min-height: 40px;
    padding: 7px 10px;
    font-size: 0.72rem;
  }
}

.kelly-mobile-calc-widget,
.kelly-mobile-calc-backdrop,
.kelly-calc-mobile-head {
  display: none;
}

.kelly-calc-title {
  margin: 0 0 8px;
}

.kelly-calc .kelly-results {
  margin-top: 8px;
}

.calculator-card {
  border: 1px solid hsl(220 15% 88%);
  border-radius: 11px;
  background: hsl(220 20% 99%);
  padding: 0 10px 10px;
}

.calculator-card + .calculator-card {
  margin-top: 8px;
}

.calculator-card-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  font-weight: 600;
  color: hsl(245 45% 32%);
}

.calculator-card-summary::-webkit-details-marker {
  display: none;
}

.calculator-card-title {
  min-width: 0;
}

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

.calculator-card-indicator {
  color: var(--muted-foreground);
  font-size: 1rem;
  line-height: 1;
  display: inline-block;
  width: 1ch;
  text-align: center;
}

.calculator-card[open] .calculator-card-indicator::before {
  content: "-";
  font-size: 1rem;
  line-height: 1;
}

.calculator-card[open] .calculator-card-indicator {
  font-size: 0;
}

.calculator-help-wrap {
  position: relative;
  display: inline-flex;
}

.calculator-help-trigger {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid hsl(220 12% 70%);
  background: hsl(220 12% 96%);
  color: hsl(220 10% 46%);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.calculator-help-trigger:hover,
.calculator-help-trigger:focus-visible {
  border-color: hsl(220 12% 52%);
  color: hsl(220 12% 36%);
  outline: none;
}

.calculator-help-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, 78vw);
  z-index: 3;
  border: 1px solid hsl(220 15% 84%);
  border-radius: 10px;
  background: hsl(0 0% 100%);
  color: hsl(220 16% 28%);
  font-size: 0.76rem;
  line-height: 1.4;
  padding: 8px 9px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
  pointer-events: none;
}

.calculator-help-wrap:hover .calculator-help-popover,
.calculator-help-wrap:focus-within .calculator-help-popover,
.calculator-help-wrap.is-open .calculator-help-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.kelly-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.kelly-form label {
  display: grid;
  gap: 4px;
  color: var(--muted-foreground);
  font-size: 0.79rem;
}

.kelly-form input {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px;
  background: #fff;
}

.kelly-form button {
  grid-column: span 2;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  border-radius: 9px;
  padding: 8px;
  font-weight: 600;
  cursor: pointer;
}

.kelly-results ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.kelly-results li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid hsl(220 15% 92%);
  padding-bottom: 6px;
}

.kelly-results li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kelly-results span {
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.kelly-results strong {
  font-family: "Space Grotesk", system-ui, sans-serif;
}

.kelly-note {
  margin: 8px 0 0;
  color: hsl(220 18% 34%);
  font-size: 0.84rem;
}

.scroll-top-btn {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 18px);
  z-index: 80;
  width: 46px;
  height: 46px;
  border: 1px solid hsl(245 45% 45% / 0.35);
  border-radius: 999px;
  background: var(--primary);
  color: hsl(0 0% 100%);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, background 140ms ease;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.scroll-top-btn:hover {
  background: var(--primary-hover);
}

.scroll-top-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px hsl(245 45% 45% / 0.2), var(--shadow-lg);
}

.scroll-top-btn span {
  font-size: 1.2rem;
  line-height: 1;
}

@media (max-width: 1120px) {
  .match-grid {
    grid-template-columns: 1fr;
  }

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

  .simu-layout {
    grid-template-columns: 1fr;
  }

  .simu-side {
    position: static;
  }

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

@media (max-width: 980px) {
  .market-table-wrap,
  .ranked-markets-table-wrap {
    display: none;
  }

  .market-mobile-list,
  .ranked-markets-mobile-list {
    display: grid;
    gap: 12px;
  }
}

@media (max-width: 780px) {
  .kelly-drawer {
    height: 100dvh;
  }

  .drawer-groups {
    max-height: clamp(180px, calc(100dvh - 320px), 72dvh);
  }

  .kelly-mobile-calc-widget {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 74;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid hsl(245 50% 34% / 0.7);
    border-radius: 14px;
    background: linear-gradient(135deg, hsl(245 52% 44%), hsl(219 58% 42%));
    color: hsl(0 0% 100%);
    box-shadow: 0 12px 28px hsl(220 25% 15% / 0.28);
    padding: 10px 15px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
  }

  .kelly-mobile-calc-widget:hover,
  .kelly-mobile-calc-widget:focus-visible {
    border-color: hsl(245 56% 26%);
    outline: none;
  }

  .kelly-mobile-calc-backdrop {
    position: fixed;
    inset: 0;
    z-index: 74;
    background: hsl(220 25% 15% / 0.4);
  }

  .kelly-calc {
    display: none;
  }

  .kelly-drawer.is-mobile-calc-open {
    overflow: hidden;
  }

  .kelly-drawer.is-mobile-calc-open .kelly-mobile-calc-widget {
    opacity: 0;
    pointer-events: none;
    transform: translateY(7px);
  }

  .kelly-drawer.is-mobile-calc-open .kelly-calc {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 75;
    display: block;
    height: auto;
    max-height: min(84dvh, 760px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
  }

  .kelly-drawer.is-mobile-calc-open .kelly-calc-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 2;
    margin: -10px -10px 14px;
    padding: 10px;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    border-bottom: 1px solid var(--border);
    background: hsl(0 0% 100% / 0.98);
  }

  .kelly-drawer.is-mobile-calc-open .kelly-calc-mobile-head h3 {
    margin: 0;
    font-size: 0.96rem;
  }

  .kelly-calc-mobile-close {
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--foreground);
    padding: 6px 9px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
  }

  .kelly-drawer.is-mobile-calc-open .kelly-calc-title {
    display: none;
  }

  .kelly-drawer.is-mobile-calc-open .kelly-calc .calculator-card:first-of-type {
    margin-top: 0;
  }

  .app-shell {
    padding: 12px;
  }

  .topbar {
    margin: 0 -12px 14px;
    padding: 0 12px;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    gap: 10px;
    padding: 10px 0;
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .nav-tabs {
    width: 100%;
    overflow-x: visible;
    flex-wrap: wrap;
    margin-left: 0;
    gap: 8px;
  }

  .nav-user-pill {
    flex: 1 1 auto;
    max-width: none;
    min-height: 38px;
    justify-content: center;
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  .nav-tab {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    padding: 7px 10px;
    font-size: 0.84rem;
    line-height: 1.25;
    min-height: 38px;
  }

  .nav-logout-form {
    flex: 1 1 auto;
  }

  .nav-tab-button {
    width: 100%;
    justify-content: center;
  }

  .account-modal {
    padding: 8px;
    align-items: flex-start;
  }

  .account-modal-panel {
    width: 100%;
    max-height: none;
    height: auto;
    overflow: visible;
    border-radius: 16px;
    padding: 12px;
  }

  .event-picker-select {
    min-height: 160px;
  }

  .account-modal-grid,
  .account-kelly-grid {
    grid-template-columns: 1fr;
  }

  .account-modal-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .page-header {
    padding: 6px 0 4px;
  }

  .filters-actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .community-card {
    gap: 7px;
    padding: 9px 10px;
    border-radius: 11px;
  }

  .community-topline .badge {
    font-size: 0.7rem;
    padding: 4px 7px;
  }

  .community-kickoff {
    font-size: 0.74rem;
  }

  .community-match-title {
    font-size: 0.84rem;
  }

  .community-selection-market {
    font-size: 0.7rem;
  }

  .community-selection-pick {
    font-size: 0.8rem;
  }

  .community-selection-row {
    gap: 8px;
    align-items: flex-start;
  }

  .community-card-actions .btn {
    min-height: 29px;
    padding: 4px 8px;
    font-size: 0.74rem;
  }

  .community-card-actions {
    justify-content: flex-start;
  }

  .community-card-actions .btn-primary {
    flex: 1 1 auto;
  }

  .kelly-selection-spotlight {
    padding: 10px 11px;
  }

  .kelly-community-row {
    padding: 7px 8px;
    gap: 8px;
  }

  .kelly-community-row-main strong {
    font-size: 0.82rem;
  }

  .kelly-community-row-main span {
    font-size: 0.74rem;
  }

  .kelly-community-row-side {
    justify-items: start;
  }

  .simu-filters .filters-quick-grid {
    grid-template-columns: 1fr;
  }

  .event-picker-list-teams {
    grid-template-columns: 1fr;
  }

  .simu-layout {
    padding-bottom: 88px;
  }

  .simu-mobile-widget {
    position: fixed;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 42;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 170px;
    max-width: min(88vw, 320px);
    border: 1px solid hsl(245 44% 44% / 0.42);
    border-radius: 16px;
    background: hsl(0 0% 100% / 0.98);
    color: var(--foreground);
    box-shadow: 0 10px 24px hsl(220 25% 15% / 0.18);
    text-align: left;
    padding: 9px 11px;
    cursor: pointer;
    transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease;
  }

  .simu-mobile-widget-count {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid hsl(245 44% 44% / 0.35);
    background: hsl(245 62% 94%);
    color: hsl(245 58% 30%);
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .simu-mobile-widget-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
  }

  .simu-mobile-widget-copy strong {
    font-size: 0.82rem;
    line-height: 1.2;
  }

  .simu-mobile-widget-copy small {
    color: var(--muted-foreground);
    font-size: 0.74rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .simu-mobile-widget.is-warning {
    border-color: hsl(12 70% 55% / 0.5);
    background: hsl(12 92% 97%);
  }

  .simu-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    background: hsl(220 25% 15% / 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .simu-side {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    top: auto;
    z-index: 41;
    max-height: min(76vh, 620px);
    overflow-y: auto;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    transform: translateY(calc(100% + 16px));
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .simu-side-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .js-simu-page.is-simu-mobile-panel-open .simu-mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .js-simu-page.is-simu-mobile-panel-open .simu-side {
    transform: translateY(0);
  }

  .js-simu-page.is-simu-mobile-panel-open .simu-mobile-widget {
    opacity: 0;
    pointer-events: none;
    transform: translateY(7px);
  }

  .favorites-filter-wrap {
    width: 100%;
  }

  .favorites-filter-wrap .js-favorites-toggle {
    width: 100%;
  }

  .favorites-filter-tooltip {
    width: min(100%, 420px);
  }

  .event-metrics,
  .market-mobile-metrics {
    grid-template-columns: 1fr;
  }

  .one-x2-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .one-x2-cell {
    padding: 7px;
  }

  .home-cta-grid {
    grid-template-columns: 1fr;
  }

  .home-stack {
    gap: 24px;
  }

  .content > .home-stack:first-child,
  .content > .flash-stack + .home-stack {
    margin-top: 4px;
  }

  .home-hero {
    gap: 10px;
    padding-top: 0;
  }

  .home-section {
    gap: 12px;
  }

  .home-panel-actions {
    margin-top: 6px;
  }

  .system-summary-grid,
  .system-activity-grid,
  .system-check-grid,
  .system-substats,
  .system-inline-stats {
    grid-template-columns: 1fr;
  }

  .btn-values-toggle {
    max-width: none;
    white-space: normal;
  }

  .match-foot {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
  }

  .match-foot .btn {
    min-height: 36px;
    font-size: 0.76rem;
    padding: 7px 8px;
  }

  .match-foot .match-favorite-form {
    display: flex;
    align-self: center;
  }

  .match-foot .match-favorite-form .favorite-btn {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 12px;
  }

  .comparison-modal {
    padding: 0;
    align-items: flex-end;
  }

  .comparison-panel {
    width: 100%;
    max-height: min(93vh, 860px);
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
    padding: 10px;
  }

  .comparison-tabs {
    gap: 6px;
  }

  .comparison-tab {
    padding: 7px 6px;
    font-size: 0.72rem;
  }

  .comparison-window-tabs {
    display: flex;
    overflow-x: auto;
    grid-template-columns: none;
    gap: 6px;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  #comparison-content {
    gap: 10px;
    padding-inline-end: 10px;
  }

  .comparison-window-tab {
    flex: 0 0 auto;
    min-width: 86px;
    white-space: nowrap;
    padding: 6px 6px;
    font-size: 0.72rem;
  }

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

  .comparison-metric-head {
    display: block;
  }

  .comparison-metric-label {
    text-align: left;
  }

  .comparison-metric-values {
    gap: 10px;
  }

  .comparison-metric-value.is-away {
    text-align: right;
  }

  .comparison-metrics .comparison-category-body {
    grid-template-columns: 1fr;
  }

  .comparison-metric-foot-item.is-share {
    display: none;
  }

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

  .market-mobile-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .kelly-form {
    grid-template-columns: 1fr;
  }

  .kelly-form button {
    grid-column: auto;
  }

  .app-footer-inner {
    align-items: flex-start;
    gap: 8px;
  }

  .app-footer-meta {
    gap: 8px;
  }

  .auth-card {
    padding: 14px;
  }

  .simu-event-btn {
    flex-direction: column;
    align-items: flex-start;
  }

  .simu-event-stats {
    text-align: left;
  }

.simu-selection-group-head {
  flex-direction: column;
  gap: 4px;
}

.simu-selection-group-actions {
  display: flex;
  width: 100%;
  padding-right: 4px;
}

.simu-selection-group-metrics {
  max-width: none;
  text-align: left;
}

.simu-selection-match-link {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .faq-responsible-row {
    flex-direction: column;
  }

  .market-mobile-card.ranked-mobile-row {
    flex-direction: row;
    gap: 8px;
  }

  .ranked-mobile-side {
    display: grid;
    gap: 6px;
    align-content: start;
    justify-items: end;
  }

  .ranked-mobile-side .bet-like-btn {
    width: 100%;
  }

  #ranked-markets-filters .event-picker-head {
    justify-content: center;
  }

  #ranked-markets-filters .event-picker-reset,
  #ranked-markets-filters .filters-actions-row > a.btn-ghost {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .app-footer-inner {
    flex-wrap: wrap;
  }

  .app-footer-meta {
    margin-left: auto;
  }
}

@media (max-width: 440px) {
  .comparison-window-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .js .content,
  .js.is-page-exiting .content,
  .js.is-page-ready .content {
    opacity: 1 !important;
    transform: none !important;
  }
}
