/* Toolwoven Bracket Maker — "tournament night" board: navy scoreboard, trophy-gold winner path, rounded sans. */
:root {
  --page: #e7ebf1;
  --paper: #ffffff;
  --ink: #111a2e;
  --ink2: #36405a;
  --muted: #566079;
  --line: #c3cad8;
  --line2: #dde2ea;
  --board: #142038;
  --board2: #1c2a47;
  --board3: #24345a;
  --on-board: #ffffff;
  --on-board2: #c3cde0;
  --on-board3: #9fb0cf;
  --wire: #4d5f84;
  --gold: #ffc93c;
  --gold-deep: #f0b000;
  --gold-ink: #2b2000;
  --focus: #2f6bff;
  --focus-dark: #8fb8ff;
  --err: #b3261e;
  --round: ui-rounded, "SF Pro Rounded", "Avenir Next", Avenir, "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --row: 36px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 var(--ui); }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.stage :focus-visible { outline-color: var(--focus-dark); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; z-index: 100; border-radius: 4px; }
.skip:focus { top: 10px; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 24px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand-name { white-space: nowrap; display: flex; flex-direction: column; line-height: 1.15; }
.brand-name b { font: 800 19px/1.1 var(--round); }
.brand-name small { font-size: 13px; color: var(--muted); }
.topnav { display: flex; gap: 6px; }
.topnav a { white-space: nowrap; text-decoration: none; font-size: 15px; padding: 10px 10px; border-radius: 5px; }
.topnav a:hover { background: #eef1f6; }

.intro { max-width: 1600px; margin: 0 auto; padding: 26px 24px 20px; display: flex; align-items: flex-end; gap: 40px; }
.intro h1 { margin: 0; font: 800 clamp(30px, 3.3vw, 46px)/1.05 var(--round); letter-spacing: -0.01em; white-space: nowrap; }
.intro p { margin: 0; max-width: 720px; font-size: 17px; color: var(--ink2); }

/* ---------- desk ---------- */
.desk { max-width: 1600px; margin: 0 auto; padding: 0 24px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }

/* the board */
.stage { position: relative; background: var(--board); color: var(--on-board); border-radius: 8px; min-width: 0; overflow: hidden; }
.stage-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; padding: 18px 20px 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.stage-title { min-width: 0; }
.kicker { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--on-board2); }
.tag { background: var(--gold); color: var(--gold-ink); font-weight: 800; letter-spacing: .08em; padding: 2px 8px; border-radius: 3px; }
#board-title { margin: 4px 0 2px; font: 800 26px/1.15 var(--round); overflow-wrap: anywhere; }
.meta { margin: 0; font-size: 15px; color: var(--on-board2); }
.stage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: 15px; text-decoration: none; }
.btn:hover:not(:disabled) { background: #f1f4f8; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn.ghost { background: transparent; color: var(--on-board); border-color: rgba(255, 255, 255, .34); }
.btn.ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
.btn.primary { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 800; }
.btn.primary:hover:not(:disabled) { background: #ffd666; }
.btn:disabled { opacity: .45; }
.btn[aria-busy="true"] { opacity: .7; }
.btn.small { min-height: 42px; padding: 0 12px; }
.hint { margin: 0; padding: 10px 20px; font-size: 15px; color: var(--on-board2); }
.to-setup { display: none; color: var(--gold); font-weight: 600; }

.board-scroll {
  position: relative; overflow: auto; max-height: max(560px, calc(100vh - 150px)); overscroll-behavior: contain;
  background-color: var(--board);
  background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 28px 28px;
  border-top: 1px solid rgba(255, 255, 255, .06); border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.board { position: relative; transform-origin: 0 0; min-height: 240px; }
.board-empty { margin: 40px 24px; padding: 20px; border: 2px dashed rgba(255, 255, 255, .3); border-radius: 8px; display: grid; gap: 6px; max-width: 560px; font-size: 16px; }
.board-empty strong { font: 800 20px var(--round); }
.board-empty span { color: #ffd2cc; }
.wires { position: absolute; left: 0; top: 0; pointer-events: none; }
.wires path { fill: none; stroke: var(--wire); stroke-width: 2; }
.wires path.hot { stroke: var(--gold); stroke-width: 2.5; }
.sec-label { position: absolute; font: 800 16px/1 var(--round); letter-spacing: .05em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.col-head { position: absolute; font-size: 13px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--on-board3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.match { position: absolute; }
.m-head { height: 22px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--on-board3); white-space: nowrap; overflow: hidden; }
.m-no { font-family: var(--mono); letter-spacing: .02em; }
.m-title { color: var(--on-board); text-transform: uppercase; letter-spacing: .06em; }
.m-note { margin-left: auto; text-transform: uppercase; letter-spacing: .07em; }
.m-note.ready { color: var(--gold); }
.row { display: flex; align-items: stretch; height: var(--row); background: var(--paper); color: var(--ink); }
.match .row:nth-child(2) { border-radius: 5px 5px 0 0; }
.match .row:nth-child(3) { border-radius: 0 0 5px 5px; border-top: 1px solid var(--line2); }
.pick { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 10px 0 0; margin: 0; border: 0; background: transparent; text-align: left; font-weight: 600; font-size: 15px; border-radius: inherit; }
.pick:focus-visible { outline-offset: -3px; outline-color: var(--focus); }
button.pick:hover:not(:disabled) { background: #eef2f8; }
.sd { flex: none; width: 32px; align-self: stretch; display: grid; place-items: center; background: #e9edf4; color: #3e4862; font: 700 13px var(--mono); border-radius: inherit; }
.match .row:nth-child(2) .sd { border-radius: 5px 0 0 0; }
.match .row:nth-child(3) .sd { border-radius: 0 0 0 5px; }
.nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.via { flex: none; font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; line-height: 18px; }
.tick { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--gold-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pick.ph .nm { color: #6b7590; font-weight: 500; font-size: 14px; }
.row.win { background: var(--gold); }
.row.win .sd { background: var(--gold-deep); color: var(--gold-ink); }
.row.win .nm { font-weight: 700; color: var(--gold-ink); }
.row.win button.pick:hover { background: #ffd35c; }
.row.lose .nm { color: #5d667c; font-weight: 500; }
.sc { flex: none; width: 42px; border: 0; border-left: 1px solid var(--line2); background: transparent; text-align: center; font: 700 16px var(--mono); padding: 0; border-radius: 0; }
input.sc:hover { background: #f4f6fa; }
span.sc { display: grid; place-items: center; }
.row.win input.sc { border-left-color: rgba(43, 32, 0, .2); }
.row.win input.sc:hover { background: #ffd35c; }
input.sc[aria-invalid="true"] { background: #fde3e0; color: var(--err); }
input.sc:focus-visible { outline-offset: -3px; outline-color: var(--focus); }
.match:not(.s-ready):not(.s-done) .row { background: var(--board3); color: var(--on-board2); }
.match:not(.s-ready):not(.s-done) .row:nth-child(3) { border-top-color: rgba(255, 255, 255, .08); }
.match:not(.s-ready):not(.s-done) .sd { background: var(--board2); color: var(--on-board3); }
.match:not(.s-ready):not(.s-done) .pick.ph .nm, .match:not(.s-ready):not(.s-done) .nm { color: var(--on-board2); }
.match:not(.s-ready):not(.s-done) .sc { border-left-color: rgba(255, 255, 255, .08); }
.match.s-notneeded { opacity: .55; }
.match.flash .row { animation: flash 1.2s ease-out 1; }
@keyframes flash { 0%, 40% { box-shadow: inset 0 0 0 3px var(--gold); } 100% { box-shadow: inset 0 0 0 3px transparent; } }

.champ { position: absolute; height: 92px; padding: 10px 12px 10px 52px; border: 2px solid var(--gold); border-radius: 6px; background: rgba(255, 201, 60, .08); display: flex; flex-direction: column; justify-content: center; }
.champ svg { position: absolute; left: 12px; top: 50%; width: 28px; height: 28px; margin-top: -14px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.champ-label { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.champ strong { font: 800 20px/1.2 var(--round); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.champ:not(.won) strong { color: var(--on-board2); font-weight: 700; }
.champ.won { background: var(--gold); color: var(--gold-ink); }
.champ.won svg { stroke: var(--gold-ink); }
.champ.won .champ-label { color: var(--gold-ink); }

.stage-foot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 28px; padding: 16px 20px 6px; align-items: start; }
.podium { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.podium div { border: 1px solid rgba(255, 255, 255, .2); border-radius: 6px; padding: 7px 12px; min-width: 130px; max-width: 240px; }
.podium div.gold { border-color: var(--gold); }
.podium dt { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-board3); }
.podium dd { margin: 0; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.podium .gold dd { color: var(--gold); }
.upnext h3 { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-board3); }
.upnext ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.goto { min-height: 40px; padding: 6px 12px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .18); background: var(--board2); color: var(--on-board); font-size: 15px; text-align: left; }
.goto:hover { background: var(--board3); }
.goto b { color: var(--gold); font-family: var(--mono); margin-right: 4px; }
.goto i { font-style: normal; color: var(--on-board3); }
.upnext .none { color: var(--on-board2); font-size: 15px; padding: 8px 0; }
.status { margin: 0; padding: 8px 20px 16px; min-height: 2.6em; font-size: 15px; color: #ffd76a; }
.btn.exit { display: none; }

/* round robin: standings beside the rounds, cards in normal flow */
.rr { display: grid; grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); gap: 20px 24px; align-items: start; padding: 18px 18px 22px; }
.rr-standings { position: sticky; top: 0; z-index: 1; background: var(--board); padding-bottom: 6px; }
.rr-h { margin: 0 0 8px; display: flex; align-items: baseline; gap: 8px; font: 800 14px/1.25 var(--round); letter-spacing: .06em; text-transform: uppercase; color: var(--on-board3); }
.rr-h small { font: 600 12px var(--ui); letter-spacing: .04em; color: var(--on-board3); }
.rr-count { margin-left: auto; font: 700 13px var(--mono); letter-spacing: 0; color: var(--on-board2); }
.rr-table-wrap { overflow-x: auto; border-radius: 6px; }
.rr-table { width: 100%; border-collapse: collapse; background: var(--board2); font-size: 15px; font-variant-numeric: tabular-nums; }
.rr-table th { padding: 7px 7px; font-size: 12px; font-weight: 700; color: var(--on-board3); text-align: right; white-space: nowrap; }
.rr-table th abbr { text-decoration: none; }
.rr-table td { padding: 7px 7px; text-align: right; border-top: 1px solid rgba(255, 255, 255, .08); white-space: nowrap; }
.rr-table .nm-col { text-align: left; max-width: 170px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.rr-table td.pts { font-weight: 800; color: var(--on-board); }
.rr-table tr.top td { color: var(--gold); }
.sd-inline { display: inline-block; min-width: 22px; margin-right: 6px; padding: 0 4px; border-radius: 3px; background: var(--board3); color: var(--on-board2); font: 700 12px/18px var(--mono); text-align: center; }
.rr-note { margin: 8px 0 0; font-size: 13px; color: var(--on-board2); }
.rr-rounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px 16px; align-items: start; }
.rr .match { position: relative; margin-bottom: 10px; }
.rr .m-head { height: auto; min-height: 30px; padding-bottom: 2px; }
.drawbtn { margin-left: auto; min-height: 28px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 4px; background: transparent; color: var(--on-board2); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.drawbtn:hover { background: rgba(255, 255, 255, .08); }
.drawbtn[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.row.drawn { background: #fff1c7; }
.row.drawn .sd { background: #f1dc9c; color: var(--gold-ink); }
.rr-sit { margin: 0 0 4px; font-size: 14px; color: var(--on-board2); }
.points-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.points-row label { font-size: 15px; font-weight: 600; }
.points-row select { flex: 1; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #aeb8ca; border-radius: 6px; background: #fff; font-size: 15px; }
.seg.seg3 { grid-template-columns: 1fr 1fr 1fr; }
.seg.seg3 span { font-size: 14px; padding: 6px 4px; }

/* bracket sizes (page text) */
.sizes { margin-top: 40px; max-width: 980px; }
.sizes h2 { font-size: 24px; margin-bottom: 8px; }
.sizes > p { color: var(--ink2); max-width: 760px; }
.size-table-wrap { overflow-x: auto; }
.size-table { border-collapse: collapse; background: var(--paper); font-size: 15px; font-variant-numeric: tabular-nums; }
.size-table th, .size-table td { border: 1px solid var(--line); padding: 7px 10px; text-align: right; white-space: nowrap; }
.size-table th { background: #f0f2f6; font-size: 14px; }
.size-table th:first-child, .size-table td:first-child { text-align: left; }
.size-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.related { margin-top: 36px; max-width: 860px; }
.related h2 { font-size: 24px; margin-bottom: 8px; }
.related ul { margin: 0; padding-left: 20px; }
.related li { margin: 6px 0; color: var(--ink2); }
.related a { font-weight: 700; }
.crumbs { max-width: 1600px; margin: 0 auto; padding: 14px 24px 0; font-size: 14px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.crumbs li + li::before { content: "›"; margin-right: 6px; color: var(--muted); }
.crumbs a { color: var(--ink2); }
.crumbs-inline { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.crumbs-inline ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.crumbs-inline li + li::before { content: "›"; margin-right: 6px; }
.crumbs-inline a { color: var(--ink2); }

/* shared (read-only) view */
.shared-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 12px 20px; background: var(--gold); color: var(--gold-ink); }
.shared-bar p { margin: 0; font-size: 15px; max-width: 760px; }
.shared-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.shared-bar .btn.primary { background: var(--board); color: #fff; border-color: var(--board); }
.shared-bar .btn.primary:hover:not(:disabled) { background: var(--board3); }
.shared-bar .btn.ghost { color: var(--gold-ink); border-color: rgba(43, 32, 0, .45); }
.shared-bar .btn.ghost:hover:not(:disabled) { background: rgba(43, 32, 0, .08); }
.shared-bar :focus-visible { outline-color: var(--board); }
body.is-shared .desk { grid-template-columns: minmax(0, 1fr); }
body.is-shared .setup, body.is-shared #undo { display: none; }
body.is-projector .shared-bar { display: none; }

/* setup rail */
.setup { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.setup h2 { margin: 0 0 16px; font: 800 21px/1.2 var(--round); }
.field { margin: 0 0 20px; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
.field > label, .label-row label, legend { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; padding: 0; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.count { font-size: 13px; color: var(--muted); font-weight: 600; }
.setup input[type="text"], .setup input:not([type]), .setup input[type="number"], .setup textarea { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid #aeb8ca; border-radius: 6px; background: #fff; font-size: 16px; }
.names-wrap { position: relative; }
.setup textarea { display: block; resize: vertical; min-height: 220px; padding: 9px 10px 9px 46px; font-size: 15px; line-height: 24px; white-space: pre; overflow: auto; }
.setup textarea[aria-invalid="true"] { border-color: var(--err); }
.gutter { position: absolute; left: 1px; top: 1px; bottom: 1px; width: 36px; margin: 0; padding: 9px 7px 0 0; overflow: hidden; text-align: right; font: 600 13px/24px var(--mono); color: #525b72; background: #f0f2f6; border-right: 1px solid var(--line2); border-radius: 5px 0 0 5px; pointer-events: none; }
.help { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.error { margin: 8px 0 0; padding: 8px 10px; font-size: 15px; color: var(--err); background: #fdecea; border-left: 3px solid var(--err); }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #aeb8ca; border-radius: 6px; overflow: hidden; }
.seg label { position: relative; display: block; margin: 0; }
.seg label + label { border-left: 1px solid #aeb8ca; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 8px; text-align: center; font-size: 15px; font-weight: 600; line-height: 1.2; }
.seg input:checked + span { background: var(--board); color: #fff; }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.seg label:hover input:not(:checked) + span { background: #f1f4f8; }
.setup .check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 15px; font-weight: 600; cursor: pointer; min-height: 40px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--board); }
.check small { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.draw-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.draw-row label { font-size: 15px; font-weight: 600; white-space: nowrap; }
.setup .draw-row input { width: 110px; flex: none; }
.setup-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line2); padding-top: 16px; }
.saved { margin-top: 12px; }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-out { margin-top: 10px; }
.share-out label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.setup .share-out input { font: 13px/1.4 var(--mono); color: var(--ink2); }

/* ---------- explainer ---------- */
.how { max-width: 1600px; margin: 0 auto; padding: 24px 24px 48px; }
.how h2 { font: 800 28px/1.2 var(--round); margin: 0 0 18px; }
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 24px 28px; }
.how article { border-top: 3px solid var(--board); padding-top: 12px; }
.how h3 { font: 800 19px/1.25 var(--round); margin: 0 0 6px; }
.how p { margin: 0 0 10px; color: var(--ink2); font-size: 16px; }
.pairs { border-collapse: collapse; margin-top: 6px; background: var(--paper); }
.pairs caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 4px; }
.pairs td { border: 1px solid var(--line); padding: 6px 9px; font: 600 14px var(--mono); white-space: nowrap; }
.faq { max-width: 860px; margin-top: 40px; }
.faq h2 { font-size: 24px; margin-bottom: 8px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { min-height: 48px; display: flex; align-items: center; padding: 10px 0; font-weight: 700; font-size: 17px; cursor: pointer; }
.faq details p { margin: 0 0 14px; color: var(--ink2); }

.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 20px; padding: 18px 24px; background: var(--paper); border-top: 1px solid var(--line); font-size: 15px; }
.foot nav { display: flex; gap: 4px; flex-wrap: wrap; }
.foot nav a { padding: 10px 10px; text-decoration: none; }
.foot nav a:hover { text-decoration: underline; }
.foot-brand b { font-family: var(--round); }

/* ---------- prose pages (about / privacy) ---------- */
.prose { max-width: 780px; margin: 0 auto; padding: 36px 24px 56px; }
.prose h1 { font: 800 clamp(30px, 4vw, 42px)/1.1 var(--round); margin: 0 0 14px; }
.prose h2 { font: 800 22px/1.25 var(--round); margin: 32px 0 8px; }
.prose p, .prose li { font-size: 17px; color: var(--ink2); }
.prose .lede { font-size: 19px; color: var(--ink); }
.prose code { font: 600 15px var(--mono); background: #fff; border: 1px solid var(--line2); padding: 1px 5px; border-radius: 3px; }
.prose .cta { margin-top: 28px; }
.prose .cta a { background: var(--board); color: #fff; border-color: var(--board); }
.prose .cta a:hover { background: var(--board2) !important; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; font-size: 16px; }
.prose dt { font-weight: 700; }
.prose dd { margin: 0; color: var(--ink2); }

/* ---------- projector view ---------- */
body.is-projector { overflow: hidden; --row: 36px; }
body.is-projector .stage { position: fixed; inset: 0; z-index: 50; border-radius: 0; display: flex; flex-direction: column; }
body.is-projector .stage-actions, body.is-projector .hint, body.is-projector .upnext, body.is-projector .status { display: none; }
body.is-projector .stage-bar { padding: 20px 28px 14px; }
body.is-projector #board-title { font-size: 36px; }
body.is-projector .board-scroll { flex: 1; overflow: hidden; max-height: none; }
body.is-projector .stage-foot { grid-template-columns: 1fr; padding: 12px 28px 18px; }
body.is-projector .btn.exit { display: inline-flex; position: absolute; top: 18px; right: 20px; background: transparent; color: #fff; border-color: rgba(255, 255, 255, .34); }

/* ---------- print: only the generated sheets ---------- */
#print-root { display: none; }
@media print {
  html, body { background: #fff; margin: 0; }
  body > :not(#print-root) { display: none !important; }
  #print-root { display: block; }
  .sheet { break-after: page; page-break-after: always; overflow: hidden; }
  .sheet:last-child { break-after: auto; page-break-after: auto; }
  .sheet svg { display: block; width: 100%; height: 100%; }
}

/* ---------- narrow screens ---------- */
@media (max-width: 1100px) {
  .desk { grid-template-columns: 1fr; }
  .intro { flex-direction: column; align-items: flex-start; gap: 10px; }
  .intro h1 { white-space: normal; }
}
@media (pointer: coarse), (max-width: 760px) {
  :root { --row: 44px; }
  body.is-projector { --row: 36px; }
}
@media (max-width: 760px) {
  .top { padding: 6px 12px; }
  .topnav { gap: 0; }
  .topnav a { padding: 10px 7px; font-size: 15px; }
  .brand-name small { display: none; }
  .intro { padding: 18px 16px 14px; }
  .intro p { font-size: 16px; }
  .desk { padding: 0 0 28px; gap: 16px; }
  .stage { border-radius: 0; }
  .stage-bar { padding: 16px 16px 12px; }
  #board-title { font-size: 23px; }
  .stage-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .stage-actions .btn { min-height: 44px; }
  .stage-actions .btn.primary { grid-column: 1 / -1; }
  .rr { grid-template-columns: 1fr; padding: 14px 12px 18px; }
  .rr-standings { position: static; }
  .rr-table .nm-col { max-width: 150px; }
  .crumbs { padding: 10px 16px 0; }
  .hint { padding: 10px 16px; }
  .to-setup { display: inline-block; padding: 10px 0; }
  .board-scroll { max-height: 72vh; }
  .stage-foot { grid-template-columns: 1fr; padding: 14px 16px 4px; }
  .status { padding: 8px 16px 14px; }
  .podium div { min-width: 0; flex: 1 1 140px; }
  .setup { margin: 0 12px; padding: 18px 16px; }
  .how { padding: 16px 16px 40px; }
  .foot { padding: 14px 16px; }
}
@media (max-width: 430px) {
  .topnav a[href="#how"], .topnav a[href="/"] { display: none; }
  .prose dl { grid-template-columns: 1fr; gap: 2px; }
  .prose dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Vempalo landing pages: intro with a blank-bracket CTA, facts, blank download list */
.intro-text { max-width: 760px; }
.intro-text p { margin: 0; }
.blank-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; margin: 14px 0; }
.facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink2); }
.facts dd { margin: 2px 0 0; font-weight: 700; }
.lede-sm { font-size: 16px; max-width: 720px; }
.blank-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.blank-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.blank-list a, .blank-n { min-width: 9.5em; }
.live-help a { font-weight: 600; }
.sizes .size-table-wrap + h2 { margin-top: 28px; }

/* Organiser information belongs beside the draw; it never changes tournament results. */
.event-summary{display:flex;flex-wrap:wrap;align-items:center;gap:8px 22px;padding:12px 20px;background:#1b2944;font-size:13px;color:var(--on-board2);border-top:1px solid #34425e}.event-summary b{color:var(--gold);font-size:17px;font-variant-numeric:tabular-nums}.event-summary a{color:var(--gold);text-underline-offset:3px;margin-left:auto;min-height:32px;display:inline-flex;align-items:center}.event-budget{padding:14px;background:#f2f5fa;border:1px solid var(--line);border-radius:7px;margin:0 0 22px}.event-budget summary{cursor:pointer;font-weight:700;min-height:32px}.budget-inputs{display:grid;grid-template-columns:1fr 1fr;gap:10px}.budget-inputs label{font-size:13px;font-weight:600}.budget-inputs input{width:100%;min-width:0;min-height:44px;padding:8px;border:1px solid var(--line);border-radius:5px;background:#fff;font-size:16px}.event-budget dl{margin:12px 0}.event-budget dl>div{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:8px 0}.event-budget dt{font-size:13px;color:var(--muted)}.event-budget dd{font-weight:800;font-variant-numeric:tabular-nums;margin:0;white-space:nowrap}.export-font-note{background:#fff1cd;border-left:3px solid #bd8100;padding:10px;font-size:13px;line-height:1.6}.topnav a{min-height:44px;display:inline-flex;align-items:center;justify-content:center}.btn,.btn.small{min-height:44px}.intro h1{white-space:normal;max-width:650px}.intro p{font-size:16px;line-height:1.6}.is-projector .event-summary{display:none}
@media(max-width:720px){.top{gap:8px;flex-wrap:wrap;padding:10px 16px}.topnav{width:100%;overflow-x:auto;gap:2px}.topnav a{font-size:13px;padding:8px 9px}.event-summary{padding:12px 14px;gap:6px 14px}.event-summary a{margin-left:0;width:100%}.event-budget summary{min-height:44px}.stage-actions .btn{flex:1 1 auto}.budget-inputs{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
.report-entry .related{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.report-entry .related a{display:flex;align-items:center;min-height:80px;padding:18px;font-size:14px;line-height:1.6;background:#f2f5fa;border:1px solid #d8e0ec}.report-entry p{font-size:14px;color:#51617a}
.budget-inputs label{display:flex;flex-direction:column;justify-content:space-between;gap:6px}
@media print{.event-summary,.event-budget,.export-font-note{display:none!important}}

.stage .event-budget{margin:14px 20px;color:var(--ink)}.stage .budget-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px 24px;margin-top:12px;align-items:start}.stage .budget-body>p,.stage .budget-body>a{grid-column:1/-1}.stage .event-budget a{color:#244c91}.stage .event-budget .help{color:#52617a}.stage .budget-inputs{align-self:start}.stage #budget-result dl{margin-top:0}.stage .event-budget dt{color:#52617a}.is-projector .event-budget{display:none}@media(max-width:720px){.stage .event-budget{margin:12px 14px}.stage .budget-body{grid-template-columns:1fr}.report-entry .related{grid-template-columns:1fr}}
