@font-face { font-family: "Anton"; src: url("fonts/anton-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #eef1f5;          /* cool shelf grey */
  --paper: #ffffff;
  --ink: #18202f;
  --muted: #4e586a;
  --line: #d3d9e2;
  --line-strong: #7f8a9c;
  --navy: #1f2d4a;        /* masthead, tabs, primary buttons */
  --navy-ink: #ffffff;
  --gold: #f2a516;        /* box tape: highlights, bars, the leader */
  --gold-soft: #fdf1d6;
  --gold-ink: #7a4d00;    /* readable gold text on white */
  --tomato: #b3361f;      /* penalties and errors */
  --tomato-soft: #fbe6e1;
  --focus: #1c5fc4;
  --tab: #dde3ec;         /* folder tabs behind the open one */
  --head: "Anton", Impact, "Arial Narrow", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1520; --paper: #172030; --ink: #e9edf4; --muted: #a9b3c4; --line: #2b3648; --line-strong: #66728a;
    --navy: #0a0f19; --navy-ink: #f2f5fa; --gold: #f2b134; --gold-soft: #2f2716; --gold-ink: #f6c766;
    --tomato: #ff8f78; --tomato-soft: #3a1f1a; --focus: #8ab8ff; --tab: #1d2738;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--body); }
body.has-bar { padding-bottom: 76px; }
.wrap { max-width: 1060px; margin: 0 auto; padding: 0 16px; }
a { color: var(--focus); }
h1, h2 { font-family: var(--head); font-weight: 400; line-height: 1.1; letter-spacing: .01em; }
h2 { font-size: 1.75rem; margin: 2.4rem 0 .6rem; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .5rem; line-height: 1.2; }
h4 { font-size: 1rem; margin: 1.2rem 0 .4rem; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: 8px 12px; z-index: 5; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- masthead and title band: navy, sealed with a strip of box tape ---------- */
.mast { background: var(--navy); color: var(--navy-ink); }
.mast-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy-ink); text-decoration: none; font: 1.35rem var(--head); letter-spacing: .03em; }
.mast nav { display: flex; gap: 18px; }
.mast nav a { color: var(--navy-ink); opacity: .88; text-decoration: none; font-size: .95rem; padding: 10px 0; white-space: nowrap; }
.mast nav a:hover { opacity: 1; text-decoration: underline; }
.mast :focus-visible { outline-color: var(--gold); }

.band { background: var(--navy); color: var(--navy-ink); border-bottom: 6px solid var(--gold); border-top: 1px solid rgba(255,255,255,.12); }
.band .hero { padding-top: 14px; padding-bottom: 18px; }
h1 { font-size: 2.6rem; margin: 0 0 .4rem; color: var(--navy-ink); }
.lede { margin: 0; color: var(--navy-ink); opacity: .86; font-size: 1.03rem; max-width: 62ch; }

/* ---------- tool ---------- */
.tool { max-width: 760px; margin: 16px 0 8px; }
.summary p { margin: 0 0 10px; color: var(--muted); font-size: .97rem; }
.summary b { color: var(--ink); }
.banner { background: var(--gold-soft); border-left: 5px solid var(--gold); padding: 10px 12px; margin: 0 0 12px; }
.banner .btn { margin: 6px 6px 0 0; }
.store-note { background: var(--tomato-soft); color: var(--tomato); padding: 10px 12px; margin: 0 0 12px; }
.nojs { padding: 12px; background: var(--tomato-soft); }

.tabs { display: flex; gap: 4px; scroll-margin-top: 8px; position: relative; z-index: 1; }
/* folder tabs: the open one joins the sheet below it */
.tabs [role=tab] { flex: 1 1 0; font: 1.08rem var(--head); letter-spacing: .04em; color: var(--muted); background: var(--tab); border: 1px solid var(--line);
  border-bottom: 0; border-radius: 8px 8px 0 0; padding: 10px 4px 8px; min-height: 48px; cursor: pointer; margin-top: 6px; }
.tabs [role=tab]:hover { color: var(--ink); }
.tabs [role=tab][aria-selected=true] { background: var(--paper); color: var(--ink); margin-top: 0; margin-bottom: -1px; padding-bottom: 9px; min-height: 54px;
  box-shadow: inset 0 5px 0 var(--gold); }
.panel { background: var(--paper); border: 1px solid var(--line); padding: 16px 16px 18px; }
.examples { color: var(--muted); font-size: .95rem; margin: 10px 0 0; }

input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 4px; padding: 9px 10px; min-height: 44px; width: 100%; min-width: 0; }
textarea { min-height: 0; line-height: 1.45; }
input[aria-invalid] { border-color: var(--tomato); background: var(--tomato-soft); box-shadow: inset 0 0 0 1px var(--tomato); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; }
input[type=checkbox], input[type=radio] { width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--navy); flex: none; }
@media (prefers-color-scheme: dark) { input[type=checkbox], input[type=radio] { accent-color: var(--gold); } }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin-top: 8px; }
.field label { font-size: .93rem; font-weight: 600; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; margin: 0; }
.field.inline select { width: auto; max-width: 100%; }
.opt { font-weight: 400; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.hint { color: var(--muted); margin: 6px 0 4px; font-size: .95rem; }
.bad { color: var(--tomato); }
.hint.bad:empty { display: none; }
.num { width: 5.5em; text-align: right; font-variant-numeric: tabular-nums; }

.btn { font: 700 1rem var(--body); display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 16px;
  border-radius: 4px; border: 2px solid var(--navy); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; text-align: center; }
@media (prefers-color-scheme: dark) { .btn { border-color: var(--line-strong); } }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: var(--navy-ink); }
@media (prefers-color-scheme: dark) { .btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1406; } }
.btn.primary:hover { filter: brightness(1.12); }
.btn.quiet { border-color: var(--line-strong); font-weight: 500; color: var(--muted); }
.btn.small { min-height: 40px; padding: 4px 12px; font-size: .95rem; }
.btn.icon { width: 48px; padding: 0; font-size: 1.6rem; line-height: 1; flex: none; }
.btn:disabled { opacity: .4; cursor: default; }
.link { font: inherit; color: var(--focus); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.row-btns.tight { margin-top: 8px; }
.toast { min-height: 1.4em; color: var(--muted); margin: 8px 0 0; font-size: .95rem; }
.toast:empty { min-height: 0; margin: 0; }
.empty { color: var(--muted); }

/* ---------- count ---------- */
.daypick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
/* counting days: one ruled strip, like the columns of a tally sheet */
#panel-count .daypick { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 0; background: var(--paper);
  border: 2px solid var(--navy); border-radius: 6px; overflow: hidden; }
@media (prefers-color-scheme: dark) { #panel-count .daypick { border-color: var(--line-strong); } }
.daychip { position: relative; font: 700 .9rem var(--body); display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 58px; max-width: 96px; min-height: 48px; padding: 4px;
  border: 1px solid var(--line-strong); border-radius: 4px; background: var(--paper); color: var(--ink); cursor: pointer; line-height: 1.15; }
.daychip small { font: 500 .78rem var(--body); color: var(--muted); }
#panel-count .daychip { border: 0; border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); margin: 0 -1px -1px 0;
  border-radius: 0; max-width: none; min-width: 0; }
.daychip.has small::after { content: " \2713"; color: var(--gold-ink); font-weight: 700; }
.daychip[aria-pressed=true] { background: var(--gold); color: #1a1406; }
.daychip[aria-pressed=true] small, .daychip[aria-pressed=true].has small::after { color: #1a1406; }
.x2 { position: absolute; top: 2px; right: 2px; font: 700 .7rem/1 var(--body); font-style: normal; background: var(--navy); color: var(--navy-ink); padding: 2px 4px; border-radius: 3px; }
/* class picker: one bar, back and next on either end */
.boxpick { display: flex; align-items: stretch; border: 2px solid var(--navy); border-radius: 6px; overflow: hidden; background: var(--paper); }
@media (prefers-color-scheme: dark) { .boxpick { border-color: var(--line-strong); } }
.boxpick select { font: 1.2rem var(--head); letter-spacing: .03em; min-height: 50px; border: 0; border-radius: 0; text-align: center; text-align-last: center; }
.boxpick .btn.icon { border: 0; border-radius: 0; background: var(--tab); min-height: 50px; }
.boxpick .btn.icon:first-child { border-right: 1px solid var(--line-strong); }
.boxpick .btn.icon:last-child { border-left: 1px solid var(--line-strong); }
.progress { color: var(--muted); margin: 10px 0 0; font-size: .95rem; }

/* this box's score: a small scoreboard */
.box-result { margin: 12px 0 6px; padding: 10px 14px 12px; background: var(--navy); color: var(--navy-ink); border-radius: 6px; min-height: 80px; }
@media (prefers-color-scheme: dark) { .box-result { border: 1px solid var(--line-strong); } }
.box-result p { margin: 0; }
.br-big { font: 2.3rem/1.05 var(--head); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.br-big .pos { color: var(--gold); }
.br-big .neg { color: #ff9b85; }
.br-big.muted { color: var(--navy-ink); opacity: .6; }
.br-sub { color: var(--navy-ink); font-size: .97rem; opacity: .92; }
.br-x2 { font-weight: 700; color: var(--gold); }
.br-err { color: #ffb4a3; margin-top: 4px !important; }
.box-result .badge { color: var(--gold); }
.badge { font: 600 .8rem var(--body); color: var(--gold-ink); border: 1px solid var(--gold); padding: 1px 6px; border-radius: 3px; white-space: nowrap; vertical-align: middle; letter-spacing: 0; }

.crow { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lab in" "est est"; column-gap: 12px; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--line); }
.cl { grid-area: lab; min-width: 0; display: flex; flex-direction: column; }
.cl label { font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.cp { font-size: .88rem; color: var(--muted); }
.cp.theme { color: var(--gold-ink); font-weight: 700; }
.cp.down { color: var(--tomato); }
.cin { grid-area: in; display: flex; align-items: center; gap: 6px; }
.cin input { width: 5.2em; text-align: right; font: 1.25rem var(--head); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.crow.wide .cin input { width: 8.5em; }
.cin.step input { width: 4.4em; text-align: center; }
.stepb { width: 44px !important; font-size: 1.5rem !important; border-width: 1px; }
.unit { font-size: .9rem; color: var(--muted); min-width: 1.6em; }
.unit.pre { min-width: 0; }
.est { grid-area: est; text-align: right; margin: 4px 0 0; font-size: .86rem; color: var(--muted); line-height: 1.3; }
.est:empty { display: none; }
.est.bad { color: var(--tomato); }
details.bonus summary, details.pts summary, details.paste summary, details.bydays summary { cursor: pointer; color: var(--focus); padding: 10px 0; min-height: 44px; font-weight: 600; }
details.bonus .crow { border-top: 1px solid var(--line); }
details.bonus .field { margin-bottom: 4px; }

/* ---------- standings ---------- */
.stand-ctl { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; border: 2px solid var(--navy); border-radius: 4px; overflow: hidden; }
@media (prefers-color-scheme: dark) { .seg { border-color: var(--line-strong); } }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 9px 14px; min-height: 40px; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.seg input:checked + span { background: var(--navy); color: var(--navy-ink); }
@media (prefers-color-scheme: dark) { .seg input:checked + span { background: var(--gold); color: #1a1406; } }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -3px; }
.collected { margin: 0 0 10px; font-weight: 600; }
.board { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.board li { display: grid; grid-template-columns: 3em minmax(0, 1fr) 10em; grid-template-areas: "place name pts" "place bar sub"; column-gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line); align-items: center; }
.place { grid-area: place; justify-self: start; display: grid; place-items: center; min-width: 2.5rem; height: 2.5rem; padding: 0 4px; border-radius: 6px;
  background: var(--tab); font: 1.15rem var(--head); color: var(--ink); }
.board li.lead .place { background: var(--navy); color: var(--gold); }
@media (prefers-color-scheme: dark) { .board li.lead .place { background: var(--gold); color: #1a1406; } }
.tname { grid-area: name; font-weight: 650; overflow-wrap: break-word; min-width: 0; }
.tpts { grid-area: pts; text-align: right; white-space: nowrap; }
.tpts b { font: 1.4rem var(--head); letter-spacing: .02em; font-weight: 400; font-variant-numeric: tabular-nums; }
.tpts small { color: var(--muted); }
.tsub { grid-area: sub; text-align: right; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { grid-area: bar; height: 12px; background: var(--bg); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--line-strong); }
.board li.lead .bar i { background: var(--gold); }
.board li.neg .bar i { background: var(--tomato); }
.warn { background: var(--tomato-soft); color: var(--tomato); padding: 10px 12px; }
.warn .link { color: inherit; }
.tablewrap { overflow-x: auto; }
.daytable { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: .95rem; }
.daytable th, .daytable td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: right; white-space: nowrap; }
.daytable th:first-child { text-align: left; font-weight: 600; white-space: normal; }
.daytable thead th { font-size: .85rem; color: var(--muted); }
.dash { color: var(--muted); }
.announce { margin-top: 18px; }
.announce textarea { font-size: 15px; background: var(--bg); }
.inline-sel { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.inline-sel select { width: auto; }

/* ---------- setup ---------- */
.sec { padding: 4px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.sec:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.sec > h3 { font: 1.35rem var(--head); font-weight: 400; letter-spacing: .03em; }
.sec h3 .count { color: var(--muted); }
fieldset { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
legend { font-weight: 700; font-size: .93rem; padding: 0; margin-bottom: 6px; }
.preset { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); margin-bottom: 5px; cursor: pointer; line-height: 1.4; }
.preset:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); box-shadow: inset 4px 0 0 var(--gold); }
.preset input { margin-top: 2px; }
.preset > span { display: flex; flex-direction: column; min-width: 0; }
.preset > span > span { color: var(--muted); font-size: .94rem; }
.preset small { font-size: .85rem; color: var(--muted); }
details.presets-w summary { cursor: pointer; color: var(--focus); padding: 10px 0; min-height: 44px; font-weight: 600; }
details.presets-w fieldset { margin-top: 0; }
#h-points { scroll-margin-top: 8px; }
#h-points:focus { outline: none; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; cursor: pointer; }
.rate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px 32px; }
.rate .num { width: 4.4em; padding: 9px 8px; }
.rate select { width: auto; padding: 9px 6px; }
.items { list-style: none; margin: 0; padding: 0; }
.items li { border-bottom: 1px solid var(--line); padding: 8px 0; }
.it-main { display: flex; gap: 8px; align-items: center; }
.it-main .num { width: 4.6em; flex: none; }
.each { color: var(--muted); font-size: .9rem; }
.it-theme { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.it-theme select { width: auto; max-width: 100%; font-size: 15px; min-height: 40px; padding: 6px 8px; color: var(--muted); }
.it-tp { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.doubles .daypick { margin: 0; }
.dchk { position: relative; cursor: pointer; flex: 1 1 0; min-width: 58px; max-width: 96px; }
.dchk input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dchk span { display: flex; flex-direction: column; align-items: center; min-height: 48px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 4px; font-weight: 700; font-size: .9rem; line-height: 1.15; }
.dchk small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.dchk input:checked + span { background: var(--gold); border-color: var(--gold); color: #1a1406; }
.dchk input:checked + span small { color: #1a1406; }
.dchk input:checked + span::after { content: "×2"; font-size: .75rem; }
.dchk input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.teams-head { display: flex; justify-content: flex-end; gap: 0; font-size: .85rem; color: var(--muted); padding-right: 56px; }
.teams-head span:first-child { margin-right: auto; padding-left: 2.6em; }
.teams-head span:last-child { width: 5.5em; text-align: center; }
.teams { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.teams li { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; counter-increment: t; }
.teams li::before { content: counter(t); width: 2em; text-align: right; color: var(--muted); font-size: .9rem; flex: none; }
.teams .size { flex: none; }
.addteam { display: flex; gap: 8px; margin-top: 8px; }
.addteam .btn { flex: none; }
.movebox { margin-top: 12px; }
.movebox label { font-size: .95rem; }
.restore { margin-top: 12px; }

/* ---------- print tab ---------- */
.printlist { list-style: none; margin: 0; padding: 0; }
.printlist li { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.printlist li:last-child { border-bottom: 0; }
.printlist p { margin: 0 0 6px; color: var(--muted); }
.printlist .btn { flex: none; min-width: 12.5em; }
.printlist .field.inline { margin: 6px 0 0; }

/* ---------- undo bar ---------- */
.undo-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 20; width: min(560px, calc(100% - 24px)); display: flex; align-items: center;
  justify-content: space-between; gap: 12px; background: var(--navy); color: var(--navy-ink); padding: 8px 8px 8px 16px; border-bottom: 4px solid var(--gold); box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.undo-bar .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); flex: none; }

/* ---------- content ---------- */
.content { max-width: 720px; padding-bottom: 30px; }
.content p { max-width: 68ch; }
.systems { border-collapse: collapse; width: 100%; font-size: .95rem; }
.systems th, .systems td { text-align: left; vertical-align: top; padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); }
.systems thead th { border-bottom: 2px solid var(--ink); font-size: .9rem; }
.systems tbody th { font-weight: 600; width: 44%; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; min-height: 44px; }
.faq details p { margin: 0 0 14px; }
.sources { font-size: .92rem; color: var(--muted); margin-top: 26px; }

footer { border-top: 1px solid var(--line); padding: 18px 0 28px; color: var(--muted); font-size: .92rem; }
footer a { color: var(--muted); }
.sb-footer p { margin: 6px 0; }

@media (max-width: 560px) {
  h1 { font-size: 2.05rem; }
  .mast nav { gap: 12px; }
  .mast nav a:nth-child(2) { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .printlist li { flex-direction: column; }
  .printlist .btn { width: 100%; }
  .panel { padding: 14px 12px 16px; }
  .board li { grid-template-columns: 2.6em minmax(0, 1fr) 6.6em; grid-template-areas: "place name name" "place bar pts" "place sub sub"; column-gap: 8px; }
  .board .tname { margin-bottom: 2px; }
  .tpts small { display: none; }
  .board.per .tpts small { display: block; font-size: .78rem; line-height: 1.1; }
  .crow.wide .cin input { width: 7em; }
  .systems tbody th { width: 40%; }
  .rate { margin-left: 0; }
}
@media (max-width: 360px) {
  .mast nav a:first-child { display: none; }
  .cin.step input { width: 3.6em; }
  .stepb { width: 40px !important; }
  .tabs [role=tab] { font-size: .98rem; letter-spacing: .01em; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* ---------- print ---------- */
.print-root { display: none; }
@media print {
  body { background: #fff; color: #000; font: 11pt/1.4 var(--body); padding: 0 !important; }
  body > *:not(.print-root) { display: none !important; }
  .print-root { display: block; color: #000; }
  .print-root .h1, .print-root .h2 { font-family: var(--head); color: #000; font-weight: 400; line-height: 1.1; letter-spacing: .01em; }
  table { border-collapse: collapse; }

  /* flyer */
  .pf { text-align: center; }
  .pf-kicker { font: 700 12pt var(--body); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 2mm; }
  .pf { padding-top: 8mm; }
  .pf .h1 { font-size: 80pt; margin: 0; line-height: .98; }
  .pf.t-m .h1 { font-size: 54pt; }
  .pf.t-s .h1 { font-size: 40pt; }
  .pf-dates { font: 700 15pt var(--body); margin: 4mm 0 0; padding-bottom: 5mm; border-bottom: 3pt solid #000; }
  .pf-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 9mm; text-align: left; margin-top: 7mm; align-items: start; }
  .pf-grid.one { grid-template-columns: 1fr; max-width: 140mm; margin-left: auto; margin-right: auto; }
  .pf-grid.stack { grid-template-columns: 1fr; gap: 5mm; }
  .pf-grid.stack .pf-need ul { columns: 3; column-gap: 8mm; }
  .pf-grid.stack .pf-need li { break-inside: avoid; }
  .print-root .pf .h2 { font-size: 21pt; margin: 0 0 2mm; }
  .pf-pts table { width: 100%; }
  .pf-pts th, .pf-pts td { border-bottom: .75pt solid #999; padding: 3.6mm 0; vertical-align: baseline; }
  .pf-pts th { font: 600 15pt/1.25 var(--body); text-align: left; padding-right: 4mm; }
  .pf-pts td { text-align: right; white-space: nowrap; font-size: 11pt; }
  .pf-pts td b { font: 26pt/1 var(--head); font-weight: 400; }
  .pf-pts th, .pf-pts td { line-height: 1.2; }
  .pf-extra { margin: 4mm 0 0; padding-left: 5mm; font-size: 12pt; }
  .pf-extra li { margin-bottom: 1.5mm; }
  .pf-need { border: 2.5pt solid #000; padding: 4mm 5mm; }
  .pf-need ul { margin: 0; padding-left: 5mm; font-size: 13.5pt; }
  .pf-need li { margin: 0 0 1.8mm; }
  .pf-win { font: 700 19pt/1.3 var(--body); margin: 14mm auto 4mm; max-width: 170mm; }
  .pf-small { font-size: 12.5pt; margin: 0 auto; max-width: 160mm; }
  .pf.dense .h1 { font-size: 54pt; }
  .pf.dense.t-m .h1 { font-size: 44pt; }
  .pf.dense.t-s .h1 { font-size: 34pt; }
  .pf.dense { padding-top: 0; }
  .pf.dense .pf-pts th, .pf.dense .pf-pts td { padding: 1.6mm 0; }
  .pf.dense .pf-pts th { font-size: 12pt; }
  .pf.dense .pf-pts td b { font-size: 16pt; }
  .pf.dense .pf-dates { padding-bottom: 3mm; }
  .pf.dense .pf-grid { margin-top: 4mm; }
  .pf.dense .pf-extra { margin-top: 2mm; font-size: 11pt; }
  .pf.dense .pf-win { font-size: 16pt; margin: 6mm auto 2mm; }
  .pf.dense .pf-need ul { font-size: 11pt; }
  .pf.dense .pf-need li { margin-bottom: 1mm; }

  /* box labels: 2 per page */
  .pl-page { display: grid; grid-template-rows: 1fr 1fr; height: 252mm; break-after: page; }
  .pl-page:last-child { break-after: auto; }
  .pl { border: 1pt dashed #777; padding: 8mm 10mm; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; overflow: hidden; }
  .pl + .pl { border-top: 0; }
  .pl-ev { font: 700 13pt var(--body); text-transform: uppercase; letter-spacing: .14em; margin: 0 0 3mm; }
  .pl-name { font: 64pt/1.02 var(--head); margin: 0 0 6mm; overflow-wrap: break-word; max-width: 100%; }
  .pl-name.xl { font-size: 88pt; }
  .pl-name.l { font-size: 66pt; }
  .pl-name.m { font-size: 46pt; }
  .pl-name.s { font-size: 32pt; }
  .pl-rule { font: 600 13pt var(--body); margin: 0 0 3mm; max-width: 160mm; border-top: 2pt solid #000; border-bottom: 2pt solid #000; padding: 2mm 4mm; }
  .pl-cause { font-size: 11pt; margin: 0; max-width: 150mm; }

  /* counting sheet */
  .ps-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10mm; margin-bottom: 3mm; }
  .ps-head .h1 { font-size: 22pt; margin: 0; flex-basis: 100%; }
  .ps-head p { margin: 1mm 0; font-size: 11pt; }
  .ps-head .ps-foot { font-size: 9.5pt; margin: 0 0 1mm; flex-basis: 100%; color: #333; }
  .ps-table { width: 100%; table-layout: fixed; font-size: 10.5pt; }
  .ps-table col.c-team { width: 50mm; }
  .ps-table col.c-size { width: 22mm; }
  .ps-table col.c-bonus { width: 24mm; }
  .ps-table col.c-tot { width: 20mm; }
  .ps-table th, .ps-table td { border: .75pt solid #000; padding: 1.4mm 1.5mm; height: 10mm; }
  .ps-table thead th { background: #eee; font: 700 9.5pt var(--body); text-align: center; height: auto; overflow-wrap: break-word; }
  .ps-table thead th small { display: block; font-weight: 500; font-size: 8.5pt; }
  .ps-table tbody th { text-align: left; font-weight: 600; overflow-wrap: break-word; }
  .ps-table td.sz { text-align: center; color: #333; }
  .ps-table.small thead th { font-size: 8.5pt; }
  .ps-table thead { display: table-header-group; }
  .ps-table tr { break-inside: avoid; }
  .print-root tr.run td { border: 0 !important; height: auto !important; padding: 0 0 1.5mm !important; font: 500 8.5pt var(--body); color: #555; text-align: left !important; background: none; }

  /* standings */
  .pr-head .h1 { font-size: 24pt; margin: 0 0 1mm; }
  .pr-head p { margin: 0 0 1mm; }
  .pr-raised { font-size: 12pt; margin: 2mm 0 1mm !important; }
  .pr-rule { font-size: 10pt; color: #333; margin: 0 0 4mm !important; }
  .pr-table, .print-root .daytable { width: 100%; font-size: 10.5pt; font-variant-numeric: tabular-nums; }
  .pr-table { table-layout: fixed; }
  .pr-table col.c-place { width: 18mm; }
  .pr-table col.c-num { width: 28mm; }
  .pr-table th, .pr-table td, .print-root .daytable th, .print-root .daytable td { border-bottom: .75pt solid #888; padding: 1.6mm 2mm; height: 8mm; text-align: right; white-space: normal; }
  .pr-table td:first-child, .pr-table tbody th, .pr-table thead th:nth-child(-n+2), .print-root .daytable th:first-child { text-align: left; }
  .pr-table tbody th { font-weight: 600; overflow-wrap: break-word; }
  .pr-table thead th, .print-root .daytable thead th { border-bottom: 1.5pt solid #000; font: 700 10pt var(--body); color: #000; }
  .pr-table thead, .print-root .daytable thead { display: table-header-group; }
  .pr-table tr, .print-root .daytable tr { break-inside: avoid; }
  .print-root .h2 { font-size: 15pt; margin: 7mm 0 2mm; break-after: avoid; }
  .pr-note { font-size: 10pt; margin: 2mm 0 0; }
  .pr-warn { font-weight: 600; }
  .print-root .dash { color: #666; }
}
