: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);
}

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

.account-modal-overlay[hidden],
.account-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;
}

.account-modal-panel {
  width: min(1080px, 100%);
  max-height: min(90vh, 760px);
  overflow: auto;
  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);
}

.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;
}

.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);
}

.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);
}

.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;
}

.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-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-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: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

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

.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-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-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-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 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-side {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 10px;
}

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

.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: auto;
  padding-right: 2px;
}

.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-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;
}

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

.auth-card {
  width: min(520px, 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;
}

.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%);
}

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

.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 {
  margin: 0;
  padding: 0 0 11px;
  color: var(--muted-foreground);
  font-size: 0.87rem;
  line-height: 1.5;
}

.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-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;
}

.kelly-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  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;
}

.kelly-drawer.is-open {
  transform: translateX(0);
  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-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-head p {
  margin: 5px 0 0;
  color: var(--muted-foreground);
  font-size: 0.84rem;
}

.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;
}

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

.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: 260px;
  overflow: auto;
  padding-right: 2px;
}

.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 {
  border: 0;
  border-radius: 0;
}

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

.drawer-table th,
.drawer-table td {
  padding: 8px 9px;
  font-size: 0.8rem;
}

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

.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%);
}

.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 {
    display: none;
  }

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

@media (max-width: 780px) {
  .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: stretch;
  }

  .account-modal-panel {
    width: 100%;
    max-height: none;
    height: calc(100vh - 16px);
    border-radius: 16px;
    padding: 12px;
  }

  .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;
  }

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

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

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

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

  .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;
  }

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

  .match-foot,
  .market-mobile-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .match-favorite-form {
    margin-left: 0;
    align-self: flex-end;
  }

  .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-metrics {
    max-width: none;
    text-align: left;
  }

  .faq-responsible-row {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .app-footer-inner {
    flex-wrap: wrap;
  }

  .app-footer-meta {
    margin-left: auto;
  }
}

@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;
  }
}
