:root {
  --neon-page: #070913;
  --neon-panel: #10081e;
  --neon-panel-soft: #160b28;
  --neon-row: #140b25;
  --neon-row-alt: #190d2d;
  --neon-line: rgba(125, 85, 184, 0.34);
  --neon-cyan: #55f5e8;
  --neon-pink: #ff5ddd;
  --neon-purple: #9b72ff;
  --neon-lime: #6dff9e;
  --neon-text: #f7f4ff;
  --neon-muted: #a79aba;
}

body[data-page="strategic-data"] { background: var(--neon-page); }

.strategic-page {
  padding: clamp(22px, 3vw, 44px);
  min-width: 0;
}

.strategic-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 600px);
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.strategic-heading h1 {
  margin: 8px 0 0;
  color: var(--neon-text);
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.strategic-heading p {
  margin: 0;
  color: #bcb2d5;
  font-size: clamp(0.95rem, 1.2vw, 1.12rem);
  line-height: 1.6;
}

.strategic-eyebrow,
.neon-overline {
  color: var(--neon-cyan);
  font: 800 0.72rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.18em;
}

.neon-matrix {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 93, 221, 0.42);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 93, 221, 0.08), transparent 26%),
    radial-gradient(circle at 85% 0%, rgba(85, 245, 232, 0.11), transparent 30%),
    var(--neon-panel);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255,255,255,0.04);
}

.neon-matrix::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-pink), var(--neon-cyan), transparent);
  opacity: 0.85;
}

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

.neon-matrix-header h2 {
  margin: 7px 0 4px;
  color: var(--neon-text);
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.neon-matrix-header p { margin: 0; color: var(--neon-muted); }

.cycle-controls { display: flex; align-items: stretch; gap: 8px; flex: 0 0 auto; }

.cycle-button,
.cycle-readout {
  min-height: 44px;
  border: 1px solid rgba(85, 245, 232, 0.34);
  border-radius: 12px;
  background: #0b1121;
  color: var(--neon-text);
}

.cycle-button {
  min-width: 44px;
  padding: 0 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.cycle-button:hover:not(:disabled) { border-color: var(--neon-cyan); background: #122238; transform: translateY(-1px); }
.cycle-button:disabled { cursor: not-allowed; opacity: 0.36; }
.cycle-current { border-color: rgba(255, 93, 221, 0.48); color: var(--neon-pink); }

.cycle-readout {
  display: grid;
  place-content: center;
  min-width: 82px;
  padding: 5px 12px;
  text-align: center;
}

.cycle-readout span { color: var(--neon-muted); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.14em; }
.cycle-readout strong { color: var(--neon-cyan); font: 900 1rem/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; }

.matrix-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--neon-line);
}

.matrix-summary > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(155, 114, 255, 0.22);
  border-radius: 999px;
  background: rgba(9, 11, 26, 0.72);
  color: var(--neon-muted);
  font-size: 0.75rem;
}

.matrix-summary strong { color: var(--neon-text); }
.summary-dot { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.summary-dot-cyan { color: var(--neon-cyan); background: currentColor; }
.summary-dot-pink { color: var(--neon-pink); background: currentColor; }

.strategic-status {
  margin: 14px 20px 0;
  padding: 11px 14px;
  border: 1px solid rgba(85, 245, 232, 0.18);
  border-radius: 10px;
  background: rgba(5, 12, 24, 0.78);
  color: var(--neon-cyan);
  font-size: 0.78rem;
}

.strategic-status[data-state="ready"] { color: var(--neon-lime); }
.strategic-status[data-state="warning"] { color: #ffd166; border-color: rgba(255, 209, 102, 0.26); }
.strategic-status[data-state="error"] { color: #ff7f9e; border-color: rgba(255, 127, 158, 0.35); }

.strategic-matrix-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: visible;
  max-height: none;
  margin: 14px 20px 0;
  border: 1px solid var(--neon-line);
  border-radius: 14px;
  scrollbar-color: auto;
  scrollbar-width: auto;
}

.strategic-matrix-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: var(--neon-text);
}

.strategic-matrix-table th,
.strategic-matrix-table td {
  border-right: 1px solid var(--neon-line);
  border-bottom: 1px solid var(--neon-line);
}

.strategic-matrix-table tr > :last-child { border-right: 0; }
.strategic-matrix-table tbody tr:last-child > * { border-bottom: 0; }

.strategic-matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 58px;
  padding: 10px 12px;
  background: #24103b;
  color: var(--neon-pink);
  box-shadow: inset 0 -1px 0 rgba(255, 93, 221, 0.35);
  font: 900 0.88rem/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: center;
}

.strategic-matrix-table thead th:first-child {
  left: 0;
  z-index: 6;
  width: 178px;
  color: var(--neon-cyan);
  text-align: left;
}

.strategic-matrix-table tbody th {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 178px;
  padding: 12px 14px;
  background: #160b28;
  text-align: left;
  box-shadow: 8px 0 18px rgba(5, 2, 12, 0.28);
}

.strategic-matrix-table tbody tr:nth-child(even) th { background: #1c0d31; }
.league-code { display: block; color: var(--neon-cyan); font: 800 0.58rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: 0.12em; }
.league-name { display: block; margin-top: 4px; color: var(--neon-text); font-size: 0.86rem; }
.league-total { display: block; margin-top: 3px; color: var(--neon-muted); font-size: 0.64rem; font-weight: 500; }

.strategic-matrix-table td {
  height: 72px;
  padding: 8px 10px;
  background: var(--neon-row);
  text-align: center;
  vertical-align: middle;
}

.strategic-matrix-table tbody tr:nth-child(even) td { background: var(--neon-row-alt); }
.strategic-matrix-table tbody tr:hover td { background: #211139; }
.strategic-matrix-table tbody tr:hover th { color: var(--neon-cyan); }

.matrix-cell { display: grid; gap: 4px; justify-items: center; }
.cell-count { color: var(--neon-text); font: 900 0.88rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.cell-count::after { content: "×"; margin-left: 2px; color: var(--neon-pink); }
.cell-gmt { color: var(--neon-lime); font: 800 0.67rem/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; }
.cell-meter { width: min(68px, 76%); height: 2px; border-radius: 999px; background: rgba(155, 114, 255, 0.15); overflow: hidden; }
.cell-meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan)); box-shadow: 0 0 8px var(--neon-pink); }
.matrix-empty { color: #655a78; font: 700 0.82rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; }
.cell-unavailable { color: #ddae59; font-size: 0.62rem; }

.matrix-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 16px 24px 22px;
  color: var(--neon-muted);
  font-size: 0.7rem;
}

.matrix-notes b { color: var(--neon-cyan); font: 800 0.67rem/1 ui-monospace, SFMono-Regular, Consolas, monospace; }

/* Production alignment with the selected 07 Neon Circuit prototype. */
.strategic-page {
  padding: clamp(14px, 2vw, 24px);
}

.neon-matrix {
  min-height: 680px;
  padding: 16px;
  border-radius: 16px;
  background: var(--neon-panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
}

.neon-matrix-header {
  position: sticky;
  top: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, auto);
  align-items: end;
  gap: 16px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: var(--neon-panel);
}

.matrix-caption-copy h1 {
  margin: 4px 0 0;
  color: var(--neon-text);
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.matrix-caption-copy p {
  margin: 0;
  color: var(--neon-muted);
  font-size: 10px;
}

.neon-overline {
  color: var(--neon-pink);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: 0.13em;
}

.matrix-header-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.summary-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.summary-pills span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 93, 221, 0.35);
  border-radius: 999px;
  background: rgba(9, 5, 20, 0.72);
  color: #cbd0df;
  font-size: 9px;
  white-space: nowrap;
}

.summary-pills b { color: var(--neon-cyan); }

.cycle-controls { gap: 5px; }
.cycle-button,
.cycle-readout {
  min-height: 32px;
  border-color: rgba(255, 93, 221, 0.26);
  border-radius: 9px;
  background: #0c0717;
}
.cycle-button { min-width: 34px; padding: 0 10px; font-size: 0.7rem; }
.cycle-readout { min-width: 68px; padding: 3px 10px; }
.cycle-readout span { font-size: 0.52rem; }
.cycle-readout strong { font-size: 0.82rem; }

.strategic-status {
  margin: 9px 0 0;
  padding: 8px 10px;
  font-size: 0.68rem;
}
.strategic-status[data-state="ready"] { display: none; }

.strategic-matrix-scroll {
  max-height: none;
  margin: 0;
  border-color: rgba(255, 93, 221, 0.16);
  border-radius: 10px;
  background: var(--neon-row);
  box-shadow: 0 0 28px rgba(255, 93, 221, 0.09), inset 0 0 24px rgba(85, 245, 232, 0.03);
}

.strategic-matrix-table { min-width: 1000px; }
.strategic-matrix-table th,
.strategic-matrix-table td {
  height: 48px;
  padding: 6px 8px;
  border-color: rgba(255, 93, 221, 0.16);
}

.strategic-matrix-table thead th {
  height: 48px;
  padding: 6px 8px;
  color: var(--neon-text);
  box-shadow: inset 0 -1px rgba(255, 93, 221, 0.28);
  font: 900 11px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: left;
}

.strategic-matrix-table thead th:first-child,
.strategic-matrix-table tbody th {
  width: 138px;
}

.strategic-matrix-table tbody th {
  padding: 6px 9px;
  background: var(--neon-row);
  box-shadow: 8px 0 16px rgba(5, 2, 12, 0.28);
}
.strategic-matrix-table tbody tr:nth-child(even) th { background: var(--neon-row-alt); }

.league-cell {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}
.league-code {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(255, 93, 221, 0.48);
  border-radius: 7px;
  background: rgba(255, 93, 221, 0.05);
  color: var(--neon-pink);
  font: 850 8px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0;
}
.league-copy { min-width: 0; }
.league-name { margin: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.league-total { margin-top: 0; color: #74839a; font-size: 8px; }

.strategic-matrix-table td {
  height: 48px;
  padding: 6px 8px;
  text-align: left;
}
.strategic-matrix-table td:nth-child(2) { --multiplier-tone: #4b98ff; }
.strategic-matrix-table td:nth-child(3) { --multiplier-tone: #3bbcff; }
.strategic-matrix-table td:nth-child(4) { --multiplier-tone: #36e4d1; }
.strategic-matrix-table td:nth-child(5) { --multiplier-tone: #63ed92; }
.strategic-matrix-table td:nth-child(6) { --multiplier-tone: #9fea4a; }
.strategic-matrix-table td:nth-child(7) { --multiplier-tone: #ffce45; }
.strategic-matrix-table td:nth-child(8) { --multiplier-tone: #ff8b55; }
.strategic-matrix-table td:nth-child(9) { --multiplier-tone: #ff5fc9; }

.matrix-cell {
  position: relative;
  display: block;
  justify-items: stretch;
  min-height: 36px;
  padding: 0 0 3px;
  text-align: left;
}
.matrix-cell::before {
  content: "";
  position: absolute;
  top: -6px;
  bottom: -6px;
  left: -8px;
  width: 3px;
  background: var(--multiplier-tone);
}
.cell-count { display: block; width: 100%; font-size: 12px; text-align: left; }
.cell-count::after { color: inherit; }
.cell-gmt { display: block; width: 100%; margin-top: 2px; font-size: 8px; text-align: left; }
.cell-meter {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  width: auto;
  background: rgba(255,255,255,0.05);
}
.cell-meter i { background: var(--multiplier-tone); box-shadow: none; }
.matrix-empty { display: block; padding-left: 0; color: #665b7c; }

.matrix-notes {
  gap: 13px;
  margin-top: 9px;
  padding: 0;
  color: #887c9b;
  font-size: 8px;
}
.matrix-notes span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-dot-count { background: #4b98ff; }
.legend-dot-reward { background: #54eea4; }

@media (max-width: 900px) {
  .strategic-heading { grid-template-columns: 1fr; gap: 12px; }
  .neon-matrix-header { grid-template-columns: 1fr; align-items: flex-start; }
  .matrix-header-tools { width: 100%; justify-items: start; }
  .summary-pills { justify-content: flex-start; }
  .cycle-controls { width: min(100%, 420px); }
  .cycle-readout { flex: 1; }
}

@media (max-width: 640px) {
  .strategic-page { padding: 14px 10px 24px; }
  .neon-matrix { min-height: 620px; padding: 10px; border-radius: 14px; }
  .neon-matrix-header { padding: 0; }
  .matrix-caption-copy h1 { font-size: 1.22rem; }
  .summary-pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .summary-pills span { justify-content: center; min-width: 0; }
  .strategic-status { margin: 0 0 8px; }
  .strategic-matrix-scroll { margin: 0; max-height: none; }
  .strategic-matrix-table { min-width: 880px; }
  .strategic-matrix-table thead th:first-child,
  .strategic-matrix-table tbody th { width: 142px; }
  .league-cell { grid-template-columns: 30px minmax(0, 1fr); gap: 6px; }
  .league-code { width: 29px; height: 29px; }
  .cycle-button { padding: 0 10px; }
  .cycle-current { min-width: 70px; }
  .matrix-notes { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cycle-button { transition: none; }
}
