/* Bagpeek, Direction C: Floodlight design, Field Issue layout. One stylesheet for all pages.
   Colour tokens: the day set is the default; the night set applies when the system is dark, unless <html data-theme="light">.
   <html data-theme="dark"> forces night. js/theme.js sets that attribute from the System / Light / Dark switch
   (Settings tab, club page, guide and legal footers); keep the two night blocks identical (tests/unit.test.mjs).
   .day forces the day set on an element (scan page, print); .night forces the night set (landing). */

@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/nunito-latin.woff2) format('woff2'); 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: 'Nunito'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(/fonts/nunito-latin-ext.woff2) format('woff2'); 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: 'Big Shoulders Display'; font-style: normal; font-weight: 800 900; font-display: swap; src: url(/fonts/big-shoulders-display-latin.woff2) format('woff2'); 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: 'Big Shoulders Display'; font-style: normal; font-weight: 800 900; font-display: swap; src: url(/fonts/big-shoulders-display-latin-ext.woff2) format('woff2'); 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; }

:root, .day {
  /* fixed brand colours (same in day and night) */
  --night: #08140f; --turf: #11241c; --turf-2: #183126; --lined: #24402f; --inkd: #eef5ef; --mutd: #9db3a8;
  --lime: #d4f04c; --chalk: #f4f6f1;
  --green: #077a4c;       /* bench green (first-aid green); white text on it is 5.4:1 */
  --green-d: #066b45;
  --red: #c8262c;         /* call red; white text on it is 5.6:1 */
  --amber: #f2a20c;
  /* day set */
  --bg: #f4f6f1; --card: #ffffff; --card-2: #eef2ec;
  --ink: #0a1a14; --ink-2: #34443d; --ink-3: #4a5a53;
  --line: #dce3dd; --rule: #0a1a14;
  --green-l: #e3f4ec;
  --accent: #077a4c;      /* accent as text: scores, active tab */
  --wm-em: #077a4c;       /* the "PEEK" in the wordmark */
  --primary: #0a1a14; --on-primary: #ffffff; --primary-h: #1f352b;
  --ok: #077a4c; --on-ok: #ffffff; --ok-t: #066b45; --ok-l: #e3f4ec;
  --bad: #c8262c; --on-bad: #ffffff; --bad-t: #b0181b; --bad-l: #fde8e8;
  --warn: #f2a20c; --on-warn: #0a1a14; --warn-t: #8a5a00; --warn-l: #fff3d9;
  --red-t: #b0181b; --red-l: #fde8e8; --amber-l: #fff3d9;
  --link: #077a4c;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(10, 26, 20, .05), 0 8px 20px -12px rgba(10, 26, 20, .18);
  --font: 'Nunito', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  --disp: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08140f; --card: #11241c; --card-2: #183126;
    --ink: #eef5ef; --ink-2: #c9d8d0; --ink-3: #9db3a8;
    --line: #24402f; --rule: #4c6b5b;
    --green-l: #12332a;
    --accent: #d4f04c; --wm-em: #d4f04c;
    --primary: #d4f04c; --on-primary: #0a1a14; --primary-h: #e2f77c;
    --ok: #d4f04c; --on-ok: #0a1a14; --ok-t: #d4f04c; --ok-l: #2a3f22;
    --bad: #ff7a70; --on-bad: #08140f; --bad-t: #ff7a70; --bad-l: #3a1b1c;
    --warn: #ffc24d; --on-warn: #08140f; --warn-t: #ffc24d; --warn-l: #3a2e12;
    --red-t: #ff7a70; --red-l: #3a1b1c; --amber-l: #3a2e12;
    --link: #d4f04c;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"], .night {
  --bg: #08140f; --card: #11241c; --card-2: #183126;
  --ink: #eef5ef; --ink-2: #c9d8d0; --ink-3: #9db3a8;
  --line: #24402f; --rule: #4c6b5b;
  --green-l: #12332a;
  --accent: #d4f04c; --wm-em: #d4f04c;
  --primary: #d4f04c; --on-primary: #0a1a14; --primary-h: #e2f77c;
  --ok: #d4f04c; --on-ok: #0a1a14; --ok-t: #d4f04c; --ok-l: #2a3f22;
  --bad: #ff7a70; --on-bad: #08140f; --bad-t: #ff7a70; --bad-l: #3a1b1c;
  --warn: #ffc24d; --on-warn: #08140f; --warn-t: #ffc24d; --warn-l: #3a2e12;
  --red-t: #ff7a70; --red-l: #3a1b1c; --amber-l: #3a2e12;
  --link: #d4f04c;
  --shadow: none;
  color-scheme: dark;
}

/* Printing a coach page is always day, whatever the screen shows (the :not() selector outranks the dark rule). */
@media print {
  :root, :root:not([data-theme="light"]), :root[data-theme] {
  /* day set */
  --bg: #f4f6f1; --card: #ffffff; --card-2: #eef2ec;
  --ink: #0a1a14; --ink-2: #34443d; --ink-3: #4a5a53;
  --line: #dce3dd; --rule: #0a1a14;
  --green-l: #e3f4ec;
  --accent: #077a4c;      /* accent as text: scores, active tab */
  --wm-em: #077a4c;       /* the "PEEK" in the wordmark */
  --primary: #0a1a14; --on-primary: #ffffff; --primary-h: #1f352b;
  --ok: #077a4c; --on-ok: #ffffff; --ok-t: #066b45; --ok-l: #e3f4ec;
  --bad: #c8262c; --on-bad: #ffffff; --bad-t: #b0181b; --bad-l: #fde8e8;
  --warn: #f2a20c; --on-warn: #0a1a14; --warn-t: #8a5a00; --warn-l: #fff3d9;
  --red-t: #b0181b; --red-l: #fde8e8; --amber-l: #fff3d9;
  --link: #077a4c;
    --shadow: none;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
.day, .night { color: var(--ink); }
a { color: var(--link); }
::placeholder { color: var(--ink-3); opacity: 1; }
h1, h2, h3 { line-height: 1.1; margin: 0 0 .4em; }
h1, h2 { font-family: var(--disp); font-weight: 900; text-transform: uppercase; letter-spacing: .005em; }
h1 { font-size: clamp(2.1rem, 6vw, 3rem); line-height: .95; }
h2 { font-size: 1.6rem; line-height: 1; }
h3 { font-size: 1.05rem; font-weight: 800; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--ink-2); }
.tiny { font-size: .84rem; color: var(--ink-3); }
.tiny .exp-ic { color: var(--bad-t); margin-right: .3em; }
.disp { font-family: var(--disp); font-weight: 900; text-transform: uppercase; }
.ic { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.25em; }
.ic.fill { fill: currentColor; stroke: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* Kit stripes: decorative, always their own element (never behind text). */
.stripes { display: block; height: 14px; background: repeating-linear-gradient(115deg, var(--lime) 0 16px, transparent 16px 27px); }
.stripes.thin { height: 9px; background: repeating-linear-gradient(115deg, var(--lime) 0 12px, var(--night) 12px 20px); }

/* Layout */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.narrow { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap, .top .narrow { display: flex; align-items: center; gap: 10px; min-height: 60px; }
.top .teamname { font-weight: 800; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* Wordmark: leaning lime tile + BAGPEEK */
.brand { display: inline-flex; align-items: center; gap: 9px; font: 900 24px/1 var(--disp); text-transform: uppercase; letter-spacing: .02em; color: var(--ink); text-decoration: none; min-height: 44px; white-space: nowrap; flex: none; }
.brand em, .wm em { font-style: normal; color: var(--wm-em); }
.logo { width: 1.15em; height: 1.15em; border-radius: .3em; background: var(--lime); display: grid; place-items: center; transform: skewX(-8deg); flex: none; }
.logo .ic { color: var(--night); width: 62%; height: 62%; transform: skewX(8deg); vertical-align: 0; }
.logo .ic path { fill: var(--night); stroke: none; }
.spacer { flex: 1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
main { padding: 22px 0 120px; }

/* Cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border: 1px solid var(--line); min-width: 0; }
.card.flat { box-shadow: none; }
.card h2 { display: flex; align-items: center; gap: 8px; }
.card h2 .ic { color: var(--accent); width: 1em; height: 1em; }
.section-title { font: 900 .78rem/1.5 var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 28px 0 12px; padding-bottom: 6px; border-bottom: 1.5px solid var(--rule); }

/* Buttons: 14px tool buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; transition: transform .06s, background .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { border-color: var(--rule); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-h); border-color: var(--primary-h); }
.btn.lime { background: var(--lime); border-color: var(--lime); color: var(--night); }
.btn.lime:hover { background: #e2f77c; border-color: #e2f77c; }
.btn.danger { color: var(--bad-t); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.big { min-height: 56px; font-size: 1.06rem; padding: 0 22px; }
.btn.block { width: 100%; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { border-color: var(--line); }
.btn.outline { background: transparent; }
.btn.small { min-height: 44px; padding: 0 13px; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn { width: 44px; height: 44px; padding: 0; }
.modal-actions .btn.danger.primary { background: var(--red); border-color: var(--red); color: #fff; }

/* Forms */
label.f { display: block; font-weight: 800; font-size: .92rem; margin: 0 0 12px; }
label.f > span { display: block; margin-bottom: 5px; }
input[type=text], input[type=number], input[type=date], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600;
}
textarea { min-height: 80px; resize: vertical; }
input[type=checkbox] { accent-color: var(--ok); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { flex: 1 1 auto; min-height: 46px; padding: 8px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; text-align: center; }
.seg button[aria-pressed=true] { border-color: var(--ok); background: var(--ok-l); color: var(--ok-t); box-shadow: inset 0 0 0 1px var(--ok); }
.seg button small { display: block; font-weight: 600; font-size: .78rem; color: var(--ink-3); }

/* Pills / status: always icon or word, never colour alone */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 8px; font-size: .8rem; font-weight: 800; background: var(--ok-l); color: var(--ok-t); white-space: nowrap; }
.pill .ic { width: 1.05em; height: 1.05em; }
.pill.warn { background: var(--warn-l); color: var(--warn-t); }
.pill.bad { background: var(--bad-l); color: var(--bad-t); }
.pill.grey { background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink-2); }
.meter { height: 10px; border-radius: 3px; background: var(--line); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: var(--ok); }
.meter.warn > i { background: var(--warn); }
.meter.bad > i { background: var(--bad); }

/* Kit cards (dashboard): equipment tags */
.kitcard { display: block; text-decoration: none; color: inherit; cursor: pointer; text-align: left; font: inherit; width: 100%; position: relative; overflow: hidden; padding: 0; }
.kitcard .stripes { height: 10px; }
.kitcard .in { padding: 14px 18px 18px; }
.kitcard .head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.kitcard h3 { font: 900 2rem/.9 var(--disp); text-transform: uppercase; margin: 0; overflow-wrap: anywhere; }
.kitcard .code { font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.score { font: 900 2.6rem/.8 var(--disp); color: var(--accent); text-align: right; flex: none; }
.score sup { font-size: .45em; vertical-align: top; margin-left: 1px; }
.score small { display: block; font: 800 .66rem/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.kitcard .stats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.kitcard.add { display: grid; place-items: center; align-content: center; gap: 6px; border-style: dashed; box-shadow: none; min-height: 150px; padding: 18px; background: transparent; }
.kitcard.add .ic { width: 34px; height: 34px; color: var(--accent); }
.kitbadge { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--ok); color: var(--on-ok); flex: none; transform: skewX(-8deg); }
.kitbadge .ic { width: 24px; height: 24px; transform: skewX(8deg); }
.kitbadge.warn { background: var(--warn); color: var(--on-warn); }
.kitbadge.bad { background: var(--bad); color: var(--on-bad); }

/* Tabs (manage): ruled, the selected one underlined in the accent */
.tabs { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; margin: 0 0 18px; border-bottom: 1.5px solid var(--rule); }
.tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: none; padding: 12px 12px 10px; min-height: 48px; font: inherit; font-weight: 800; color: var(--ink-3); cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1.5px; }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs button[aria-selected=true] .ic { color: var(--accent); }
@media (max-width: 560px) {
  .tabs button { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; padding: 8px 2px 7px; font-size: .74rem; position: relative; }
  .tabs button .ic { width: 22px; height: 22px; }
  .tabs .count { position: absolute; top: 3px; left: calc(50% + 8px); }
}
.tabs .count { background: var(--bad); color: var(--on-bad); border-radius: 8px; font-size: .74rem; font-weight: 900; padding: 1px 7px; }

/* Kit view: title row with score, three counters, contents table */
.kt { padding: 0; overflow: hidden; }
.kt-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1.5px solid var(--rule); }
.kt-title h1 { margin: 0; font-size: clamp(2.2rem, 8vw, 3rem); line-height: .86; overflow-wrap: anywhere; }
.kt-title .meta { margin: 8px 0 0; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.kt-title .meta .late { color: var(--warn-t); }
.kt .score { font-size: 3.2rem; }
.cnt { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1.5px solid var(--rule); background: var(--card-2); }
.cnt > div { padding: 10px 10px 10px 14px; border-left: 1px solid var(--line); font-size: .72rem; font-weight: 800; line-height: 1.2; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); min-width: 0; }
.cnt > div:first-child { border-left: 0; }
.cnt b { display: flex; align-items: center; gap: 6px; font: 900 2.1rem/1 var(--disp); color: var(--ink); margin-bottom: 3px; }
.cnt b .ic { width: 17px; height: 17px; stroke-width: 2.5; }
.cnt .r { box-shadow: inset 0 4px 0 var(--bad); } .cnt .r .ic { color: var(--bad-t); }
.cnt .a { box-shadow: inset 0 4px 0 var(--warn); } .cnt .a .ic { color: var(--warn-t); }
.cnt .g { box-shadow: inset 0 4px 0 var(--accent); } .cnt .g .ic { color: var(--ok-t); }
.kt .actions { padding: 14px 18px 16px; }

.ctbl { list-style: none; margin: 0; padding: 0; }
.items.ctbl li, .ctbl-th { display: grid; grid-template-columns: minmax(0, 1fr) 50px 80px; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.items.ctbl li:last-child { border-bottom: 0; }
.ctbl-th { font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 0 0 6px; border-bottom: 1.5px solid var(--rule); }
.ctbl-th span + span { text-align: right; }
.items.ctbl li.cathead { display: block; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 16px 0 6px; border-bottom: 1.5px solid var(--rule); }
.items.ctbl li.cathead.attn { color: var(--bad-t); padding-top: 10px; }
.ctbl .nm { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; font-size: .95rem; line-height: 1.25; min-width: 0; }
.ctbl .nm > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.sq { width: 20px; height: 20px; border-radius: 5px; flex: none; display: grid; place-items: center; transform: skewX(-8deg); background: var(--ok); color: var(--on-ok); margin-top: 1px; }
.sq .ic { width: 13px; height: 13px; stroke-width: 3; transform: skewX(8deg); }
.sq.bad { background: var(--bad); color: var(--on-bad); }
.sq.warn { background: var(--warn); color: var(--on-warn); }
.ctbl .sub { display: block; font-size: .76rem; font-weight: 800; margin-top: 2px; color: var(--ok-t); }
.ctbl .sub.bad { color: var(--bad-t); } .ctbl .sub.warn { color: var(--warn-t); }
.ctbl .q, .ctbl .e { font: 800 1.15rem/1.1 var(--disp); text-align: right; text-transform: uppercase; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.ctbl .q i { font-style: normal; color: var(--ink-3); font-size: .85em; }
.ctbl .q.short { color: var(--bad-t); }
.ctbl .e { font-size: 1rem; line-height: 1.25; white-space: nowrap; }
.ctbl .e.bad { color: var(--bad-t); } .ctbl .e.warn { color: var(--warn-t); }

/* Item rows (lists elsewhere) */
.items { list-style: none; margin: 0; padding: 0; }
.items li { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items .name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.items .name b { font-weight: 700; display: block; }
.items .qty { font: 800 1.2rem/1 var(--disp); font-variant-numeric: tabular-nums; min-width: 3em; text-align: right; }
.cathead { font-size: .74rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 14px 2px 2px; }

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; flex: none; }
.stepper button { width: 44px; height: 44px; border: 0; background: var(--card); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.stepper button:active { background: var(--ok-l); }
.stepper output, .stepper input { width: 40px; text-align: center; font: 800 1.25rem/44px var(--disp); font-variant-numeric: tabular-nums; border: 0; min-height: 44px; padding: 0; border-radius: 0; background: var(--card); }

/* Scan page: night brand header, chalk body (always day) */
.scan { min-height: 100dvh; display: flex; flex-direction: column; }
.scanhead { background: radial-gradient(ellipse 70% 90% at 90% -20%, rgba(212, 240, 76, .18), transparent 70%), var(--night); color: var(--inkd); }
.scanhead .brandrow { display: flex; align-items: center; gap: 8px; padding: 8px 16px 2px; max-width: 640px; margin: 0 auto; }
.scanhead .brand { font-size: 17px; color: var(--inkd); }
.scanhead .brand em { color: var(--lime); }
.scanhead .team { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mutd); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; text-align: right; }
.scanhead .lang-select { background: var(--turf); color: var(--inkd); border-color: var(--lined); }
.sign { display: flex; gap: 12px; align-items: center; padding: 8px 16px 14px; max-width: 640px; margin: 0 auto; }
.sign .tile-mark { width: 52px; height: 52px; border-radius: 13px; background: var(--lime); color: var(--night); display: grid; place-items: center; transform: skewX(-8deg); flex: none; }
.sign .tile-mark .ic { width: 30px; height: 30px; transform: skewX(8deg); }
.sign .tile-mark .ic path { fill: currentColor; stroke: none; }
.sign small { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mutd); }
.sign h1 { font-size: 2.3rem; line-height: .88; margin: 2px 0 0; color: var(--inkd); overflow-wrap: anywhere; }
.sos { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 16px; }
.sos .call { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; background: var(--red); color: #fff; border-radius: 20px; padding: 10px 14px; text-decoration: none; box-shadow: 0 10px 24px -12px rgba(200, 38, 44, .75); min-height: 68px; }
.sos .call .ph { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; }
.sos .call .ph .ic { width: 26px; height: 26px; }
.sos .call b { display: block; font: 900 2.4rem/.85 var(--disp); text-transform: uppercase; }
.sos .call small { display: block; color: #fff; font-size: .74rem; font-weight: 800; line-height: 1.2; margin-top: 3px; }
.sos .help { display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 92px; max-width: 120px; border-radius: 20px; border: 1.5px solid var(--ink); background: var(--card); color: var(--ink); font: inherit; font-size: .84rem; font-weight: 800; line-height: 1.15; text-align: center; cursor: pointer; padding: 8px; }
.sos .help .ic { width: 26px; height: 26px; color: var(--green); }
.say { font-weight: 700; font-size: .95rem; margin: 12px 2px 10px; }
.elist { background: var(--card); border: 1.5px solid var(--ink); border-radius: 18px; overflow: hidden; }
.elist .r { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; padding: 9px 10px 9px 14px; border-top: 1px solid var(--line); align-items: center; }
.elist .r:first-child { border-top: 0; }
.elist .no { font: 900 1.5rem/1 var(--disp); color: var(--green); }
.elist small { display: block; font-size: .7rem; font-weight: 800; line-height: 1.2; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.elist b { display: block; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.elist .none { color: var(--ink-3); font-weight: 700; }
.go { width: 44px; height: 44px; border-radius: 14px; background: var(--lime); color: var(--night); display: grid; place-items: center; border: 0; cursor: pointer; text-decoration: none; }
.go .ic { width: 20px; height: 20px; }
.go[aria-busy=true] { opacity: .6; }
.used { margin-top: 14px; border: 1.5px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--card); display: grid; grid-template-columns: 12px 1fr; }
.vstripes { background: repeating-linear-gradient(155deg, var(--lime) 0 9px, var(--night) 9px 16px); }
.used .in { padding: 10px 10px 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.used b { display: block; font: 900 1.4rem/1 var(--disp); text-transform: uppercase; }
.used .tiny { color: var(--ink-3); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { position: relative; min-height: 86px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); padding: 12px 14px; text-align: left; font: inherit; font-weight: 800; font-size: .98rem; line-height: 1.2; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; -webkit-tap-highlight-color: transparent; user-select: none; touch-action: manipulation; box-shadow: var(--shadow); }
.tile:active { transform: scale(.97); }
.tile.on { border-color: var(--green); background: var(--green-l); box-shadow: inset 0 0 0 1px var(--green); }
.tile .n { position: absolute; top: -9px; right: -7px; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px; background: var(--night); color: var(--lime); display: grid; place-items: center; font: 900 1.35rem/1 var(--disp); }
.tile .minus { position: absolute; bottom: 6px; right: 6px; width: 36px; height: 36px; border-radius: 10px; border: 0; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.tile .sub { font-size: .78rem; font-weight: 700; color: var(--ink-3); }
.bottombar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-top: 1.5px solid var(--rule); transform: translateY(110%); transition: transform .2s; }
.bottombar.show { transform: none; }
.bottombar .narrow { padding: 0; }
.done-screen { text-align: center; padding: 40px 10px; }
.done-screen .bigcheck { width: 92px; height: 92px; border-radius: 24px; background: var(--ok); color: var(--on-ok); display: grid; place-items: center; margin: 0 auto 18px; animation: pop .35s ease-out; transform: skewX(-8deg); }
.done-screen .bigcheck .ic { width: 48px; height: 48px; stroke-width: 3; transform: skewX(8deg); }
@keyframes pop { from { opacity: 0; } to { opacity: 1; } }

/* First-aid cards */
.fa { border-left: 6px solid var(--ok); }
.fa.urgent { border-left-color: var(--bad); }
.fa summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.05rem; }
.fa summary::-webkit-details-marker { display: none; }
.fa summary .ic { width: 28px; height: 28px; color: var(--ok-t); }
.fa.urgent summary .ic { color: var(--bad-t); }
.fa ol { padding-left: 1.3em; margin: 12px 0; }
.fa ol li { margin: 6px 0; }
.fa .call { background: var(--bad-l); border-radius: 14px; padding: 10px 12px; margin: 10px 0; }
.fa .call b { color: var(--bad-t); }
.disclaimer { font-size: .84rem; color: var(--ink-3); border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 14px; }
.infobox { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 18px; background: var(--ok-l); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.infobox.warn { background: var(--warn-l); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.infobox > .ic { margin-top: 2px; }
.emerg-line { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.emerg-line:last-child { border-bottom: 0; }
.emerg-line .ic { color: var(--bad-t); margin-top: 3px; }

/* Landing (always night): ruled nav, hero with equipment tag, steps in ruled cells */
.land .top { background: color-mix(in srgb, var(--night) 90%, transparent); }
.land .top .lk { display: none; color: var(--mutd); font-weight: 700; text-decoration: none; min-height: 44px; align-items: center; padding: 0 6px; }
.land .top .lk:hover { color: var(--inkd); }
@media (min-width: 760px) { .land .top .lk { display: inline-flex; } }
.glow { background: radial-gradient(ellipse 55% 70% at 88% -10%, rgba(212, 240, 76, .14), transparent 70%), radial-gradient(ellipse 40% 60% at 10% -20%, rgba(255, 255, 255, .05), transparent 70%); }
.hero { display: grid; gap: 34px; padding: 30px 0 40px; align-items: start; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.2fr .8fr; padding: 56px 0 56px; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips span { border: 1.5px solid var(--lined); color: var(--lime); padding: 3px 10px; border-radius: 8px; font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.hero h1 { font-size: clamp(3rem, 8.4vw, 5.6rem); line-height: .88; margin: 18px 0; }
.hero h1 span { color: var(--lime); }
.lead { font-size: clamp(1.02rem, 1.8vw, 1.18rem); color: var(--ink-2); max-width: 34em; }
.hero .lead { margin-bottom: 24px; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { background: linear-gradient(180deg, #132a20, #0d1e17); border: 1px solid var(--lined); border-radius: 22px; position: relative; overflow: hidden; box-shadow: 0 40px 80px -36px rgba(212, 240, 76, .32); color: var(--inkd); }
.tag .hole { position: absolute; top: 30px; right: 20px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--lined); background: var(--night); }
.tag .in { padding: 16px 20px 20px; }
.tag .code { font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--mutd); }
.tag h3 { margin: 4px 0 12px; font: 900 3rem/.9 var(--disp); text-transform: uppercase; }
.tag dl { margin: 0; display: grid; grid-template-columns: auto 1fr; }
.tag dt, .tag dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--lined); }
.tag dt { color: var(--mutd); padding-right: 16px; font: 800 .72rem/24px var(--font); text-transform: uppercase; letter-spacing: .08em; }
.tag dd { text-align: right; font: 800 1.4rem/24px var(--disp); text-transform: uppercase; font-variant-numeric: tabular-nums; }
.tag dd.t { font: 700 .9rem/24px var(--font); text-transform: none; }
.tag dd.big { color: var(--lime); font-size: 1.9rem; }
.tag dd.r { color: #ff7a70; display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.tag dd.r .ic { width: 17px; height: 17px; }
.segbar { display: grid; grid-template-columns: repeat(19, 1fr); gap: 3px; margin-top: 12px; }
.segbar i { height: 10px; border-radius: 2px; background: var(--lime); }
.segbar i.o { background: var(--lined); } .segbar i.r { background: #ff7a70; } .segbar i.a { background: #ffc24d; }
.steps3 { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
@media (min-width: 700px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.steps3 > div { padding: 18px 0 22px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: 0 14px; align-items: baseline; }
@media (min-width: 700px) { .steps3 > div { border-bottom: 0; border-left: 1px solid var(--line); padding: 18px 22px 24px; } .steps3 > div:first-child { border-left: 0; padding-left: 0; } }
.steps3 .n { grid-row: 1 / 3; font: 900 2.8rem/.9 var(--disp); color: var(--lime); }
.steps3 h3 { font: 900 1.6rem/1 var(--disp); text-transform: uppercase; margin: 0; }
.steps3 p { margin: 6px 0 0; font-size: .95rem; color: var(--ink-3); }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature h3 { margin-top: 2px; }
.fic { width: 44px; height: 44px; border-radius: 12px; background: var(--lime); color: var(--night); display: grid; place-items: center; flex: none; transform: skewX(-8deg); }
.fic .ic { transform: skewX(8deg); }
.band { background: var(--turf); color: var(--inkd); border-radius: 22px; position: relative; overflow: hidden; border: 1px solid var(--lined); display: grid; grid-template-columns: 12px 1fr; }
.band .in { padding: 26px 26px 22px; }
.band h2 { color: var(--inkd); }
.band p { color: #c9d8d0; }
.band b, .band strong { color: var(--lime); }
.price { font: 900 3rem/1 var(--disp); text-transform: uppercase; margin: 6px 0 10px; }
.price small { font: 700 1rem var(--font); text-transform: none; color: var(--ink-2); }
.plan h3 { font: 900 1.6rem/1 var(--disp); text-transform: uppercase; }
.plan ul { padding-left: 1.2em; }
footer.site { padding: 26px 0 50px; color: var(--ink-3); font-size: .9rem; border-top: 1.5px solid var(--rule); margin-top: 40px; }
footer.site a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; }
footer.site a.q-madeby { justify-content: flex-start; }
.q-madeby { display: inline-flex; align-items: center; gap: .4em; font-weight: 800; font-size: .88rem; color: var(--ink-2); text-decoration: none; }
.q-madeby svg { height: .8em; width: auto; fill: currentColor; }
footer.site .legal { display: block; margin-top: 2px; }

/* Wizard */
.steps { display: flex; gap: 6px; margin: 0 0 18px; }
.steps i { flex: 1; height: 8px; border-radius: 2px; background: var(--line); transform: skewX(-20deg); }
.steps i.on { background: var(--ok); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }

/* Dialog + toast */
dialog.modal { border: 1px solid var(--line); border-radius: 18px; padding: 22px; width: min(480px, calc(100vw - 28px)); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
dialog.modal h2 { font-size: 1.7rem; }
dialog.modal::backdrop { background: rgba(8, 20, 15, .6); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
#toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .2s; background: var(--night); color: var(--inkd); border: 1px solid var(--lined); padding: 12px 16px; border-radius: 14px; font-weight: 700; z-index: 100; display: flex; gap: 14px; align-items: center; max-width: calc(100vw - 24px); }
#toast.at-top { bottom: auto; top: calc(76px + env(safe-area-inset-top)); transform: translate(-50%, -20px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-act { background: none; border: 0; color: var(--lime); font: inherit; font-weight: 900; cursor: pointer; min-height: 44px; }
.copybox { width: 100%; font: .9rem/1.4 var(--font); }
.linkbox { display: flex; gap: 8px; }
.kitlink { flex-wrap: nowrap; padding: 6px 0; gap: 8px; }
.kitlink b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kitlink code { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font); }
.kitlink .btn { flex: none; }
.linkbox input { font-size: .88rem; min-width: 0; }
.qrbox { background: #fff; border-radius: 14px; padding: 10px; display: inline-block; }
.qrbox svg { display: block; width: 180px; height: 180px; }
.empty { text-align: center; padding: 30px 10px; color: var(--ink-2); }
.empty .ic { width: 42px; height: 42px; color: var(--accent); margin-bottom: 8px; }
.loading { text-align: center; padding: 60px 0; color: var(--ink-3); }
.lang-select { width: auto; min-height: 44px; padding: 4px 8px; font-size: .9rem; flex: none; }
.event { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .93rem; align-items: flex-start; }
.event:last-child { border-bottom: 0; }
.event > .ic { color: var(--ink-3); margin-top: 2px; }
.event .when { color: var(--ink-3); white-space: nowrap; margin-left: auto; font-size: .85rem; }
table.club { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.club th, table.club td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.club th { font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); border-bottom: 1.5px solid var(--rule); }
.joincode { font: 900 2.2rem/1 var(--disp); color: var(--accent); }
.check-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.check-item .row { justify-content: space-between; }
.check-item.done { opacity: .62; }
.hint { font-size: .84rem; color: var(--ink-3); }
.date-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.date-quick button { font: inherit; font-size: .84rem; font-weight: 800; border: 1.5px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 10px; padding: 0 12px; min-height: 44px; cursor: pointer; }
.fa[open] summary > .ic:last-child { transform: rotate(90deg); }
.fa summary > .ic:last-child { transition: transform .15s; color: var(--ink-3); width: 20px; height: 20px; }
.infobox .btn { flex: none; align-self: center; }

/* Prose pages (privacy, terms) */
.prose h1 { margin-top: 26px; }
.prose h2 { margin-top: 28px; padding-bottom: 6px; border-bottom: 1.5px solid var(--rule); font-size: 1.5rem; }
.prose li { margin: 6px 0; }

/* Tap targets: a 44px hit area for disclosure rows without changing how they look. */
details > summary { cursor: pointer; padding-block: 10px; margin-block: -10px; }

@media (min-width: 700px) { .items.ctbl li, .ctbl-th { grid-template-columns: minmax(0, 1fr) 80px 110px; gap: 16px; } }
@media (max-width: 420px) {
  .top .wrap, .top .narrow { gap: 6px; }
  .brand { font-size: 21px; }
  .kt .score { font-size: 2.7rem; }
  .cnt b { font-size: 1.8rem; }
}

/* Reduced motion: no movement, only colour and opacity changes. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn:active, .tile:active { transform: none; }
}

/* Team list (/m/ without a key): team name with its club underneath. */
.btn.team-link { justify-content: flex-start; padding-block: 10px; }
.team-link-text { display: flex; flex-direction: column; align-items: flex-start; text-align: left; line-height: 1.2; min-width: 0; }
.team-link-text small { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 600; opacity: .75; }
.team-link-text small svg { width: 14px; height: 14px; }

/* System / Light / Dark switch (js/theme.js; i18n.js themePicker). Device setting, not a team setting. */
.theme-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.theme-l { font-size: .84rem; font-weight: 800; color: var(--ink-3); }
.theme-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 14px; background: var(--card); border: 1.5px solid var(--line); }
.theme-seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px; border: 0; border-radius: 11px; background: none; color: var(--ink-2); font: inherit; font-weight: 800; font-size: .9rem; cursor: pointer; }
.theme-seg button .i { width: 16px; height: 16px; flex: none; }
.theme-seg button[aria-checked="true"] { background: var(--primary); color: var(--on-primary); }
.theme-seg button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
footer.site .theme-pick { flex-basis: 100%; margin-top: 8px; }
.theme-foot { margin: 28px 0 40px; padding-top: 16px; border-top: 1.5px solid var(--rule); }
@media print { .theme-pick, .theme-foot { display: none; } }
