/* Design from the corners prototype (corners-notes/public/prototype), which David approved. */
/* The two typefaces, Latin and Latin Extended (accented names), each loaded when a page uses it. */
@font-face {
  font-family: 'Antonio';
  src: url(/fonts/antonio-latin-wght-normal.woff2) format('woff2');
  font-weight: 100 700;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Antonio';
  src: url(/fonts/antonio-latin-ext-wght-normal.woff2) format('woff2');
  font-weight: 100 700;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Liter';
  src: url(/fonts/liter-latin-400-normal.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Liter';
  src: url(/fonts/liter-latin-ext-400-normal.woff2) format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
/* Design tokens. Every colour and the heading type come from here: near-black,
   heavy upper-case headings, red as the one accent. */
:root {
  --ink: #f2f2f3;
  --muted: #a6a6ad;
  --rule: #2c2c32;
  --rule-strong: #4a4a52;
  --chip: #26262c;
  --bg: #111113;
  /* Cards, inputs, popovers; a raised or hovered row; a hovered menu item. */
  --surface: #19191c;
  --surface-2: #1e1e22;
  --hover: #26262c;
  --bar-bg: rgb(17 17 19 / 0.96);
  --action: #f2f2f3;
  --action-ink: #111113;
  --focus: #e5484d;
  --shadow: rgb(0 0 0 / 0.5);
  --ok: #4cc38a;
  /* Text on an --ok background, such as the Same person button. */
  --ok-ink: #08140e;
  --ok-bg: rgb(76 195 138 / 0.14);
  --warn: #f5a524;
  --warn-bg: rgb(245 165 36 / 0.12);
  --bad: #ff6b6b;
  --bad-bg: rgb(255 107 107 / 0.13);
  --blue: #6f9bff;
  --red: #ff5a5f;
  /* A boxer's own rating on a chart: blue, since red reads as a loss. */
  --self: var(--blue);
  /* The opponent timeline's per-bout rating line, beside the boxer's own (blue) one. */
  --per-bout: #b98cff;
  /* The paper panel of the home page; tinted in, a career line opened on the boxer page. */
  --paper: #e8e6e1;
  --paper-ink: #111113;
  --paper-muted: #55555c;
  --opened: color-mix(in srgb, var(--paper) 9%, var(--surface));
  /* The typefaces, set here only: Liter for text, Antonio Bold for the wordmark, headings and
     figures. Liter has one weight; text that needs weight is Antonio. */
  --sans: 'Liter', Arial, sans-serif;
  --head-font: 'Antonio', 'Arial Narrow', sans-serif;
  --head-weight: 700;
  --head-case: uppercase;
  --head-spacing: 0.01em;
  --h1-size: 24px;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
/* The hidden attribute hides at every width, whatever display a rule gives the element (a
   career's opened line is a grid row on a phone). */
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  height: 100%;
}
body {
  font: 400 14px/1.5 var(--sans);
  /* Liter has one weight: the browser never thickens it into a made-up bold. */
  font-synthesis: style;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button {
  font: inherit;
  cursor: pointer;
}
.ico {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* shell: a top bar with the brand, the three record-book places, search and the account menu */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}
.brand .logo {
  flex-shrink: 0;
}
.brand b {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav {
  display: flex;
  gap: 4px;
}
.nav a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}
.nav a:hover {
  background: var(--chip);
}
.nav a.on {
  background: var(--action);
  color: var(--action-ink);
}
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--chip);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  color: var(--ink);
}
.page {
  padding: 24px 32px 48px;
  max-width: 1400px;
  margin: 0 auto;
}
h1 {
  font-family: var(--head-font);
  font-size: var(--h1-size);
  font-weight: var(--head-weight);
  text-transform: var(--head-case);
  margin: 0 0 4px;
  letter-spacing: var(--head-spacing);
}
/* Every heading is Antonio; each place sets its own size. */
h2,
h3 {
  font-family: var(--head-font);
  font-weight: var(--head-weight);
}
.sub {
  color: var(--muted);
  margin: 0 0 20px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 10px;
}
.back:hover {
  color: var(--ink);
}
.back .ico {
  width: 16px;
  height: 16px;
}
.crumbs {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.crumbs a {
  color: inherit;
}

/* common */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13.5px;
}
.btn:hover {
  border-color: var(--rule-strong);
}
.btn.primary {
  background: var(--action);
  color: var(--action-ink);
  border-color: var(--action);
}
.btn.ok {
  background: var(--ok);
  color: var(--ok-ink);
  border-color: var(--ok);
}
.btn.small {
  padding: 3px 10px;
  font-size: 12.5px;
}
.btn:disabled {
  opacity: 0.4;
  cursor: default;
}
/* A chip is Liter wherever it sits, a heading included. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--sans);
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 9px;
  border: 1px solid var(--rule);
  background: var(--surface);
  white-space: nowrap;
}
.chip.ok {
  color: var(--ok);
  background: var(--ok-bg);
  border-color: color-mix(in srgb, var(--ok) 35%, transparent);
}
.chip.warn {
  color: var(--warn);
  background: var(--warn-bg);
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
}
.chip.bad {
  color: var(--bad);
  background: var(--bad-bg);
  border-color: color-mix(in srgb, var(--bad) 35%, transparent);
}
.chip.grey {
  color: var(--muted);
  background: var(--chip);
}
table {
  border-collapse: collapse;
  width: 100%;
}
th,
td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
th {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
}
tr.click {
  cursor: pointer;
}
/* Only where a pointer hovers: a touch screen keeps :hover on the row it tapped. The row is
   painted, not its cells, so a line laid out as a grid on a phone highlights as one block. */
@media (hover: hover) {
  tr.click:hover {
    background: var(--surface-2);
  }
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12.5px;
}
.red {
  color: var(--red);
}
.blue {
  color: var(--blue);
}
.win {
  color: var(--ok);
}
.loss {
  color: var(--bad);
}
a.lk {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--rule-strong);
}
a.lk:hover {
  text-decoration-color: var(--ink);
}

/* review stepper */
.steps {
  display: flex;
  gap: 8px;
  margin: 4px 0 18px;
  flex-wrap: wrap;
}
.steps a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  font-size: 13.5px;
}
.steps a .n .ico {
  width: 12px;
  height: 12px;
}
/* A step's number, and an answer's on the findings step. */
.steps a .n,
.opt .n {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--chip);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-family: var(--head-font);
  font-weight: var(--head-weight);
}
.steps a.on {
  background: var(--action);
  color: var(--action-ink);
  border-color: var(--action);
}
.steps a.on .n {
  background: var(--action-ink);
  color: var(--action);
}
.steps a.done .n {
  background: var(--ok);
  color: var(--ok-ink);
}
/* Centred on the line it sits in: an inline-flex box's baseline is the flag's bottom edge, which
   would lift the flag and code above the text beside them. */
.cty {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  vertical-align: middle;
}
.flag {
  width: 18px;
  height: 13.5px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--shadow);
  flex-shrink: 0;
}
.totals {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 150px;
}
.stat b {
  display: block;
  font-size: 20px;
  font-family: var(--head-font);
  font-weight: var(--head-weight);
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}

/* who is who */
.who {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
/* Narrow, the list sits above its panel and scrolls in place: it stays at the top of the page. */
@media (max-width: 1000px) {
  .who {
    grid-template-columns: minmax(0, 1fr);
  }
  .who .plist {
    position: static;
    max-height: 50vh;
  }
}
.plist {
  padding: 6px 0;
  position: sticky;
  top: calc(var(--bar) + 12px);
  max-height: calc(100vh - var(--bar) - 140px);
  overflow-y: auto;
}
.plist h3 {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 12px 14px 4px;
  display: flex;
  justify-content: space-between;
}
.plist button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 7px 14px;
  font-size: 13.5px;
}
.plist button:hover {
  background: var(--surface-2);
}
.plist button.sel {
  background: var(--chip);
}
.plist button .c {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
  flex-shrink: 0;
}
.dot.ok {
  background: var(--ok);
}
.dot.new {
  background: var(--blue);
}
.match {
  padding: 16px 18px;
}
.match h2 {
  font-size: 18px;
  margin: 0;
}
.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 0 16px;
}
.colh {
  font-size: 11px;
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.appear {
  margin-bottom: 12px;
}
.appear .lbl {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.cand {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px;
}
.cand-h {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.cand-h b {
  font-size: 15px;
}
.verdict {
  font-size: 12px;
}
.decide {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  align-items: center;
}
.done-banner {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: 13.5px;
  margin-top: 12px;
}

/* profile */
.prof-h {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 20px;
}
.prof-h h1 {
  margin: 0;
}
.facts {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 13px;
}
.facts > div > b,
.other-names summary b {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.facts > div > b {
  display: block;
}
/* A fact that shows more below it when chosen: the other weights under the latest one; the other
   names, a line of their own under the facts. */
.fact-more summary {
  cursor: pointer;
}
.other-names {
  margin-top: 10px;
  font-size: 13px;
}
.other-names summary b {
  margin-right: 4px;
}
.fact-more .shut,
.fact-more .opened {
  color: var(--muted);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.fact-more summary:hover :is(.shut, .opened) {
  color: var(--ink);
}
.fact-more[open] .shut,
.fact-more:not([open]) .opened {
  display: none;
}
/* A boxer list's country and weight selects (views/BoxerTable.tsx). */
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
/* Busy lists: the Events or Boxers list while the one its filters asked for is on its way
   (list-busy.js). It fades after a moment, so a quick answer does not flicker, and comes back at
   once. */
.events-list[aria-busy='true'],
.boxer-table[aria-busy='true'] {
  opacity: 0.45;
  cursor: progress;
  transition: opacity 0.2s ease 0.12s;
}
/* The Events list's search box and pickers (routes/events.tsx): on a phone the box takes its own
   line and the pickers share the lines below, two by two. */
@media (max-width: 760px) {
  .event-filters .top-search {
    flex-basis: 100%;
  }
  .event-filters .picker {
    flex: 1 1 140px;
  }
  .event-filters .picker-btn {
    min-width: 0;
    width: 100%;
  }
}
/* The Boxers list's ranges (views/BoxerTable.tsx, RangeSlider; range.js): two handles on one bar,
   the chosen part filled between them. --lo and --hi place the handles, from 0 to 1 along the bar;
   the fill runs between the handles' centres, half a handle in from each end. A range may hold an
   option after its bar, on its line, such as the weight's "Latest weight". On a phone the bar
   narrows so the range stays on one line within the screen. */
.kg-range {
  --thumb: 18px;
  display: inline-flex;
  max-width: 100%;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px 16px;
  background: var(--surface);
}
.kg-range-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}
.kg-range .filter-check {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  white-space: nowrap;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
}
.kg-range-label {
  flex-shrink: 0;
  min-width: 6.5em;
  white-space: nowrap;
}
/* A range too short for a bar clears a limit it holds with a link. */
.kg-range-clear {
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--muted);
  text-underline-offset: 2px;
}
.kg-range-clear:hover {
  color: var(--ink);
}
.kg-range-bar {
  position: relative;
  width: 180px;
  min-width: 64px;
  height: 28px;
}
.kg-range-bar::before,
.kg-range-bar::after {
  content: '';
  position: absolute;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
}
.kg-range-bar::before {
  left: calc(var(--thumb) / 2);
  right: calc(var(--thumb) / 2);
  background: var(--rule-strong);
}
.kg-range-bar::after {
  left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--lo));
  right: calc(var(--thumb) / 2 + (100% - var(--thumb)) * (1 - var(--hi)));
  background: var(--ink);
}
.kg-range-bar input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  background: none;
  appearance: none;
  -webkit-appearance: none;
  /* Only the handles take the pointer, so each reaches its own handle through the other bar. */
  pointer-events: none;
}
.kg-range-bar input::-webkit-slider-runnable-track {
  height: 100%;
  background: none;
}
.kg-range-bar input::-moz-range-track {
  background: none;
}
.kg-range-bar input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
  width: var(--thumb);
  height: var(--thumb);
  margin-top: calc((28px - var(--thumb)) / 2);
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--ink);
  cursor: grab;
}
.kg-range-bar input::-moz-range-thumb {
  pointer-events: auto;
  box-sizing: border-box;
  width: var(--thumb);
  height: var(--thumb);
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--ink);
  cursor: grab;
}
.kg-range-bar input:focus-visible {
  outline: none;
}
.kg-range-bar input:focus-visible::-webkit-slider-thumb {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.kg-range-bar input:focus-visible::-moz-range-thumb {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
/* A boxer list's count and page links, under the table (views/BoxerTable.tsx). */
.pager {
  display: flex;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 14px;
}
.pager .pages {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.pager .btn {
  min-width: 32px;
  justify-content: center;
}
.pager .btn.on {
  background: var(--action);
  border-color: var(--action);
  color: var(--action-ink);
}
.pager .btn.off {
  color: var(--muted);
  cursor: default;
}
.pager .gap {
  color: var(--muted);
  padding: 0 4px;
}
/* Our own chevron, inside the padding: the browser's arrow sits against the rounded edge. */
select {
  font: inherit;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 36px 7px 14px;
  appearance: none;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236b6b6b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 14px center / 12px 12px;
  cursor: pointer;
}
.note {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--chip);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 12px;
}
.empty {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

/* A not found, forbidden or failed page inside the layout (routes/error-page.tsx). */
.error-page {
  padding: 40px 20px;
  text-align: center;
}
.error-page h1 {
  margin: 0 0 6px;
}

/* Matchups' pair detail (views/PairDetail.tsx): the chains of wins each way, side by side. */
.chains {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 12px;
}
.chain-list {
  padding: 12px 16px;
}
.chain-list ol {
  margin: 0;
  padding-left: 20px;
  font-size: 13.5px;
}
.chain-list li + li {
  margin-top: 6px;
}
.opp-res {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12.5px;
}

/* app additions */
td.nowrap,
.nowrap {
  white-space: nowrap;
}
summary::-webkit-details-marker {
  display: none;
}
summary {
  list-style: none;
}

img.avatar {
  object-fit: cover;
  background: var(--chip);
}

/* Top bar: one height on every page, its content aligned with the page's */
:root {
  --bar: 60px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bar-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.topbar-in {
  display: flex;
  align-items: center;
  gap: 22px;
  height: var(--bar);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1;
}
.top-search {
  position: relative;
  flex: 0 1 380px;
}
.top-search .ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.top-search input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 14px 8px 36px;
  background: var(--surface-2);
}
/* A boxer search inside a page, such as Matchups' pickers. */
.page > .top-search {
  max-width: 480px;
  margin: 16px 0;
}
.top-search input:focus {
  outline: 2px solid var(--focus);
  background: var(--surface);
}
/* The Events search box's × (event-search.js): inside the box, at its end. */
.top-search .clear-search {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  padding: 2px 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.top-search .clear-search:hover {
  color: var(--ink);
  background: var(--hover);
}
.top-search:has(.clear-search) input {
  padding-right: 36px;
}
.account {
  position: relative;
}
.account summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  border-radius: 50%;
}
.account summary::-webkit-details-marker {
  display: none;
}
.account summary .avatar {
  width: 32px;
  height: 32px;
}
.account[open] summary .avatar {
  box-shadow: 0 0 0 3px var(--rule-strong);
}
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--shadow);
  padding: 6px;
}
.account-who {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  font-size: 13px;
}
.account-who small {
  color: var(--muted);
}
.account-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  text-decoration: none;
  color: var(--ink);
}
.account-menu a:hover {
  background: var(--hover);
}
.account-menu .ico {
  width: 16px;
  height: 16px;
}

/* An upload's stages on its import page: Received, Processing, Live. */
.stages {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
}
.stages li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  color: var(--muted);
}
.stages .mark {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--rule-strong);
  align-self: center;
}
.stages li.current {
  color: var(--ink);
}
.stages li.current .mark {
  border-color: var(--warn);
}
.stages li.done {
  color: var(--ink);
}
.stages li.done .mark {
  border-color: var(--ok);
  background: var(--ok)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 10px no-repeat;
}
.stages .stage-note {
  font-size: 12.5px;
  color: var(--muted);
}

/* The event page: Team Canada, the weight classes, the participants and the bracket. */
.team {
  padding: 12px 16px;
  margin-bottom: 16px;
}
.team-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.team-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 4px 24px;
}
.team-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
  border-top: 1px solid var(--rule);
}
.wtag {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.wtag:hover {
  color: var(--ink);
  text-decoration: underline;
}
.finish {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.weights {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 18px;
}
.wrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.wsex {
  width: 56px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.wchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
}
.wchip:hover {
  border-color: var(--rule-strong);
}
.wchip.on {
  background: var(--action);
  border-color: var(--action);
  color: var(--action-ink);
}
.wchip .flag {
  width: 14px;
  height: 10.5px;
}
.division-h {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.division-h h2 {
  margin: 0;
  font-size: 20px;
}
.entrants {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr));
  column-gap: 24px;
  padding: 6px 16px;
  margin-bottom: 18px;
}
.prow {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto 34px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.prow.ca .pn {
  font-family: var(--head-font);
  font-weight: var(--head-weight);
}
.pn {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.prow .small {
  text-align: right;
}
/* Nothing in the bracket grows: it scrolls sideways only. */
.bracket-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}
.bracket {
  position: relative;
}
.round-h {
  position: absolute;
  top: 0;
  font-size: 12px;
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bracket .lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bracket .lines path {
  fill: none;
  stroke: var(--rule-strong);
  stroke-width: 1.5;
}
/* A bout card: only a name's text links to the boxer; the rest of the card is .fight-open, which
   opens the bout's details (public/bout.js), with its chevron at the right edge. */
.fight {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.bracket .fight {
  position: absolute;
}
.fight:hover,
.fight:has(.fight-open:focus-visible) {
  border-color: var(--rule-strong);
  background: var(--surface-2);
}
.fight-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 3px;
  border-radius: 7px;
  color: var(--muted);
}
.fight-open:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.chev {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fight-open .chev {
  opacity: 0;
  transition: opacity 0.12s;
}
.fight:hover .chev,
.fight-open:focus-visible .chev {
  opacity: 1;
}
/* Touch screens have no hover: the chevron always shows. */
@media (hover: none) {
  .fight-open .chev {
    opacity: 1;
  }
}
.fr {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 22px 0 8px;
  border-left: 3px solid var(--red);
}
.fr.blue {
  border-left-color: var(--blue);
  border-top: 1px solid var(--rule);
}
.fight .fr.red {
  border-top-left-radius: 7px;
}
/* A sheet that prints no corners: the two boxers in printed order, no corner colours. */
.fr.nocorner {
  border-left-color: var(--rule);
}
.fr.side-blue {
  border-top: 1px solid var(--rule);
}
.fight .fr.side-red {
  border-top-left-radius: 7px;
}
.fight .fr.side-blue,
.fight .fr.blue {
  border-bottom-left-radius: 7px;
}
.fn {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--ink);
}
/* Above .fight-open, so only the name's text is the boxer's link. */
.fn a {
  position: relative;
  z-index: 2;
  color: inherit;
  text-decoration: none;
}
.fn a:hover {
  text-decoration: underline;
}
.fr.lost .fn,
.fr.lost .fs {
  color: var(--muted);
}
.fs {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
/* A saved bye: a placeholder card with the boxer and "Bye", nothing to open (routes/events.tsx). */
.bye {
  background: var(--surface);
  border: 1px dashed var(--rule-strong);
  border-radius: 8px;
  overflow: hidden;
}
.bracket .bye {
  position: absolute;
}
.bye .fn.muted {
  color: var(--muted);
}
.fight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(232px, 100%), 1fr));
  gap: 10px;
}
.other-h {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 18px 0 8px;
}

/* A bout row in a table opens the bout modal; its chevron link is what Tab reaches. */
td.more {
  width: 36px;
  padding-left: 0;
  padding-right: 8px;
  text-align: right;
}
.bout-more {
  display: inline-flex;
  padding: 2px;
  border-radius: 6px;
  color: var(--muted);
}
tr.click:hover .bout-more {
  color: var(--ink);
}
.bout-more:focus-visible {
  outline: 2px solid var(--focus);
}
html.bout-loading,
html.bout-loading [data-bout] {
  cursor: progress;
}
/* The short note under a page, such as where the event page's results and ratings come from. */
.page-note {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

/* The bout modal (views/BoutDetails.tsx): full screen on a phone. */
.bout-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: 12px;
  box-shadow: 0 16px 48px var(--shadow);
}
.bout-modal::backdrop {
  background: rgb(0 0 0 / 0.6);
}
.bout-modal-in {
  padding: 16px 18px 18px;
}
/* The modal focuses the bout itself when it opens, so Tab starts from the top. */
.bout:focus {
  outline: none;
}
.bout-h {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.bout-h h2 {
  flex: 1;
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}
.bout-h form {
  margin: 0;
}
.bout-close {
  width: 30px;
  height: 30px;
  margin: -4px -6px 0 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.bout-close:hover {
  background: var(--hover);
  color: var(--ink);
}
.bout-corners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.bout-corner {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--red);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.bout-corner.blue {
  border-left-color: var(--blue);
}
/* Only the corner's label takes its colour, not the whole card. */
.bout-corner.red,
.bout-corner.blue {
  color: var(--ink);
}
.bout-corner.nocorner {
  border-left-color: var(--rule);
}
.bout-side {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bout-corner.red .bout-side {
  color: var(--red);
}
.bout-corner.blue .bout-side {
  color: var(--blue);
}
.bout-name {
  font-size: 15px;
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.bout-name:hover {
  text-decoration: underline;
}
.bout-rating {
  margin-top: 4px;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.bout-rating b {
  white-space: nowrap;
}
.bout-expected {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
}
.bout-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.bout-section h3 {
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.bout-facts {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 12px;
  margin: 0;
  font-size: 13.5px;
}
.bout-facts dt {
  color: var(--muted);
}
.bout-facts dd {
  margin: 0;
}
.bout-judges {
  font-size: 13px;
}
.bout-judges th,
.bout-judges td {
  padding: 6px 8px;
}
.bout-judges th:first-child,
.bout-judges td:first-child {
  padding-left: 0;
}
.bout-judges .num {
  width: 70px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bout-judges th {
  background: none;
}
.bout-judges tr:last-child td {
  border-bottom: 0;
}
@media (max-width: 760px) {
  .bout-modal {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
}

/* Import review: who is who (COR-24) */
.review-list .ptools {
  padding: 12px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.review-list .ptools input,
.review-list .ptools select {
  font: inherit;
  font-size: 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--surface);
  width: 100%;
  min-width: 0;
}
.review-list .row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
}
.review-list .row:hover {
  background: var(--surface-2);
}
.review-list .row.sel {
  background: var(--chip);
}
.review-list .row .c {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}
.dot.done {
  background: var(--muted);
}
/* What a step has left, in the warning colour: it is what holds the Next button. */
.steps .left {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--warn);
  color: var(--bg);
}
/* The button to the next step, at the end of the steps; waiting, it says why when pointed at. */
.steps-next {
  position: relative;
  display: flex;
  margin-left: auto;
}
.steps-next .btn.off {
  opacity: 0.45;
  cursor: not-allowed;
}
.steps-next[data-tip]:hover::after,
.steps-next[data-tip]:focus-within::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  width: max-content;
  max-width: 280px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 8px 24px var(--shadow);
  color: var(--ink);
  font-size: 13px;
}
.appear .txt {
  font-size: 12.5px;
  margin-top: 2px;
}
.appear mark {
  background: rgb(250 204 21 / 0.35);
  border-radius: 3px;
  padding: 0 2px;
  color: inherit;
}
.match .fights {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fight-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
}
.v-ok {
  color: var(--ok);
}
.v-warn {
  color: var(--warn);
}
.v-bad {
  color: var(--bad);
}
.v-grey {
  color: var(--muted);
}
.btn.picked {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.chip.blue {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--blue) 35%, transparent);
}
.match .colh {
  margin-top: 20px;
}
.match .appear {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 8px 10px;
  margin: 0;
}
.match .apps {
  gap: 8px 12px;
}

/* Import review: confirm and save (COR-24) */
.confirm {
  padding: 18px 20px;
}
.confirm h2 {
  font-size: 16px;
  margin: 0 0 10px;
}
.ck {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 4px 0;
}
.ck-mark {
  width: 16px;
  text-align: center;
}
.noticed details {
  border-top: 1px solid var(--rule);
  padding: 8px 0;
}
.noticed summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.noticed summary::-webkit-details-marker {
  display: none;
}
.noticed .n {
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.noticed .ex {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0 38px;
}
.save-row {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.preview-divs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr));
  gap: 12px;
}
.preview-div h3 {
  font-size: 14px;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.preview-fights {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pfight {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}
.pfight .r {
  text-align: right;
}
.pfight .how {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.pfight .won {
  font-family: var(--head-font);
  font-weight: var(--head-weight);
}
.confirm .colh {
  margin-top: 18px;
}
.confirm + .colh {
  margin-top: 24px;
}
.pfight {
  display: block;
  padding: 0;
}
.pfight summary {
  display: grid;
  /* Long names wrap inside their column instead of widening the page on a phone. */
  grid-template-columns: 26px minmax(0, 1fr) auto minmax(0, 1fr);
  overflow-wrap: anywhere;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  cursor: pointer;
  list-style: none;
}
.pfight summary::-webkit-details-marker {
  display: none;
}
.pfight .num {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pfight.repeated {
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
  background: var(--warn-bg);
}
.pfight .printed {
  padding: 0 10px 8px 46px;
  font-size: 11.5px;
  color: var(--muted);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.match .pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 12px;
  margin-top: 14px;
}
.match .apps.one {
  grid-template-columns: 1fr;
}
.review-list .row .tag {
  margin-left: 6px;
  font-size: 11px;
  color: var(--warn);
}
.match .pair .fight-row {
  grid-template-columns: 60px 1fr;
}
.match .pair .fight-row > :last-child {
  grid-column: 2;
}

/* Search suggestions (search.js) */
.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--shadow);
  padding: 6px;
  text-align: left;
}
.suggest a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
}
.suggest a:hover,
.suggest a.hi {
  background: var(--hover);
}
.suggest .empty {
  padding: 12px;
}
/* A suggestion's icon, then its name over a second line, then a boxer's record. */
.top-search .suggest a .ico {
  position: static;
  transform: none;
  color: var(--muted);
}
.suggest .sg-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.suggest .sg-text > * {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* "Boxers" and "Events" above their suggestions in the top bar. */
.suggest .sg-head {
  padding: 8px 10px 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* A searchable select (picker.js): a button like a select, a panel with a search and a list. */
.picker {
  position: relative;
}
.picker-btn {
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 36px 7px 14px;
  background: var(--surface)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236b6b6b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 14px center / 12px 12px;
  cursor: pointer;
  min-width: 180px;
  text-align: left;
}
.picker-btn:focus-visible,
.picker-btn[aria-expanded='true'] {
  outline: 2px solid var(--focus);
}
.picker-face {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
/* The list opens under its button, from its left edge rightwards. */
.picker-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--shadow);
  padding: 6px;
}
/* A short list with no search: as wide as its button, or its longest choice. */
.picker-panel.short {
  width: max-content;
  min-width: 100%;
}
.picker-panel input {
  width: 100%;
  font: inherit;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 7px 10px;
  margin-bottom: 6px;
}
.picker-panel input:focus {
  outline: 2px solid var(--focus);
}
.picker-list {
  max-height: 320px;
  overflow-y: auto;
}
.picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
}
.picker-item.hi {
  background: var(--hover);
}
.picker-item.on {
  background: var(--chip);
}
.picker-list .empty {
  padding: 12px;
}

/* The boxer table: a header sorts by its column; a no-break space keeps the arrow beside its label. */
th a.sort {
  color: inherit;
  text-decoration: none;
}
th a.sort:hover {
  color: var(--ink);
}
th a.sort.on {
  color: var(--ink);
}
th a.sort.on::after {
  content: '\a0↓';
}
th a.sort.on.asc::after {
  content: '\a0↑';
}
/* On a desktop, the boxer table keeps its column widths whatever the sort, filter or page shows:
   the one column without a width takes what the others leave. */
@media (min-width: 1001px) {
  .boxer-table table {
    table-layout: fixed;
  }
  .boxer-table th:nth-child(1) {
    width: 22%;
  }
  .boxer-table th:nth-child(2) {
    width: 72px;
  }
  .boxer-table th:nth-child(3) {
    width: 76px;
  }
  .boxer-table th:nth-child(4) {
    width: 16%;
  }
  .boxer-table th.num {
    width: 80px;
  }
  .boxer-table th.rating {
    width: 180px;
  }
  /* "Not rated yet:" above the counted bouts to go, each on one line. */
  .not-rated .to-go {
    white-space: nowrap;
  }
}
a.name {
  color: var(--ink);
  text-decoration: none;
}
a.name:hover {
  text-decoration: underline;
}
.between {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
td.num,
th.num {
  text-align: right;
}

/* Add event */
.steps > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface);
  font-size: 13.5px;
}
.steps > span .n {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--chip);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-family: var(--head-font);
  font-weight: var(--head-weight);
}
.steps > span.on {
  background: var(--action);
  color: var(--action-ink);
  border-color: var(--action);
}
.steps > span.on .n {
  background: var(--action-ink);
  color: var(--action);
}
.drop {
  padding: 36px 20px;
  text-align: center;
  border: 2px dashed var(--rule-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.drop.over {
  border-color: var(--blue);
  background: var(--surface-2);
}
.drop > .ico {
  width: 28px;
  height: 28px;
  color: var(--muted);
}
.drop-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
/* The file field hides inside its button; upload.js shows the chosen file. */
.file-pick {
  position: relative;
  cursor: pointer;
}
.file-pick input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.file-pick:focus-within {
  outline: 2px solid var(--focus);
}
.drop-chosen {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface-2);
}
.drop-name {
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drop-error {
  margin: 0;
  color: var(--bad);
  font-size: 13px;
  white-space: pre-wrap;
}
/* A table fills its card; the header's background stays inside the rounded corners. */
.card:has(> table) {
  overflow: hidden;
}
.section-h {
  font-size: 16px;
  margin: 22px 0 10px;
}

/* Boxer profile: record, career by event, weights */
.prof-h {
  flex-wrap: wrap;
}
.prof-record {
  min-width: 190px;
}
.prof-record .colh {
  margin: 0;
}
.big-record {
  font-size: 26px;
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  line-height: 1.2;
}
.recbar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--chip);
  margin: 2px 0 4px;
}
.recbar .w {
  background: var(--ok);
}
.recbar .l {
  background: var(--bad);
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  font-size: 11.5px;
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  background: var(--chip);
  color: var(--muted);
}
.pill.W {
  background: var(--ok-bg);
  color: var(--ok);
}
.pill.L {
  background: var(--bad-bg);
  color: var(--bad);
}
.form {
  display: inline-flex;
  gap: 3px;
  vertical-align: middle;
}
.form .pill {
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  border-radius: 4px;
  padding: 0 3px;
}
.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
  margin-top: 18px;
}
/* The boxer's shared note (views/BoxerNote.tsx, public/note.js). */
.boxer-note {
  margin-top: 18px;
  padding: 14px 18px;
}
.boxer-note-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.boxer-note-h .colh {
  margin: 0;
}
.boxer-note-body {
  max-width: 760px;
  overflow-wrap: anywhere;
}
.boxer-note-body > :first-child {
  margin-top: 0;
}
.boxer-note-body > :last-child {
  margin-bottom: 0;
}
.boxer-note-body p {
  margin: 0 0 8px;
}
.boxer-note-body h1,
.boxer-note-body h2 {
  font-family: var(--sans);
  text-transform: none;
  letter-spacing: 0;
  margin: 14px 0 6px;
}
.boxer-note-body h1 {
  font-size: 18px;
}
/* Liter has no bold: a note's bold words are Antonio, as other emphasis is. */
.boxer-note-body b,
.boxer-note-body strong {
  font-family: var(--head-font);
  font-weight: var(--head-weight);
}
.boxer-note-body h2 {
  font-size: 15px;
}
.boxer-note-body ul,
.boxer-note-body ol {
  margin: 0 0 8px;
  padding-left: 22px;
}
.boxer-note-body a {
  color: var(--blue);
}
.boxer-note-by {
  margin: 10px 0 0;
}
.boxer-note-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.boxer-note-tools [data-command='bold'] {
  font-family: var(--head-font);
  font-weight: var(--head-weight);
}
.boxer-note-tools [data-command='italic'] {
  font-style: italic;
}
.boxer-note-editor {
  min-height: 120px;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 8px;
  background: var(--bg);
  outline: none;
}
.boxer-note-editor:focus {
  border-color: var(--focus);
}
.boxer-note-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.career {
  margin-bottom: 10px;
  overflow: hidden;
}
.career-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
}
/* The career's own rows and cells only (`> tbody > tr`): an opened line holds a table of its own. */
table.hist {
  table-layout: fixed;
}
table.hist > tbody > tr > td:nth-child(1) {
  width: 46px;
}
table.hist > tbody > tr > td:nth-child(2) {
  width: 20%;
}
table.hist > tbody > tr > td:nth-child(4) {
  width: 120px;
}
table.hist > tbody > tr > td:nth-child(5) {
  width: 112px;
}
table.hist > tbody > tr > td:nth-child(6) {
  width: 36px;
}
table.hist > tbody > tr:last-child > td {
  border-bottom: 0;
}
/* A country beside a name, its code on the name's line, and the opponent's rating going in after
   it. */
table.hist .cty {
  margin-left: 4px;
}
table.hist .opp-rating {
  margin-left: 10px;
}
/* A bye in the career: one muted line, no win mark, opponent or score. */
table.hist > tbody > tr.bye > td {
  padding-top: 6px;
  padding-bottom: 6px;
}
/* A career line opened (public/career.js): its chevron turned down, and below it the judges'
   scores, tinted and marked at the left edge apart from the line. */
table.hist > tbody > tr.career-open,
table.hist > tbody > tr.career-open > td {
  background: var(--opened);
}
table.hist > tbody > tr.career-open > td {
  box-shadow: inset 3px 0 0 var(--paper);
  padding: 10px 14px 12px 58px;
}
table.hist tr.open .chev {
  transform: rotate(90deg);
}
table.hist .chev {
  transition: transform 0.12s;
}
[data-career-bout][aria-busy] {
  cursor: progress;
}
button.bout-more {
  border: 0;
  background: none;
  cursor: pointer;
}
.bout-officials .bout-judges {
  width: auto;
  min-width: min(100%, 420px);
}
.bout-officials .bout-judges th {
  padding-top: 0;
}
.bout-officials .bout-judges th.num {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bout-officials .bout-judges td {
  border-bottom-color: color-mix(in srgb, var(--paper) 12%, transparent);
}
.bout-officials p {
  margin: 8px 0 0;
}

/* The boxer's rating: beside the record, and after each event as a line with its range. */
.rating-after {
  color: var(--ink);
}
/* The opponent timeline on the boxer page (views/OpponentTimeline.tsx, public/timeline.js). */
.timeline {
  position: relative;
  margin-top: 8px;
  padding: 10px 12px 0;
}
.timeline svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.timeline .grid {
  stroke: var(--rule);
}
.timeline .start {
  stroke: var(--rule-strong);
  stroke-dasharray: 4 4;
}
.timeline .tick {
  fill: var(--muted);
  font-size: 11px;
}
/* Opponents not rated yet going in: a strip apart from the rating axis, never a low rating. */
.timeline .event-band {
  display: none;
  fill: color-mix(in srgb, var(--ink) 5%, transparent);
}
.timeline.events .event-band {
  display: inline;
}
.timeline .legend-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  cursor: pointer;
}
.timeline .guide {
  stroke: var(--muted);
  stroke-dasharray: 3 3;
  pointer-events: none;
}
.timeline .guide-date {
  fill: var(--muted);
  font-size: 11px;
  pointer-events: none;
}
.timeline .selection {
  fill: color-mix(in srgb, var(--blue) 18%, transparent);
  stroke: var(--blue);
  pointer-events: none;
}
.timeline svg {
  cursor: crosshair;
  user-select: none;
}
.timeline .unrated rect {
  fill: color-mix(in srgb, var(--muted) 10%, transparent);
  rx: 6px;
}
.timeline .self .band {
  fill: color-mix(in srgb, var(--self) 13%, transparent);
}
.timeline .self .line {
  fill: none;
  stroke: var(--self);
  stroke-width: 2.5;
  stroke-linejoin: round;
}
/* One colour per rating method's line (views/OpponentTimeline.tsx). */
.timeline .self.glicko2-bout .line {
  stroke: var(--per-bout);
  stroke-width: 2;
}
.timeline .self.glicko2-bout .band {
  fill: color-mix(in srgb, var(--per-bout) 13%, transparent);
}
.timeline .bout {
  outline: none;
}
.timeline .bout circle {
  fill: var(--surface);
  stroke: var(--muted);
  stroke-width: 2;
}
.timeline .bout.W circle {
  fill: var(--ok);
  stroke: var(--ok);
}
.timeline .bout.L circle {
  stroke: var(--bad);
}
.timeline .bout.D circle {
  fill: var(--muted);
}
.timeline .bout.NC circle {
  stroke-dasharray: 1 3;
}
.timeline .bout.wo circle {
  stroke-dasharray: 2 2;
}
.timeline .bout.W.wo circle {
  fill: var(--surface);
}
.timeline .bout .name {
  fill: var(--ink);
  font-size: 11px;
}
.timeline .bout:focus-visible circle {
  stroke: var(--focus);
  stroke-width: 3;
}
.timeline.pointing .bout:not(.on) {
  opacity: 0.15;
}
.timeline [data-links] path {
  fill: none;
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
}
.timeline [data-links] .won {
  stroke: var(--ok);
}
.timeline [data-links] .lost {
  stroke: var(--bad);
}
.timeline [data-links] .both {
  stroke: var(--warn);
}
.timeline [data-links] .even {
  stroke: var(--muted);
}
.timeline-card {
  position: absolute;
  z-index: 5;
  max-width: 320px;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: 0 8px 24px var(--shadow);
  font-size: 13px;
  pointer-events: none;
}
.timeline .legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 10px 4px 12px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
}
.timeline .key {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  vertical-align: -1px;
}
.timeline .key.W {
  background: var(--ok);
  border-color: var(--ok);
}
.timeline .key.L {
  border-color: var(--bad);
}
.timeline .key.D {
  background: var(--muted);
}
.timeline .key.NC {
  border-style: dotted;
}
.timeline .key.wo {
  border-style: dashed;
}
.timeline .key.self {
  width: 14px;
  height: 3px;
  border: 0;
  border-radius: 2px;
  background: var(--self);
  vertical-align: 2px;
}
.timeline .key.self.glicko2-bout,
.timeline-help .key.self.glicko2-bout {
  background: var(--per-bout);
}
/* The chart's title and its "How to read this" button; the help opens below the button. */
.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 10px;
}
.timeline-head .section-h {
  margin: 0;
}
.timeline-head [popovertarget] {
  anchor-name: --timeline-help;
}
.timeline-help {
  position-anchor: --timeline-help;
  position-area: bottom span-left;
  margin: 6px 0 0;
  max-width: min(440px, calc(100vw - 24px));
  padding: 14px 16px 6px;
  border: 1px solid var(--rule-strong);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: 0 8px 24px var(--shadow);
  font-size: 13.5px;
  line-height: 1.45;
}
.timeline-help h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.timeline-help ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline-help li {
  margin-bottom: 10px;
}
.timeline-help li.muted {
  color: var(--muted);
  font-size: 12.5px;
}
.timeline-help .links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin-top: 6px;
}
.timeline-help .link {
  display: inline-block;
  width: 18px;
  vertical-align: 3px;
  border-top: 2px dashed var(--muted);
}
.timeline-help .link.won {
  border-color: var(--ok);
}
.timeline-help .link.lost {
  border-color: var(--bad);
}
.timeline-help .link.both {
  border-color: var(--warn);
}
.timeline-help .key {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 2px;
  border-radius: 50%;
  vertical-align: -1px;
}
.timeline-help .key.W {
  background: var(--ok);
}
.timeline-help .key.self {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--self);
  vertical-align: 3px;
}

/* Matchups (routes/matchups.tsx): the ladder (views/Ladder.tsx), each opponent's line under its
   row, the pair's detail a line opens (public/matchups.js), and the weight-class lists. The ladder
   uses the timeline's head and "How to read this" help. */
.matchups-who {
  margin: -4px 0 14px;
}
.ladder {
  /* Every row's columns: name, track, then chance and remove. Each track draws the same band. */
  --who: 13rem;
  --end: 5.25rem;
  margin-top: 8px;
  padding: 4px 0;
}
.ladder-track .grid {
  stroke: var(--rule);
}
.ladder-track .band {
  fill: color-mix(in srgb, var(--self) 13%, transparent);
}
.ladder-track .line {
  stroke: var(--self);
  stroke-width: 2.5;
}
.ladder-axis,
.ladder-self,
.ladder-row {
  position: relative;
  display: grid;
  grid-template-columns: var(--who) minmax(0, 1fr) var(--end);
  align-items: center;
}
.ladder-axis {
  height: 24px;
}
.ladder-ticks {
  display: block;
  width: 100%;
  height: 16px;
  overflow: visible;
}
.ladder-ticks .tick {
  fill: var(--muted);
  font-size: 11px;
}
.ladder-who {
  min-width: 0;
  padding: 0 10px 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ladder-who .cty {
  margin-left: 4px;
}
.ladder-self {
  padding: 6px 0;
  color: var(--self);
}
.ladder-self .key.self {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: var(--self);
  vertical-align: 3px;
}
.ladder-own {
  display: block;
  white-space: nowrap;
}
.ladder-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ladder-row {
  border-top: 1px solid var(--rule);
  cursor: pointer;
}
svg.ladder-track {
  display: block;
  width: 100%;
  height: 26px;
}
.ladder-track .range {
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
}
.ladder-track .dot {
  fill: var(--ink);
  stroke: var(--surface);
  stroke-width: 2;
}
.ladder-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-right: 10px;
}
.ladder-chance {
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  font-size: 15px;
}
.ladder-remove {
  padding: 0 5px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.2;
  text-decoration: none;
}
.ladder-remove:hover {
  color: var(--ink);
}
.ladder-remove:focus-visible {
  outline: 2px solid var(--focus);
}
.ladder-line {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 14px;
  padding: 0 10px 8px 14px;
  color: var(--muted);
  font-size: 12.5px;
}
.ladder-line .pair-more {
  margin-left: auto;
}
.pair-more .chev {
  transition: transform 0.12s;
}
.ladder-row.open .pair-more .chev {
  transform: rotate(90deg);
}
[data-pair][aria-busy] {
  cursor: progress;
}
@media (hover: hover) {
  .ladder-row:hover {
    background: color-mix(in srgb, var(--surface-2) 60%, transparent);
  }
  .ladder-row:hover .pair-more {
    color: var(--ink);
  }
}
/* An opened line's detail: tinted and marked at the left edge, as a career line's judges. */
.pair-open {
  grid-column: 1 / -1;
  padding: 12px 14px 14px;
  background: var(--opened);
  box-shadow: inset 3px 0 0 var(--paper);
  cursor: auto;
}
.pair-record {
  margin: 0 0 10px;
}
.pair-detail .section-h {
  margin: 18px 0 8px;
}
.ladder-strip {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--rule-strong);
}
.ladder-strip .colh {
  padding: 0 14px 4px;
}
.not-rated {
  font-size: 12.5px;
  white-space: normal;
}
.matchups-weights {
  margin-top: 22px;
}
.weight-list tr.on {
  background: color-mix(in srgb, var(--self) 8%, transparent);
}
.weight-list td.num,
.weight-list td.add {
  width: 1%;
  white-space: nowrap;
}
.weight-list td.add {
  text-align: right;
}
@media (max-width: 760px) {
  .ladder {
    --who: 7.5rem;
    --end: 4.25rem;
  }
  .ladder-who {
    padding-left: 10px;
  }
  .ladder-who .cty {
    display: flex;
    margin-left: 0;
    font-size: 11px;
  }
  /* Every other tick, so the numbers fit a phone's narrow track. */
  .ladder-ticks .tick.minor {
    display: none;
  }
  .ladder-line {
    padding-left: 10px;
  }
  .pair-open {
    padding: 10px 10px 12px;
  }
}

@media (max-width: 1000px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .topbar {
    position: static;
  }
  .topbar-in {
    flex-wrap: wrap;
    gap: 10px;
    height: auto;
    padding: 10px 16px;
  }
  .topbar-right {
    flex-basis: 100%;
  }
  /* Wide tables scroll inside their card instead of the page. */
  .card:has(> table) {
    overflow-x: auto;
  }
  .page {
    padding: 18px 16px 40px;
  }
  table.hist > tbody > tr > td:nth-child(2),
  table.hist > tbody > tr > td:nth-child(5) {
    display: none;
  }
  table.hist > tbody > tr.bye > td:nth-child(2) {
    display: table-cell;
  }
}

/* Sign-in and members (routes/account.tsx, routes/members.tsx). */
body.bare main.sign-in {
  max-width: 380px;
  margin: 0 auto;
  padding: 12vh 20px 48px;
  overflow: visible;
}
.sign-in .brand {
  padding: 0 0 28px;
}
.sign-in-card {
  padding: 20px;
  margin-bottom: 16px;
}
body.bare main.sign-in.wide {
  max-width: 600px;
}
/* The privacy page (routes/privacy.tsx). */
.privacy {
  padding: 4px 22px 8px;
  margin-bottom: 16px;
  line-height: 1.55;
}
.privacy h2 {
  font-size: 15px;
  margin: 18px 0 6px;
}
.privacy ul {
  padding-left: 18px;
}
.privacy p,
.privacy ul {
  margin: 0 0 8px;
}
.btn.wide {
  width: 100%;
  justify-content: center;
  padding: 9px 14px;
}
.link-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.link-form input,
.invite input {
  font: inherit;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--surface);
}
.link-form input:focus,
.invite input:focus {
  outline: 2px solid var(--focus);
}
.or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 12.5px;
}
.or::before,
.or::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--rule);
}
.auth-error {
  color: var(--bad);
  margin: 10px 0 0;
}
.save-row .auth-error {
  margin: 0;
}
.account-menu form {
  margin: 0;
}
.link-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ink);
  font-size: 13.5px;
  text-align: left;
}
.link-button:hover {
  background: var(--hover);
}
.invite {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.invite input[type='email'] {
  flex: 1 1 220px;
}
.invite input[type='text'] {
  flex: 1 1 160px;
}
.inline-form {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}
.inline-form select {
  padding: 3px 26px 3px 10px;
  font-size: 12.5px;
}
.note + .card {
  margin-top: 12px;
}

/* The account page's MCP address and the steps to add it to Claude or ChatGPT. */
.connect-assistant {
  margin-top: 28px;
}
.connect-assistant code {
  font-family: var(--sans);
  font-size: 12.5px;
  background: var(--chip);
  border-radius: 4px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}
.mcp-url code {
  font-size: 14px;
  padding: 6px 10px;
  user-select: all;
}
.connect-steps {
  padding: 4px 18px 10px;
  line-height: 1.55;
}
.connect-steps h3 {
  font-size: 14px;
  margin: 14px 0 4px;
}
.connect-steps p {
  margin: 0 0 8px;
}
a.btn {
  text-decoration: none;
}

/* Two columns side by side, one on a phone: the review's pair of boxers. */
.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
}

/* Headings: heavy upper-case section titles. */
.section-h {
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  text-transform: var(--head-case);
  font-size: 15px;
  letter-spacing: 0.08em;
}

/* The navigation bar: near-black, the active page underlined in red. */
.nav a {
  border-radius: 0;
  padding: 6px 2px;
  margin: 0 10px;
  letter-spacing: 0.02em;
}
.nav a:hover {
  background: none;
  box-shadow: inset 0 -2px 0 var(--rule-strong);
}
.nav a.on {
  background: none;
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--red);
}
.brand b {
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  font-size: 14px;
}
@media (max-width: 760px) {
  .pair {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Who is who: the boxer found in the PDF beside a saved boxer. The two cards share their rows
   (subgrid), so each fact lines up with the same fact of the other side. */
.match-state {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}
.versus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(7, auto);
  column-gap: 14px;
}
/* One column the card's width: a long bout or name wraps inside it instead of widening it. */
.versus .side {
  grid-row: span 7;
  display: grid;
  grid-template-rows: subgrid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 0;
}
.versus .side.book,
.versus .side.other {
  background: var(--surface-2);
}
.side-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}
/* The status sits over the PDF's card and Compare with over the right card, in the cards'
   columns. */
.match-top {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: center;
  margin: 0 0 14px;
}
.match-top .match-state {
  margin: 0;
}
.compare {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.compare-k {
  color: var(--muted);
  margin-right: 2px;
}
.compare .tab,
.compare .picker-btn,
.compare select {
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 5px 12px;
  background-color: var(--surface);
  text-decoration: none;
}
.compare .picker-btn {
  min-width: 0;
  padding-right: 32px;
}
.compare .tab.on,
.compare .tab-pick.on .picker-btn,
.compare .tab-pick.on select {
  border-color: var(--ink);
  background-color: var(--chip);
}
.find-label {
  flex-basis: 100%;
  margin: 20px 0 4px;
  font-size: 15px;
  color: var(--ink);
}
.fact {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: baseline;
  padding: 7px 0;
  border-top: 1px solid var(--rule);
  font-size: 13.5px;
  overflow-wrap: anywhere;
}
.fact .k {
  color: var(--muted);
  font-size: 12px;
}
.fact .nm {
  font-weight: 650;
}
.fact .verdict {
  white-space: nowrap;
}
.fact.none {
  grid-row: span 5;
  display: block;
  margin: 0;
  color: var(--muted);
}
.side-more {
  border-top: 1px solid var(--rule);
}
.printings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}
.printings mark {
  background: rgb(250 204 21 / 0.35);
  border-radius: 3px;
  padding: 0 2px;
  color: inherit;
}
.side .career {
  margin: 10px 0 0;
  line-height: 1.6;
}
.offered {
  display: flex;
  flex-direction: column;
}
.offered .row,
.found-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
}
.offered .row:hover,
.found-row:hover {
  background: var(--hover);
}
.offered .row.sel,
.found-row.sel {
  background: var(--chip);
  font-weight: 600;
}
.offered .tag {
  font-size: 11px;
  color: var(--ok);
  font-weight: 600;
}
.book-find {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.book-find input[type='search'] {
  flex: 1 1 160px;
  min-width: 0;
  font: inherit;
  font-size: 13.5px;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 7px 14px;
  background: var(--surface);
}
.found {
  margin-top: 10px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 4px;
  background: var(--surface);
}
.own-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13.5px;
}
.own {
  margin-top: 16px;
}

/* The list joins the panel on a wide screen: the selected boxer's row takes the panel's colour
   and the line between them stops at it, so the row reads as the panel's tab. */
@media (min-width: 1001px) {
  .who.attached {
    gap: 0;
  }
  .who.attached > .review-list {
    position: sticky;
    z-index: 1;
    margin-right: -1px;
    border-right: 0;
    border-radius: 12px 0 0 12px;
    background: var(--bg);
    box-shadow: inset -1px 0 0 var(--rule);
  }
  .who.attached > .review-list .ptools {
    background: var(--bg);
    box-shadow: inset -1px 0 0 var(--rule);
  }
  .who.attached > .review-list .row:hover:not(.sel) {
    box-shadow: inset -1px 0 0 var(--rule);
  }
  .who.attached > .review-list .row.sel {
    background: var(--surface);
  }
  .who.attached > .match {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }
}
@media (max-width: 760px) {
  .versus,
  .match-top {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 12px;
  }
  /* A bout on two lines: the opponent and the outcome, then the bout number and date under them,
     so a long name keeps the card's width. */
  .versus .fight-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
  }
  .versus .fight-row > :first-child {
    grid-row: 2;
    grid-column: 1 / -1;
  }
}

/* The list's groups after "Needs a decision" fold, like the list's headings. */
.plist .pgroup > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 12px 14px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.plist .pgroup > summary::-webkit-details-marker {
  display: none;
}
.plist .pgroup > summary::before {
  content: '▸';
}
.plist .pgroup[open] > summary::before {
  content: '▾';
}
.plist .pgroup > summary span {
  margin-left: auto;
}
.review-list .row .nm {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-list .row .tag.mine {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Phones (COR-129): every page at 390 px wide. Controls are at least 40 px tall to tap, tables keep
   the columns a phone needs, and only a bracket scrolls sideways. Desktop is untouched. */
@media (max-width: 760px) {
  /* The top bar: the logo and the account on one line, the places under them, the search last. */
  .topbar-in {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      'brand . account'
      'nav nav nav'
      'search search search';
    gap: 0 12px;
    padding: 4px 16px 10px;
  }
  .topbar-right {
    display: contents;
  }
  .brand {
    grid-area: brand;
    min-height: 44px;
  }
  .account {
    grid-area: account;
    align-self: center;
  }
  .account summary {
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
  }
  .account-menu a,
  .account-menu .link-button {
    min-height: 44px;
  }
  .nav {
    grid-area: nav;
    justify-content: space-between;
    margin: 0 -10px;
  }
  .nav a {
    padding: 11px 2px;
  }
  .top-search {
    grid-area: search;
  }
  .top-search input,
  .picker-panel input {
    min-height: 44px;
  }

  /* Controls a thumb taps. */
  .btn,
  select,
  .picker-btn,
  .wchip,
  .steps a,
  .file-pick,
  input:not([type='checkbox'], [type='radio'], [type='file']) {
    min-height: 40px;
  }
  .picker-item {
    min-height: 44px;
  }
  .pager .btn {
    min-width: 40px;
  }
  .bout-close {
    width: 44px;
    height: 44px;
  }
  /* Links that stand alone as controls: a taller hit area without moving the text. */
  .back,
  .crumbs a,
  th a.sort {
    display: inline-block;
    padding: 12px 0;
    margin: -12px 0;
  }
  .back {
    margin-bottom: 0;
  }

  /* Tables: tighter cells, and the columns a phone can do without left out. */
  th,
  td {
    padding: 9px 8px;
  }
  .boxer-table th:nth-child(2),
  .boxer-table td:nth-child(2),
  .boxer-table th:nth-child(3),
  .boxer-table td:nth-child(3),
  .boxer-table th:nth-child(4),
  .boxer-table td:nth-child(4),
  .boxer-table th:nth-child(9),
  .boxer-table td:nth-child(9),
  .events-list th:nth-child(3),
  .events-list td:nth-child(3),
  .events-list th:nth-child(5),
  .events-list td:nth-child(5),
  .events-list th:nth-child(6),
  .events-list td:nth-child(6),
  .events-list th:nth-child(8),
  .events-list td:nth-child(8),
  .pair-bouts th:nth-child(3),
  .pair-bouts td:nth-child(3),
  .members-list th:nth-child(4),
  .members-list td:nth-child(4) {
    display: none;
  }
  /* A pair's shared opponents on Matchups: four columns, so the cells sit closer. */
  .card:has(.opp-res) th,
  .card:has(.opp-res) td {
    padding-inline: 6px;
  }
  /* Imports in progress (views/InProgress.tsx): a long file name breaks, the status chip fits. */
  .card:has(> table tr[data-href^='/imports/']) td {
    overflow-wrap: anywhere;
  }
  .card:has(> table tr[data-href^='/imports/']) td:nth-child(3),
  .card:has(> table tr[data-href^='/imports/']) th:nth-child(3) {
    display: none;
  }
  .card:has(> table tr[data-href^='/imports/']) .chip {
    white-space: normal;
  }

  /* Import review: the list's rows to tap, and the Next button the full width under the steps. */
  .review-list .row {
    min-height: 44px;
  }
  .steps-next,
  .steps-next .btn {
    flex-basis: 100%;
    justify-content: center;
  }

  /* An event's entrants and Team Canada: each name a full-height row to tap. */
  .prow {
    padding: 0;
  }
  .prow .pn {
    padding: 12px 0;
  }
  .team-row .lk {
    display: inline-block;
    padding: 10px 0;
  }

  /* A boxer's career: each bout a row of the win mark, the opponent with their rating going in,
     the result and the chevron; the stage and the date step aside (above). A grid, since a table
     shifts the cells it hides. An opened line's judges span it, its left edge marked. */
  table.hist,
  table.hist > tbody {
    display: block;
  }
  table.hist > tbody > tr {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto 24px;
    align-items: center;
    column-gap: 10px;
    padding: 0 8px 0 12px;
    border-bottom: 1px solid var(--rule);
  }
  table.hist > tbody > tr:last-child {
    border-bottom: 0;
  }
  table.hist > tbody > tr > td,
  table.hist > tbody > tr > td:nth-child(n) {
    width: auto;
    padding: 10px 0;
    border: 0;
  }
  table.hist > tbody > tr.bye > td:nth-child(2) {
    display: block;
    grid-column: 2 / -1;
  }
  table.hist > tbody > tr.career-open {
    box-shadow: inset 3px 0 0 var(--paper);
  }
  table.hist > tbody > tr.career-open > td {
    grid-column: 1 / -1;
    padding: 10px 0 12px;
    box-shadow: none;
  }

  /* The bracket keeps its tree and scrolls sideways from edge to edge of the screen; a swipe
     settles on the next round, and the cards cut by the screen's edge show there is more. */
  .bracket-scroll {
    margin: 0 -16px;
    padding: 0 16px 8px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 16px;
  }
  .round-h {
    scroll-snap-align: start;
  }
  .division-h {
    flex-wrap: wrap;
    row-gap: 2px;
  }
}

/* Import review: the findings step (COR-158) */
.qprogress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}
.qprogress .bar {
  flex: 1;
  max-width: 360px;
  height: 6px;
  background: var(--rule);
  border-radius: 9px;
  overflow: hidden;
}
.qprogress .bar i {
  display: block;
  height: 100%;
  background: var(--ok);
}
.queue .row .qt {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue .row.answered {
  color: var(--muted);
}
.question .kicker {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.question h2 {
  font-size: 17px;
  line-height: 1.4;
  text-transform: none;
}
.qgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 14px;
}
@media (max-width: 1000px) {
  .qgrid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.qform {
  display: block;
}
.opt {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 11px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  margin: 0 0 7px;
  cursor: pointer;
  background: var(--bg);
}
.opt:hover {
  border-color: var(--rule-strong);
}
.opt:has(input:checked) {
  border-color: var(--ink);
  background: var(--surface-2);
}
.opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.opt.dis {
  opacity: 0.45;
  cursor: not-allowed;
}
.opt .n {
  flex-shrink: 0;
}
.opt:has(input:checked) .n {
  background: var(--action);
  color: var(--action-ink);
}
.opt .body {
  flex: 1;
}
.opt .why,
.opt .rsk {
  display: block;
  font-size: 12.5px;
  margin-top: 3px;
}
.opt .why {
  color: var(--muted);
}
.rec {
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ok);
  background: var(--ok-bg);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  white-space: nowrap;
}
.rsk {
  padding-left: 8px;
  border-left: 2px solid;
}
.rsk.bad {
  color: var(--bad);
}
.rsk.warn {
  color: var(--warn);
}
.rsk.ok {
  color: var(--ok);
}
.paper {
  background: #f7f6f2;
  color: #1a1a1a;
  border-radius: 6px;
  padding: 12px 14px;
  position: relative;
}
.paper::before {
  content: 'PDF';
  position: absolute;
  top: 6px;
  right: 8px;
  font: 9px/1 var(--sans);
  color: #999;
  letter-spacing: 0.1em;
}
.pline {
  margin: 0 0 10px;
}
.pline:last-child {
  margin: 0;
}
.psrc {
  font: 10px/1.2 var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #777;
  margin-bottom: 3px;
}
.ptext {
  font: 12px/1.5 var(--sans);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  border-top: 1px dashed #ccc;
  border-bottom: 1px dashed #ccc;
  padding: 4px 0;
}
.ptext .cell {
  white-space: nowrap;
}
.paper mark {
  background: #ffe680;
  outline: 2px solid #e5a000;
  border-radius: 2px;
  color: #000;
  padding: 0 2px;
}
.cap {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}
.qpreview {
  display: none;
  margin-top: 18px;
}
.qpreview table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.qpreview th,
.qpreview td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}
.qpreview th {
  color: var(--muted);
  font-size: 12px;
}
.qform:has(input[name='choice'][value='0']:checked) .qpreview[data-choice='0'],
.qform:has(input[name='choice'][value='1']:checked) .qpreview[data-choice='1'],
.qform:has(input[name='choice'][value='2']:checked) .qpreview[data-choice='2'],
.qform:has(input[name='choice'][value='3']:checked) .qpreview[data-choice='3'],
.qform:has(input[name='choice'][value='4']:checked) .qpreview[data-choice='4'],
.qform:has(input[name='choice'][value='5']:checked) .qpreview[data-choice='5'],
.qform:has(input[name='choice'][value='6']:checked) .qpreview[data-choice='6'],
.qform:has(input[name='choice'][value='7']:checked) .qpreview[data-choice='7'],
.qform:has(input[name='choice'][value='8']:checked) .qpreview[data-choice='8'] {
  display: block;
}
.t-red {
  color: var(--red);
}
.t-blue {
  color: var(--blue);
}
.t-win {
  font-family: var(--head-font);
  font-weight: var(--head-weight);
}
.t-none {
  color: var(--muted);
}
.t-gone {
  color: var(--muted);
  text-decoration: line-through;
}
.t-warn {
  color: var(--warn);
}
.t-bad {
  color: var(--bad);
}
.qfoot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}
.enter {
  margin-top: 16px;
  border-top: 1px solid var(--rule);
  padding-top: 10px;
}
.enter summary {
  cursor: pointer;
}
.enter-grid {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px 14px;
  align-items: center;
  margin: 12px 0;
}
.enter-grid .colh {
  margin: 0;
}
.who-won {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.enter .votes {
  width: 64px;
  font: inherit;
  padding: 3px 6px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}
.enter select {
  font: inherit;
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  max-width: 220px;
}
.qanswered {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}
.undo-form {
  margin-top: 10px;
}
.more-rows summary {
  cursor: pointer;
  margin-top: 6px;
}

/* The home page (views/Landing.tsx), open to anyone: the ring photo with the wordmark held on the
   left while the right column scrolls; a paper panel for organizations. One column on a phone. */
.landing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  /* As tall as the column that scrolls, so the photo can stay put beside it. */
  height: auto;
  min-height: 100vh;
  background: var(--bg);
}
.landing-photo {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.landing-photo picture,
.landing-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.landing-wordmark {
  position: relative;
  margin: 0;
  font-size: clamp(64px, 11vw, 200px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 2px 24px rgb(0 0 0 / 0.35);
}
.landing-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.landing-top {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  padding: 20px clamp(20px, 5vw, 72px);
  background: var(--bg);
  color: var(--muted);
}
.landing-sign-in {
  text-shadow: none;
  background: var(--paper);
  color: var(--paper-ink);
  border-radius: 6px;
  padding: 10px 18px;
  text-decoration: none;
}
.landing-sign-in:hover {
  background: #fff;
}
.landing section {
  padding: clamp(48px, 9vh, 120px) clamp(20px, 5vw, 72px);
}
.landing section > * {
  max-width: 640px;
}
.landing .eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.landing h2 {
  margin: 0 0 20px;
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1;
  text-transform: uppercase;
}
.landing .lead {
  margin: 0 0 36px;
  font-size: 17px;
  line-height: 1.65;
  color: #c4c4ca;
}
.landing-stats {
  margin: 0;
  border-top: 1px solid var(--rule);
}
.landing-stats div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}
.landing-stats dd {
  order: -1;
  margin: 0;
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  font-size: clamp(44px, 4.5vw, 64px);
  line-height: 1;
}
.landing-stats dt {
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.landing-growing {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.landing-orgs {
  background: var(--paper);
  color: var(--paper-ink);
}
.landing-orgs .eyebrow {
  color: var(--paper-muted);
}
.landing-orgs .lead {
  color: #2c2c31;
}
.landing-trusted {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 32px;
  border-top: 1px solid rgb(17 17 19 / 0.15);
}
/* The logo's white ground takes the paper's colour. */
.landing-trusted img {
  flex-shrink: 0;
  width: 112px;
  height: auto;
  mix-blend-mode: multiply;
}
.landing-trusted .eyebrow {
  margin-bottom: 8px;
  color: var(--paper-muted);
}
.landing-org {
  margin: 0;
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  font-size: 30px;
  line-height: 1;
  text-transform: uppercase;
}
.landing-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px clamp(20px, 5vw, 72px);
  color: var(--muted);
}
.landing-mark {
  font-family: var(--head-font);
  font-weight: var(--head-weight);
  font-size: 22px;
  text-transform: uppercase;
  color: var(--ink);
}
.landing-foot a {
  color: var(--muted);
  text-decoration: none;
}
.landing-foot a:hover {
  color: var(--ink);
}
@media (max-width: 800px) {
  .landing {
    grid-template-columns: minmax(0, 1fr);
  }
  .landing-photo {
    position: relative;
    height: 62vh;
  }
  .landing-top {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    background: none;
    color: #fff;
    text-shadow: 0 1px 8px rgb(0 0 0 / 0.6);
  }
  .landing-top span {
    display: none;
  }
  .landing-main {
    min-height: 0;
  }
}
