:root {
  --blue: #1d3a8a; --blue-dark: #142a66; --blue-soft: #e8edf8;
  --yellow: #f5c400; --yellow-soft: #fff6cc;
  --ink: #1b1f2a; --muted: #5d6474; --line: #dde1ea; --bg: #f6f7fb; --card: #fff;
  --red: #b42318; --red-soft: #fde8e7; --green: #1e7a3c; --green-soft: #e3f4e8; --amber: #a15c00; --amber-soft: #fff1d6;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--blue); }
header.top { background: var(--blue); color: #fff; border-bottom: 4px solid var(--yellow); }
header.top .bar { display: flex; align-items: center; gap: 18px; max-width: 1280px; margin: 0 auto; padding: 8px 16px; flex-wrap: wrap; }
header.top img { width: 44px; height: 44px; border-radius: 50%; }
header.top .brand { font-weight: 700; font-size: 18px; color: var(--yellow); text-decoration: none; white-space: nowrap; }
header.top nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
header.top nav a { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 6px; }
header.top nav a:hover, header.top nav a.on { background: var(--blue-dark); color: var(--yellow); }
header.top nav { align-items: center; }
header.top .group { position: relative; }
header.top .group-btn { background: none; border: 0; color: #fff; font: inherit; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
header.top .group-btn span { font-size: 11px; opacity: .8; }
header.top .group-btn:hover, header.top .group.on .group-btn, header.top .group.open .group-btn { background: var(--blue-dark); color: var(--yellow); }
header.top .menu { display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; min-width: 170px; background: var(--blue-dark);
  border: 1px solid rgba(255,255,255,.15); border-top: 3px solid var(--yellow); border-radius: 8px; padding: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
header.top .group.open .menu { display: flex; flex-direction: column; gap: 2px; }
header.top .menu a { white-space: nowrap; }
header.top .menu a:hover, header.top .menu a.on { background: var(--blue); }
header.top .menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.45); color: #fff; font: inherit; font-weight: 600; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
header.top .who { font-size: 13px; opacity: .85; display: flex; gap: 8px; align-items: center; }
header.top .who button { background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; padding: 3px 8px; border-radius: 5px; cursor: pointer; }
main { max-width: 1280px; margin: 0 auto; padding: 20px 16px 60px; }
h1 { font-size: 24px; margin: 0 0 16px; color: var(--blue-dark); }
h2 { font-size: 18px; margin: 28px 0 10px; color: var(--blue-dark); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: inherit; display: block; }
.tile .n { font-size: 28px; font-weight: 700; color: var(--blue-dark); }
.tile .l { color: var(--muted); font-size: 13px; }
.tile.warn { border-left-color: var(--yellow); } .tile.bad { border-left-color: var(--red); } .tile.good { border-left-color: var(--green); }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 7px 9px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--blue-soft); color: var(--blue-dark); font-size: 13px; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--blue-soft); color: var(--blue-dark); }
.pill.good { background: var(--green-soft); color: var(--green); }
.pill.bad { background: var(--red-soft); color: var(--red); }
.pill.warn { background: var(--amber-soft); color: var(--amber); }
.pill.y { background: var(--yellow-soft); color: #6b5500; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 10px; }
.flash.ok { background: var(--green-soft); color: var(--green); }
.flash.error { background: var(--red-soft); color: var(--red); }
.flash.warn { background: var(--amber-soft); color: var(--amber); }
form.inline { display: inline; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=month], select, textarea {
  width: 100%; padding: 7px 9px; border: 1px solid #c9cfdb; border-radius: 6px; font: inherit; background: #fff; }
textarea { min-height: 120px; }
textarea.code { font: 13px/1.4 ui-monospace, Menlo, monospace; min-height: 420px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.check { display: flex; gap: 6px; align-items: center; color: var(--ink); font-size: 14px; }
.check input { width: auto; }
button, .btn { display: inline-block; background: var(--blue); color: #fff; border: 0; border-radius: 7px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.secondary, .btn.secondary { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
button.yellow, .btn.yellow { background: var(--yellow); color: var(--blue-dark); }
button.danger { background: var(--red); }
button.small, .btn.small { padding: 3px 9px; font-size: 13px; }
button:disabled { opacity: .45; cursor: not-allowed; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters > div { min-width: 150px; }
.sev1 { border-left: 4px solid var(--red); } .sev2 { border-left: 4px solid var(--yellow); } .sev3 { border-left: 4px solid var(--line); }
.issue { padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; }
.issue .t { font-weight: 600; }
.reasons { font-size: 12px; color: var(--muted); }
details.email { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: #fff; }
details.email summary { padding: 8px 12px; cursor: pointer; }
details.email .body { border-top: 1px solid var(--line); padding: 12px; }
iframe.email-frame { display: block; width: 100%; height: 400px; border: 0; border-radius: 8px; }
.guard { background: var(--yellow-soft); border: 1px solid var(--yellow); border-radius: 10px; padding: 14px; }
.steps { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.step { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff; }
.step.done { border-color: var(--green); background: var(--green-soft); }
.step h3 { margin: 0 0 8px; font-size: 15px; }
pre.report { white-space: pre-wrap; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-size: 13px; }
.login { max-width: 380px; margin: 60px auto; text-align: center; }
.login img { width: 110px; height: 110px; border-radius: 50%; }
.split { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
fieldset.types { border: 1px solid var(--line); border-radius: 8px; margin: 12px 0 0; padding: 8px 12px; }
fieldset.types legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
fieldset.types .row { gap: 6px 18px; }
.facts { margin: 3px 0 2px; color: var(--ink); }
.facts span:not(:last-child)::after { content: " · "; color: var(--muted); }
.facts .missing { color: var(--red); }
dialog.card { border: 1px solid var(--line); padding: 20px; }
dialog::backdrop { background: rgba(20, 42, 102, .35); }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.cal-head { font-size: 12px; font-weight: 700; color: var(--blue-dark); text-align: center; padding: 4px 0; }
.cal-day { background: var(--card); border: 1px solid var(--line); border-radius: 6px; min-height: 84px; padding: 4px; }
.cal-day.today { border: 2px solid var(--blue); }
.cal-day.past { background: #eef0f5; }
.cal-day.past .cal-date { opacity: .6; }
.cal-date { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.chip { display: block; font-size: 11.5px; line-height: 1.3; border-radius: 5px; padding: 3px 5px; margin-bottom: 3px; text-decoration: none; color: var(--ink); }
.chip.inline { display: inline-block; font-weight: 700; margin: 0; }
.chip.home { background: var(--yellow); color: var(--blue-dark); border: 1px solid #d9ad00; }
.chip.away { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.chip.postponed { text-decoration: line-through; opacity: .7; }
@media (max-width: 760px) { .cal { display: none; } }
.cup { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #fff; background: var(--red); border-radius: 3px; padding: 0 4px; vertical-align: 1px; }
.res { font-weight: 800; font-size: 11px; }
.res.W { color: var(--green); } .res.L { color: var(--red); } .res.D { color: var(--amber); }
.tile .sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; border-top: 1px dashed var(--line); padding-top: 4px; }
tr.totals td { background: var(--blue-soft); border-top: 2px solid var(--blue); }
table.centered th.num, table.centered td.num { text-align: center; }
.tile-list { width: auto; background: none; margin-top: 2px; font-size: 13px; color: var(--muted); }
.tile-list td { border: 0; padding: 0 12px 0 0; background: none; }
.tile-list td.num { text-align: right; padding-right: 0; }
.tile-list td.count { padding-left: 10px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-list .waived { color: var(--green); font-size: 12px; text-decoration: none; }
.tile-list .waived:hover { text-decoration: underline; }
@media (min-width: 1100px) { .grid.top-tiles { grid-template-columns: repeat(4, minmax(0, 0.9fr)) minmax(0, 1.4fr) minmax(0, 0.9fr); } }
a.forecast-link { display: block; text-decoration: none; color: var(--ink); border-left: 5px solid var(--green); }
a.forecast-link:hover { border-color: var(--blue); }
/* Column headings that explain themselves: hover for a tip, click for the Guide */
a.th-help { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
a.th-help:hover { color: var(--blue); }
/* Money */
.subnav { gap: 14px; margin: -6px 0 14px; }
.subnav a.on { font-weight: 700; color: var(--blue-dark); text-decoration: none; border-bottom: 3px solid var(--yellow); }
.receipt-pick { border: 1px dashed var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.receipt-thumb { max-height: 120px; max-width: 220px; border-radius: 6px; border: 1px solid var(--line); vertical-align: middle; }
.money-figures td.num, .money-figures th.num { text-align: right; }
.money-figures tr.sub td { color: var(--muted); }
.money-figures tr.total td { font-weight: 700; border-top: 2px solid var(--blue); }
tr.void td { color: var(--muted); text-decoration: line-through; }
tr.void td.why { text-decoration: none; }
details.inline-form { display: inline-block; }
details.inline-form > summary { cursor: pointer; color: var(--blue); font-size: 13px; list-style: none; }
details.inline-form[open] { display: block; margin-top: 6px; }
/* Team sheet: BIPins in big print for scoresheets */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sheet-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.sheet-head h1 { margin: 0; }
.sheet-pick select { font-size: 17px; padding: 8px 10px; min-width: 180px; }
ol.sheet, ul.sheet { list-style: none; margin: 10px 0 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.sheet li { display: grid; grid-template-columns: max-content 1fr; align-items: baseline; gap: 4px 22px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.sheet li:last-child { border-bottom: 0; }
.sheet li:nth-child(even) { background: var(--bg); }
.sheet .pin { font: 700 30px/1.15 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; color: var(--blue-dark); min-width: 8ch; }
.sheet .who { font-size: 26px; font-weight: 600; line-height: 1.2; }
.sheet .why { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
@media (max-width: 760px) { .sheet .pin { font-size: 28px; } .sheet .who { font-size: 22px; } }
@media print { header.top, .sheet-pick, .flash { display: none; } .sheet li:nth-child(even) { background: none; } }
/* Web access */
table.access th.c, table.access td.c { text-align: center; }
table.access td.c input[type=checkbox] { width: 18px; height: 18px; }
table.access tr.off td:nth-child(n+4) { opacity: .35; }
.bad-text { color: var(--red); }
.warn-text { color: #8a5a00; margin-top: 4px; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #c5cbd8; border-radius: 24px; transition: .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch input:disabled + span { opacity: .4; cursor: not-allowed; }
/* Phone menu (after the header rules so it wins) */
@media (max-width: 760px) {
  header.top .bar { gap: 10px; }
  header.top .menu-toggle { display: block; }
  header.top nav, header.top .who { display: none; }
  header.top.open nav { display: flex; flex-direction: column; align-items: stretch; flex-basis: 100%; gap: 6px; padding: 6px 0 4px; }
  header.top.open .who { display: flex; flex-basis: 100%; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.2); padding: 10px 0 4px; }
  header.top nav > a { font-weight: 600; font-size: 16px; }
  header.top .group-btn { display: block; width: 100%; text-align: left; font-weight: 600; font-size: 16px; pointer-events: none; }
  header.top .group-btn span { display: none; }
  header.top .group.on .group-btn { background: none; }
  header.top .menu { display: flex; flex-wrap: wrap; position: static; gap: 4px; background: none; border: 0; box-shadow: none; padding: 0 0 0 10px; min-width: 0; }
  header.top .menu a { background: rgba(255,255,255,.08); font-size: 15px; padding: 8px 12px; }
}

/* A link into a section this login can't open has no href: show it as plain text. */
a:not([href]) { color: inherit; text-decoration: none; cursor: default; }
