:root {
  color-scheme: dark;
  --bg: #151412;
  --panel: #20201c;
  --panel-2: #292820;
  --border: #444033;
  --text: #f6f1df;
  --muted: #b9ad91;
  --green: #3ddc97;
  --green-soft: rgba(61, 220, 151, 0.16);
  --gold: #f5bc42;
  --purple: #a78bfa;
  --rust: #d96c45;
  --ink: #10100e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(217, 108, 69, 0.08), transparent 320px),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  color: inherit;
  font: inherit;
}

.app-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  padding: 8px 0 24px;
}

.eyebrow,
.subhead {
  margin: 0;
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 6px;
  font-size: 12px;
}

.subhead {
  margin-top: 8px;
  font-size: clamp(15px, 2vw, 22px);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 6vw, 62px);
  line-height: 0.95;
  letter-spacing: 0;
  max-width: 820px;
}

h2 {
  margin-bottom: 4px;
  font-size: 21px;
}

h3 {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.3;
}

.status-strip,
.header-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  white-space: nowrap;
}

.header-link {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.error {
  min-height: 20px;
  color: var(--rust);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) repeat(2, minmax(180px, 1.5fr));
  gap: 10px;
  margin-bottom: 20px;
}

.summary-grid article,
.table-section,
.fixture-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.summary-grid article {
  min-height: 96px;
  padding: 16px;
}

.summary-grid span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-grid strong {
  display: block;
  font-size: 24px;
  line-height: 1.15;
}

.qi-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: 13px;
}

.qi-legend > span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.qi-legend strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.qi-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.qi-dot.elite {
  background: var(--purple);
}

.qi-dot.strong {
  background: #22c55e;
}

.qi-dot.good {
  background: #86efac;
}

.qi-dot.watch {
  background: #f59e0b;
}

.qi-dot.weak {
  background: #ef4444;
}

.wide strong {
  font-size: 18px;
}

.source-label {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(61, 220, 151, 0.35);
  border-radius: 999px;
  color: var(--green);
  background: rgba(61, 220, 151, 0.08);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.betmate-aus-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(61, 220, 151, 0.08), rgba(16, 16, 14, 0.45));
}

.betmate-aus-hero h3,
.betmate-aus-grid h3,
.betmate-aus-panel h3 {
  margin: 0 0 8px;
}

.betmate-aus-hero p,
.betmate-aus-grid p,
.betmate-aus-panel p,
.betmate-aus-panel li {
  color: var(--muted);
  line-height: 1.55;
}

.betmate-aus-scorecard {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 16, 14, 0.45);
}

.betmate-aus-scorecard span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.betmate-aus-scorecard strong {
  display: block;
  font-size: 22px;
  line-height: 1.15;
}

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

.betmate-aus-grid article,
.betmate-aus-panel {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.betmate-aus-split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.betmate-aus-panel ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.compact-table table {
  min-width: 620px;
}

.ufc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(226, 189, 92, 0.12), rgba(16, 16, 14, 0.45));
}

.ufc-hero h3,
.ufc-best-card h3,
.ufc-panel h3 {
  margin: 0 0 8px;
}

.ufc-hero p,
.ufc-best-card p,
.ufc-panel p,
.ufc-panel li {
  color: var(--muted);
  line-height: 1.55;
}

.ufc-scorecard,
.ufc-metric-grid article,
.ufc-best-card,
.ufc-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.ufc-scorecard {
  padding: 14px;
  background: rgba(16, 16, 14, 0.45);
}

.ufc-scorecard span,
.ufc-metric-grid span,
.ufc-meta,
.ufc-best-card dt {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.ufc-scorecard strong {
  display: block;
  font-size: 22px;
  line-height: 1.15;
}

.ufc-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ufc-metric-grid article {
  padding: 16px;
}

.ufc-metric-grid strong {
  display: block;
  font-size: 24px;
  line-height: 1.12;
}

.ufc-metric-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.ufc-best-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.ufc-best-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-left: 5px solid rgba(226, 189, 92, 0.72);
}

.ufc-best-card.elite {
  border-left-color: var(--green);
  background: linear-gradient(90deg, rgba(61, 220, 151, 0.12), rgba(23, 23, 20, 0.94) 18%);
}

.ufc-best-card.strong {
  border-left-color: var(--gold);
  background: linear-gradient(90deg, rgba(226, 189, 92, 0.12), rgba(23, 23, 20, 0.94) 18%);
}

.ufc-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: #0c0d0b;
  background: var(--gold);
  font-weight: 900;
}

.ufc-best-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.ufc-best-card dl > div {
  min-height: 68px;
  padding: 10px;
  border: 1px solid rgba(68, 64, 51, 0.72);
  border-radius: 8px;
  background: rgba(12, 13, 11, 0.36);
}

.ufc-best-card dd {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.ufc-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}

.ufc-panel {
  padding: 16px;
}

.ufc-panel ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.summary-grid .summary-match,
.summary-grid .summary-selection,
.summary-grid .summary-meta {
  margin: 0;
  text-transform: none;
}

.summary-grid .summary-match {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.summary-grid .summary-selection {
  margin-top: 5px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}

.summary-grid .summary-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.summary-grid .summary-meta > span {
  display: inline-flex;
  align-items: center;
  margin: 0;
  min-height: 24px;
}

.history-result-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 20px 18px;
}

.history-result-summary article {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.history-result-summary span,
.history-result-summary small {
  display: block;
  color: var(--muted);
}

.history-result-summary span {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.history-result-summary strong {
  display: block;
  font-size: 22px;
  line-height: 1.15;
}

.history-result-summary small {
  margin-top: 6px;
  font-size: 13px;
}

.results-learnings {
  margin: 0 20px 18px;
}

.learning-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.learning-card-grid article {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.learning-card-grid span,
.learning-card-grid small {
  display: block;
  color: var(--muted);
}

.learning-card-grid span {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.learning-card-grid strong {
  display: block;
  font-size: 17px;
  line-height: 1.25;
}

.learning-card-grid small {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 24px;
}

.walters-section > .section-heading h2,
.walters-section > .section-heading p {
  color: var(--text);
}

.walters-section > .section-heading p {
  color: var(--muted);
}

.strategy-principle {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-height: 148px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #000;
}

.strategy-step {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #000;
  background: #fff;
  color: #000;
  font-size: 17px;
  font-weight: 950;
  line-height: 1;
}

.strategy-grid small {
  color: #000;
}

.strategy-label {
  display: block;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  color: #000;
}

.strategy-grid strong {
  display: block;
  margin: 9px 0 10px;
  color: #000;
  font-size: clamp(22px, 1.65vw, 27px);
  line-height: 1.14;
}

.strategy-grid small {
  display: block;
  font-size: 16px;
  line-height: 1.5;
}

.strategy-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.strategy-board .inline-section-heading h3,
.strategy-board .inline-section-heading p {
  color: var(--text);
}

.strategy-board .inline-section-heading p {
  color: var(--muted);
}

.strategy-board-card {
  min-height: 0;
  padding: 22px;
  border-color: var(--border);
  background: var(--panel-2);
  color: var(--text);
}

.strategy-board-card .card-topline {
  align-items: center;
  min-height: 0;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.strategy-board-card .sub-cell {
  color: var(--muted);
}

.strategy-board-card .qi-badge {
  font-size: 14px;
}

.strategy-board-card .date-one-line {
  font-size: 15px;
  font-weight: 850;
}

.strategy-board-card .match-name {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.strategy-board-card h3 {
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(22px, 1.8vw, 28px);
  line-height: 1.16;
}

.strategy-board-card dl {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 18px;
}

.strategy-board-card dl > div {
  min-height: 64px;
  padding: 12px 0;
  border-top: 1px solid rgba(68, 64, 51, 0.72);
}

.strategy-board-card dl > div:nth-child(-n + 3) {
  border-top: 0;
}

.strategy-board-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
}

.strategy-board-card dd {
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.table-section {
  padding: 18px;
  margin-bottom: 22px;
}

.games-section {
  margin-bottom: 22px;
}

.section-heading,
.fixture-heading,
.card-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.card-topline {
  min-height: 32px;
  flex-wrap: wrap;
}

.section-heading p,
.fixture-heading p,
.tactical-summary,
.fixture-meta,
.sub-cell {
  color: var(--muted);
}

.sort-controls,
.segmented,
.view-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.top-view-tabs {
  margin: -8px 0 18px;
}

.hierarchy-tabs {
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 16, 14, 0.34);
}

.hierarchy-label {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 4px 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.hierarchy-primary {
  min-width: 116px;
  border-color: rgba(245, 188, 66, 0.76);
  background: linear-gradient(180deg, rgba(245, 188, 66, 0.2), rgba(245, 188, 66, 0.08));
  box-shadow: inset 0 0 0 1px rgba(245, 188, 66, 0.2);
}

.hierarchy-primary.active {
  background: var(--gold);
  color: var(--ink);
}

body:not(.football-view-active) [data-football-only] {
  display: none;
}

body:not(.owner-results-enabled) [data-owner-only] {
  display: none;
}

.icon-button,
.segmented-button,
.refresh-button,
.view-tab {
  padding: 0 14px;
  white-space: nowrap;
}

.top-view-tabs .view-tab {
  min-height: 42px;
  font-weight: 900;
}

.top-view-tabs .view-tab span {
  margin-left: 6px;
}

.view-tab {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  cursor: pointer;
}

.icon-button {
  min-width: 42px;
}

.segmented {
  margin: 16px 0;
}

.segmented-button {
  padding: 0 12px;
}

.icon-button.active,
.segmented-button.active,
.view-tab.active {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  font-weight: 800;
}

.refresh-button {
  min-height: 36px;
  min-width: 132px;
  padding: 0 12px;
  border-radius: 8px;
  border-color: var(--green);
  background: var(--green);
  color: var(--ink);
  font-weight: 900;
  box-shadow: none;
}

.refresh-button:hover {
  filter: brightness(1.08);
}

.view-tab {
  padding: 0 12px;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.72;
  filter: saturate(0.7);
}

.view-tabs {
  margin: 0 0 16px;
}

.view-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(16, 16, 14, 0.28);
}

.hidden {
  display: none !important;
}

.data-section {
  margin-bottom: 20px;
}

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

.data-grid article {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.data-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.data-grid strong {
  display: block;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.data-grid a {
  color: var(--gold);
}

.refresh-note {
  margin: 12px 0 0;
  color: var(--muted);
}

.data-table-wrap {
  margin-top: 16px;
  max-height: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.high-value-section,
.match-model-section,
.sportsbook-scan-section,
.player-prop-watchlist {
  margin-bottom: 22px;
}

.high-value-list,
.prop-watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.high-value-card,
.prop-watch-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.prop-summary-card {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid rgba(245, 188, 66, 0.34);
  border-radius: 8px;
  background: rgba(245, 188, 66, 0.1);
}

.prop-summary-card strong,
.prop-summary-card span {
  display: block;
}

.prop-summary-card strong {
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 18px;
}

.prop-summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.high-value-card h3,
.prop-watch-card h3 {
  margin-bottom: 8px;
}

.high-value-card .match-name,
.prop-watch-card .match-name {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.high-value-card p,
.prop-watch-card p,
.empty-note {
  margin: 0 0 14px;
  color: var(--muted);
}

.prop-watch-card dl {
  margin-top: auto;
}

.prop-price-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.prop-price-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 16, 14, 0.24);
}

.prop-price-list strong,
.prop-price-list em {
  display: block;
}

.prop-price-list em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.model-only-pill {
  color: var(--gold);
  border: 1px solid rgba(245, 188, 66, 0.34);
  background: rgba(245, 188, 66, 0.12);
}

.source-note {
  font-size: 12px;
  line-height: 1.35;
}

.match-model-list {
  margin-top: 16px;
}

.match-model-summary {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.match-model-scroll {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}

.match-model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.match-model-row strong,
.match-model-row span {
  display: block;
}

.match-model-row strong {
  line-height: 1.25;
}

.match-model-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.match-model-row dl {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sportsbook-scan-summary {
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.sportsbook-scan-table {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.sportsbook-scan-table table {
  min-width: 1280px;
}

.match-props-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.fixture-model-block {
  margin: 16px 0 18px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 16, 14, 0.26);
}

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

.model-insight-card {
  min-height: 184px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.model-market-card {
  grid-column: 1 / -1;
}

.model-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.model-filter-row label {
  display: grid;
  gap: 5px;
  min-width: 170px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.model-filter-row select {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-transform: none;
}

.sportsbet-scan-card {
  grid-column: 1 / -1;
}

.model-insight-card h3 {
  margin-bottom: 12px;
}

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

.score-model-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.score-model-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.score-model-list span {
  color: var(--muted);
  text-align: right;
}

.model-market-list {
  display: grid;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.model-market-list div,
.fixture-scan-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.model-market-list div:last-child,
.fixture-scan-list div:last-child {
  border-bottom: 0;
}

.model-market-list strong,
.model-market-list em,
.model-market-list b,
.fixture-scan-list strong,
.fixture-scan-list em,
.fixture-scan-list b {
  display: block;
}

.model-market-list em,
.fixture-scan-list em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.model-market-list b,
.fixture-scan-list b {
  color: var(--gold);
  text-align: right;
  white-space: nowrap;
}

.model-empty {
  padding: 12px;
}

.fixture-scan-list {
  display: grid;
  max-height: 340px;
  overflow-y: auto;
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.fixture-scan-list div > span:last-child {
  text-align: right;
}

.inline-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.inline-section-heading h3 {
  margin: 0;
}

.inline-section-heading p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

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

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

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

.results-section th,
.results-section td {
  text-align: center;
  vertical-align: middle;
}

.results-section .pill,
.results-section .qi-badge {
  margin-inline: auto;
}

.primary-cell,
.sub-cell {
  display: block;
}

.primary-cell {
  font-weight: 800;
}

.sub-cell {
  margin-top: 4px;
  font-size: 12px;
}

.date-one-line {
  flex: 0 0 auto;
  max-width: none;
  margin-top: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  text-align: right;
}

.confirmed-text {
  color: var(--green);
}

.warning-text {
  color: var(--rust);
}

.neutral-text {
  color: var(--muted);
}

.qi-badge,
.risk-pill,
.pill,
.official {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 8px;
  white-space: nowrap;
}

.qi-badge.compact {
  min-width: 34px;
  min-height: 24px;
  padding: 3px 7px;
  font-size: 12px;
}

.history-qi-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.line-price-with-qi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.history-arrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.qi-badge {
  min-width: 44px;
  padding: 0 9px;
  font-weight: 900;
  border: 1px solid transparent;
}

.qi-badge.card-grade {
  order: -1;
  flex: 0 0 auto;
  justify-self: flex-start;
  align-self: flex-start;
}

.qi-badge.elite {
  background: rgba(167, 139, 250, 0.22);
  color: var(--purple);
  border-color: rgba(167, 139, 250, 0.45);
}

.qi-badge.strong {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(61, 220, 151, 0.32);
}

.qi-badge.good {
  background: rgba(134, 239, 172, 0.18);
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.38);
}

.qi-badge.watch {
  background: rgba(217, 108, 69, 0.18);
  color: #f59e0b;
  border-color: rgba(217, 108, 69, 0.34);
}

.qi-badge.weak {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.36);
}

.qi-badge.no-score {
  background: var(--panel-2);
  color: var(--muted);
  border-color: var(--border);
}

.risk-pill {
  min-width: 44px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 950;
  border: 1px solid var(--border);
}

.risk-pill {
  background: rgba(185, 173, 145, 0.1);
  color: var(--muted);
}

.risk-pill.risk-low {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(61, 220, 151, 0.34);
}

.risk-pill.risk-medium {
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.38);
}

.risk-pill.risk-high {
  background: rgba(239, 68, 68, 0.16);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.38);
}

.pill,
.official {
  padding: 0 10px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.official {
  flex-direction: column;
  align-items: flex-end;
  min-height: 42px;
  padding: 6px 10px;
  text-align: right;
  white-space: normal;
}

.official small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.official.ref-verified {
  color: var(--green);
  border: 1px solid rgba(61, 220, 151, 0.32);
  background: var(--green-soft);
}

.official.ref-provided {
  color: var(--gold);
  border: 1px solid rgba(245, 188, 66, 0.34);
  background: rgba(245, 188, 66, 0.12);
}

.official.ref-not_verified {
  color: var(--muted);
  border: 1px solid var(--border);
}

.positive {
  color: var(--green);
  font-weight: 900;
}

.negative {
  color: #ef4444;
  font-weight: 900;
}

.match-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.match-tab {
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  text-align: left;
  cursor: pointer;
}

.match-tab span,
.match-tab small {
  display: block;
}

.match-tab span {
  margin-bottom: 8px;
  font-weight: 900;
  line-height: 1.2;
}

.match-tab small {
  color: var(--muted);
}

.match-tab.active {
  border-color: var(--gold);
  background: rgba(245, 188, 66, 0.14);
}

.match-tab.active span {
  color: var(--gold);
}

.plain-label {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.fixtures {
  display: grid;
  gap: 18px;
}

.fixture-panel {
  padding: 18px;
}

.fixture-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
  font-size: 13px;
}

.fixture-meta span {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 16, 14, 0.32);
}

.fixture-meta .price-freshness {
  grid-column: 1 / -1;
}

.price-freshness.fresh {
  border-color: rgba(61, 220, 151, 0.34);
  background: var(--green-soft);
}

.price-freshness.fresh strong {
  color: var(--green);
}

.price-freshness.watch {
  border-color: rgba(245, 188, 66, 0.36);
  background: rgba(245, 188, 66, 0.12);
}

.price-freshness.watch strong {
  color: var(--gold);
}

.price-freshness.stale {
  border-color: rgba(217, 108, 69, 0.45);
  background: rgba(217, 108, 69, 0.14);
}

.price-freshness.stale strong {
  color: var(--rust);
}

.fixture-meta em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.match-detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 14px;
}

.match-detail-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  cursor: pointer;
  font-weight: 850;
}

.match-detail-tab.active {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--ink);
}

.match-detail-panel {
  display: grid;
  gap: 16px;
}

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

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

.summary-answer-grid article {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.summary-answer-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-answer-grid strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.summary-factors-card {
  grid-column: 1 / -1;
}

.summary-factors-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.model-data-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.model-data-heading span {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.model-data-heading strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.model-data-heading em {
  display: block;
  margin-top: 6px;
  color: var(--gold);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.model-data-card dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin: 0;
}

.model-data-card dl div {
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.model-data-card dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.model-data-card dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.model-quality-breakdown {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.model-quality-breakdown > strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.model-quality-breakdown ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.model-quality-breakdown li {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.model-quality-breakdown li span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.model-quality-breakdown li b {
  color: var(--text);
  font-size: 14px;
}

.model-quality-breakdown li em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.model-repair-actions {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
}

.model-repair-actions span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.model-repair-actions ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.footystats-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(78, 201, 176, 0.35);
  border-radius: 8px;
  background: rgba(78, 201, 176, 0.08);
}

.footystats-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.footystats-card strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.footystats-card dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin: 0;
}

.footystats-card dl div {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.footystats-card dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.footystats-card dd {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.coefficient-grid article {
  min-height: 108px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.coefficient-grid span,
.coefficient-grid small {
  display: block;
  color: var(--muted);
}

.coefficient-grid span {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.coefficient-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 19px;
  line-height: 1.15;
}

.coefficient-grid small {
  font-size: 12px;
  line-height: 1.35;
}

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

.model-summary-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.model-summary-list strong,
.model-summary-list em {
  display: block;
}

.model-summary-list em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.lineups-block {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(16, 16, 14, 0.34);
}

.lineups-block .inline-section-heading {
  margin-bottom: 12px;
}

.lineup-note {
  margin-bottom: 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.lineup-rating-note {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 188, 66, 0.24);
  border-radius: 8px;
  background: rgba(245, 188, 66, 0.08);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

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

.lineup-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.lineup-card h4 {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 15px;
}

.lineup-card h4 span {
  color: var(--gold);
  white-space: nowrap;
}

.lineup-card h5 {
  margin: 12px 0 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.lineup-card ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.rated-player-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.rated-player-list .player-name {
  min-width: 0;
}

.rated-player-list .player-position {
  min-width: 36px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-align: left;
  white-space: nowrap;
}

.rated-player-list li b {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(245, 188, 66, 0.14);
  color: var(--gold);
  font-size: 12px;
  text-align: center;
}

.lineup-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: 16px;
}

.market-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.market-card h3 {
  margin: 12px 0 18px;
  font-size: 18px;
  line-height: 1.28;
}

.market-card .card-topline {
  min-height: 38px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 0;
}

.market-card dl,
.high-value-card dl,
.prop-watch-card dl {
  gap: 12px;
}

.market-card dl > div,
.high-value-card dl > div,
.prop-watch-card dl > div {
  min-height: 54px;
  padding: 10px 0;
  border-top: 1px solid rgba(68, 64, 51, 0.58);
}

.market-card dl > div:nth-child(-n + 2),
.high-value-card dl > div:nth-child(-n + 2),
.prop-watch-card dl > div:nth-child(-n + 2) {
  border-top: 0;
}

dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 6px 0 0;
  font-weight: 850;
  line-height: 1.25;
}

.book-stat-row {
  display: block;
  justify-content: space-between;
  gap: 10px;
}

.book-stat-row dd {
  margin-top: 6px;
}

@media (max-width: 900px) {
  .app-header,
  .section-heading,
  .inline-section-heading,
  .fixture-heading {
    display: block;
  }

  .status-strip,
  .sort-controls {
    margin-top: 14px;
  }

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

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

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

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

  .betmate-aus-hero,
  .betmate-aus-split,
  .ufc-hero,
  .ufc-panel-grid,
  .ufc-best-card {
    grid-template-columns: 1fr;
  }

  .betmate-aus-grid,
  .ufc-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide {
    grid-column: span 2;
  }

  .fixture-meta {
    grid-template-columns: 1fr;
  }

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

  .model-insight-grid {
    grid-template-columns: 1fr;
  }

  .summary-answer-grid {
    grid-template-columns: 1fr;
  }

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

  .match-model-row {
    grid-template-columns: 1fr;
  }

  .match-model-row dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1280px);
    padding-top: 18px;
  }

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

  .history-result-summary {
    grid-template-columns: 1fr;
  }

  .learning-card-grid {
    grid-template-columns: 1fr;
  }

  .betmate-aus-grid,
  .ufc-metric-grid {
    grid-template-columns: 1fr;
  }

  .ufc-best-card dl {
    grid-template-columns: 1fr;
  }

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

  .strategy-card-grid {
    grid-template-columns: 1fr;
  }

  .strategy-board-card dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .strategy-board-card dl > div:nth-child(-n + 3) {
    border-top: 1px solid rgba(68, 64, 51, 0.72);
  }

  .strategy-board-card dl > div:nth-child(-n + 2) {
    border-top: 0;
  }

  .wide {
    grid-column: auto;
  }

  .table-section,
  .fixture-panel {
    padding: 14px;
  }
}
