/* RunStaff screen kit · round 3 (round 2 + the panel's 8 kit tweaks; see README "Screen kit")
   ONE screen style for every page: an ink phone, the app's dark header, white cards on the
   app's pale surface, status shown by shape + colour + label, and the RunStaff alert as a
   white banner that drops in from the top. The alert is the trigger; the app is the payoff.
   Content mirrors the real app (facts §2/§6/§7); only the finish is newer.

   Steps: a .scene carries cumulative classes s1…s5. HTML ships the FINISHED state (all
   classes present), so no-JS and reduced motion show the end of each story.
     .in-N   appears at step N         .out-N  leaves at step N
     .sw-N   swaps .b (before) for .a (after) at step N
     .tap-N  shows the touch ring during step N only */

.phone {
  --pw: 300px;
  position: relative; width: var(--pw); max-width: 100%;
  padding: 8px; border-radius: 46px;
  background: linear-gradient(160deg, #2A3253, var(--ink) 45%);
  box-shadow: 0 2px 4px rgba(14,22,51,.12), 0 34px 60px -28px rgba(14,22,51,.6);
}
.phone::before { /* the camera island */
  content: ""; position: absolute; z-index: 6; top: 17px; left: 50%; width: 76px; height: 20px; margin-left: -38px;
  border-radius: 20px; background: #070B1C;
}
.phone__screen {
  position: relative; overflow: hidden; height: var(--sh, 420px); border-radius: 38px; background: var(--surface);
  font-size: 14px; line-height: 1.35; color: var(--ink); text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10); /* tweak 2: the ink header never merges into the ink bezel */
}
/* Tweak 1: no mask on the phone. The bezel runs unbroken to the crop edge and the fade sits INSIDE the screen,
   so a phone never turns the colour of the ground behind it. */
.phone:not(.phone--full) { padding-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.phone:not(.phone--full) .phone__screen::after { content: ""; position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(rgba(244,246,251,0), var(--surface)); pointer-events: none; }
.phone--lock:not(.phone--full) .phone__screen::after { background: linear-gradient(rgba(15,34,112,0), var(--sapphire-deep)); }
.phone:not(.phone--full) .phone__screen { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.phone--short .phone__screen { height: 300px; }
.phone--tall .phone__screen { height: 500px; }

.scene { position: absolute; inset: 0; }

/* ── The app ── */
.app { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--surface); }
.sbar { display: flex; justify-content: space-between; align-items: center; height: 44px; padding: 14px 26px 0 30px; font-size: 13px; font-weight: 600; flex: none; }
.sbar__i { display: flex; gap: 5px; align-items: center; }
.sbar__i svg { width: 15px; height: 11px; fill: currentColor; }
.sbar__i svg.b { width: 22px; }
.ahead { background: var(--ink); color: #fff; flex: none; }
.ahead .sbar { color: #fff; }
.ahead__row { display: flex; align-items: center; gap: 10px; padding: 6px 16px 14px; }
.ahead__back { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; flex: none; }
.ahead__back svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ahead__logo { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.ahead__k { font-size: 12px; font-weight: 600; color: #AEB8D8; letter-spacing: .02em; }
.ahead__t { font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.abody { padding: 12px 12px 40px; display: grid; gap: 9px; align-content: start; }
.alabel { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .03em; padding: 4px 4px 0; }

.card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 12px; display: grid; gap: 8px; }
.card--bad { background: #FFF6F6; border-color: #F3CACA; }
.card--wait { background: #FFFAF0; border-color: #F2DDB2; }
.card--ok { background: #F3FBF7; border-color: #BFE6D3; }
.card--pick { border: 2px solid var(--ultra); }
.card__t { font-weight: 700; font-size: 15px; line-height: 1.3; }
.card__s { color: var(--muted); font-size: 13px; }
.card__row { display: flex; align-items: center; gap: 8px; }
.card__row > .grow { flex: 1; min-width: 0; }

.av { width: 34px; height: 34px; border-radius: 50%; flex: none; background: #E9EEFB; }
.av--sm { width: 28px; height: 28px; }
.person { display: flex; align-items: center; gap: 10px; }
.person__n { font-weight: 700; font-size: 14px; }
.person__s { color: var(--muted); font-size: 13px; }
.person > .grow { flex: 1; min-width: 0; }
.list { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 4px 12px; }
.list .person { padding: 8px 0; border-top: 1px solid var(--border); }
.list .person:first-child { border-top: 0; }
.dim { opacity: .8; }
.dim .person__s { color: var(--muted); }

/* Status: shape + colour + label, never colour alone */
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chip--ok { color: var(--ok); background: var(--ok-bg); }
.chip--wait { color: var(--wait); background: var(--wait-bg); }
.chip--bad { color: var(--bad); background: var(--bad-bg); }
.chip--blue { color: var(--ultra); background: #E8EDFF; }
.chip--plain { color: var(--ink-2); background: #EDF0F7; }

/* A button inside a picture of the app: smaller than the page's buttons, no arrow, no lift */
.abtn { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 12px; border-radius: 10px; background: #E3E9FF; color: var(--ultra); font-weight: 700; font-size: 14px; box-shadow: inset 0 0 0 1.5px #C2CEF7; }
.abtn--line { background: #fff; color: var(--ink-2); box-shadow: inset 0 0 0 1.5px #CBD2E4; }
.abtn--red { background: var(--bad-bg); color: var(--bad); box-shadow: inset 0 0 0 1.5px #F0B9B9; }
.abtn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.abtns { display: flex; gap: 8px; }
.abtns > * { flex: 1; }

/* The touch: a ring that blooms where you'd tap, only during its step */
.tap-1, .tap-2, .tap-3, .tap-4, .tap-5 { position: relative; }
.tap-1::after, .tap-2::after, .tap-3::after, .tap-4::after, .tap-5::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%; background: rgba(23,58,177,.22); box-shadow: 0 0 0 2px rgba(23,58,177,.6);
  opacity: 0; transform: scale(.4); pointer-events: none;
}
.on-dark-tap::after { background: rgba(255,255,255,.3); box-shadow: 0 0 0 2px rgba(255,255,255,.85); }
.motion .scene.s1:not(.s2) .tap-1::after, .motion .scene.s2:not(.s3) .tap-2::after,
.motion .scene.s3:not(.s4) .tap-3::after, .motion .scene.s4:not(.s5) .tap-4::after,
.motion .scene.s5:not(.s6) .tap-5::after { animation: tap 1.1s var(--out) .25s both; }
@keyframes tap { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.5); } }

/* Step reveals */
/* Tweak 5: swaps are sequential, never a crossfade: what leaves goes in 160 ms, what arrives waits for it, then takes 220 ms */
.in-1, .in-2, .in-3, .in-4, .in-5 { transition: opacity .22s var(--out) .16s, transform .32s var(--out) .16s; }
.scene:not(.s1) .in-1, .scene:not(.s2) .in-2, .scene:not(.s3) .in-3, .scene:not(.s4) .in-4, .scene:not(.s5) .in-5 { opacity: 0; transform: translateY(10px); }
.scene.s1 .out-1, .scene.s2 .out-2, .scene.s3 .out-3, .scene.s4 .out-4, .scene.s5 .out-5 { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.out-1, .out-2, .out-3, .out-4, .out-5 { transition: opacity .16s ease-in, transform .16s ease-in; }
.scene:not(.s1) .sw-1 > .a, .scene:not(.s2) .sw-2 > .a, .scene:not(.s3) .sw-3 > .a, .scene:not(.s4) .sw-4 > .a, .scene:not(.s5) .sw-5 > .a { display: none; }
.scene.s1 .sw-1 > .b, .scene.s2 .sw-2 > .b, .scene.s3 .sw-3 > .b, .scene.s4 .sw-4 > .b, .scene.s5 .sw-5 > .b { display: none; }
.motion .sw-1 > .a, .motion .sw-2 > .a, .motion .sw-3 > .a, .motion .sw-4 > .a, .motion .sw-5 > .a { animation: pop .22s var(--out) both; }
@keyframes pop { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }

/* ── The RunStaff alert: drops from the top of the phone ── */
.alert {
  position: absolute; z-index: 5; left: 10px; right: 10px; top: 48px;
  display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: start;
  background: #fff; color: var(--ink); border-radius: 20px; padding: 11px 12px 12px;
  box-shadow: 0 2px 4px rgba(14,22,51,.14), 0 18px 34px -14px rgba(14,22,51,.55);
  font-size: 13.5px; line-height: 1.35;
}
.alert--2 { top: 166px; }
.alert > img { width: 38px; height: 38px; border-radius: 10px; }
.alert__hd { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.alert__t { font-weight: 700; font-size: 14px; margin-top: 1px; }
.alert__t.ok { color: var(--ok); display: flex; align-items: center; gap: 4px; }
.alert__t.ok svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.alert__b { color: var(--ink-2); }
.alert.in-1, .alert.in-2, .alert.in-3, .alert.in-4, .alert.in-5 { transition: opacity .3s var(--out), transform .6s var(--out); }
.scene:not(.s1) .alert.in-1, .scene:not(.s2) .alert.in-2, .scene:not(.s3) .alert.in-3, .scene:not(.s4) .alert.in-4, .scene:not(.s5) .alert.in-5 { transform: translateY(-140%); opacity: 0; }
.scene.s1 .alert.out-1, .scene.s2 .alert.out-2, .scene.s3 .alert.out-3, .scene.s4 .alert.out-4, .scene.s5 .alert.out-5 { transform: translateY(-140%); opacity: 0; }

/* ── Lock screen (used sparingly: the trigger, and Sunday's quiet) ── */
.lock { position: absolute; inset: 0; color: #fff; text-align: center; background: radial-gradient(120% 70% at 30% 0%, var(--sapphire-light), var(--sapphire) 45%, var(--sapphire-deep)); }
.lock .sbar { color: #fff; }
.lock__date { margin-top: 18px; font-weight: 600; font-size: 15px; }
.lock__time { font-weight: 700; font-size: 74px; line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.lock .alert { top: auto; position: relative; left: auto; right: auto; margin: 22px 10px 0; text-align: left; }
.lock .alert + .alert { margin-top: 8px; }
.lock__quiet { position: absolute; left: 0; right: 0; bottom: 64px; font-size: 14px; font-weight: 600; color: var(--on-blue-2); display: flex; justify-content: center; align-items: center; gap: 8px; }
.lock__quiet i { width: 9px; height: 9px; border-radius: 50%; background: var(--dot); }

/* ── Small parts ── */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px 6px; text-align: center; }
.stat b { display: block; font-size: 20px; letter-spacing: -.02em; }
.stat span { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.stat--bad { border-color: #F3CACA; } .stat--bad b, .stat--bad span { color: var(--bad); }
.stat--ok b { color: var(--ok); }

.wk { display: grid; grid-template-columns: 30px repeat(7, 1fr); gap: 3px; align-items: center; }
.wk__h { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.wk img { width: 26px; height: 26px; border-radius: 50%; }
.wk i { height: 18px; border-radius: 5px; background: #DCE3F7; position: relative; }
.wk i.on { background: #AFC0F2; }
.wk i.flag { background: var(--wait-bg); box-shadow: inset 0 0 0 1.5px #D99A2B; }
.wk i.fix { background: #AFC0F2; }
.wk .sw-3 { display: contents; }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal span { font-size: 12px; font-weight: 700; color: var(--muted); }
.cal b { position: relative; display: grid; place-items: center; height: 46px; border-radius: 10px; background: #fff; border: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.cal b.is-sel { border: 2px solid var(--ultra); }
.cal b img { position: absolute; width: 24px; height: 24px; bottom: -6px; right: -4px; border-radius: 50%; border: 2px solid #fff; }

.shift { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 9px 10px; }
.shift__d { width: 40px; text-align: center; line-height: 1.1; flex: none; }
.shift__d small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.shift__d b { font-size: 17px; }
.shift .grow { flex: 1; min-width: 0; }
.shift__t { font-weight: 700; font-size: 14px; }
.shift__r { color: var(--muted); font-size: 13px; }
.shift .abtn { min-height: 32px; font-size: 13px; padding: 0 10px; }

.opt { display: flex; flex-wrap: wrap; gap: 5px; }
.opt span { min-height: 30px; padding: 0 9px; border-radius: 999px; display: inline-flex; align-items: center; font-weight: 600; font-size: 12.5px; background: #fff; border: 1.5px solid var(--border); color: var(--ink-2); }
.opt span.is-sel { border-color: var(--ultra); background: #E8EDFF; color: var(--ultra); }

.money { display: grid; grid-template-columns: 1fr auto auto; gap: 0 12px; align-items: center; font-variant-numeric: tabular-nums; }
.money > * { padding: 8px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.money .h { border-top: 0; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .02em; padding-top: 0; }
.money .n { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.money .r { text-align: right; }
.money .tot { font-weight: 700; }

.steps-app { display: grid; gap: 6px; }
.steps-app li { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.steps-app li i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px #CBD2E4; display: grid; place-items: center; flex: none; }
.steps-app li i svg { width: 13px; height: 13px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.steps-app li.done i { background: var(--ok); box-shadow: none; }
.steps-app li.done i svg { opacity: 1; }
.steps-app small { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; }
.alert--low { top: 176px; }
.alert--bottom { top: auto; bottom: 64px; }
.scene:not(.s4) .alert--bottom.in-4 { transform: translateY(30%); }
.alerted .chip svg, .sites-mini .chip svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.abody p > svg, .card__s svg { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Tweak 6: a role badge in the app header's label line (ink and blue only), from "Who sees what" */
.role-b { display: inline-flex; align-items: center; gap: 4px; margin-right: 6px; padding: 0 7px; min-height: 18px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .01em; vertical-align: 1px; }

/* Tweak 4: two button specs.
   .abtn (above) is WEBSITE-PICTURE-ONLY: a tinted 38 px button, so a picture can't be mistaken for a page control.
   .app-btn is the REFERENCE for an app restyle: solid Ultramarine, white text (9.2:1), 44 px minimum, pressed Cobalt.
   Don't let a restyle copy the tint into the real app. */
.app-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: #173AB1; color: #fff; font: 700 15px/1.1 var(--font); }
.app-btn:active { background: #1A2F8F; }

/* Tweak 8: dark-mode tokens, defined for the APP restyle only (the website stays light). Brand dark primary: #6FA8FF. */
.kit-dark {
  --app-bg: #0B1022; --app-card: #151C36; --app-border: #26304F; --app-text: #E8ECF7; --app-muted: #A3ADCB;
  --app-primary: #6FA8FF; --app-primary-text: #0B1022; --app-ok: #5FD3A3; --app-wait: #F5B54A; --app-bad: #FF8A80;
}
/* Tweak 3 (font floor): no text in a picture below 12 px; secondary lines 13 px.
   Tweak 7: the lock-screen wallpaper stays Sapphire, which is fine now that phones only sit on light grounds. */
