/* Benchkit — sporty, clean. One stylesheet for all pages. */
:root {
  --ink: #0d1b1e;
  --ink-2: #44545a;
  --ink-3: #5f6c70;       /* all text colours meet WCAG AA (4.5:1) on --bg, --card and the tinted boxes */
  --bg: #f4f6f3;
  --card: #ffffff;
  --line: #e1e6e2;
  --green: #077a4c;       /* first-aid green (ISO 7010 family); white text on it is 5.4:1 */
  --green-d: #066b45;
  --green-l: #e3f4ec;
  --lime: #d4f04c;        /* sporty accent */
  --red: #cc2a2e;
  --red-t: var(--red);    /* red used as text */
  --link: var(--green);
  --red-l: #fde8e8;
  --amber: #f2a20c;
  --amber-l: #fff3d9;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(13, 27, 30, .06), 0 4px 16px rgba(13, 27, 30, .06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #eef3f1; --ink-2: #b5c2be; --ink-3: #9caaa6; --bg: #0e1513; --card: #17211e; --line: #263330; --green-l: #12332a; --red-l: #3a1b1c; --amber-l: #3a2e12; --red-t: #ff8a8c; --link: #4cc994; --shadow: 0 1px 2px rgba(0,0,0,.4); color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
::placeholder { color: var(--ink-3); opacity: 1; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 850; }
h2 { font-size: 1.3rem; font-weight: 800; }
h3 { font-size: 1.05rem; font-weight: 750; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--ink-2); }
.tiny { font-size: .82rem; color: var(--ink-3); }
.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; }

/* Layout */
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 18px; }
.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) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap, .top .narrow { display: flex; align-items: center; gap: 12px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 850; font-size: 1.15rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--green); display: grid; place-items: center; transform: skewX(-8deg); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.logo .ic { color: #fff; width: 18px; height: 18px; transform: skewX(8deg); }
.logo .ic path { fill: #fff; 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(260px, 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); }
.card.flat { box-shadow: none; }
.card h2 { display: flex; align-items: center; gap: 8px; }
.section-title { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin: 26px 0 10px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .06s, background .15s; -webkit-tap-highlight-color: transparent; }
.btn:hover { border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-d); }
.btn.lime { background: var(--lime); border-color: var(--lime); color: #10200a; }
.btn.danger { color: var(--red-t); }
.btn.danger.solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.big { min-height: 56px; font-size: 1.08rem; border-radius: 14px; padding: 0 22px; }
.btn.block { width: 100%; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .9rem; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn { width: 44px; height: 44px; padding: 0; border-radius: 12px; }

/* Forms */
label.f { display: block; font-weight: 700; 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: 500;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 20%, transparent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--green) 55%, transparent); 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: 12px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; text-align: center; }
.seg button[aria-pressed=true] { border-color: var(--green); background: var(--green-l); color: var(--green-d); box-shadow: inset 0 0 0 1px var(--green); }
@media (prefers-color-scheme: dark) { .seg button[aria-pressed=true] { color: #9fe3c4; } }
.seg button small { display: block; font-weight: 500; font-size: .78rem; color: var(--ink-3); }

/* Pills / status */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: .8rem; font-weight: 750; background: var(--green-l); color: var(--green-d); white-space: nowrap; }
.pill.warn { background: var(--amber-l); color: #8a5a00; }
.pill.bad { background: var(--red-l); color: #b0181b; }
.pill.grey { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink-2); }
@media (prefers-color-scheme: dark) { .pill { color: #9fe3c4; } .pill.warn { color: #ffcf6e; } .pill.bad { color: #ff9c9e; } }
.meter { height: 8px; border-radius: 9px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 9px; background: var(--green); }
.meter.warn > i { background: var(--amber); }
.meter.bad > i { background: var(--red); }

/* Kit cards (dashboard) */
.kitcard { display: block; text-decoration: none; color: inherit; cursor: pointer; text-align: left; font: inherit; width: 100%; }
.kitcard .head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.kitbadge { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--green); color: #fff; flex: none; }
.kitbadge.warn { background: var(--amber); }
.kitbadge.bad { background: var(--red); }
.kitbadge .ic { width: 24px; height: 24px; }
.kitcard .stats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

/* Tabs (manage) */
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 14px; margin: 0 0 18px; }
.tabs button { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: none; padding: 10px 14px; border-radius: 11px; font: inherit; font-weight: 750; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected=true] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.tabs .count { background: var(--red); color: #fff; border-radius: 99px; font-size: .72rem; padding: 1px 7px; }

/* Item rows */
.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; }
.items .name b { font-weight: 650; display: block; }
.items .qty { font-variant-numeric: tabular-nums; font-weight: 800; min-width: 3.4em; text-align: right; }
.cathead { font-size: .75rem; font-weight: 800; 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: 12px; overflow: hidden; }
.stepper button { width: 40px; height: 40px; border: 0; background: var(--card); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.stepper button:active { background: var(--green-l); }
.stepper output, .stepper input { width: 44px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; border: 0; min-height: 40px; padding: 0; border-radius: 0; background: var(--card); }

/* Scan page */
.scan { min-height: 100dvh; display: flex; flex-direction: column; }
.scanhead { background: var(--green); color: #fff; padding: 18px 16px 24px; position: relative; overflow: hidden; }
.scanhead::after { content: ""; position: absolute; right: -40px; top: -30px; width: 190px; height: 190px; background: repeating-linear-gradient(-55deg, rgba(255,255,255,.07) 0 12px, transparent 12px 26px); transform: skewX(-10deg); pointer-events: none; }
.scanhead h1 { font-size: 1.55rem; margin: 6px 0 2px; position: relative; z-index: 1; }
.scanhead .tiny, .scanhead small { color: #fff; position: relative; z-index: 1; }
.sos { display: flex; gap: 10px; margin-top: 14px; position: relative; z-index: 1; }
.sos a, .sos button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 14px; font: inherit; font-weight: 800; text-decoration: none; border: 0; cursor: pointer; }
.sos .call { background: #fff; color: var(--red); font-size: 1.15rem; }
.sos .help { background: rgba(0,0,0,.2); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { position: relative; min-height: 84px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); color: var(--ink); padding: 12px; text-align: left; font: inherit; font-weight: 700; 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; }
.tile:active { transform: scale(.97); }
.tile.on { border-color: var(--green); background: var(--green-l); }
.tile .n { position: absolute; top: -9px; right: -7px; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 99px; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 850; font-size: 1rem; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.tile .minus { position: absolute; bottom: 6px; right: 6px; width: 34px; height: 34px; 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: 600; 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) 92%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line); 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: 50%; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; animation: pop .35s ease-out; }
.done-screen .bigcheck .ic { width: 48px; height: 48px; stroke-width: 3; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* First-aid cards */
.fa { border-left: 5px solid var(--green); }
.fa.urgent { border-left-color: var(--red); }
.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(--green); }
.fa.urgent summary .ic { color: var(--red); }
.fa ol { padding-left: 1.3em; margin: 12px 0; }
.fa ol li { margin: 6px 0; }
.fa .call { background: var(--red-l); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.fa .call b { color: var(--red-t); }
.disclaimer { font-size: .82rem; 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: 14px; background: var(--green-l); }
.infobox.warn { background: var(--amber-l); }
.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(--red); margin-top: 3px; }

/* Landing */
.hero { padding: 40px 0 30px; display: grid; gap: 30px; grid-template-columns: 1.1fr .9fr; align-items: center; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }
.hero h1 { font-size: clamp(2.2rem, 5.6vw, 3.6rem); line-height: 1.02; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 60%, var(--lime) 60%); padding: 0 .05em; }
@media (prefers-color-scheme: dark) { .hero h1 em { background: none; color: var(--lime); } }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.phone { width: min(320px, 100%); margin: 0 auto; border-radius: 34px; border: 9px solid #0d1b1e; background: var(--bg); overflow: hidden; box-shadow: 0 30px 60px -20px rgba(13, 27, 30, .35); transform: rotate(2deg); }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature .fic { width: 44px; height: 44px; border-radius: 13px; background: var(--green-l); color: var(--green); display: grid; place-items: center; flex: none; }
/* Always a dark band (own colours, not --ink, which flips to near-white in dark mode). Text sits above the stripes. */
.band { --band-bg: #0d1b1e; background: var(--band-bg); color: #fff; border-radius: 22px; padding: 30px; position: relative; overflow: hidden; border: 1px solid transparent; }
.band::after { content: ""; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; background: repeating-linear-gradient(-55deg, rgba(212,240,76,.16) 0 14px, transparent 14px 30px); pointer-events: none; }
.band > * { position: relative; z-index: 1; }
.band h2 { color: #fff; }
.band p { color: #d3ddda; }
.band b, .band strong { color: var(--lime); }
@media (prefers-color-scheme: dark) { .band { --band-bg: #12332a; border-color: #1f4a3d; } }
.price { font-size: 2.2rem; font-weight: 850; letter-spacing: -.03em; }
footer.site { padding: 30px 0 50px; color: var(--ink-3); font-size: .9rem; border-top: 1px solid var(--line); margin-top: 40px; }
footer.site a { color: var(--ink-2); }

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

/* Dialog + toast */
dialog.modal { border: 0; border-radius: 20px; padding: 22px; width: min(480px, calc(100vw - 28px)); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
dialog.modal::backdrop { background: rgba(13, 27, 30, .45); }
.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(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-weight: 650; 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: 800; cursor: pointer; }
@media (prefers-color-scheme: dark) { .toast-act { color: var(--green-d); } }
.copybox { width: 100%; font: .9rem/1.4 ui-monospace, monospace; }
.linkbox { display: flex; gap: 8px; }
.kitlink { flex-wrap: nowrap; padding: 6px 0; gap: 8px; }
.kitlink b { flex: 1 0 auto; }
.kitlink code { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kitlink .btn { flex: none; }
.linkbox input { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; }
.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(--green); margin-bottom: 8px; }
.loading { text-align: center; padding: 60px 0; color: var(--ink-3); }
.lang-select { width: auto; min-height: 38px; padding: 4px 8px; font-size: .9rem; }
.event { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.event:last-child { border-bottom: 0; }
.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: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.check-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.check-item .row { justify-content: space-between; }
.check-item.done { opacity: .6; }
.hint { font-size: .82rem; color: var(--ink-3); }
.date-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.date-quick button { font: inherit; font-size: .8rem; font-weight: 700; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 99px; padding: 4px 10px; 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; }
