/* Shift-Ready: design tokens and the look. ONE stylesheet for the staff app, the admin panel AND the
   generated kit (kit/build.py copies this file into dist/<venue>/kit.css), screen and print. --brand is set per venue at runtime. Dark mode follows the phone. */
:root {
  --brand: #2f6f4e;
  --brand-ink: #fff;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, var(--paper));
  --brand-line: color-mix(in srgb, var(--brand) 35%, var(--line));
  --ink: #1a1d1f;
  --ink-2: #3a4247;
  --muted: #5d676d;
  --line: #e2e1dc;
  --line-2: #cfcdc6;
  --paper: #ffffff;
  --wash: #f5f4f0;
  --wash-2: #ecebe6;
  --good: #1d7a43;
  --good-bg: #e6f4ea;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --warn: #8a5a00;
  --warn-bg: #fff3d6;
  --info: #1d4f91;
  --info-bg: #e5eefa;
  --radius: 14px;
  --radius-s: 10px;
  --tap: 48px;
  --shadow-1: 0 1px 2px rgb(20 20 10 / .06), 0 1px 1px rgb(20 20 10 / .04);
  --shadow-2: 0 6px 24px rgb(20 20 10 / .10), 0 2px 6px rgb(20 20 10 / .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
  font-size: 17px;
}
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eceae5; --ink-2: #cfccc5; --muted: #a29f97; --line: #34332f; --line-2: #48463f;
    --paper: #1f1e1b; --wash: #151412; --wash-2: #2a2925;
    --good: #6fcf93; --good-bg: #183323; --bad: #ff8a80; --bad-bg: #3a1d1b; --warn: #f2c35b; --warn-bg: #3a2e12;
    --info: #8ab4f8; --info-bg: #1b2a40;
    --brand-soft: color-mix(in srgb, var(--brand) 22%, var(--paper));
    --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 8px 28px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
/* A remembered choice from the theme toggle (js/theme.js) forces dark; data-theme="light" forces light above. */
@media screen { :root[data-theme="dark"] {
    --ink: #eceae5; --ink-2: #cfccc5; --muted: #a29f97; --line: #34332f; --line-2: #48463f;
    --paper: #1f1e1b; --wash: #151412; --wash-2: #2a2925;
    --good: #6fcf93; --good-bg: #183323; --bad: #ff8a80; --bad-bg: #3a1d1b; --warn: #f2c35b; --warn-bg: #3a2e12;
    --info: #8ab4f8; --info-bg: #1b2a40;
    --brand-soft: color-mix(in srgb, var(--brand) 22%, var(--paper));
    --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 8px 28px rgb(0 0 0 / .5);
    color-scheme: dark;
} }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--wash); color: var(--ink); font: 1rem/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a { color: color-mix(in srgb, var(--brand) 55%, #fff); } }
:root[data-theme="dark"] a { color: color-mix(in srgb, var(--brand) 55%, #fff); }
img { max-width: 100%; height: auto; }
h1 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -.02em; margin: .5rem 0 .4rem; }
h2 { font-size: 1.15rem; letter-spacing: -.01em; margin: 1.8rem 0 .6rem; }
h3 { font-size: 1rem; margin: 1rem 0 .3rem; }
small, .small { font-size: .85rem; color: var(--muted); }
.muted { color: var(--muted); }
.lead { font-size: 1.05rem; color: var(--muted); margin-top: 0; }
code { font: .85rem var(--mono); word-break: break-all; }
.print-only { display: none; }
.ic { flex: none; vertical-align: middle; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }

/* Shell ---------------------------------------------------------------- */
.sample-banner, .draft-banner, .offline-bar { text-align: center; font-size: .82rem; font-weight: 600; padding: .4rem 1rem; }
.sample-banner { background: var(--warn-bg); color: var(--warn); }
.top { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  color: var(--ink); padding: .55rem 16px; display: flex; align-items: center; gap: .6rem; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); }
.brand { color: var(--ink); text-decoration: none; font-weight: 700; display: flex; align-items: center; gap: .6rem; min-height: 40px; min-width: 0; letter-spacing: -.01em; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand img, .brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--paper); flex: none; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.brand .mark { display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); box-shadow: none; }
main { max-width: 720px; margin: 0 auto; padding: .5rem 16px 2.5rem; }
.crumb { margin: .6rem 0 0; }
.crumb a { display: inline-flex; align-items: center; gap: .25rem; padding: .4rem .2rem; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem; }
.crumb a:hover { color: var(--ink); }

/* Bottom tab bar (staff app) */
.has-tabbar main { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center;
  background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); }
.tabbar-in { display: flex; width: 100%; max-width: 560px; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; min-height: 52px; justify-content: center; }
.tabbar a[aria-current="page"] { color: var(--brand); }
.tabbar a[aria-current="page"] .ic { background: var(--brand-soft); border-radius: 999px; padding: 3px 14px; width: 52px; height: 28px; }
.tabbar .ic { width: 24px; height: 24px; padding: 2px 0; }

/* Home ----------------------------------------------------------------- */
.hero-card { background: var(--brand); color: var(--brand-ink); border-radius: 22px; padding: 1.2rem 1.2rem 1.1rem; margin: 1rem 0 .4rem; position: relative; overflow: hidden; box-shadow: var(--shadow-2); }
.hero-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgb(255 255 255 / .09); }
.hero-card h1 { margin: 0 0 .2rem; font-size: 1.6rem; }
.hero-card p { margin: 0; opacity: .9; }
.hero-card .meter { background: rgb(255 255 255 / .25); margin-top: .9rem; }
.hero-card .meter span { background: #fff; }
.hero-card .hero-meta { display: flex; justify-content: space-between; font-size: .85rem; margin-top: .4rem; opacity: .95; font-weight: 600; }
.hero-card a.hero-link { color: inherit; font-weight: 700; display: inline-flex; align-items: center; gap: .2rem; margin-top: .7rem; text-decoration: none; background: rgb(255 255 255 / .16); padding: .45rem .8rem; border-radius: 999px; font-size: .9rem; position: relative; z-index: 1; }
.hero h1 { margin-top: 1.2rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 1rem; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; min-height: 104px; box-shadow: var(--shadow-1); transition: transform .12s, border-color .12s; }
.tile:hover { border-color: var(--brand-line); }
.tile:active { transform: scale(.98); }
.tile .ico { width: 38px; height: 38px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 6px; }
.tile b { font-size: 1rem; letter-spacing: -.01em; }
.tile small { line-height: 1.35; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.station-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.station-list a { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px 8px 8px; text-decoration: none; color: var(--ink); min-height: var(--tap); box-shadow: var(--shadow-1); }
.station-list a:hover { border-color: var(--brand-line); }
.station-list img, .station-list .thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 9px; flex: none; background: var(--wash-2); display: grid; place-items: center; color: var(--muted); }
.station-list span.txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.station-list small { line-height: 1.35; }
.station-list .chev { color: var(--muted); }
.people { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; margin: 0; }
.people dt { font-weight: 600; color: var(--muted); font-size: .92rem; }
.people dd { margin: 0; }
.card-box-plain, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin: 1rem 0; box-shadow: var(--shadow-1); }
.qr-row { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }

/* Components ----------------------------------------------------------- */
.spacer { flex: 1; }
.btn.small { min-height: 36px; padding: 0 .85rem; font-size: .88rem; }
.mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: .85rem; flex: none; }
.mark.big { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--shadow-2); }
.qr { image-rendering: pixelated; background: #fff; border-radius: 10px; padding: 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: var(--tap); padding: 0 1.15rem; border-radius: 999px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; transition: filter .12s, background .12s; white-space: nowrap; }
.btn:hover { filter: brightness(1.06); }
.btn:active { filter: brightness(.95); }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--wash); filter: none; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.quiet:hover { background: var(--wash-2); filter: none; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.linkish { background: none; border: 0; color: var(--bad); font: inherit; text-decoration: underline; padding: .3rem 0; cursor: pointer; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: .25rem; font-style: normal; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .18rem .55rem; border-radius: 999px; vertical-align: middle; white-space: nowrap; }
.badge.high { background: var(--bad-bg); color: var(--bad); }
.badge.med { background: var(--warn-bg); color: var(--warn); }
.badge.comp { background: var(--info-bg); color: var(--info); }
.box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .3rem 1.1rem .8rem; margin: 1rem 0; box-shadow: var(--shadow-1); }
.box h2, .box h3 { margin-top: .8rem; font-size: 1rem; display: flex; align-items: center; gap: .4rem; }
.box.good { border-left: 5px solid var(--good); }
.box.wrong { border-left: 5px solid var(--bad); }
.box.safety { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); color: var(--ink); }
.box.safety h2 { color: var(--warn); }
.photo { border-radius: var(--radius); display: block; width: 100%; aspect-ratio: 8/5; object-fit: cover; background: var(--wash-2); }
.steps { padding-left: 0; list-style: none; counter-reset: s; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: .6rem 0 .6rem 2.7rem; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: .5rem; width: 1.85rem; height: 1.85rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; display: grid; place-items: center; font-size: .9rem; }
.fixes dt { font-weight: 700; margin-top: .7rem; }
.fixes dd { margin: .1rem 0 0; color: var(--ink-2); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips a { display: inline-block; padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); text-decoration: none; font-weight: 600; font-size: .92rem; }
.status { padding: .75rem 1rem; border-radius: var(--radius-s); font-weight: 600; display: flex; gap: .5rem; align-items: flex-start; }
.status.ok { background: var(--good-bg); color: var(--good); }
.status.todo { background: var(--warn-bg); color: var(--warn); }
.status.bad { background: var(--bad-bg); color: var(--bad); }
.sources { font-size: .86rem; color: var(--muted); }
.disclaimer { font-style: italic; color: var(--ink-2); }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .6rem; border-radius: 999px; background: var(--wash-2); font-size: .78rem; font-weight: 700; white-space: nowrap; color: var(--ink-2); }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.brand { background: var(--brand-soft); color: var(--brand); }

/* Checklists ----------------------------------------------------------- */
.tabs { display: flex; gap: 4px; position: sticky; top: 57px; background: var(--wash-2); padding: 4px; border-radius: 999px; z-index: 4; margin: 1rem 0 .4rem; }
.tab { flex: 1; min-height: 42px; border: 0; background: transparent; color: var(--ink-2); border-radius: 999px; font: inherit; font-weight: 650; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
.cl-bar { display: flex; justify-content: space-between; align-items: center; margin: .8rem 0 .2rem; gap: 1rem; }
.cl-progress { font-weight: 700; }
.cl-started { margin: 0; font-size: .85rem; color: var(--muted); }
.cl-group { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 1.3rem 0 .4rem; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.ticks label { display: flex; gap: 12px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; min-height: var(--tap); transition: background .15s; }
.ticks input { width: 26px; height: 26px; flex: none; accent-color: var(--good); margin: 0; }
.tick-text { display: flex; flex-direction: column; }
.ticks input:checked + .tick-text { text-decoration: line-through; color: var(--muted); }
.ticks li:has(input:checked) label { background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 30%, transparent); }

/* Passport ------------------------------------------------------------- */
.summary { margin: .1rem 0 .5rem; font-weight: 700; }
.meter { height: 8px; background: var(--wash-2); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .4s; border-radius: 99px; }
.pp-cat h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pp-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pp-skill { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; font: inherit; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-height: 64px; cursor: pointer; box-shadow: var(--shadow-1); }
.pp-skill[aria-disabled="true"] { cursor: default; }
.pp-name { display: flex; flex-direction: column; gap: 3px; font-weight: 650; }
.pp-name small { font-weight: 400; }
.pp-badges:empty { display: none; }
.pp-badges .badge { margin-right: 4px; }
.pp-status { flex: none; min-width: 64px; text-align: center; font-weight: 700; padding: .35rem .6rem; border-radius: 999px; background: var(--wash-2); font-size: .88rem; }
li.part .pp-status { background: var(--warn-bg); color: var(--warn); }
li.cleared .pp-skill { border-color: color-mix(in srgb, var(--good) 35%, transparent); background: var(--good-bg); }
li.cleared .pp-status { background: var(--good); color: #fff; }
.pp-log { margin: 4px 0 0 14px; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); }
.pp-log:empty { display: none; }
.people-pick { list-style: none; padding: 0; display: grid; gap: 8px; }
.people-pick button { width: 100%; text-align: left; display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font: inherit; min-height: 64px; cursor: pointer; color: inherit; box-shadow: var(--shadow-1); }
.people-pick .who { flex: 1; display: flex; flex-direction: column; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; flex: none; font-size: .95rem; }
.ring { --p: 0; width: 46px; height: 46px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--wash-2) 0); display: grid; place-items: center; flex: none; }
.ring b { width: 36px; height: 36px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-size: .72rem; }

/* Sheets / dialogs ------------------------------------------------------ */
dialog { color: var(--ink); background: var(--paper); }
dialog.sheet { border: 0; border-radius: 22px 22px 0 0; width: 100%; max-width: 560px; margin: auto auto 0; padding: 1.3rem 1.1rem 1.6rem; box-shadow: var(--shadow-2); }
dialog.sheet::backdrop, dialog.modal::backdrop { background: rgb(10 10 5 / .45); backdrop-filter: blur(2px); }
@media (min-width: 700px) { dialog.sheet { border-radius: 22px; margin: auto; } }
dialog h2 { margin-top: 0; }
.confirm { display: flex; gap: 10px; margin-top: 1rem; background: var(--bad-bg); padding: .8rem; border-radius: 10px; font-weight: 600; }
.confirm input { width: 24px; height: 24px; flex: none; }
.how { background: var(--wash); padding: .7rem .9rem; border-radius: 10px; }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1.2rem; flex-wrap: wrap; }

/* Week one / trainer docs ------------------------------------------------ */
.levels { display: grid; gap: 8px; margin: 1rem 0; }
.levels div { display: flex; gap: 10px; align-items: baseline; }
.levels dt { flex: none; width: 7.5rem; }
.levels dd { margin: 0; font-size: .92rem; color: var(--ink-2); }
.lvl { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.lvl-watch { background: var(--wash-2); color: var(--ink-2); }
.lvl-assist { background: var(--info-bg); color: var(--info); }
.lvl-supervised { background: var(--warn-bg); color: var(--warn); }
.lvl-independent { background: var(--good-bg); color: var(--good); }
.timeline { position: relative; margin: 1rem 0; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.shift { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1.1rem .9rem; margin: 0 0 12px; position: relative; box-shadow: var(--shadow-1); }
.shift::before { content: ""; position: absolute; left: -23px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3px solid var(--brand); }
.shift header { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.shift h2 { margin: .6rem 0 .3rem; }
.focus { font-weight: 600; margin: 0; }
.shift-skills { padding-left: 1.2rem; }
.shift-skills li { margin: .25rem 0; }
.trainer-note { background: var(--warn-bg); padding: .55rem .8rem; border-radius: 10px; }
.checkin { background: var(--wash); border-radius: 10px; padding: .1rem .9rem .3rem; margin-top: .6rem; }
.checkin h3 { font-size: .88rem; }
.warn-list li { margin: .3rem 0; }
.mistakes dt { font-weight: 700; margin-top: .5rem; }
.mistakes dd { margin: 0 0 0 1rem; }
.mistakes dd::before { content: "– "; }
.field { display: flex; flex-direction: column; font-weight: 650; gap: 5px; margin: .8rem 0; font-size: .95rem; }
.field input, .field select, .field textarea, .comp-log input[type=text], .comp-log input[type=date] { font: inherit; font-weight: 400; min-height: var(--tap); padding: .4rem .75rem; border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--paper); color: var(--ink); width: 100%; }
.field textarea { min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 22%, transparent); outline-offset: 0; }
.comp-log input[type=text], .comp-log input[type=date] { min-height: 40px; }
.comp-log input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--brand); }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 1rem; border: 2px solid var(--line); border-radius: 999px; cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick label:has(input:checked) { border-color: var(--brand); background: var(--brand); color: #fff; }

/* Generated kit (static pages from kit/build.py) ------------------------- */
.foot { max-width: 720px; margin: 0 auto; padding: 1.2rem 16px 2rem; color: var(--muted); font-size: .85rem; }
.has-tabbar .foot { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
.managers { margin-top: 2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .2rem 1.1rem; box-shadow: var(--shadow-1); }
.managers summary { cursor: pointer; font-weight: 650; min-height: var(--tap); display: flex; align-items: center; gap: .5rem; }
.managers[open] summary { border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
.downloads { list-style: none; padding: 0; margin: .6rem 0 1rem; display: grid; gap: 6px; }
.downloads li { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; background: var(--wash); border-radius: 10px; }
.downloads .ic { color: var(--brand); }
.starter-bar { background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; position: sticky; top: 64px; z-index: 4; box-shadow: var(--shadow-1); margin: 1rem 0; }
.starter-bar label { font-weight: 700; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.starter-bar select { flex: 1; min-height: 44px; font: inherit; padding: 0 .6rem; border-radius: var(--radius-s); border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); }
.starter-bar .btn { min-height: 44px; }
.note-empty { background: var(--warn-bg); color: var(--warn); padding: .9rem 1rem; border-radius: var(--radius); font-weight: 600; }
[data-passport].locked { opacity: .45; pointer-events: none; }
.starter-line { color: var(--muted); }
@media screen and (max-width: 700px) { .log-table { display: block; overflow-x: auto; } }
@media (min-width: 640px) { .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; } }

/* Print docs (A4) ------------------------------------------------------ */
/* Paper is always light, even when the phone is in dark mode. */
.print-doc, .cards-doc { --paper: #fff; --ink: #1a1d1f; --ink-2: #3a4247; --muted: #5d676d; --line: #e2e1dc; --line-2: #cfcdc6; --wash: #f5f4f0; --wash-2: #ecebe6;
  --good: #1d7a43; --good-bg: #e6f4ea; --bad: #b3261e; --bad-bg: #fdecea; --warn: #8a5a00; --warn-bg: #fff3d6; --info: #1d4f91; --info-bg: #e5eefa;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, #fff); color-scheme: light; color: var(--ink); }
.print-doc { background: #fff; max-width: 210mm; margin: 0 auto; padding: 12px 16px; font-size: 11pt; }
.print-help { background: var(--warn-bg); color: var(--warn); font-weight: 600; padding: .6rem 1rem; border-radius: 10px; font-size: .9rem; }
.doc-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--brand); color: #fff; border-radius: 12px; padding: 4mm 5mm; margin-bottom: .8rem; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.doc-head h1 { margin: 0; font-size: 19pt; letter-spacing: -.01em; }
.doc-head p { margin: .1rem 0 0; color: rgb(255 255 255 / .85); }
.doc-head img { background: #fff; border-radius: 10px; padding: 2px; }
.fill-line { margin: .8rem 0; }
.print-table { width: 100%; border-collapse: collapse; margin: .6rem 0 1rem; page-break-inside: auto; }
.print-table th, .print-table td { border: 1px solid #9aa3a9; padding: 6px 8px; text-align: left; vertical-align: top; }
.print-table thead th { background: var(--brand-soft); color: var(--ink); font-size: 9.5pt; text-transform: uppercase; letter-spacing: .04em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.print-table { border-radius: 8px; }
.print-table th, .print-table td { border-color: #cfcdc6 !important; }
.print-table tr { page-break-inside: avoid; }
.c-box { width: 34px; text-align: center !important; }
.box-sq { display: inline-block; width: 18px; height: 18px; border: 2px solid #333; border-radius: 3px; }
.c-time { width: 70px; font-weight: 700; white-space: nowrap; }
.c-init { width: 70px; }
.c-who { width: 110px; font-size: 9.5pt; }
.c-sign { width: 92px; font-size: 9pt; }
.c-sign.na { background: #e4e8eb; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pp-print td .badge { margin-left: 4px; }
.print-page + .print-page { break-before: page; }

/* Station cards ---------------------------------------------------------- */
.cards-doc { background: #e7e5df; margin: 0; }
.card {
  background: #fff; width: 148mm; height: 210mm; margin: 10mm auto; overflow: hidden;
  display: flex; flex-direction: column; font-size: 12.5pt; line-height: 1.3;
  break-after: page; color: #000;
}
.card-a4 .card { width: 210mm; height: 297mm; font-size: 16pt; }
.card-head { background: var(--brand); color: #fff; padding: 5mm 7mm; display: flex; justify-content: space-between; align-items: center; gap: 4mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.card-head h1 { margin: 0; font-size: 22pt; line-height: 1.1; letter-spacing: -.01em; }
.card-head .kicker { display: block; font-size: 8.5pt; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .8; margin-bottom: 1mm; }
.card-head img { background: #fff; border-radius: 3mm; padding: .5mm; }
.card-body { padding: 4mm 7mm 0; flex: 1; display: flex; flex-direction: column; gap: 2.2mm; min-height: 0; overflow: hidden; }
.card-body > * { flex: none; }
.card-photo { width: 100%; height: 34mm; object-fit: cover; border-radius: 4mm; flex: none; }
.card-a4 .card-photo { height: 60mm; }
.card-photo.placeholder { display: grid; place-items: center; background: #f5f4f0; color: #5d676d; border: 2px dashed #cfcdc6; font-weight: 700; }
.card-purpose { margin: 0; font-style: italic; font-size: .9em; }
.card-steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.card-steps li { counter-increment: s; position: relative; padding: 1.4mm 0 1.4mm 10mm; font-weight: 600; border-bottom: .3mm solid #e2e1dc; }
.card-steps li:last-child { border-bottom: 0; }
.card-steps li::before { content: counter(s); position: absolute; left: 0; top: 1mm; width: 7mm; height: 7mm; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 10.5pt; font-weight: 800; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.card-box { border: 0; border-left: 1.6mm solid; border-radius: 3mm; padding: 1.8mm 3.5mm; font-size: .86em; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.card-box h2 { margin: 0 0 .5mm; font-size: .82em; text-transform: uppercase; letter-spacing: .06em; display: flex; gap: 1.5mm; align-items: center; }
.card-box h2 .ic { width: 1.2em; height: 1.2em; }
.card-box ul { margin: 0; padding-left: 5mm; }
.card-box dl { margin: 0; }
.card-box dt { font-weight: 700; }
.card-box dd { margin: 0 0 1mm 0; }
.card-box.good { border-color: var(--good); background: var(--good-bg); }
.card-box.good h2 { color: var(--good); }
.card-box.wrong { border-color: var(--bad); background: var(--bad-bg); }
.card-box.wrong h2 { color: var(--bad); }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 4mm; padding: 3mm 7mm 5mm; border-top: .3mm solid #e2e1dc; margin-top: 2mm; }
.card-safety { font-size: .82em; flex: 1; }
.card-safety .ic { color: var(--warn); vertical-align: -2px; }
.card-safety .badge { display: inline-block; margin-top: 1.5mm; }
.card-qr { margin: 0; text-align: center; flex: none; }
.card-qr img { width: 24mm; height: 24mm; display: block; }
.card-qr figcaption { font-size: 7.5pt; }

/* Print ------------------------------------------------------------------ */
@media print {
  :root { font-size: 11pt; --paper: #fff; --wash: #f3f5f4; --ink: #15191c; --line: #cfd6db; color-scheme: light; }
  .tabbar, .fab, .toasts { display: none !important; }
  body { background: #fff; }
  .top, .sample-banner, .tabs, .cl-bar, .screen-only, .managers, .crumb, dialog, .starter-bar, .note-empty { display: none !important; }
  .print-only { display: flex; }
  main, .foot { max-width: none; padding: 0; }
  .print-doc { padding: 0; max-width: none; }
  .cards-doc { background: #fff; }
  .card { margin: 0; }
  .shift, .box { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .sources a::after { content: " (" attr(href) ")"; font-size: 8pt; word-break: break-all; }
  section.checklist[hidden] { display: block !important; }
  section.checklist { break-before: page; }
  section.checklist:first-of-type { break-before: auto; }
  .comp-log input[type=text], .comp-log input[type=date] { border: 0; border-bottom: 1px solid #888; border-radius: 0; }
  .doc.compact { font-size: 9.5pt; }
  .doc.compact h2 { font-size: 11.5pt; margin: .7rem 0 .25rem; }
  .doc.compact .steps li { padding: .2rem 0 .2rem 2rem; }
  .doc.compact .steps li::before { width: 1.4rem; height: 1.4rem; top: .2rem; font-size: 8pt; }
  .doc.compact .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
  .doc.compact ul { margin: .2rem 0; padding-left: 1.1rem; }
  .doc .lead { font-size: 10.5pt; }
}
