:root {
  color-scheme: light;
  --bg: #edf2f7;
  --panel: #ffffff;
  --text: #172033;
  --muted: #536176;
  --line: #c9d4e2;
  --accent: #0f6380;
  --accent-strong: #073d54;
  --good: #147a4b;
  --bad: #b42318;
  --warn-bg: #fff6db;
  --warn-text: #755900;
  --gold: #b7791f;
  --silver: #64748b;
  --bronze: #9a5a2e;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.landing-page {
  background:
    radial-gradient(circle at 16% 8%, rgba(15, 99, 128, 0.22), transparent 28%),
    radial-gradient(circle at 86% 2%, rgba(7, 61, 84, 0.1), transparent 25%),
    linear-gradient(180deg, #dfeaf1 0%, #f5f8fb 43%, #e4edf4 100%);
}

.landing-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 42px;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  max-width: 720px;
  background: linear-gradient(90deg, #031326 0%, #073d54 46%, #0f7c79 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 900;
  line-height: 0.95;
  text-decoration: none;
  filter: drop-shadow(0 14px 24px rgba(7, 61, 84, 0.22));
}

.analyzer-brand {
  width: fit-content;
  max-width: 100%;
  font-size: clamp(28px, 3vw, 42px);
}

.landing-nav-actions,
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.landing-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #073d54;
  border-radius: 6px;
  background: #073d54;
  color: #fff;
  font-weight: 850;
  text-decoration: none;
  box-shadow: 0 13px 26px rgba(7, 61, 84, 0.26);
}

.landing-primary:hover {
  background: #032d40;
}

.landing-page .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #c8d8e5;
  border-radius: 6px;
  background: #ffffff;
  color: var(--accent);
  font-weight: 850;
  text-decoration: none;
}

.landing-page .secondary-button:hover {
  border-color: var(--accent);
  background: #eef7fa;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 34px;
  align-items: center;
  min-height: min(620px, calc(100vh - 86px));
  padding: 34px 0 36px;
}

.landing-copy {
  display: grid;
  gap: 18px;
}

.landing-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.landing-copy h1 {
  max-width: 720px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 0.98;
  letter-spacing: 0;
  color: #07172f;
}

.landing-lead {
  max-width: 660px;
  color: #334155;
  font-size: 18px;
  line-height: 1.55;
}

.landing-preview {
  overflow: hidden;
  border: 1px solid #9db5c9;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(7, 61, 84, 0.22);
}

.preview-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #eef5f8;
}

.preview-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d2dce7;
}

.preview-topbar strong {
  margin-left: 8px;
  color: #526174;
  font-size: 13px;
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
}

.preview-stats article {
  padding: 12px;
  border: 1px solid #d2deea;
  border-radius: 6px;
  background: #ffffff;
}

.preview-stats span,
.preview-row span {
  color: var(--muted);
  font-size: 12px;
}

.preview-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.preview-table {
  display: grid;
  padding: 0 16px 18px;
}

.preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 74px;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border-bottom: 1px solid #dce6ef;
}

.preview-row.head {
  min-height: 36px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-row.hot {
  background: linear-gradient(90deg, rgba(225, 246, 235, 0.7), rgba(255, 255, 255, 0));
}

.preview-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-row b {
  color: var(--good);
  text-align: right;
}

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

.landing-grid article,
.landing-flow {
  border: 1px solid #c5d4e2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.landing-grid article {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.feature-index {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.landing-grid h2,
.landing-flow h2 {
  font-size: 20px;
}

.landing-grid p {
  color: #566478;
  line-height: 1.45;
}

.landing-stat-cards,
.example-card-grid {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.landing-stat-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-stat-cards article,
.real-example-section,
.example-card-grid article,
.what-we-analyze,
.landing-faq {
  border: 1px solid #aec5d7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 16px 42px rgba(7, 61, 84, 0.11);
}

.landing-stat-cards article {
  padding: 22px;
  border-top: 4px solid rgba(15, 99, 128, 0.78);
}

.landing-stat-cards span {
  color: #43536a;
  font-size: 13px;
  font-weight: 800;
}

.landing-stat-cards strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
  color: #06152a;
}

.section-heading {
  display: grid;
  gap: 6px;
}

.section-heading h2 {
  font-size: 28px;
  color: #07172f;
}

.real-example-section,
.what-we-analyze,
.landing-faq {
  display: grid;
  gap: 18px;
  margin-top: 14px;
  padding: 24px;
}

.example-card-grid article {
  align-content: start;
  min-height: 0;
}

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

.example-stats div {
  padding: 12px;
  border: 1px solid #cfdae6;
  border-radius: 6px;
  background: #ffffff;
}

.example-stats dt {
  color: #4c5c72;
  font-size: 12px;
  font-weight: 800;
}

.example-stats dd {
  margin: 5px 0 0;
  font-size: 22px;
  font-weight: 900;
}

.example-card-grid p,
.landing-faq p {
  color: #3f4f64;
  line-height: 1.45;
}

.positive-text {
  color: #0b6f45;
  font-weight: 900;
}

.example-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.example-card-grid article {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
  border-color: rgba(15, 99, 128, 0.42);
  background: linear-gradient(180deg, #f1f9fc, #ffffff);
}

.example-card-grid h3 {
  margin: 0;
  font-size: 24px;
}

.analysis-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.analysis-chip-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d7e2ec;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-weight: 800;
}

.analysis-roi-table {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #aec5d7;
  border-radius: 8px;
  background: #ffffff;
}

.analysis-roi-table article {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 16px;
  border-right: 1px solid #cfdae6;
  background: linear-gradient(180deg, #ffffff, #eef7fa);
}

.analysis-roi-table article:last-child {
  border-right: 0;
}

.analysis-roi-table span {
  color: #172033;
  font-size: 14px;
  font-weight: 900;
}

.analysis-roi-table strong {
  color: #0f6380;
  font-size: 18px;
  line-height: 1.15;
}

.landing-faq details {
  padding: 14px 0;
  border-top: 1px solid #cfdae6;
}

.landing-faq summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 900;
}

.landing-faq .section-heading h2 {
  font-size: 42px;
}

.landing-flow {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 24px;
  margin-top: 14px;
  padding: 24px;
}

.landing-flow ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: #405367;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .landing-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 28px;
  }

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

  .landing-stat-cards,
  .example-stats {
    grid-template-columns: 1fr;
  }

  .analysis-roi-table {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analysis-roi-table article {
    border-right: 1px solid #dce7ef;
    border-bottom: 1px solid #dce7ef;
  }

  .landing-flow {
    grid-template-columns: 1fr;
  }

  .analyzer-hero,
  .explanation-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .landing-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 12px;
  }

  .landing-nav-actions,
  .landing-actions {
    width: 100%;
  }

  .landing-nav-actions .nav-link,
  .landing-actions .nav-link {
    flex: 1 1 180px;
  }

  .landing-copy h1 {
    font-size: 38px;
  }

  .landing-lead {
    font-size: 16px;
  }

  .landing-grid,
  .preview-stats,
  .example-card-grid {
    grid-template-columns: 1fr;
  }

  .analysis-roi-table {
    grid-template-columns: 1fr;
  }

  .analysis-roi-table article {
    border-right: 0;
  }

  .preview-row {
    grid-template-columns: minmax(0, 1fr) 62px 58px;
  }

  .analyzer-hero {
    padding: 18px;
  }

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

  .post-table-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .post-table-cta .landing-primary {
    width: 100%;
  }
}

.shell {
  width: min(1760px, calc(100% - 20px));
  margin: 16px auto;
}

.analyzer-shell {
  display: grid;
  gap: 14px;
}

.analyzer-hero,
.explanation-grid,
.post-table-cta {
  border: 1px solid #b5c7d8;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 34px rgba(7, 61, 84, 0.08);
}

.analyzer-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, 0.9fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 8% 0%, rgba(15, 99, 128, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(226, 241, 247, 0.96), rgba(255, 255, 255, 0.99)),
    #fff;
}

.analyzer-hero-copy {
  display: grid;
  gap: 14px;
}

.analyzer-hero-copy h1 {
  max-width: 820px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1;
  letter-spacing: 0;
  color: #07172f;
}

.analyzer-hero-copy p:not(.landing-kicker) {
  max-width: 690px;
  color: #334155;
  font-size: 17px;
  line-height: 1.5;
}

.analyzer-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-metrics article {
  min-height: 118px;
  padding: 18px;
  border: 1px solid #bfd0df;
  border-radius: 8px;
  background: #ffffff;
}

.hero-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.hero-metrics strong {
  display: block;
  margin-top: 10px;
  font-size: 36px;
  line-height: 1;
  color: #07172f;
}

.explanation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(230px, 0.7fr) minmax(260px, 0.8fr);
  gap: 14px;
  padding: 16px;
}

.analytics-note {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #cbd8e5;
  border-radius: 8px;
  background: #ffffff;
}

.analytics-note p {
  color: #3f4f64;
  line-height: 1.45;
}

.toolbar,
.content,
.status-grid article {
  background: var(--panel);
  border: 1px solid #bfccd9;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(7, 61, 84, 0.06);
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
}

#configStatus,
#runStatus,
.status-grid span {
  color: var(--muted);
  font-size: 14px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: flex-end;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
button {
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font: inherit;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.wc2022-table th,
.wc2022-table td {
  vertical-align: top;
}

.strategies-table td {
  vertical-align: middle;
}

.market-pill,
.be-pill,
.roi-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 800;
}

.market-pill {
  background: #dff2f7;
  color: #0b5871;
}

.be-pill {
  background: #dceaff;
  color: #174ea6;
}

.roi-pill.positive {
  background: #dff5e9;
  color: #0b6f45;
}

.roi-pill.negative {
  background: #fbe1df;
  color: var(--bad);
}

.roi-pill.neutral {
  background: #f1f5f9;
  color: #475467;
}

.odds-cell {
  min-width: 320px;
}

.odds-line {
  display: grid;
  grid-template-columns: 72px 48px 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 5px 0;
  border-bottom: 1px solid #e8eef6;
}

.odds-line:last-child {
  border-bottom: 0;
}

.odds-line strong {
  color: #0f6f86;
}

.odds-line span {
  color: #6b778d;
  font-weight: 700;
  white-space: nowrap;
}

.odds-line small {
  color: #152238;
  line-height: 1.35;
}

.muted-text {
  color: #6b778d;
}

input,
select {
  min-width: 120px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

select {
  min-width: 210px;
}

button {
  padding: 0 18px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  background: #ffffff;
  color: var(--accent);
  border-color: #b9cbd9;
}

.secondary-button:hover {
  background: #eef7fa;
}

.secondary-button.toggle-active {
  border-color: rgba(20, 122, 75, 0.35);
  background: #e8f7ef;
  color: var(--good);
}

.secondary-button.status-good {
  border-color: rgba(20, 122, 75, 0.35);
  background: #e8f7ef;
  color: var(--good);
}

.secondary-button.status-bad {
  border-color: rgba(180, 35, 24, 0.35);
  background: #fdeceb;
  color: var(--bad);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

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

.status-grid article {
  padding: 16px;
}

.status-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  color: #07172f;
}

.content {
  overflow: hidden;
}

.matches-panel {
  margin-bottom: 12px;
}

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

.matches-sidebar {
  position: static;
}

.compact-header {
  padding: 14px 16px;
}

.match-list {
  display: grid;
  gap: 14px;
  max-height: none;
  overflow: visible;
  padding: 12px;
}

.continent-stats {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.continent-filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #eef5f8;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.continent-filter-title.sub-title {
  margin-top: 10px;
  border-left: 3px solid var(--accent);
  background: #f6f9fc;
  color: #405367;
}

.continent-filter-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clear-filter {
  height: 28px;
  padding: 0 10px;
  border-color: #c9d8e3;
  background: #fff;
  color: var(--accent);
  font-size: 12px;
}

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

.continent-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  height: auto;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #e3eaf2;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  text-align: left;
}

.continent-row:hover,
.continent-row.active {
  border-color: rgba(23, 107, 135, 0.38);
  background: #eef8fb;
}

.continent-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.continent-row strong {
  color: var(--accent);
  font-size: 12px;
}

.continent-missing {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.average-stats {
  display: grid;
  gap: 5px;
}

.average-stats-head,
.average-stats-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
  gap: 6px;
  align-items: center;
}

.continent-average-stats .average-stats-head,
.continent-average-stats .average-stats-row,
.round-average-stats .average-stats-head,
.round-average-stats .average-stats-row {
  grid-template-columns: minmax(0, 1fr) 42px 48px 42px 42px;
}

.average-stats-head {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.average-stats-row {
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid #e3eaf2;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.average-stats-row strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.average-stats-row span {
  color: var(--accent);
  font-weight: 800;
  text-align: right;
}

.team-average-stats {
  max-height: 260px;
  overflow: auto;
  padding-right: 2px;
}

.match-date-group {
  display: grid;
  gap: 8px;
}

.match-date-group h3 {
  margin: 4px 2px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.match-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #e5ebf2;
  border-radius: 8px;
  background: #fbfcfe;
  font-size: 13px;
}

.match-button {
  width: 100%;
  cursor: pointer;
  color: inherit;
  font: inherit;
  text-align: left;
}

.match-button:hover {
  border-color: rgba(23, 107, 135, 0.35);
  background: #f4fbfd;
}

.match-type {
  grid-column: 1 / -1;
  justify-self: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #2463c7;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.match-chip strong {
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf6f8;
  color: var(--accent);
  font-size: 12px;
}

.team-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-name:last-child {
  text-align: right;
}

.match-empty {
  min-height: 80px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.compact-button {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.warnings {
  margin: 14px 20px 0;
  padding: 12px;
  border-radius: 6px;
  background: var(--warn-bg);
  color: var(--warn-text);
  font-size: 14px;
}

.strategy-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #bfccd9;
  background: #eef4f8;
}

.tab-button {
  height: 34px;
  padding: 0 13px;
  border-color: #bdcedd;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.tab-button:hover {
  border-color: #0f6380;
  background: #e4f3f7;
}

.tab-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.strategy-section + .strategy-section {
  border-top: 1px solid #bfccd9;
}

.strategy-section h3 {
  margin: 0;
  padding: 14px 16px;
  color: #43536a;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #d3dde8;
  text-align: left;
  white-space: nowrap;
  font-size: 14px;
}

th {
  background: #eef4f8;
  color: #4c5c72;
  font-size: 12px;
  text-transform: uppercase;
}

.sort-header {
  width: 100%;
  height: auto;
  min-height: 24px;
  justify-content: inherit;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.sort-header:hover,
.sort-header.active {
  background: transparent;
  color: var(--accent);
}

td:nth-child(n + 5),
th:nth-child(n + 5) {
  text-align: right;
}

tbody tr {
  transition: background 140ms ease, box-shadow 140ms ease;
}

tbody tr:hover {
  background: #eef7fb;
}

.strategy-row.roi-hot {
  background: linear-gradient(90deg, rgba(20, 122, 75, 0.14), rgba(20, 122, 75, 0.04) 38%, transparent);
}

.strategy-row.roi-good {
  background: linear-gradient(90deg, rgba(20, 122, 75, 0.1), rgba(20, 122, 75, 0.035) 34%, transparent);
}

.strategy-row.roi-positive,
.strategy-row.roi-warm {
  background: linear-gradient(90deg, rgba(20, 122, 75, 0.075), rgba(20, 122, 75, 0.026) 30%, transparent);
}

.strategy-row.roi-cold {
  background: linear-gradient(90deg, rgba(180, 35, 24, 0.09), rgba(180, 35, 24, 0.035) 30%, transparent);
}

.strategy-row.premium-preview-row {
  position: relative;
}

.strategy-row.locked-row td {
  color: #8290a3;
}

.strategy-row.locked-row.roi-hot td {
  background: rgba(20, 122, 75, 0.08);
}

.strategy-row.locked-row.roi-good td {
  background: rgba(20, 122, 75, 0.06);
}

.strategy-row.locked-row.roi-positive td,
.strategy-row.locked-row.roi-warm td {
  background: rgba(20, 122, 75, 0.048);
}

.strategy-row.locked-row.roi-cold td {
  background: rgba(180, 35, 24, 0.055);
}

.premium-strategy-name {
  color: #172033;
  font-weight: 900;
}

.premium-hidden {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e5edf4;
  color: #7a8798;
  font-size: 12px;
  font-weight: 850;
}

.strategy-table-wrap {
  position: relative;
}

.top-lock-overlay {
  position: absolute;
  top: 72px;
  bottom: auto;
  left: 0;
  right: 0;
  height: calc(var(--locked-rows, 10) * 64px);
  z-index: 5;
  pointer-events: none;
}

.top-lock-card {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(360px, calc(100% - 32px));
  padding: 22px;
  border: 1px solid #b9cbd9;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 46px rgba(7, 61, 84, 0.24);
  text-align: center;
  pointer-events: auto;
}

.top-lock-card strong {
  font-size: 18px;
}

.top-lock-card span {
  color: #526174;
  line-height: 1.35;
}

.top-lock-card b {
  color: var(--accent);
  font-size: 15px;
}

.top-lock-overlay .unlock-pro-button {
  min-width: 190px;
  pointer-events: auto;
}

.unlock-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid #c7d7e2;
  border-radius: 999px;
  background: #f8fbfd;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.unlock-pill:hover {
  border-color: var(--accent);
  background: #eef8fb;
}

.metric-help {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.metric-help span {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 999px;
  background: #e8eef5;
  color: #526174;
  font-size: 10px;
  font-weight: 900;
  text-transform: none;
}

.rank-stack {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  min-width: 62px;
}

.rank-badge {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: #eef2f7;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
}

.rank-badge.gold {
  background: #fff4cc;
  color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(183, 121, 31, 0.22);
}

.rank-badge.silver {
  background: #eef2f6;
  color: var(--silver);
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.22);
}

.rank-badge.bronze {
  background: #ffe8d5;
  color: var(--bronze);
  box-shadow: inset 0 0 0 1px rgba(154, 90, 46, 0.22);
}

.rank-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  max-width: 38px;
  padding: 1px 3px;
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.95);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.rank-delta.positive {
  color: var(--good);
}

.rank-delta.negative {
  color: var(--bad);
}

.market-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #edf6f8;
  color: #176b87;
  font-size: 13px;
  font-weight: 700;
  text-transform: capitalize;
}

.strategy-name {
  font-weight: 700;
}

.hit-cell {
  display: grid;
  min-width: 92px;
  gap: 5px;
  justify-items: end;
}

.hit-bar {
  width: 86px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf3;
}

.hit-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #176b87, #34a853);
}

.metric-pill {
  display: inline-flex;
  gap: 5px;
  justify-content: center;
  align-items: center;
  min-width: 68px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  font-weight: 800;
}

.metric-pill.positive {
  background: #e8f7ef;
  color: var(--good);
}

.metric-pill.negative {
  background: #fdeceb;
  color: var(--bad);
}

.roi-pill {
  min-width: 74px;
}

.roi-delta {
  font-size: 11px;
  font-weight: 900;
  opacity: 0.88;
}

.roi-delta.positive {
  color: var(--good);
}

.roi-delta.negative {
  color: var(--bad);
}

.odds-pill {
  background: #e7f1ff;
  color: #175cd3;
}

.muted-pill {
  min-width: 54px;
  color: var(--muted);
}

.result-badge {
  display: inline-flex;
  min-width: 52px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.result-badge.win {
  background: #e8f7ef;
  color: var(--good);
}

.result-badge.loss {
  background: #fdeceb;
  color: var(--bad);
}

.post-table-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(238, 248, 251, 0.95), rgba(255, 255, 255, 0.98));
}

.post-table-cta h2 {
  margin-bottom: 5px;
}

.post-table-cta p {
  color: var(--muted);
  line-height: 1.45;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.38);
}

.modal-overlay[hidden] {
  display: none;
}

.pro-modal {
  position: relative;
  display: grid;
  width: min(460px, 100%);
  gap: 12px;
  padding: 24px;
  border: 1px solid #d7e2ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.pro-modal p {
  color: #566478;
  line-height: 1.45;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  height: 30px;
  padding: 0 10px;
  border-color: #d7e2ec;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.modal-status {
  min-height: 20px;
  color: var(--accent);
  font-weight: 800;
}

.result-badge.push {
  background: #eef2f7;
  color: var(--muted);
}

.details-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
}

.account-button,
.account-nav-button,
.google-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 6px;
  font-weight: 850;
  text-decoration: none;
}

.account-button {
  border: 1px solid #073d54;
  background: #073d54;
  color: #fff;
  box-shadow: 0 10px 22px rgba(7, 61, 84, 0.18);
}

.account-button:hover {
  background: #032d40;
}

.account-nav-button {
  border: 1px solid #b9cbd9;
  background: #fff;
  color: var(--accent);
}

.google-login-button {
  border: 1px solid #bfd0df;
  background: #ffffff;
  color: #172033;
}

.google-login-button:hover,
.account-nav-button:hover {
  border-color: var(--accent);
  background: #eef7fa;
}

.auth-shell {
  width: min(1180px, calc(100% - 20px));
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 12%, rgba(16, 101, 129, 0.18), transparent 34%),
    radial-gradient(circle at 82% 88%, rgba(5, 48, 69, 0.16), transparent 34%),
    linear-gradient(135deg, #eef6fb 0%, #f8fbfd 54%, #e7f0f5 100%);
}

.auth-layout {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 460px);
  gap: 22px;
  align-items: stretch;
}

.auth-brand-panel,
.auth-card-panel {
  border: 1px solid #bfd0df;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.auth-brand-panel {
  display: grid;
  align-content: center;
  gap: 22px;
  min-height: 640px;
  padding: clamp(32px, 5vw, 58px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(230, 245, 250, 0.92)),
    radial-gradient(circle at 18% 18%, rgba(7, 61, 84, 0.2), transparent 42%);
}

.auth-brand {
  width: fit-content;
  font-size: clamp(28px, 4vw, 52px);
}

.auth-brand-panel h1 {
  max-width: 620px;
  color: #06172f;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 0.95;
}

.auth-brand-panel p {
  max-width: 560px;
  color: #415169;
  font-size: 18px;
  line-height: 1.55;
}

.auth-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-benefits span {
  padding: 10px 12px;
  border: 1px solid #c8d8e5;
  border-radius: 999px;
  background: #fff;
  color: #073d54;
  font-size: 13px;
  font-weight: 900;
}

.auth-card-panel {
  align-self: center;
  padding: 28px;
}

.auth-card-header {
  margin-bottom: 18px;
}

.auth-card-header h2 {
  color: #06172f;
  font-size: 32px;
}

.auth-card-header p {
  margin-top: 6px;
  color: #536176;
  line-height: 1.45;
}

.google-auth-button {
  width: 100%;
  min-height: 52px;
  gap: 12px;
  border-color: #cbd8e5;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  font-size: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.google-auth-button:hover {
  border-color: #8fb5c8;
  background: #f8fbfd;
}

.google-icon {
  display: inline-grid;
  place-items: center;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 20px 0;
  color: #718096;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: #d7e1ea;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border: 1px solid #d4e0ea;
  border-radius: 10px;
  background: #f4f8fb;
}

.auth-tab {
  min-height: 42px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #536176;
  font-weight: 900;
  cursor: pointer;
}

.auth-tab.active {
  background: #073d54;
  color: #fff;
  box-shadow: 0 8px 18px rgba(7, 61, 84, 0.18);
}

.auth-panel {
  display: none;
  padding: 18px 0 0;
}

.auth-panel.active {
  display: grid;
}

.auth-secondary-link {
  display: inline-flex;
  margin-top: 14px;
  color: #0f6b86;
  font-weight: 850;
  text-decoration: none;
}

.auth-secondary-link:hover {
  color: #073d54;
  text-decoration: underline;
}

.account-toolbar {
  margin-bottom: 14px;
}

.account-console {
  overflow: hidden;
  padding: 0;
  background: #fff;
}

.account-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 34px;
  border-bottom: 1px solid #d7e1ea;
  background:
    radial-gradient(circle at 8% 0%, rgba(15, 99, 128, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(232, 244, 249, 0.96), rgba(255, 255, 255, 0.99));
}

.account-hero h1 {
  margin-top: 4px;
  color: #07172f;
  font-size: clamp(30px, 4vw, 48px);
}

.account-hero p:not(.landing-kicker) {
  max-width: 620px;
  margin-top: 8px;
  color: #334155;
  line-height: 1.5;
}

.account-badge {
  min-width: 160px;
  padding: 10px 14px;
  border: 1px solid #cbd8e5;
  border-radius: 999px;
  background: #f1f5f9;
  color: #536176;
  font-weight: 900;
  text-align: center;
}

.account-badge.premium {
  border-color: rgba(20, 122, 75, 0.28);
  background: #dff5e9;
  color: #0b6f45;
}

.account-grid {
  display: block;
  padding: 24px 34px 30px;
}

.account-card {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.profile-card,
.subscription-card {
  align-content: start;
}

.account-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-top: 1px solid #d7e1ea;
  border-bottom: 1px solid #d7e1ea;
}

.account-details div,
.subscription-summary {
  padding: 22px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.account-details div + div {
  border-left: 1px solid #d7e1ea;
}

.account-details span {
  display: block;
  color: #536176;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.account-details strong {
  display: block;
  margin-top: 8px;
  overflow: hidden;
  color: #07172f;
  font-size: 18px;
  text-overflow: ellipsis;
}

.inline-upgrade-button {
  width: auto;
  min-width: 180px;
  min-height: 40px;
  margin-top: 14px;
  padding: 0 22px;
  border: 1px solid #073d54;
  border-radius: 6px;
  background: #073d54;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(7, 61, 84, 0.16);
}

.inline-upgrade-button:hover {
  background: #032d40;
}

.subscription-summary {
  display: grid;
  gap: 8px;
  margin: 16px;
}

.subscription-summary strong {
  color: #07172f;
  font-size: 28px;
}

.subscription-summary p {
  color: #3f4f64;
  line-height: 1.45;
}

.subscription-card .landing-primary {
  margin: 0 16px 16px;
}

.auth-form,
.auth-actions {
  display: grid;
  gap: 12px;
  padding: 22px 0 0;
}

.account-console .auth-actions {
  padding: 22px 34px 30px;
}

.signed-out-notice {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 30px 34px 34px;
  border-top: 1px solid #e2eaf1;
  background: linear-gradient(180deg, #fff, #f8fbfd);
}

.signed-out-notice[hidden],
#premiumButton[hidden] {
  display: none;
}

.signed-out-notice h2 {
  color: #07172f;
  font-size: 32px;
}

.signed-out-notice p {
  max-width: 560px;
  color: #536176;
  line-height: 1.5;
}

.signed-out-notice .landing-primary {
  width: fit-content;
  min-width: 240px;
  margin-top: 4px;
}

.account-message {
  min-height: 22px;
  margin-top: 12px;
  color: #536176;
  font-weight: 800;
}

.account-message.success {
  color: #0b6f45;
}

.account-message.error {
  color: var(--bad);
}

.auth-page .auth-panel {
  display: none;
}

.auth-page .auth-panel.active {
  display: grid;
}

.auth-page .auth-form {
  padding: 18px 0 0;
}

@media (max-width: 900px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: auto;
  }

  .account-hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

.details-panel {
  width: min(1040px, 96vw);
  max-height: 88vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.details-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.details-header span,
.details-meta {
  color: var(--muted);
  font-size: 13px;
}

.details-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.details-close,
.fetch-correct-score {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.fetch-correct-score {
  border-color: rgba(23, 107, 135, 0.25);
  background: #edf6f8;
  color: var(--accent);
}

.fetch-correct-score:disabled {
  cursor: default;
  opacity: 0.7;
}

.details-body {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.details-notice {
  margin: 12px 14px 0;
  padding: 10px 12px;
  border: 1px solid #f4d4a4;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a5a2e;
  font-size: 13px;
  font-weight: 800;
}

.details-meta {
  margin: 0 0 10px;
}

.details-table {
  max-height: 68vh;
}

.positive {
  color: var(--good);
  font-weight: 700;
}

.negative {
  color: var(--bad);
  font-weight: 700;
}

.empty {
  height: 160px;
  color: var(--muted);
  text-align: center !important;
}

.small-empty {
  height: 72px;
}

.ht-input {
  width: 84px;
  min-width: 84px;
}

.saved-value {
  display: inline-flex;
  min-width: 84px;
  height: 46px;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.row-button {
  height: 34px;
  padding: 0 12px;
}

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

  .controls {
    justify-content: stretch;
  }

  label,
  input,
  select,
  button {
    width: 100%;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

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

  .matches-sidebar {
    position: static;
  }
}
