﻿:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #e9edef;
  background: #10171b;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 88px;
  padding: 0 max(6vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2b353c;
}
.brand {
  color: #ecf4ed;
  text-decoration: none;
  font-size: 20px;
  letter-spacing: 0.13em;
  font-weight: 750;
}
.brand span {
  font-weight: 350;
  color: #a5b5aa;
}
.badge,
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #b5d0a0;
}
.badge {
  border: 1px solid #44513e;
  border-radius: 30px;
  padding: 8px 12px;
}
main {
  max-width: 1180px;
  margin: auto;
  padding: 64px 24px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 64px;
}
.intro {
  padding: 14px 0;
}
h1 {
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.045em;
  margin: 22px 0;
}
h2 {
  font-size: 25px;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 10px 0 22px;
}
.intro > p:not(.eyebrow) {
  max-width: 420px;
  color: #a9b5bb;
  line-height: 1.8;
}
.engine-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}
.engine-tags li {
  margin: 0;
  padding: 0;
  list-style: none;
}
.engine-tags li::marker,
.history li::marker {
  content: none;
}
.engine-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.engine-tags span {
  border: 1px solid #36434b;
  border-radius: 5px;
  padding: 7px 10px;
  color: #bfccd0;
  font-size: 11px;
}
.panel {
  background: #192328;
  border: 1px solid #344047;
  border-radius: 14px;
  padding: 30px;
}
.muted {
  color: #9aaab2;
  font-size: 13px;
  line-height: 1.65;
}
.small {
  font-size: 11px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #c8d4d9;
}
label span {
  font-size: 11px;
}
input,
textarea,
select {
  font: inherit;
  color: #eef3f5;
  background: #111a1f;
  border: 1px solid #3a494f;
  border-radius: 6px;
  padding: 12px;
  min-width: 0;
  width: 100%;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #bad5a4;
  box-shadow: 0 0 0 2px #bad5a422;
}
textarea {
  resize: vertical;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.7;
}
button {
  cursor: pointer;
  border: 1px solid transparent;
  background: #c5dcae;
  color: #172017;
  border-radius: 7px;
  padding: 13px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
button:hover {
  filter: brightness(1.07);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
#sign-in {
  width: 100%;
}
body.signed-in main {
  grid-template-columns: minmax(0, 1fr);
}
.quiet {
  background: transparent;
  border: 1px solid #425149;
  color: #cee0bf;
  font-size: 11px;
  white-space: nowrap;
}
.heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.heading-actions .quiet {
  width: auto;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.file {
  display: flex;
  flex-direction: row;
  align-items: center;
  color: #c5dcae;
}
.file input {
  font-size: 11px;
  padding: 6px;
  max-width: 240px;
}
#status {
  grid-column: 1/-1;
  border-left: 2px solid #bad5a4;
  padding: 8px 16px;
  margin: 0;
  color: #b7c6cd;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.results {
  grid-column: 1/-1;
  border-top: 1px solid #344047;
  padding-top: 30px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.card {
  background: #192328;
  border: 1px solid #344047;
  border-radius: 10px;
  padding: 20px;
}
.card h3 {
  margin: 0 0 18px;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.player-card {
  grid-column: 1 / -1;
}
.closest-summary {
  margin: -6px 0 14px;
  color: #d5e2d4;
  font-size: 13px;
}
.match-table {
  margin-top: 8px;
}
.match-table th {
  position: static;
}
.match-table th:last-child,
.match-table td:last-child {
  text-align: right;
}
/* Five nowrap columns overflow the card below ~620px. Stack each engine instead. */
@media (max-width: 640px) {
  .cards,
  .player-card {
    min-width: 0;
  }
  .match-table,
  .match-table tbody,
  .match-table tr,
  .match-table td {
    display: block;
    width: auto;
    white-space: normal;
  }
  .match-table thead {
    display: none;
  }
  .match-table {
    width: 100%;
  }
  .match-table tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 8px;
    row-gap: 8px;
    align-items: start;
    padding: 10px 0;
    border-top: 1px solid #2b373e;
  }
  .match-table td {
    min-width: 0;
    padding: 0;
    border: 0;
    text-align: left;
    overflow-wrap: anywhere;
  }
  .match-table td:first-child,
  .match-table td:last-child {
    grid-column: 1 / -1;
  }
  .match-table td:last-child {
    text-align: right;
  }
  .match-table td[data-label] {
    overflow-wrap: normal;
  }
  .match-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: #9eb0b6;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .match-table tr:first-child {
    border-top: 0;
    padding-top: 2px;
  }
  .match-table td[data-label] strong,
  .match-table .match-count {
    white-space: nowrap;
  }
  .match-table button.details-link {
    white-space: nowrap;
  }
}
.match-count {
  display: block;
  margin-top: 2px;
  color: #9eb0b6;
  font-size: 11px;
}
.closest-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid #5d7a52;
  background: #243226;
  color: #e4f3d4;
  font-size: 11px;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}
tr.is-closest td:first-child {
  color: #f4f7f1;
}
button.details-link,
button.depth-more,
button.dialog-close {
  width: auto;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 650;
}
button.details-link {
  display: inline-flex;
}
button.dialog-close {
  background: transparent;
  color: #e7f0ea;
  border-color: #3d4e56;
  font-size: 18px;
  line-height: 1;
}
.engine-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: min(86vh, 860px);
  margin: auto;
  padding: 0;
  border: 1px solid #3d4e56;
  border-radius: 16px;
  background: #141c20;
  color: #e7f0ea;
}
.engine-dialog::backdrop {
  background: rgba(5, 9, 11, 0.72);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  background: #182226;
  border-bottom: 1px solid #2e3d44;
}
.dialog-head h3 {
  margin: 0;
  font-size: 16px;
}
.dialog-scroll {
  max-height: calc(86vh - 64px);
  overflow: auto;
  padding: 0 0 12px;
}
.dialog-preface {
  padding: 14px 18px 8px;
}
.dialog-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px 16px;
  margin-bottom: 12px;
}
.dialog-summary p {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #a8bbc3;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dialog-summary strong {
  color: #f4f7f1;
  font-size: 16px;
  letter-spacing: 0;
  text-transform: none;
}
.tier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.tier-legend li {
  border-radius: 99px;
  padding: 3px 8px;
  font-size: 11px;
  border: 1px solid transparent;
}
.engine-dialog tbody tr.tier-top1 td,
.tier-legend .tier-top1 {
  background: #1c2b22;
  color: #e7f6dc;
}
.engine-dialog tbody tr.tier-top2 td,
.tier-legend .tier-top2 {
  background: #17303a;
  color: #e5f4fb;
}
.engine-dialog tbody tr.tier-top3 td,
.tier-legend .tier-top3 {
  background: #2c2818;
  color: #f8f0d8;
}
.engine-dialog tbody tr.tier-miss td,
.tier-legend .tier-miss {
  background: #2a1e22;
  color: #f6e4e4;
}
.engine-dialog tbody tr.tier-top1 td:first-child {
  box-shadow: inset 3px 0 0 #8dce7a;
}
.engine-dialog tbody tr.tier-top2 td:first-child {
  box-shadow: inset 3px 0 0 #6eb6e0;
}
.engine-dialog tbody tr.tier-top3 td:first-child {
  box-shadow: inset 3px 0 0 #e0b85a;
}
.engine-dialog tbody tr.tier-miss td:first-child {
  box-shadow: inset 3px 0 0 #c47a84;
}
.choice-tag.tier-top1 {
  color: #e7f6dc;
  background: #234232;
  border-color: #6eaa78;
}
.choice-tag.tier-top2 {
  color: #e5f4fb;
  background: #1a4252;
  border-color: #6eb4d4;
}
.choice-tag.tier-top3 {
  color: #f8ecc8;
  background: #3a3420;
  border-color: #d4b15a;
}
.choice-tag.tier-miss {
  color: #f3d4d4;
  background: #3a2428;
  border-color: #b56d72;
}
.depth-summary {
  white-space: normal;
}
.depth-chip {
  display: inline-block;
  margin: 2px;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid #3a4a52;
  color: #d5e0d8;
  background: #1a2429;
}
.depth-chip.depth-hit {
  color: #e7f6dc;
  background: #24382a;
  border-color: #6eaa78;
}
.depth-full {
  margin: 6px 0 0;
  color: #c5d4cc;
  font-size: 11px;
  white-space: normal;
}
.engine-dialog table.detail-table {
  border-collapse: separate;
  border-spacing: 0;
}
.engine-dialog thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background-color: #1b262b;
  border-top: 0;
  border-bottom: 1px solid #3d4e56;
  box-shadow: none;
}
.engine-dialog tbody td {
  position: relative;
  z-index: 0;
}
.engine-dialog tbody tr.move-decided td {
  color: #8e9ba2;
  opacity: 0.55;
}
.engine-dialog tbody tr.move-decided .choice-tag,
.engine-dialog tbody tr.move-decided .depth-chip {
  filter: grayscale(0.45) saturate(0.4);
}
.engine-dialog tbody tr.decided-separator td {
  background: #141c20;
  color: #8e9ba2;
  font-size: 11px;
  letter-spacing: 0.01em;
  white-space: normal;
  opacity: 1;
}
.engine-metrics {
  display: grid;
  gap: 14px;
}
.engine-block {
  border-top: 1px solid #2b373e;
  padding-top: 12px;
}
.engine-block h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 650;
  color: #e7f0ea;
}
.scope-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 28px;
}
.scope h5 {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b5d0a0;
}
.metric {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #a8bbc3;
  font-size: 12px;
  padding: 7px 0;
}
.metric strong {
  color: #edf4e9;
  text-align: right;
}
.metric.match-line strong {
  color: #f4f7f2;
  font-size: 15px;
}
.choice-match {
  color: #d7ecc0;
}
.choice-miss {
  color: #e7d3a4;
}
.choice-tag {
  display: inline-block;
  border-radius: 99px;
  padding: 2px 8px;
  font-size: 11px;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
}
.choice-tag.choice-match {
  color: #d7ecc0;
  border-color: #44513e;
  background: #1c2820;
}
.choice-tag.choice-miss {
  color: #e7d3a4;
  border-color: #4a4332;
  background: #241f18;
}
@media (min-width: 900px) {
  .engine-metrics {
    grid-template-columns: 1fr 1fr;
  }
}
.table-wrap {
  max-height: 600px;
  overflow: auto;
  border: 1px solid #344047;
  border-radius: 9px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  white-space: nowrap;
}
caption {
  text-align: left;
  padding: 16px;
  color: #a6b8be;
}
th,
td {
  text-align: left;
  padding: 12px 15px;
  border-top: 1px solid #2b373e;
}
th {
  position: sticky;
  top: 0;
  background: #223028;
  color: #d1e0c4;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tbody tr:nth-child(even) {
  background: #172126;
}
details {
  margin: 24px 0;
  border: 1px solid #344047;
  padding: 18px;
  border-radius: 8px;
}
summary {
  cursor: pointer;
  color: #bbd2aa;
  font-size: 12px;
}
pre {
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
footer {
  grid-column: 1/-1;
  border-top: 1px solid #2b353c;
  padding-top: 24px;
  color: #8d9fa7;
  font-size: 11px;
  line-height: 1.8;
}
[hidden] {
  display: none !important;
}
main.stack {
  grid-template-columns: minmax(0, 1fr);
}
nav {
  display: flex;
  align-items: center;
  gap: 16px;
}
nav a,
.actions a {
  color: #cee0bf;
  text-decoration: none;
  font-size: 13px;
}
a.action {
  text-decoration: none;
  background: #c5dcae;
  color: #172017;
  border-radius: 7px;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 650;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}
.actions a,
.history a.row,
.history li.row {
  border: 1px solid #344047;
  background: #192328;
  border-radius: 10px;
  padding: 14px 16px;
}
.history {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.history a.row,
.history li.row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.findings {
  align-self: stretch;
  width: 100%;
}
.findings table {
  width: 100%;
  border: 1px solid #344047;
  border-radius: 4px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
}
.findings th,
.findings td {
  position: static;
  padding: 6px 8px;
  border-top: 0;
  border-bottom: 1px solid #344047;
  border-right: 1px solid #2c383e;
  text-align: left;
  font-weight: 450;
  vertical-align: top;
  background: transparent;
}
.findings th:last-child,
.findings td:last-child {
  border-right: 0;
}
.findings tbody tr:last-child th,
.findings tbody tr:last-child td {
  border-bottom: 0;
}
.findings thead th {
  background: #152026;
  color: #9eb0b6;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.findings tbody th {
  color: #e7f0e4;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}
.findings td {
  color: #d5e0e4;
  font-variant-numeric: tabular-nums;
}
.findings .muted {
  margin: 0;
}
.notice {
  border-left: 2px solid #e2c48a;
  padding: 8px 14px;
  color: #e7d7b4;
  margin: 0 0 16px;
}
.badge-state {
  display: inline-block;
  border: 1px solid #44513e;
  border-radius: 99px;
  padding: 3px 8px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}
.badge-state[data-state="running"],
.badge-state[data-state="queued"] {
  color: #e2c48a;
}
.badge-state[data-state="failed"],
.badge-state[data-state="partial_failure"] {
  color: #e7b4b4;
}
.badge-state[data-state="completed"] {
  color: #c5dcae;
}
.chart {
  margin: 18px 0 8px;
  min-width: 0;
}
.chart-plot {
  position: relative;
  width: 100%;
  height: 360px;
}
.chart-empty {
  margin: 8px 0 18px;
  color: #9aaab2;
  font-size: 13px;
}
.chart-toggle {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
}
.chart-toggle button {
  width: auto;
}
.chart-toggle button[aria-pressed="false"] {
  background: transparent;
  border: 1px solid #425149;
  color: #cee0bf;
}
.chart-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.chart-controls .chart-toggle {
  margin: 0 0 12px;
}
.move-time {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 8px 0 24px;
}
.move-time h3,
.move-time .card h4 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}
.search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}
.key-secret {
  font-family: ui-monospace, monospace;
  overflow-wrap: anywhere;
}
tr.depth td {
  white-space: normal;
  background: #121a1e;
}
nav .quiet {
  width: auto;
}
@media (max-width: 760px) {
  main {
    grid-template-columns: 1fr;
    padding-top: 26px;
    gap: 28px;
  }
  .intro {
    padding: 0;
  }
  h1 {
    font-size: 48px;
  }
  .badge {
    display: none;
  }
  .panel {
    padding: 22px;
  }
  .heading {
    align-items: flex-start;
  }
  .heading h2 {
    font-size: 21px;
  }
  .chart-plot {
    height: 280px;
  }
  .findings thead {
    display: none;
  }
  .findings table,
  .findings tbody,
  .findings tr,
  .findings th,
  .findings td {
    display: block;
    width: auto;
    border-right: 0;
  }
  .findings tbody tr {
    border-bottom: 1px solid #344047;
  }
  .findings tbody tr:last-child {
    border-bottom: 0;
  }
  .findings tbody tr:last-child th,
  .findings tbody tr:last-child td {
    border-bottom: 0;
  }
  .findings td {
    padding-top: 2px;
    padding-bottom: 7px;
  }
  .findings td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 1px;
    color: #8ea0a6;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .findings tbody th {
    background: #152026;
  }
}
