:root {
  color-scheme: light;
  --bg: #f4f5f0;
  --paper: #fff;
  --ink: #172c25;
  --sub: #52625a;
  --line: #d8dfd6;
  --green: #126349;
  --soft: #e5f2e9;
  --bad: #85391e;
  --warn: #fff1e7;
  --home: #226c53;
  --draw: #c5a24d;
  --away: #7790a5;
  font-family: Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-variant-numeric: tabular-nums;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

button,input {
  font: inherit;
}

button,a,input {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

button:focus-visible,a:focus-visible,input:focus-visible {
  outline: 3px solid #0675a4;
  outline-offset: 3px;
}

[hidden] {
  display: none!important;
}

.skip {
  position: absolute;
  left: 0;
  top: -100px;
}

.skip:focus {
  top: 0;
  background: #fff;
  padding: 12px;
  z-index: 5;
}

.site-header {
  background: #18372c;
  color: #f7faf4;
}

.header-inner,main {
  max-width: 1000px;
  margin: auto;
  padding-inline: clamp(16px,4vw,42px);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 18px;
}

.wordmark {
  font-size: 24px;
  letter-spacing: .012em;
  font-weight: 850;
  text-decoration: none;
}

.product {
  font-size: 13px;
  color: #d9e8df;
}

nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

nav a {
  display: grid;
  min-height: 44px;
  place-items: center;
  min-width: 68px;
  padding: 6px 13px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .02em;
  color: #dfebe4;
}

nav a[aria-current=page] {
  background: #e5efd9;
  color: #18372c;
}

nav a:hover {
  box-shadow: inset 0 0 0 1px #b5cabb;
}

main {
  padding-top: clamp(26px,5vw,56px);
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
  outline: 0;
}

.title-bar,.section-line,.card-head,.dialog-header,.action-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.title-bar {
  margin-bottom: 22px;
}

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

h1 {
  font-size: clamp(30px,4vw,42px);
  line-height: 1.18;
  font-weight: 740;
  letter-spacing: -.04em;
}

h2 {
  font-size: 19px;
  line-height: 1.4;
}

h3 {
  font-size: 17px;
  line-height: 1.4;
}

.quiet,.primary {
  border-radius: 6px;
  min-height: 44px;
  padding: 8px 16px;
  font-weight: 620;
}

.quiet {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #bac7bc;
}

.primary {
  color: white;
  background: var(--green);
  border: 1px solid var(--green);
}

button:disabled {
  opacity: .55;
  cursor: default;
}

button:hover:enabled {
  filter: brightness(.96);
}

.card,.panel,.empty {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.card,.panel {
  padding: clamp(16px,3vw,24px);
}

.card+.card,.panel+.panel {
  margin-top: 12px;
}

.panel {
  margin-bottom: 18px;
}

.panel>p,.empty p,.sub,.meta {
  color: var(--sub);
}

.panel>p {
  margin-top: 6px;
}

.panel>h2+.table-wrap,.panel>.fact-list,.panel>.action-line,.panel>ul {
  margin-top: 14px;
}

.empty {
  padding: clamp(28px,5vw,56px) 20px;
  text-align: center;
}

.empty h2 {
  font-size: 18px;
  margin-bottom: 5px;
}

.empty p {
  font-size: 14px;
}

.notice {
  margin-bottom: 16px;
  background: var(--soft);
  color: #154c37;
  border: 1px solid #bad2bf;
  border-radius: 8px;
  padding: 12px 16px;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.notice.error {
  background: var(--warn);
  color: var(--bad);
  border-color: #e4b8a9;
}

.file-label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin: 14px 0 6px;
}

input[type=file] {
  max-width: 100%;
  min-height: 44px;
  color: var(--sub);
}

input::file-selector-button {
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid #bac7bc;
  border-radius: 6px;
  background: #f5f7f3;
  color: var(--ink);
  margin-right: 10px;
  font-weight: 600;
}

form .primary {
  margin-left: 8px;
}

.section-line {
  margin: 18px 0 10px;
}

.meta {
  font-size: 13px;
  overflow-wrap: anywhere;
}

.card-head {
  align-items: flex-start;
  min-width: 0;
}

.card-head h2,.card-head h3 {
  overflow-wrap: anywhere;
}

.tag {
  display: inline-block;
  flex: none;
  max-width: 45%;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 12px;
  color: var(--sub);
  background: #eff1eb;
  overflow-wrap: anywhere;
}

.tag.good {
  background: var(--soft);
  color: var(--green);
}

.tag.warn {
  background: var(--warn);
  color: var(--bad);
}

.odds {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  margin: 14px 0;
}

.odds>div {
  border-top: 4px solid var(--home);
  padding-top: 4px;
}

.odds>div:nth-child(2) {
  border-color: var(--draw);
}

.odds>div:nth-child(3) {
  border-color: var(--away);
}

.odds small {
  display: block;
  color: var(--sub);
}

.odds strong {
  font-size: clamp(18px,3vw,24px);
  letter-spacing: -.04em;
}

.card-tail {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fact-list {
  display: grid;
  grid-template-columns: minmax(6em,auto) 1fr;
  column-gap: 16px;
  row-gap: 8px;
  margin: 14px 0 0;
}

dt {
  color: var(--sub);
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.progress {
  margin-top: 12px;
}

progress {
  display: block;
  max-width: 100%;
  accent-color: var(--green);
  height: 10px;
  margin-top: 5px;
}

.list {
  padding-left: 1.3em;
  overflow-wrap: anywhere;
}

.list li+li {
  margin-top: 4px;
}

.score-list {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.score-list li {
  background: #f3f6ef;
  padding: 9px 10px;
  border-radius: 6px;
}

.score-list strong {
  display: block;
  font-size: 18px;
}

.score-list span {
  font-size: 13px;
  color: var(--sub);
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  padding-bottom: 4px;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

th,td {
  text-align: right;
  white-space: nowrap;
  padding: 8px 9px;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--sub);
  font-size: 13px;
}

td:first-child,th:first-child {
  text-align: left;
}

.samples {
  font-size: 36px;
  line-height: 1.3;
  letter-spacing: -.045em;
  font-weight: 740;
}

.action-line {
  justify-content: flex-start;
  flex-wrap: wrap;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  max-height: 82dvh;
  width: min(540px,calc(100vw - 28px));
  padding: 20px;
  color: var(--ink);
}

dialog::backdrop {
  background: rgb(9 29 20/.45);
}

.dialog-header {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dialog-header .quiet {
  flex: none;
}

dialog h3 {
  margin-top: 16px;
}

@media(max-width:620px) {
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 12px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  nav {
    grid-column: 1/-1;
    width: 100%;
    margin: 0;
    justify-content: space-between;
    gap: 4px;
  }
  nav a {
    min-width: 0;
    flex: 1;
  }
  .wordmark {
    font-size: 21px;
  }
  .product {
    font-size: 12px;
  }
  form .primary {
    display: block;
    margin: 10px 0 0;
  }
  .fact-list {
    column-gap: 10px;
  }
}

@media(prefers-reduced-motion:no-preference) {
  dialog[open] {
    animation: reveal .12s ease-out;
  }
  @keyframes reveal {
    from {
      opacity: .7;
      transform: translateY(3px);
    }
  }
}

.pager {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.job-details {
  margin-top: 12px;
}
.job-details summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 600;
}
select {
  max-width: 100%;
  min-height: 44px;
  font: inherit;
  color: var(--ink);
  border: 1px solid #bac7bc;
  border-radius: 6px;
  background: white;
  padding: 6px;
}
#download {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.device-link {
  color: #e4eee7;
  font-size: 13px;
  white-space: nowrap;
}
