/* Tournament Platform prototype. One file, no outside fonts, no motion. */
:root {
  --ink: #1d1d1f;
  --ink2: #6e6e73;
  --line: #d2d2d7;
  --field: #86868b;
  --soft: #f5f5f7;
  --accent: #0071e3;
  --accent-dark: #0058b0;
  --link: #0066cc;
  --bad: #b3261e;
  --tint: #eaf3fd;
}
* { box-sizing: border-box; transition: none !important; animation: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: #fff; color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); }
h1 { font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 12px; }
h2 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; margin: 48px 0 12px; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
p { margin: 0 0 16px; max-width: 64ch; }
.lead { color: var(--ink2); font-size: 17px; margin: 0 0 32px; max-width: 60ch; }
.small { font-size: 14px; color: var(--ink2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; background: #fff; padding: 8px 12px; z-index: 5; border: 1px solid var(--ink); border-radius: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Top bar and footer */
.top { border-bottom: 1px solid var(--line); background: #fff; }
.top-in { max-width: 880px; margin: 0 auto; height: 56px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 17px; font-weight: 600; color: var(--ink); text-decoration: none; }
.who { font-size: 14px; color: var(--ink2); }
.who a { margin-left: 12px; }
main { width: 100%; max-width: 880px; margin: 0 auto; padding: 48px 24px 96px; outline: none; flex: 1 0 auto; }
main:focus, h1:focus { outline: none; }
.foot { border-top: 1px solid var(--line); }
.foot-in { max-width: 880px; margin: 0 auto; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; font-size: 14px; color: var(--ink2); }
.foot-in p { margin: 0; max-width: none; }
.foot .check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.foot input[type=checkbox] { width: 18px; height: 18px; min-height: 0; margin: 0; }
.back { display: inline-block; margin: 0 0 24px; min-height: 24px; font-size: 15px; }
.ids { display: none; font-size: 14px; color: var(--ink2); margin: 0 0 8px; }
body.show-ids .ids { display: block; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 22px; background: #fff; color: var(--ink);
  font: 600 16px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  text-decoration: none; cursor: pointer;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.secondary { border-color: var(--field); }
.btn.secondary:hover { background: var(--soft); }
.btn.text { color: var(--link); padding: 0 8px; background: none; }
.btn.text:hover { text-decoration: underline; }
.btn[disabled] { background: var(--soft); color: var(--ink2); border-color: var(--line); cursor: default; }
.link { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; font-size: 14px; color: var(--link); cursor: pointer; text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 32px; }

/* Forms */
.field { margin: 0 0 24px; max-width: 560px; }
.field.wide { max-width: none; }
label.lab, .lab { display: block; font-weight: 600; margin-bottom: 6px; }
.help { color: var(--ink2); font-size: 14px; margin: 6px 0 0; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=tel], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--field); border-radius: 10px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--bad); }
.err { color: var(--bad); font-size: 14px; margin: 6px 0 0; }
.choices { display: flex; flex-wrap: wrap; gap: 12px; }
.choice { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1px solid var(--field); border-radius: 10px; cursor: pointer; }
.choice input { width: 20px; height: 20px; margin: 0; }
.choice:has(input:checked) { border-color: var(--accent); outline: 1px solid var(--accent); background: var(--tint); }
.inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline .field { margin-bottom: 0; flex: 1 1 200px; }

input[type=file] { width: 100%; min-height: 44px; font: inherit; color: var(--ink); padding: 0; }
input[type=file]::file-selector-button { min-height: 44px; padding: 0 20px; margin-right: 12px; border: 1px solid var(--field); border-radius: 22px; background: #fff; color: var(--ink); font: 600 16px -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif; cursor: pointer; }
details.more { margin: 32px 0 0; border-top: 1px solid var(--line); }
details.more > summary { min-height: 56px; display: flex; align-items: center; cursor: pointer; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: "Show"; margin-left: auto; font-size: 16px; font-weight: 600; color: var(--link); }
details.more[open] > summary::after { content: "Hide"; }
details.more > .inside { padding: 0 0 8px; }

/* Lists, rows, cards */
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; min-height: 72px; }
a.row:hover .t { text-decoration: underline; }
.row .main { min-width: 0; }
.row .t { font-weight: 600; display: block; }
.row .m { color: var(--ink2); font-size: 14px; display: block; }
.row .side { display: flex; align-items: center; gap: 16px; flex: none; }
.go { color: var(--link); font-weight: 600; white-space: nowrap; }
.facts { display: grid; grid-template-columns: 200px 1fr; gap: 12px 24px; margin: 0 0 8px; }
.facts dt { color: var(--ink2); }
.facts dd { margin: 0; }
.stats { display: flex; gap: 48px; margin: 0 0 32px; flex-wrap: wrap; }
.stat b { display: block; font-size: 32px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; }
.stat span { color: var(--ink2); font-size: 14px; }

/* Status words with a small dot. The dot never carries meaning alone. */
.st { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; white-space: nowrap; }
.st i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--field); background: #fff; flex: none; }
.st-ok i { background: var(--accent); border-color: var(--accent); }
.st-warn i { background: var(--ink); border-color: var(--ink); }
.st-bad i { background: #fff; border-color: var(--ink); }

/* Inline messages */
.banner { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 24px 0; background: var(--soft); max-width: 680px; }
.banner b { display: block; margin-bottom: 2px; }
.banner p { margin: 0 0 8px; }
.banner .actions { margin-top: 12px; }
.b-warn { background: #fff; border-color: var(--ink); }
.b-bad { background: #fff; border: 2px solid var(--ink); }
.b-ok { background: var(--tint); border-color: var(--tint); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl caption { text-align: left; }
.tbl th { text-align: left; font-size: 14px; font-weight: 600; color: var(--ink2); padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 16px 12px 0; height: 56px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; }
.tbl tr.total td { font-weight: 600; }

/* Segmented switch */
.seg { display: inline-flex; border: 1px solid var(--field); border-radius: 22px; overflow: hidden; margin: 0 0 24px; }
.seg button { min-height: 44px; padding: 0 20px; border: 0; background: #fff; font: inherit; cursor: pointer; color: var(--ink); }
.seg button[aria-pressed=true] { background: var(--ink); color: #fff; }

/* Bracket */
.match { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 0 0 12px; max-width: 560px; }
.match .vs { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; }
.match .vs.win { font-weight: 600; }

@media print {
  .top, .foot, .back, .actions, .noprint, .seg { display: none !important; }
  main { padding: 0; max-width: none; }
}
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } .row { flex-wrap: wrap; } }
