/* Valymo: the look. Direction and tokens: docs/DESIGN.md. Phone first (cleaners, wet hands); no SVG, no inline styles (CSP). */
@font-face { font-family: Jost; src: url(/fonts/jost.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ground: #eceee7; --card: #fffefa; --ink: #12303a; --soft: #4a6068; --line: #d3dcd8; --field: #7f989d;
  --sea: #17607a; --deep: #0f4558; --sand: #e6d3a3; --bad: #a8261c; --focus: #b36a00;
  --r: 6px; --ease: cubic-bezier(.23, 1, .32, 1); --drawer: cubic-bezier(.32, .72, 0, 1);
  --bar: 64px;
  --green: #1f7a46; --green-t: #dcf0e3; --green-k: #165a33; --track: #d8e2e0; --edge: #8da1a5; --switch-off: #e6ecea; --off: #dde3e1;
  --sky: #9cc6cf; --note: #fbf1d3; --sea-t: #e3eef0; --occ: #e9dcb4; --bad-t: #f8e0dd; --white: #fff;
  --amber-bg: #f7e3b2; --amber-edge: #d79a1c; --amber-ink: #5d3700; --mint: #e2efe5; --mint-edge: #8fbf9f; --bad-k: #7d1a14; --bad-k2: #6d1610;
  --green-k2: #123f26; --header-soft: #dbe9ee; --open-t: #dcecf1;
  --sh1: rgb(15 69 88 / .08); --sh2: rgb(15 69 88 / .07);
}
/* One colour set per job status; --c the strong colour, --t its tint, --k text on the tint. */
.s-open { --c: #17607a; --t: var(--open-t); --k: #0f4558; }
.s-taken { --c: #b36a00; --t: #fcebc8; --k: #774500; }
.s-confirmed { --c: var(--green); --t: var(--green-t); --k: var(--green-k); }
.s-done { --c: #7a3b78; --t: #f1dff0; --k: #5c2a5a; }
.s-accepted { --c: #5d7078; --t: #e3e8e7; --k: #44565c; }
.s-cancelled { --c: #8a8f91; --t: #ececec; --k: #5c6163; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { overflow-x: clip; margin: 0; background: var(--ground); color: var(--ink); font: 18px/1.45 Jost, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--sea); text-decoration-skip-ink: none; text-underline-offset: 4px; text-decoration-thickness: 2px; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; letter-spacing: -.005em; }
h1 { font-size: 2rem; line-height: 1.1; margin: .2rem 0 .7rem; }
h2 { font-size: 1.35rem; line-height: 1.2; margin: 0 0 .7rem; display: flex; align-items: center; gap: .6rem; }
h3 { margin: 0; }
p { margin: 0 0 .7rem; }

/* ---------- header, bottom bar, menu ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.5rem; min-height: 56px; padding: 0 1rem;
  background: var(--deep); color: var(--white); border-bottom: 4px solid var(--sand); }
.top a:focus-visible, .top summary:focus-visible, .foot a:focus-visible { outline-color: var(--sand); }
.brand { color: var(--white); text-decoration: none; font-weight: 600; font-size: 1.55rem; letter-spacing: -.01em; padding: .5rem 0; }
.brand span { color: var(--sand); }
.desk { display: none; gap: .25rem; margin-right: auto; }
.desk a { color: var(--white); text-decoration: none; font-weight: 500; padding: 0 1rem; min-height: 52px; display: inline-flex; align-items: center; }
.desk a[aria-current] { box-shadow: inset 0 -4px 0 var(--sand); font-weight: 600; }
.account { position: relative; margin-left: auto; }
.account summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 0 .2rem; font-weight: 500; color: var(--header-soft); }
.account summary::-webkit-details-marker { display: none; }
.account .panel { position: absolute; right: 0; top: 100%; width: 19rem; padding: 1rem; background: var(--card); color: var(--ink); border: 3px solid var(--deep);
  border-radius: var(--r); box-shadow: 0 8px 24px rgb(15 69 88 / .25); }
.fine { color: var(--soft); font-size: .95rem; }

.bar { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; background: var(--card); padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 14px rgb(15 69 88 / .16); }
.bar a { flex: 1 1 0; min-height: var(--bar); display: grid; place-items: center; color: var(--soft); text-decoration: none; font-weight: 500; font-size: 1.02rem; }
.bar a[aria-current] { color: var(--deep); font-weight: 600; background: var(--sea-t); box-shadow: inset 0 4px 0 var(--sea); }
body:has(input:not([type=radio]):not([type=file]):not([type=checkbox]):focus, textarea:focus) .bar { transform: translateY(110%); }

.sheet { position: fixed; inset: 0; z-index: 30; visibility: hidden; transition: visibility 0s linear .22s; }
.sheet:target { visibility: visible; transition-duration: 0s; }
.sheet .scrim { position: absolute; inset: 0; background: rgb(15 40 50 / .5); opacity: 0; }
.sheet .panel { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: .8rem; padding: 1.2rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
  background: var(--card); border-top: 6px solid var(--sand); transform: translateY(100%); }
.sheet:target .scrim { opacity: 1; }
.sheet:target .panel { transform: none; }
.sheet .panel p, .sheet .panel form { margin: 0; }
.who-line { font-size: 1.15rem; }

/* ---------- page frame ---------- */
main { max-width: 46rem; margin: 0 auto; padding: 1.1rem 1rem calc(var(--bar) + 2.5rem + env(safe-area-inset-bottom)); }
.out main { padding-bottom: 2rem; }
section { margin: 0 0 1.6rem; }
.card { background: var(--card); border-radius: var(--r); padding: 1.1rem; margin: 0 0 1rem; box-shadow: 0 1px 0 var(--sh1), 0 4px 14px var(--sh2); }
.card > h2 { margin-bottom: .8rem; }
.empty { color: var(--soft); }
.back { margin: 0 0 .5rem; }
.back a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; font-weight: 500; text-decoration: none; }
.back a::before { content: ""; width: 11px; height: 11px; border-left: 4px solid currentColor; border-bottom: 4px solid currentColor; transform: rotate(45deg) translate(2px, -2px); }
.opt { color: var(--soft); font-weight: 400; font-size: .92rem; }
/* The honeypot: out of sight and out of the tab order; a bot that fills it is refused (pages.php). */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.n, .count, .price, .day { font-variant-numeric: tabular-nums; }
.n, .count { display: inline-block; min-width: 1.7rem; padding: .05rem .45rem; border-radius: 4px; background: var(--deep); color: var(--white); font-size: .95rem; font-weight: 600; text-align: center; }
.count { margin-left: auto; background: var(--t, var(--open-t)); color: var(--deep); }

.flash { padding: .8rem 1rem; border-radius: var(--r); font-weight: 600; margin: 0 0 1rem; border: 3px solid; }
.flash.ok { background: var(--green-t); color: var(--green-k); border-color: var(--green); }
.flash.err { background: var(--bad-t); color: var(--bad-k); border-color: var(--bad); }

/* ---------- status stamps: the word always, plus a shape (hollow square, diamond, square, triangle, tick, bar) ---------- */
.stamp { display: inline-flex; align-items: center; gap: .45rem; padding: .2rem .6rem; border: 3px solid var(--c); border-radius: 4px; background: var(--t); color: var(--k);
  font-size: .9rem; font-weight: 600; line-height: 1.2; }
.stamp::before, .day u { content: ""; display: block; flex: none; width: 12px; height: 12px; background: var(--c); }
.s-open .stamp::before, .stamp.s-open::before, .day.s-open u { background: none; border: 3px solid var(--c); }
.stamp.s-taken::before, .day.s-taken u { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.stamp.s-done::before, .day.s-done u { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.stamp.s-accepted::before, .day.s-accepted u { clip-path: polygon(0 55%, 14% 40%, 38% 62%, 86% 6%, 100% 22%, 38% 94%); }
.stamp.s-cancelled::before, .day.s-cancelled u { height: 4px; }
.tight { display: inline-block; padding: .05rem .5rem; border-radius: 4px; background: var(--bad); color: var(--white); font-size: .88rem; font-weight: 600; white-space: nowrap; }

/* ---------- job rows ---------- */
.list { display: grid; gap: .5rem; }
.job { position: relative; display: grid; grid-template-columns: 60px 1fr; gap: .2rem .9rem; align-items: center; padding: .7rem 2.2rem .7rem .7rem; min-height: 88px;
  background: var(--card); color: var(--ink); text-decoration: none; border-left: 6px solid var(--c); border-radius: var(--r);
  box-shadow: 0 1px 0 var(--sh1), 0 3px 10px rgb(15 69 88 / .06); }
.job.urgent { border-left-color: var(--bad); }
.job::after { content: ""; position: absolute; right: 16px; top: 50%; width: 12px; height: 12px; border-right: 4px solid var(--soft); border-top: 4px solid var(--soft); transform: translateY(-50%) rotate(45deg); }
.job:has(em)::after { display: none; }
.tag { display: grid; place-items: center; align-content: center; height: 64px; background: var(--t); color: var(--k); border-radius: var(--r); }
.tag b { font-size: 1.9rem; line-height: .95; font-weight: 600; }
.tag i { font-style: normal; font-size: .9rem; font-weight: 500; }
.body { display: grid; gap: .15rem; min-width: 0; }
.when { font-weight: 600; font-size: 1.12rem; }
.when .tight { margin-left: .3rem; vertical-align: .1em; }
.what { display: flex; flex-wrap: wrap; gap: 0 .7rem; color: var(--soft); overflow-wrap: anywhere; }
.who { color: var(--ink); font-weight: 500; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; margin-top: .15rem; }
.price { font-weight: 600; }
.offer { flex: 1 0 100%; margin: .1rem 0 0; font-size: .95rem; font-weight: 500; color: var(--soft); }
p.offer { margin: .5rem 0 0; }
.go:empty { display: none; }
.go { grid-column: 1 / -1; }
.go em { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: .3rem; border-radius: var(--r); background: var(--ink); color: var(--white); font-style: normal; font-weight: 600; font-size: 1.1rem; }
.go em::after { content: ""; width: 10px; height: 10px; margin-left: .7rem; border-right: 4px solid currentColor; border-top: 4px solid currentColor; transform: rotate(45deg); }

.attn { padding: 1rem; background: var(--amber-bg); border-radius: var(--r); border: 4px solid var(--amber-edge); }
.attn h2 { color: var(--amber-ink); }
.attn .n { background: var(--amber-ink); }
.attn .empty { margin: 0; color: var(--amber-ink); font-weight: 500; }
.attn:has(.empty) { background: var(--mint); border-color: var(--mint-edge); }
.attn:has(.empty) h2, .attn .empty { color: var(--green-k); }
.attn .list { gap: .6rem; }
.attn ~ .attn, .attn ~ .attn:has(.empty) { padding: 0; background: none; border: 0; }
.attn ~ .attn h2, .attn ~ .attn:has(.empty) h2 { color: var(--ink); }
.attn ~ .attn .n { background: var(--deep); }
.attn ~ .attn .empty, .attn ~ .attn:has(.empty) .empty { color: var(--soft); font-weight: 400; }

/* ---------- calendar and day strip ---------- */
.day { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 56px; border-radius: 4px;
  background: var(--card); color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.day i { font-style: normal; font-size: .8rem; color: var(--soft); font-weight: 500; }
.day b { font-weight: 600; line-height: 1; }
.day.s-open, .day.s-taken, .day.s-confirmed, .day.s-done, .day.s-accepted { background: var(--t); color: var(--k); }
.day.s-open i, .day.s-taken i, .day.s-confirmed i, .day.s-done i, .day.s-accepted i { color: var(--k); }
.day.occ:not([class*=" s-"]) { background: var(--occ); }
.day.today { box-shadow: inset 0 0 0 4px var(--ink); }
.day.blank { background: none; box-shadow: none; }
a.day:active { transform: scale(.96); }
.strip h2 { margin-bottom: .5rem; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.week .day { min-height: 76px; }
.side-cal { display: none; }
.cal { margin: 0 0 1.4rem; }
.cal h3 { font-size: 1.4rem; margin: 0 0 .5rem; text-transform: capitalize; }
.cal h3 span { color: var(--soft); font-weight: 500; }
.cal .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .25rem; }
.dow { text-align: center; font-size: .85rem; font-weight: 600; color: var(--soft); padding-bottom: .15rem; }
.cal .day { min-height: 0; aspect-ratio: 1; min-width: 44px; }
.legend { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; color: var(--soft); font-size: .95rem; }
.legend span::before { content: ""; display: inline-block; width: 18px; height: 18px; margin-right: .5rem; vertical-align: -4px; border-radius: 3px; background: var(--card); }
.today-key::before { box-shadow: inset 0 0 0 4px var(--ink); }
.occ-key::before { background: var(--occ) !important; }

/* ---------- job page ---------- */
.job-card { border-top: 8px solid var(--c); }
.big-stamp { font-size: 1.05rem; padding: .3rem .8rem; transform: rotate(-1.5deg); transform-origin: left center; margin-bottom: .6rem; }
.big { font-size: 1.4rem; font-weight: 600; margin: 0 0 .1rem; }
.addr a { display: inline-block; padding: .45rem 0; font-weight: 500; }
.window { display: grid; gap: .1rem; margin: .5rem 0; padding: .7rem .9rem; background: var(--sea-t); border: 3px solid var(--sea); border-radius: 4px; font-weight: 500; font-size: 1.1rem; }
.window.tight-day { background: var(--bad-t); border-color: var(--bad); color: var(--bad-k2); font-weight: 600; }
.window span, .note span { font-size: .95rem; font-weight: 500; opacity: .85; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: .6rem 1rem; margin: .8rem 0; }
.facts div { min-width: 0; }
.facts dt { font-size: .98rem; font-weight: 500; color: var(--soft); }
.facts dd { margin: 0; font-size: 1.2rem; }
.facts .tel { white-space: nowrap; margin-top: .3rem; padding: 0 1rem; border: 3px solid var(--sea); border-radius: var(--r); text-decoration: none; }
.tel { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 1.15rem; }
.note { margin: .6rem 0 0; padding: .7rem .9rem; background: var(--note); border: 3px solid var(--sand); border-radius: 4px; }
.note span { display: block; }
.history ol { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 6rem 1fr; gap: .6rem; padding: .55rem 0; }
.history li + li { border-top: 1px solid var(--line); }
.history time { color: var(--ink); opacity: .75; font-size: 1rem; font-variant-numeric: tabular-nums; padding-top: .1rem; }
.actions { display: grid; gap: .7rem; margin: 0 0 1rem; }
.actions form { margin: 0; }

/* buttons: a button keeps its colours; hover is an edge light, press is a small scale, focus a ring */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: .6rem 1.2rem; width: 100%;
  border: 3px solid var(--sea); border-radius: var(--r); background: var(--card); color: var(--sea); font: inherit; font-weight: 600; font-size: 1.1rem;
  cursor: pointer; text-align: center; text-decoration: none; }
.btn.primary { background: var(--sea); color: var(--white); min-height: 64px; font-size: 1.2rem; }
.btn.quiet { border-color: var(--edge); color: var(--soft); }
.btn.small { min-height: 48px; padding: .3rem .8rem; width: auto; font-size: 1rem; }
.btn:focus-visible, .check:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 4px solid var(--focus); outline-offset: 2px; }
.btn input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
@media (hover: hover) and (pointer: fine) { .btn:hover, .check:hover, .job:hover, a.day:hover { box-shadow: 0 0 0 4px rgb(23 96 122 / .22); } }

.tiles { display: flex; flex-wrap: wrap; gap: .5rem; }
.tiles .btn { width: auto; flex: 1 1 9rem; }
.tile { display: flex; align-items: center; gap: .5rem; min-height: 52px; padding: .5rem .9rem; border: 3px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; font-weight: 500; flex: 1 1 9rem; }
.tile:has(input:checked) { border-color: var(--sea); color: var(--deep); font-weight: 600; background: var(--sea-t); }
.tile input { width: 22px; height: 22px; accent-color: var(--sea); }
.assign p { margin: .3rem 0 .5rem; color: var(--soft); }

/* checklist: the tick is the app's best moment, so it is big and it lands */
.checks { list-style: none; margin: .5rem 0 .8rem; padding: 0; display: grid; gap: .5rem; }
.checks form { margin: 0; }
.check { position: relative; display: flex; align-items: center; gap: 1rem; width: 100%; min-height: 68px; padding: .6rem 1rem; text-align: left;
  border: 3px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); font: inherit; font-size: 1.12rem; line-height: 1.25; cursor: pointer; }
.check::before { content: ""; flex: none; width: 36px; height: 36px; border: 4px solid var(--soft); border-radius: 5px; background: var(--white); }
.check::after { content: ""; position: absolute; left: 1.45rem; top: 50%; width: 11px; height: 20px; margin-top: -15px; border-right: 6px solid var(--white); border-bottom: 6px solid var(--white);
  transform: rotate(45deg) scale(.7); opacity: 0; transform-origin: 70% 70%; }
.check.on { border-color: var(--green); background: var(--green-t); color: var(--green-k2); }
.check.on::before { background: var(--green); border-color: var(--green); }
.check.on::after { transform: rotate(45deg) scale(1); opacity: 1; }
span.check { cursor: default; min-height: 56px; }
button.check:active { transform: scale(.985); }
progress { display: block; width: 100%; height: 14px; border: 0; border-radius: 4px; background: var(--track); appearance: none; overflow: hidden; }
progress::-webkit-progress-bar { background: var(--track); }
progress::-webkit-progress-value { background: var(--green); }
progress::-moz-progress-bar { background: var(--green); }
[data-left] { margin: 0; font-weight: 600; font-size: 1.1rem; color: var(--ink); }

/* photos: the proof. Print-style frames, the time each was taken */
.photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: .4rem 0 1rem; }
.shot { position: relative; display: block; padding: 6px 6px 30px; background: var(--white); border-radius: 4px; box-shadow: 0 2px 10px rgb(15 69 88 / .18); }
.shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 2px; }
.shot time { position: absolute; left: 10px; bottom: 5px; font-size: .95rem; font-weight: 600; color: var(--soft); font-variant-numeric: tabular-nums; }
.camera { min-height: 80px; font-size: 1.5rem; background: var(--sea); color: var(--white); gap: 1rem; }
.camera::before { content: ""; width: 38px; height: 28px; border: 5px solid var(--white); border-radius: 5px; background: linear-gradient(var(--white), var(--white)) center / 12px 12px no-repeat; }
.snap { margin-top: .4rem; }

/* ---------- forms ---------- */
.stack { display: grid; gap: .9rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
label { display: grid; gap: .3rem; font-weight: 600; }
input:not([type=radio]):not([type=file]):not([type=checkbox]), textarea, select { width: 100%; min-height: 52px; font: inherit; font-size: 1.05rem; padding: .6rem .8rem; border: 2px solid var(--field);
  border-radius: var(--r); background: var(--white); color: var(--ink); }
textarea { resize: vertical; }
fieldset { display: grid; gap: .9rem; min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset + fieldset { margin-top: 1.4rem; }
legend { padding: 0; margin-bottom: .7rem; font-size: 1.3rem; font-weight: 600; color: var(--ink); }
.add { margin-top: 1rem; padding-top: 1.1rem; border-top: 4px solid var(--line); }
.fold summary { display: flex; align-items: center; min-height: 52px; margin: -.3rem 0; cursor: pointer; font-weight: 600; color: var(--sea); }
.fold[open] summary { margin-bottom: .8rem; }
.fold summary::after { content: ""; flex: none; width: 11px; height: 11px; margin-left: .9rem; border-right: 4px solid currentColor; border-bottom: 4px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.fold[open] summary::after { transform: translateY(2px) rotate(225deg); }
.fold summary .count { margin-left: auto; }
.fold summary .opt { margin-left: .35em; }
.fold summary { list-style: none; }
.fold.checklist summary { color: var(--ink); }

/* ---------- team and house ---------- */
.people { display: grid; }
.person { display: grid; grid-template-columns: 2.2rem 52px minmax(0, 1fr); gap: .5rem .8rem; align-items: center; padding: .9rem 0; }
.person + .person { border-top: 1px solid var(--line); }
.rank { font-size: 1.7rem; font-weight: 600; color: var(--sea); text-align: right; font-variant-numeric: tabular-nums; }
.person form { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; margin: 0; }
.face { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--r); background: var(--sand); color: var(--deep); font-size: 1.5rem; font-weight: 600; }
.nm { display: grid; min-width: 0; font-size: 1.15rem; }
.nm small { color: var(--soft); font-size: .95rem; overflow-wrap: anywhere; }
.nm .tel { white-space: nowrap; }
.person form [value=rank_up], .person form [value=rank_down] { order: 1; width: 48px; min-width: 48px; padding: 0; font-size: 0; }
.person form [value=rank_up]::before, .person form [value=rank_down]::before { content: ""; width: 12px; height: 12px; border-left: 4px solid currentColor; border-top: 4px solid currentColor; transform: translateY(3px) rotate(45deg); }
.person form [value=rank_down]::before { transform: translateY(-3px) rotate(225deg); }
.person form [value=auto] { order: 2; }
.person form [value=relink] { order: 3; }
.person form [value=toggle_cleaner] { order: 4; }
.switch { gap: .7rem; border-color: transparent; background: none; color: var(--ink); padding-left: .2rem; padding-right: .2rem; }
.switch::after { content: ""; flex: none; width: 56px; height: 32px; border-radius: 5px; border: 3px solid var(--edge);
  background: linear-gradient(var(--edge), var(--edge)) 3px center / 20px 22px no-repeat var(--switch-off); }
.switch.on::after { border-color: var(--green); background: linear-gradient(var(--white), var(--white)) calc(100% - 3px) center / 20px 22px no-repeat var(--green); }
.vh { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap; }
.face + .nm { grid-column: 3; }
.person.off .nm b { text-decoration: line-through; color: var(--soft); }
.person.off .face { background: var(--off); color: var(--soft); }
.person.feed { grid-template-columns: 1fr; }
.person.feed.bad .nm small { color: var(--bad); font-weight: 600; }
.linkbox { background: var(--deep); color: var(--white); border-top: 8px solid var(--sand); }
.linkbox h2 { color: var(--sand); }
.linkbox input { min-height: 60px; margin: .3rem 0 .8rem; border: 4px solid var(--sand); font-size: 1.05rem; font-weight: 600; }
.linkbox .btn.primary { background: var(--sand); border-color: var(--sand); color: var(--deep); min-height: 68px; font-size: 1.35rem; }
.cols { display: grid; gap: 0; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.todo li { display: flex; align-items: center; gap: .8rem; min-height: 48px; font-size: 1.08rem; }
.todo li::before { content: ""; flex: none; width: 14px; height: 14px; border: 4px solid var(--soft); border-radius: 3px; }

/* ---------- signed out ---------- */
.welcome { padding: 0; overflow: hidden; max-width: 36rem; margin: 1rem auto; }
.film { position: relative; aspect-ratio: 16 / 9; background: #0b0f19; overflow: hidden; }
.film img, .film video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.film video { opacity: 0; }
.film video.on { opacity: 1; }
.welcome .inside { padding: 1.4rem 1.2rem 1.5rem; }
.welcome h1 { font-size: 2.4rem; }
.welcome p { font-size: 1.12rem; }
.key { padding: .9rem 1rem; background: var(--note); border: 3px solid var(--sand); border-radius: 4px; }
.welcome .flash { margin-top: .5rem; }

/* ---------- phone (bottom bar), landscape phone and tablet (header nav) ---------- */
@media (max-width: 640px) {
  .top { min-height: 52px; }
  .account { pointer-events: none; }
  .account .panel { display: none; }
  .account summary { font-size: .95rem; }
}
@media (min-width: 641px) {
  .bar, .sheet { display: none; }
  .desk { display: flex; }
  main { padding-bottom: 3rem; }
  .actions { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
  .job { grid-template-columns: 64px 1fr auto; padding-right: 1rem; }
  .go { grid-column: auto; }
  .go em { margin: 0; padding: 0 1.2rem; }
  .job::after { right: 14px; }
  .job:not(:has(em)) { padding-right: 2.6rem; }
  .photos { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
@media (max-width: 1099px) {
  .jobpage:has(.work > .side-cal:only-child) { grid-template-columns: minmax(0, 34rem); }
}
@media (min-width: 800px) {
  main { max-width: 64rem; }
  .jobpage:has(.work:empty) { grid-template-columns: minmax(0, 34rem); }
  .jobpage { display: grid; grid-template-columns: minmax(300px, 24rem) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
  .out main { max-width: 46rem; }
}
@media (min-width: 1100px) {
  main { max-width: 94rem; padding: 1.6rem 2rem 3rem; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) 26rem; gap: 2.4rem; align-items: start; }
  .side-cal { display: block; position: sticky; top: 84px; padding: 1.2rem; background: var(--card); border-radius: var(--r); box-shadow: 0 1px 0 var(--sh1), 0 4px 14px var(--sh2); }
  .strip { display: none; }
  .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.4rem; align-items: start; }
  .team { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 0 2rem; align-items: start; }
  .team > h2, .team > p { grid-column: 1 / -1; }
  .team .people { grid-column: 1; }
  .team .add { grid-column: 2; }
  .team .add { margin-top: 0; padding-top: 0; border-top: 0; align-content: start; }
  .linkbox { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); grid-template-rows: auto 1fr; gap: 0 2.4rem; padding: 1.6rem; }
  .linkbox h2 { grid-area: 1 / 1; margin: 0; }
  .linkbox p { grid-area: 2 / 1; margin: .5rem 0 0; }
  .linkbox input { grid-area: 1 / 2; margin: 0 0 .8rem; }
  .linkbox .tiles { grid-area: 2 / 2; }
  .team { grid-column: 1 / -1; }
}
@media (min-width: 1900px) {
  main { max-width: 118rem; }
  .split { grid-template-columns: minmax(0, 1fr) 46rem; }
  .col { columns: 2; column-gap: 2.4rem; }
  .work > .side-cal { position: static; grid-column: 1 / -1; max-width: 50rem; }
  .col > section, .col > details { break-inside: avoid; }
  .side-cal { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.6rem; }
  .legend { grid-column: 1 / -1; }
  .jobpage { grid-template-columns: 28rem minmax(0, 1fr); }
  .work { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.2rem; align-items: start; }
  .photos { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .check, .job, .day, .tile { transition: transform 140ms var(--ease), box-shadow 160ms var(--ease); }
  .btn:active, .job:active { transform: scale(.98); }
  .check::before { transition: background-color 160ms var(--ease), border-color 160ms var(--ease); }
  .check::after { transition: transform 200ms var(--ease), opacity 120ms var(--ease); }
  .check { transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 140ms var(--ease); }
  .bar { transition: transform 200ms var(--ease); }
  .sheet .scrim { transition: opacity 200ms var(--ease); }
  .sheet .panel { transition: transform 240ms var(--drawer); }
  .film video { transition: opacity 400ms var(--ease); }
}

@media (min-width: 1100px) {
  /* The film is the hero: whole 16:9 frame, as wide as the screen allows while it still fits under the header. */
  .out main { max-width: min(160rem, calc((100svh - 9rem) * 1.778 + 36rem)); padding-top: 3rem; }
  .welcome { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(22rem, 36rem); align-items: center; }
  .welcome .inside { padding: 2.5rem; }
  .welcome h1 { font-size: 3.2rem; }
  .welcome p { font-size: 1.3rem; }
}

/* ---------- phone alerts card (cleaner's list); app.js unhides it only where push works ---------- */
.push { display: grid; gap: .6rem; }
.push h2 { margin: 0; }
.push p { margin: 0; color: var(--soft); }
.push [data-push-ready] { display: flex; flex-wrap: wrap; gap: .5rem; }
.push [data-push-ready] .btn { flex: 1 1 10rem; width: auto; }
.push .hint { font-weight: 500; color: var(--green-k); }
.push .hint:empty { display: none; }
/* On: one quiet row, so it does not sit large above the jobs forever. */
.push:has([data-push-on][hidden]) { grid-template-columns: auto 1fr; align-items: center; gap: .4rem 1rem; padding: .7rem 1rem; }
.push:has([data-push-on][hidden]) h2 { font-size: 1.1rem; }
.push:has([data-push-on][hidden]) > p:not(.hint) { display: none; }
.push:has([data-push-on][hidden]) [data-push-ready] { justify-content: flex-end; flex-wrap: nowrap; }
.push:has([data-push-on][hidden]) [data-push-ready] .btn { flex: 0 1 auto; min-height: 48px; padding: .3rem .9rem; font-size: 1rem; }
.push:has([data-push-on][hidden]) .hint { grid-column: 1 / -1; }

/* ---------- admin: counters, approvals, letters, members ---------- */
.stats { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.stats li { position: relative; padding: .7rem .9rem; min-height: 84px; background: var(--card); border-left: 6px solid var(--edge); border-radius: var(--r); box-shadow: 0 1px 0 var(--sh1), 0 3px 10px rgb(15 69 88 / .06); color: var(--soft); font-weight: 500; line-height: 1.25; }
.stats li > a { display: block; margin: -.7rem -.9rem; padding: .7rem .9rem; min-height: 84px; color: inherit; text-decoration: none; }
.stats b { display: block; font-size: 2rem; line-height: 1.05; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.stats li.attn { background: var(--amber-bg); border-left-color: var(--amber-edge); color: var(--amber-ink); }
.stats li.attn b { color: var(--amber-ink); display: flex; align-items: center; gap: .5rem; }
.stats li.attn b::after { content: ""; width: 12px; height: 12px; background: var(--amber-ink); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (hover: hover) and (pointer: fine) { .stats a:hover { box-shadow: 0 0 0 4px rgb(23 96 122 / .22); } }

.cols > .card { margin-bottom: 1rem; }
.cols .card .card { margin: 0 0 .8rem; padding: .9rem; background: var(--ground); box-shadow: none; border: 3px solid var(--line); }
.cols .card .card > p { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.cols .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: .8rem; }
.cols .facts div { border-left-width: 4px; padding: .5rem .7rem; box-shadow: none; overflow-wrap: anywhere; }
.cols .facts dd { font-size: 1.02rem; }
.cols .picks .pick { flex: 1 1 100%; }
@media (min-width: 560px) { .cols .picks .pick { flex-basis: 12rem; } }
.cols .hint { margin: .2rem 0 0; color: var(--soft); font-weight: 500; }
.letter-row { padding: .8rem .8rem .8rem 1rem; border-left: 6px solid var(--amber-edge); border-top: 1px solid var(--line); }
.letter-row:first-of-type { border-top: 0; }
.letter-row.done { border-left-color: var(--edge); background: var(--ground); color: var(--soft); }
.letter-row.done b { color: var(--soft); }
.letter-row form { margin-top: .5rem; }
.letter-row .btn.small { width: auto; }
.people-list { list-style: none; margin: 0; padding: 0; display: grid; }
.people-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem .8rem; align-items: center; padding: .7rem .5rem .7rem .8rem; border-left: 6px solid var(--sea); }
.people-list li + li { border-top: 1px solid var(--line); }
.people-list li > span { min-width: 0; overflow-wrap: anywhere; }
.people-list small { color: var(--soft); font-size: .95rem; }
.people-list form { margin: 0; }
.people-list .btn.small { width: auto; min-width: 7.5rem; }
.people-list li.off { border-left-color: var(--edge); background: var(--off); color: var(--soft); }
.people-list li.off b { text-decoration: line-through; text-decoration-skip-ink: none; text-decoration-thickness: 3px; }
.dac7 { margin-top: 1rem; }
.dac7 a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* ---------- history fold ---------- */
.history { padding-block: .6rem; }
.history summary { flex-wrap: nowrap; gap: .8rem; }
.history summary .count { min-width: 0; text-align: right; white-space: normal; font-size: .9rem; font-weight: 500; line-height: 1.25; padding: .15rem .5rem; }
.help { margin: .1rem 0 1.2rem; }
.help a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

.stats li.attn { padding: .7rem .9rem; border: 0; border-left: 6px solid var(--amber-edge); }
.nw { white-space: nowrap; }
