/* Helping Hands — phone-first, large-text, high-contrast styles.
   Brand: navy #073B68, orange #F77B19. Orange is an accent (never small text on white). */

@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/ahn-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/ahn-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible Next"; src: url("/fonts/ahn-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --navy: #073B68;
  --navy-800: #052C4F;
  --navy-50: #EAF1F8;
  --navy-100: #D3E2F1;
  --orange: #F77B19;
  --orange-600: #C25A08;
  --orange-50: #FFF2E6;
  --orange-ink: #8A3C00;
  --ink: #13283D;
  --ink-strong: #0B1F33;
  --muted: #475A6E;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --line: #D6DEE7;
  --line-strong: #8C9DAF;
  --green: #146C43;
  --green-50: #E7F5EE;
  --red: #B42318;
  --red-50: #FDECEA;
  --amber-50: #FFF7DB;
  --amber-ink: #6B4E00;
  --purple: #5B2A86;
  --purple-50: #F2EAFB;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(7, 59, 104, .06), 0 4px 14px rgba(7, 59, 104, .06);
  --font: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-800); }
h1, h2, h3 { line-height: 1.2; color: var(--ink-strong); margin: 0 0 .5rem; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.3rem; margin-top: .25rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .75rem; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: .75rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; top: .5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.wrap-wide { max-width: 1180px; }
main.wrap { padding-top: 1rem; padding-bottom: 2.5rem; }
body.has-bottom-nav main.wrap { padding-bottom: 7rem; }

/* ---------- Demo banner ---------- */
.demo-banner { background: var(--amber-50); color: var(--amber-ink); border-bottom: 1px solid #EDD48A; text-align: center; font-size: .875rem; padding: .35rem 1rem; }

/* ---------- Header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: .75rem; min-height: 64px; max-width: 1180px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.logo-full { display: none; width: 300px; height: auto; }
.logo-mark { display: block; width: 44px; height: 44px; }
.community-chip {
  display: inline-flex; align-items: center; gap: .35rem; background: var(--navy-50); color: var(--navy);
  font-weight: 700; font-size: .95rem; padding: .45rem .8rem; border-radius: 999px; text-decoration: none;
  min-width: 0; max-width: 52vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.community-chip .chev { font-size: .75rem; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; color: var(--navy); }
.bell .icon { width: 26px; height: 26px; }
.bell[aria-current] { background: var(--navy-50); }
.bell .count {
  position: absolute; top: 2px; right: 0; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px;
  background: var(--orange); color: var(--ink-strong); font-size: .75rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
/* ---------- Bottom navigation (phones) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--line);
  display: flex; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 12px rgba(7, 59, 104, .08);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  min-height: 64px; font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: none; border-top: 4px solid transparent;
}
.bottom-nav a .icon { width: 26px; height: 26px; }
.bottom-nav a[aria-current] { color: var(--navy); border-top-color: var(--orange); background: var(--navy-50); }
.bar-icon { position: relative; display: inline-flex; }
.bar-icon .nav-badge { position: absolute; top: -7px; right: -15px; min-width: 21px; height: 21px; padding: 0 5px; font-size: .72rem; border: 2px solid #fff; }

/* An orange count of things waiting (menus and Leader tools). */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-width: 24px; height: 24px; padding: 0 7px;
  border-radius: 12px; background: var(--orange); color: var(--ink-strong); font-size: .8rem; font-weight: 700; line-height: 1;
}

/* ---------- Side menu (computers) ---------- */
.side-nav { display: none; }
.side-new { margin: 0 0 .9rem; }
.side-link {
  display: flex; align-items: center; gap: .7rem; min-height: 46px; padding: .55rem .75rem; border-radius: 12px;
  font-weight: 700; color: var(--ink); text-decoration: none;
}
.side-link .icon { width: 22px; height: 22px; color: var(--navy); flex-shrink: 0; }
.side-link .nav-badge { margin-left: auto; }
/* A long name wraps rather than being cut off ("Contact us messages", 2026-11-07). */
.side-link > span:not(.nav-badge) { min-width: 0; overflow-wrap: anywhere; }
.side-link:hover { background: var(--navy-50); color: var(--navy); }
.side-link[aria-current] { background: var(--navy); color: #fff; }
.side-link[aria-current] .icon { color: #fff; }
.side-head { margin: 1.1rem .75rem .35rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

@media (min-width: 720px) {
  .logo-full { display: block; }
  .logo-mark { display: none; }
}
@media (min-width: 960px) {
  .header-row { max-width: 1320px; padding: 0 24px; }
  .app-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 0 2rem; max-width: 1320px; margin: 0 auto; padding: 0 24px; }
  .side-nav { display: flex; flex-direction: column; gap: .15rem; position: sticky; top: 65px; align-self: start; max-height: calc(100vh - 65px); overflow-y: auto; padding: 1.25rem 0 2rem; }
  .app-shell > main.wrap { max-width: 860px; margin: 0; padding: 1.25rem 0 3rem; }
  .app-shell > main.wrap-wide { max-width: none; }
  .bottom-nav { display: none; }
  body.has-bottom-nav main.wrap { padding-bottom: 3rem; }
  /* Things the side menu already offers. */
  .no-side { display: none !important; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 1.75rem 0 2rem; text-align: center; color: var(--muted); }
body.has-bottom-nav .site-footer { padding-bottom: 6.5rem; }
@media (min-width: 960px) { body.has-bottom-nav .site-footer { padding-bottom: 2rem; } }
.site-footer p { margin: .35rem 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; padding: .65rem 1.2rem;
  border-radius: 14px; border: 2px solid transparent; font: inherit; font-weight: 700; font-size: 1.05rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn .icon { width: 22px; height: 22px; flex-shrink: 0; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-800); color: #fff; }
.btn-cta { background: var(--orange); color: var(--ink-strong); border-color: var(--orange-600); }
.btn-cta:hover { background: #E86F10; color: var(--ink-strong); }
.btn-secondary { background: var(--surface); color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy-50); }
.btn-ghost { background: transparent; color: var(--navy); border-color: transparent; text-decoration: underline; }
.btn-danger { background: var(--surface); color: var(--red); border-color: var(--red); }
.btn-danger:hover { background: var(--red-50); color: var(--red); }
.btn-good { background: var(--green); color: #fff; }
.btn-good:hover { background: #0F5634; color: #fff; }
.btn-block { display: flex; width: 100%; }
.btn-small { min-height: 42px; padding: .4rem .85rem; font-size: .95rem; border-radius: 11px; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.btn-stack { display: grid; gap: .65rem; }
.inline-form { display: inline; margin: 0; }
.btn-stack .inline-form, .btn-stack .inline-form .btn { display: flex; width: 100%; }
button[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---------- Page heading ---------- */
.page-head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; justify-content: space-between; margin: .5rem 0 1.25rem; }
.page-head h1 { margin: 0; }
.page-head .lead { margin: .35rem 0 0; color: var(--muted); font-size: 1.05rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.back-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; text-decoration: none; margin: .25rem 0 .5rem; padding: .35rem 0; }
.back-link .icon { width: 20px; height: 20px; }
.eyebrow { font-size: .9rem; font-weight: 700; color: var(--muted); margin: 0 0 .25rem; }

/* ---------- Cards & sections ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.15rem; }
.card + .card, .stack > * + * { margin-top: 1rem; }
.section { margin-top: 1.25rem; }
.section > h2 { display: flex; align-items: center; gap: .5rem; }
.section > h2 .icon { width: 24px; height: 24px; color: var(--navy); }
.card-link { display: block; color: inherit; text-decoration: none; }
.handup-card { padding: 0; }
.handup-card .card-link { padding: 1rem 1.1rem 1.05rem; border-radius: var(--radius); }
.handup-card:hover { border-color: var(--navy); }
.handup-card h3 { margin: .5rem 0 .35rem; font-size: 1.15rem; }
.card-top { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.meta { color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: 0 0 .5rem; font-size: .95rem; }
.meta .dot { margin: 0 .15rem; }
.icon { width: 22px; height: 22px; vertical-align: -4px; }
.icon-sm { width: 17px; height: 17px; vertical-align: -3px; }
.list-gap > * + * { margin-top: .85rem; }
.captain-flags { margin: .5rem 0 0; display: flex; gap: .35rem; flex-wrap: wrap; }

/* ---------- Badges, tags, chips ---------- */
.badge { display: inline-block; font-size: .85rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; border: 1px solid transparent; }
.status-submitted { background: var(--amber-50); color: var(--amber-ink); border-color: #EDD48A; }
.status-declined, .status-cancelled { background: #EEF1F4; color: #3E4C5A; border-color: #C9D2DB; }
.status-open { background: var(--orange-50); color: var(--orange-ink); border-color: #F6C79E; }
.status-scheduled { background: var(--navy-50); color: var(--navy); border-color: var(--navy-100); }
.status-in_progress { background: var(--purple-50); color: var(--purple); border-color: #D9C6EF; }
.status-completed { background: var(--green-50); color: var(--green); border-color: #B5DEC8; }
.tag { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; font-weight: 700; padding: .15rem .55rem; border-radius: 6px; background: #EEF1F4; color: #33414F; }
.tag-sample { background: var(--amber-50); color: var(--amber-ink); border: 1px dashed #C9A227; }
.tag-match { background: var(--orange-50); color: var(--orange-ink); }
.tag-good { background: var(--green-50); color: var(--green); }
.tag-excellent { background: var(--green); color: #fff; }
.tag-info { background: var(--navy-50); color: var(--navy); }
.tag-warn { background: var(--amber-50); color: var(--amber-ink); }
.tag-muted { background: #EEF1F4; color: #3E4C5A; }
.tag-danger { background: var(--red-50); color: var(--red); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: .25rem 0 .5rem; }
.chip { background: #F0F3F7; border: 1px solid var(--line); border-radius: 999px; padding: .2rem .7rem; font-size: .92rem; }

.hands { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .95rem; color: var(--ink); }
.pips { display: inline-flex; gap: 4px; }
.pips i { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--navy); display: inline-block; }
.pips i.on { background: var(--orange); border-color: var(--orange-600); }
.hands.full .pips i { background: var(--green); border-color: var(--green); }
.hands.full, .hands.enough { color: var(--green); }

/* ---------- Notices & flashes ---------- */
.flash { padding: .85rem 1rem; border-radius: var(--radius-sm); margin: 0 0 1rem; font-weight: 700; border-left: 6px solid; }
.flash-success { background: var(--green-50); color: #0F5634; border-color: var(--green); }
.flash-error { background: var(--red-50); color: #8E1B12; border-color: var(--red); }
.flash-info { background: var(--navy-50); color: var(--navy); border-color: var(--navy); }
.notice { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--radius-sm); margin: 0 0 1rem; }
.notice > .icon { flex-shrink: 0; margin-top: 2px; }
.notice p:last-child { margin-bottom: 0; }
.notice-info { background: var(--navy-50); color: var(--ink); }
.notice-info > .icon { color: var(--navy); }
.notice-warn { background: var(--amber-50); color: #4A3600; }
.notice-warn > .icon { color: var(--amber-ink); }
.notice-private { background: #F1F0FA; color: #2D2556; border: 1px solid #D9D5F2; }
.notice-private > .icon { color: #4B3F9A; }
.notice-success { background: var(--green-50); color: #0F5634; }

/* ---------- Forms ---------- */
form.stack > * + * { margin-top: 1.1rem; }
.field { margin: 0 0 1.1rem; border: 0; padding: 0; min-width: 0; }
.field > label:not(.check-row):not(.radio-card), .field > legend, .town-picker > div > label { display: block; font-weight: 700; font-size: 1.05rem; margin-bottom: .35rem; color: var(--ink-strong); padding: 0; }
.optional { font-weight: 400; color: var(--muted); font-size: .9rem; }
.hint { color: var(--muted); font-size: .95rem; margin: -.1rem 0 .5rem; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=time],
input[type=datetime-local], input[type=search], input[type=url], select, textarea {
  width: 100%; font: inherit; font-size: 1.05rem; color: var(--ink); background: #fff; border: 2px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: .7rem .85rem; min-height: 52px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); outline: 3px solid rgba(247, 123, 25, .45); outline-offset: 1px; }
input[type=file] { font: inherit; font-size: 1rem; width: 100%; padding: .75rem; border: 2px dashed var(--line-strong); border-radius: var(--radius-sm); background: #fff; }
input[type=checkbox], input[type=radio] { width: 24px; height: 24px; accent-color: var(--navy); flex-shrink: 0; margin: 0; }
.form-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.15rem .2rem; margin: 0 0 1rem; }
.form-section > h2 { font-size: 1.15rem; display: flex; align-items: center; gap: .5rem; }
.form-section > h2 .step { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .95rem; }
.form-actions { display: grid; gap: .65rem; margin-top: 1.25rem; }
@media (min-width: 720px) { .form-actions { display: flex; flex-wrap: wrap; } }

/* ---------- Changing a job (John, 2026-11-07: "make edit easy to find") ---------- */
.job-top-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 0; }
.edit-link { display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; white-space: nowrap; }
.facts .edit-link { margin-left: .2rem; }
/* A jump to a part of the form, to Leader controls or to Complete job, lands below the sticky header. */
.form-section, #controls, #complete { scroll-margin-top: 84px; }
/* Editing a job: Save changes stays in reach at the bottom of the screen, above a phone's bottom bar. */
.edit-actions {
  position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 5; display: flex; flex-wrap: wrap; gap: .5rem;
  margin: .5rem 0 0; padding: .65rem 0; background: var(--bg); border-top: 1px solid var(--line);
}
.edit-actions .btn { flex: 1 1 auto; }
@media (min-width: 960px) { .edit-actions { bottom: 0; } }
/* "Send the update?" after an edit: the message as the crew and helpers will get it. */
.update-preview { display: grid; gap: .2rem; margin: .25rem 0 .6rem; padding: .75rem .9rem; background: var(--navy-50); border-left: 4px solid var(--orange); border-radius: var(--radius); }
#update { scroll-margin-top: 84px; }
.date-row { display: grid; gap: .6rem; }
@media (min-width: 560px) { .date-row { grid-template-columns: repeat(3, 1fr); } }
.two-col { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .two-col { grid-template-columns: 1fr 1fr; } }

.chip-set .chip-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-check { display: inline-flex; align-items: center; gap: .55rem; border: 2px solid var(--line-strong); background: #fff; border-radius: 999px; padding: .55rem 1rem .55rem .75rem; cursor: pointer; min-height: 50px; font-weight: 400; }
.chip-check:has(input:checked) { border-color: var(--navy); background: var(--navy-50); font-weight: 700; }
.chip-check:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.radio-set { display: grid; gap: .55rem; }
.radio-set > legend { margin-bottom: .45rem; }
/* "Do you hold a trade license?" (John, 2026-11-12): No and Yes side by side, then the work it's for. */
.radio-set.yes-no { grid-template-columns: 1fr 1fr; }
.radio-set.yes-no > .hint { grid-column: 1 / -1; }
.license-block { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.license-block h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.license-list { list-style: none; margin: .25rem 0 .5rem; padding: 0; display: grid; gap: .35rem; }
.license-list small { white-space: nowrap; }
/* A Leader records a license: each kind of work with its own "Good through" day (John, 2026-11-16), label above the box
   like any field. On a phone the day sits under its work; from 560px it's beside it, the two boxes level. minmax(0, 1fr)
   keeps a date box from pushing the row wider than the card. */
.license-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; }
.license-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: .35rem; }
.license-day { display: grid; grid-template-columns: minmax(0, 1fr); gap: .2rem; }
.license-day label { margin: 0; font-weight: 400; font-size: .95rem; }
@media (min-width: 560px) {
  .license-row { grid-template-columns: minmax(0, 1fr) 11rem; align-items: end; gap: .75rem; }
}
.radio-card, .check-row { display: flex; gap: .75rem; align-items: flex-start; border: 2px solid var(--line-strong); border-radius: var(--radius-sm); padding: .8rem .9rem; background: #fff; cursor: pointer; }
.radio-card:has(input:checked), .check-row:has(input:checked) { border-color: var(--navy); background: var(--navy-50); }
.radio-card > span, .check-row > span { display: block; min-width: 0; }
.radio-card small, .check-row small { display: block; color: var(--muted); font-size: .92rem; margin-top: .1rem; }
.check-row + .check-row { margin-top: .55rem; }
.field .check-row { margin-top: .25rem; }

/* ---------- Home ---------- */
.hello { margin: .5rem 0 1rem; }
.hello h1 { font-size: 1.6rem; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 0 0 1.25rem; }
@media (min-width: 720px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile {
  display: flex; flex-direction: column; gap: .35rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem; text-decoration: none; color: var(--ink); min-height: 120px;
}
.tile:hover { border-color: var(--navy); color: var(--ink); }
.tile .tile-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--navy-50); color: var(--navy); }
.tile .tile-icon .icon { width: 26px; height: 26px; }
.tile strong { font-size: 1.05rem; color: var(--ink-strong); }
.tile small { color: var(--muted); font-size: .88rem; line-height: 1.35; }
.tile-cta { background: var(--orange-50); border-color: #F6C79E; }
.tile-cta .tile-icon { background: var(--orange); color: var(--ink-strong); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 1.5rem 0 .75rem; }
.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; white-space: nowrap; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.card-head a { font-weight: 700; white-space: nowrap; }
.todo-card > h2, .card-head h2, .home-side .card > h2 { display: flex; align-items: center; gap: .5rem; }
.todo-card > h2 .icon, .card-head h2 .icon, .home-side .card > h2 .icon { color: var(--navy); }

/* ---------- Leader home ---------- */
.home-head { align-items: center; }
.home-actions { width: 100%; display: grid; gap: .6rem; }
@media (min-width: 720px) { .home-actions { width: auto; display: flex; } }
.home-grid { display: grid; gap: 1.25rem; }
@media (min-width: 1100px) { .home-grid { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; } }
.home-side > .section:first-child { margin-top: 0; }

/* "Needs your attention": one row per thing to do, most pressing first. */
.todo-card { padding-bottom: .5rem; }
.todo-list, .agenda { list-style: none; margin: .25rem 0 0; padding: 0; }
.todo-list li + li, .agenda li + li { border-top: 1px solid var(--line); }
.todo, .agenda-item { display: flex; align-items: center; gap: .85rem; padding: .75rem .3rem; border-radius: 10px; text-decoration: none; color: var(--ink); }
.todo:hover, .agenda-item:hover { background: var(--navy-50); color: var(--ink); }
.todo { min-height: 64px; }
.todo-icon { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--navy-50); color: var(--navy); }
.todo-icon.urgent { background: var(--orange-50); color: var(--orange-ink); box-shadow: inset 0 0 0 2px #F6C79E; }
.todo-main, .agenda-main { flex: 1; min-width: 0; }
.todo-main strong { color: var(--ink-strong); line-height: 1.3; }
.todo-main small { display: block; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.todo-chev { flex-shrink: 0; width: 20px; height: 20px; color: var(--line-strong); }
.todo-more .todo-icon { background: transparent; }
.todo-more strong { color: var(--navy); }
/* "3 more…" opens in place to list the rest (audit 2026-11-12). */
.todo-rest > summary { list-style: none; cursor: pointer; }
.todo-rest > summary::-webkit-details-marker { display: none; }
.todo-rest > summary .todo-chev { transition: transform .15s; }
.todo-rest[open] > summary .todo-chev { transform: rotate(90deg); }
.todo-rest > .todo-list { margin: 0; border-top: 1px solid var(--line); }
.all-clear { display: flex; gap: .6rem; align-items: center; margin: .5rem 0; padding: .85rem 1rem; border-radius: var(--radius-sm); background: var(--green-50); color: #0F5634; }
.all-clear .icon { flex-shrink: 0; }

/* "Next 7 days": a date block, then the job. */
.agenda-date { flex-shrink: 0; width: 54px; height: 58px; border-radius: 12px; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; line-height: 1.05; }
.agenda-date small { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.agenda-date b { font-size: 1.45rem; }
.agenda-date.now { background: var(--purple); }
.agenda-main { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; }
.agenda-main strong { color: var(--ink-strong); }
.agenda-main .hands { font-size: .88rem; }
.agenda-main small { color: var(--muted); }

.glance { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.stat .sub { display: block; margin-top: .15rem; font-size: .85rem; color: var(--muted); }

/* ---------- Lists of jobs ---------- */
.list-grid { display: grid; gap: .85rem; }
.list-grid > .card + .card { margin-top: 0; }
@media (min-width: 1100px) { .list-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.tab-count { display: inline-flex; justify-content: center; min-width: 1.6rem; margin-left: .35rem; padding: 0 .4rem; border-radius: 999px; background: #EEF1F4; color: #3E4C5A; font-size: .8rem; }
.filter-tabs a[aria-current] .tab-count { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---------- Hand-Up detail ---------- */
.detail-grid { display: grid; gap: 1rem; }
@media (min-width: 960px) { .detail-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; } .detail-aside { position: sticky; top: 84px; } }
.facts { display: grid; gap: .8rem; margin: 1rem 0 0; }
.facts div { display: flex; gap: .7rem; align-items: flex-start; }
.facts .icon { color: var(--navy); margin-top: 2px; flex-shrink: 0; }
.facts dt { font-size: .9rem; color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .75rem 0; }
.photo-grid a, .photo-grid figure { display: block; margin: 0; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #EEF1F4; }
.photo-grid figcaption { font-size: .85rem; }
.action-card h2 { font-size: 1.2rem; }
.private-block { background: #F7F6FD; border: 2px solid #D9D5F2; border-radius: var(--radius); padding: 1rem 1.1rem; }
.private-block h2 { color: #2D2556; display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; }
.kv { display: grid; gap: .5rem; margin: 0; }
.kv div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .5rem; }
.kv dt { color: var(--muted); font-weight: 700; font-size: .92rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .kv div { grid-template-columns: 1fr; gap: 0; } }
.person-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .75rem 0; border-top: 1px solid var(--line); }
.person-row:first-of-type { border-top: 0; }
.person-row .who { min-width: 0; }
.person-row .who strong { display: block; }
.person-row .who small { color: var(--muted); display: block; }
.qa { border-top: 1px solid var(--line); padding: .85rem 0; }
.qa:first-of-type { border-top: 0; }
.qa .q { font-weight: 700; }
.qa .a { margin-top: .35rem; padding-left: .85rem; border-left: 4px solid var(--orange); }
details.disclosure { border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; margin-top: .75rem; }
details.disclosure > summary { cursor: pointer; padding: .8rem 1rem; font-weight: 700; color: var(--navy); list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 52px; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::after { content: "＋"; font-size: 1.2rem; }
details.disclosure[open] > summary::after { content: "－"; }
details.disclosure > .disclosure-body { padding: 0 1rem 1rem; }
.history { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.history li { padding: .45rem 0; border-top: 1px solid var(--line); }
.history li:first-child { border-top: 0; }
.status-steps { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: .5rem 0 0; font-size: .85rem; }
.status-steps li { padding: .2rem .55rem; border-radius: 999px; background: #EEF1F4; color: #4A5868; }
.status-steps li.done { background: var(--navy-50); color: var(--navy); }
.status-steps li.now { background: var(--navy); color: #fff; font-weight: 700; }

/* ---------- Filters ---------- */
.filters { display: grid; gap: .6rem; margin: 0 0 1rem; }
.filter-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; -webkit-overflow-scrolling: touch; }
.filter-tabs a { flex-shrink: 0; padding: .5rem .95rem; border-radius: 999px; border: 2px solid var(--line-strong); text-decoration: none; font-weight: 700; color: var(--ink); background: #fff; min-height: 44px; display: inline-flex; align-items: center; }
.filter-tabs a[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.filter-row .field { margin: 0; }
.filter-row > .btn { align-self: end; }
.filter-row label { font-size: .9rem; }
@media (min-width: 720px) { .filter-row { grid-template-columns: 1fr 1fr auto; align-items: end; } .filter-row .btn { min-height: 52px; } }
/* The Done tab adds a Year filter (2026-11-07). */
@media (min-width: 720px) { .filter-row.has-year { grid-template-columns: 1fr 1fr 1fr auto; } }

/* ---------- Captain's Deck ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin: 0 0 1.25rem; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1080px) { .stats { grid-template-columns: repeat(6, 1fr); } }
.stat { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.stat:hover { border-color: var(--navy); color: var(--ink); }
.stat .num { display: block; font-size: 2rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat .label { display: block; font-weight: 700; font-size: .95rem; }
.stat.attention { background: var(--orange-50); border-color: #F6C79E; }
.stat.attention .num { color: var(--orange-ink); }
/* Messages: new website inquiries waiting, for a Leader (John, 2026-11-12). */
.inquiry-link { display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; margin: 0 0 1rem; border-radius: var(--radius-sm); background: var(--orange-50); border: 1px solid #F6C79E; color: var(--orange-ink); font-weight: 700; text-decoration: none; }
.inquiry-link:hover { background: #FFE6CF; color: var(--orange-ink); }
.inquiry-link > span { flex: 1; }
.inquiry-link > .icon:first-child { flex-shrink: 0; color: var(--orange-600); }
.deck-grid { display: grid; gap: 1.25rem; }
@media (min-width: 1080px) { .deck-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.impact { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.impact strong { display: block; font-size: 1.6rem; color: var(--navy); }
.impact span { font-size: .85rem; color: var(--muted); font-weight: 700; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.data th, table.data td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: #F3F6F9; font-size: .85rem; color: var(--muted); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
@media (max-width: 719px) {
  table.responsive thead { display: none; }
  table.responsive tr { display: block; border-bottom: 1px solid var(--line); padding: .6rem 0; }
  table.responsive tr:last-child { border-bottom: 0; }
  table.responsive td { display: block; border: 0; padding: .15rem .9rem; }
  table.responsive td[data-label]::before { content: attr(data-label) ": "; font-weight: 700; color: var(--muted); font-size: .88rem; }
}
.row-list { list-style: none; padding: 0; margin: 0; }
.row-list li { border-top: 1px solid var(--line); padding: .8rem 0; }
.row-list li:first-child { border-top: 0; padding-top: .2rem; }
.row-list .row-title { font-weight: 700; display: block; }
.row-list small { color: var(--muted); }

/* ---------- Inbox ---------- */
.inbox-list { list-style: none; padding: 0; margin: 0; }
.inbox-list li { border-bottom: 1px solid var(--line); }
.inbox-list a { display: flex; gap: .8rem; padding: .9rem .25rem; text-decoration: none; color: var(--ink); }
.inbox-list a:hover { background: var(--navy-50); }
.inbox-list .dot-unread { width: 12px; height: 12px; border-radius: 50%; background: var(--orange); margin-top: .45rem; flex-shrink: 0; border: 2px solid var(--orange-600); }
.inbox-list .dot-read { width: 12px; height: 12px; flex-shrink: 0; }
.inbox-list .unread strong { color: var(--ink-strong); }
.inbox-list .read strong { font-weight: 400; }
.inbox-list small { display: block; color: var(--muted); }

/* ---------- Phone notifications ---------- */
.push-card { margin-bottom: 1rem; }
.push-card h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; }
.push-card ol, .push-card ul { padding-left: 1.4rem; }
.push-card li + li { margin-top: .35rem; }
.push-on { display: flex; gap: .55rem; align-items: flex-start; }
.push-on > .icon { color: var(--green); flex-shrink: 0; margin-top: 2px; }
.push-message { margin: .75rem 0 0; font-weight: 600; }
.push-install-tip { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.push-message:empty { display: none; }
.device-list { list-style: none; padding: 0; margin: 0 0 .75rem; }
.device-list li { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.device-list small { display: block; color: var(--muted); }

/* ---------- Demo mailbox ---------- */
.mail-item h2 { font-size: 1.15rem; margin-top: .35rem; }
.mail-body { overflow-wrap: anywhere; color: var(--ink); }

/* ---------- Texts (Demo texts page) ---------- */
.text-bubble { background: var(--navy-50); border-radius: 18px 18px 18px 4px; padding: .75rem 1rem; max-width: 34rem; overflow-wrap: anywhere; color: var(--ink); }

/* A form field for robots only: people never see or fill it in (the Ask for a Hand form). */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Stories ---------- */
.story-card { padding: 0; overflow: hidden; }
.story-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #EEF1F4; }
.story-card .story-body { padding: 1rem 1.1rem; }
.story-card h3 { margin: .25rem 0 .4rem; font-size: 1.2rem; }
.story-hero { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 9; object-fit: cover; margin: .5rem 0 1rem; }
.story-text { font-size: 1.1rem; line-height: 1.65; }
.story-placeholder { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--navy-50), var(--orange-50)); display: flex; align-items: center; justify-content: center; }
.story-placeholder img { width: 30%; aspect-ratio: auto; background: none; }

/* ---------- Landing ---------- */
.hero { text-align: center; padding: 1.5rem 0 1rem; }
.hero img.hero-logo { width: min(340px, 85%); height: auto; margin: 0 auto .75rem; display: block; }
.hero h1 { font-size: 1.9rem; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 34rem; margin: 0 auto 1.25rem; }
.hero .btn-stack { max-width: 22rem; margin: 0 auto; }
.hero-more { margin: 1rem 0 0; font-size: 1.05rem; }
.hero-more a { font-weight: 700; }
.how { display: grid; gap: .9rem; margin: 1.5rem 0; }
@media (min-width: 720px) { .how { grid-template-columns: repeat(3, 1fr); } }
.how .card h2 { font-size: 1.15rem; }
.how > .card + .card { margin-top: 0; }
.how .emoji { font-size: 2rem; display: block; margin-bottom: .25rem; }
.demo-accounts { display: grid; gap: .5rem; }
.demo-accounts form { margin: 0; }
.demo-accounts .btn { width: 100%; justify-content: space-between; text-align: left; }
.demo-accounts .btn small { font-weight: 400; color: var(--muted); }
.auth-card { max-width: 30rem; margin: 1rem auto; }

/* ---------- Pledge & prose ---------- */
.prose h2 { margin-top: 1.5rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin: .35rem 0; }
.pledge-list { counter-reset: pledge; list-style: none; padding: 0; }
.pledge-list li { counter-increment: pledge; position: relative; padding: .85rem 0 .85rem 3rem; border-top: 1px solid var(--line); }
.pledge-list li::before { content: counter(pledge); position: absolute; left: 0; top: .8rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pledge-list strong { display: block; color: var(--ink-strong); }

.empty { text-align: center; padding: 1.5rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius); background: #FBFCFD; color: var(--muted); }
.empty .empty-title { font-weight: 700; color: var(--ink); font-size: 1.1rem; }

.coming-soon { border-style: dashed; background: #FBFCFD; }
.pill-note { display: inline-block; background: #EEF1F4; color: #3E4C5A; font-weight: 700; font-size: .8rem; padding: .15rem .6rem; border-radius: 999px; }

.desktop-only { display: none; }
@media (min-width: 720px) { .desktop-only { display: block; } .mobile-only { display: none !important; } }
.jump-link { margin: .25rem 0 0; }

@media print {
  .site-header, .bottom-nav, .side-nav, .site-footer, .demo-banner { display: none; }
}

/* ---------- Privacy Policy & Terms ---------- */
.legal section[id] { scroll-margin-top: 84px; }
.legal-summary { background: var(--navy-50); border: 1px solid var(--navy-100); border-radius: var(--radius); padding: 1rem 1.15rem .25rem; margin: 0 0 1rem; }
.legal-summary h2 { font-size: 1.15rem; }
.legal-summary li { margin: .4rem 0; }
.toc { margin: 0 0 1.5rem; }
.toc h2 { font-size: 1.05rem; margin: 0 0 .25rem; }
.toc ol { margin: 0; padding-left: 1.4rem; }
.toc li { margin: .3rem 0; }
mark.placeholder { background: #FFF1B8; color: #4A3600; border: 1px dashed #C9A227; border-radius: 4px; padding: 0 .25rem; }

/* ---------- Mockups (/mocks, demo site only) ---------- */
.mock-bar { display: flex; flex-wrap: wrap; gap: .25rem 1rem; justify-content: space-between; align-items: center; background: var(--purple-50); color: var(--purple); border: 1px dashed #B79AD6; border-radius: var(--radius-sm); padding: .5rem .85rem; margin: 0 0 1rem; font-size: .92rem; }
.mock-bar a { color: var(--purple); font-weight: 700; }
.mock-about { border: 2px dashed #B79AD6; background: #FBF8FE; }
.mock-about h2 { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: 1.15rem; }
.mock-about ul { padding-left: 1.25rem; }
.mock-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 40; margin: 0; background: var(--ink-strong); color: #fff; font-weight: 700; padding: .65rem 1.1rem; border-radius: 999px; box-shadow: var(--shadow); white-space: nowrap; }
@media (min-width: 960px) { .mock-toast { bottom: 24px; } }
.mock-media { margin: 0; }
.mock-media-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); border: 1px solid var(--line); background: linear-gradient(135deg, var(--navy-50), var(--orange-50)); color: var(--navy); font-weight: 700; font-size: .9rem; text-align: center; padding: .5rem; }
.mock-media-box .icon { width: 34px; height: 34px; }
.mock-media figcaption { font-size: .85rem; color: var(--muted); margin-top: .25rem; }
.mock-banner-photo { aspect-ratio: 16 / 9; border-radius: var(--radius); margin: 0 0 1rem; }
.story-card .mock-banner-photo { border-radius: 0; border: 0; margin: 0; }
/* Stays under the header while the Leader scrolls through the skills. */
.mock-count { position: sticky; top: 72px; z-index: 5; display: flex; align-items: center; gap: .6rem; margin: 0 0 .9rem; padding: .75rem 1rem; background: var(--navy); color: #fff; border-radius: var(--radius-sm); font-size: 1.1rem; box-shadow: var(--shadow); }
.mock-count strong { font-size: 1.4rem; }
.mock-attention { background: var(--orange-50); border-color: #F6C79E; }
.tally { list-style: none; padding: 0; margin: .75rem 0; }
.tally-row { border-top: 1px solid var(--line); padding: .85rem 0; display: grid; gap: .35rem; }
.tally-row:first-child { border-top: 0; padding-top: .25rem; }
.tally-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tally-row small { color: var(--muted); }
.tally progress { width: 100%; height: 14px; appearance: none; border: 0; border-radius: 999px; background: #EEF1F4; overflow: hidden; }
.tally progress::-webkit-progress-bar { background: #EEF1F4; border-radius: 999px; }
.tally progress::-webkit-progress-value { background: var(--orange); border-radius: 999px; }
.tally progress::-moz-progress-bar { background: var(--orange); border-radius: 999px; }
.bubbles { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.bubble { max-width: 85%; padding: .65rem .9rem; border-radius: 18px; overflow-wrap: anywhere; }
.bubble p { margin: 0 0 .2rem; }
.bubble small { font-size: .8rem; }
.bubble.theirs { justify-self: start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.theirs small { color: var(--muted); }
.bubble.mine { justify-self: end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.bubble.mine small { color: var(--navy-100); }

/* ---------- Helpers (Leaders) ---------- */
.helper-list { list-style: none; margin: 0; padding: .25rem 1rem; }
.helper-row { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; }
.helper-row.wrap-actions { flex-wrap: wrap; }
.helper-row + .helper-row { border-top: 1px solid var(--line); }
.helper-main { flex: 1 1 14rem; min-width: 0; display: flex; align-items: flex-start; gap: .8rem; text-decoration: none; color: var(--ink); border-radius: 10px; padding: .15rem; }
.helper-main:hover { color: var(--ink); background: var(--navy-50); }
.avatar { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; background: var(--navy-50); color: var(--navy); border: 2px solid var(--navy-100); font-weight: 700; display: flex; align-items: center; justify-content: center; letter-spacing: .02em; }
.helper-text { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.helper-text strong { color: var(--ink-strong); font-size: 1.05rem; }
.helper-text small { color: var(--muted); }
.chip-row { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip-row:empty { display: none; }
.helper-actions { display: flex; gap: .5rem; align-items: center; margin-left: auto; }
@media (max-width: 559px) { .helper-row.wrap-actions .helper-actions { width: 100%; padding-left: 3.6rem; } }
.search-row { display: flex; gap: .5rem; }
.search-row input[type=search] { flex: 1; }
.search-row .btn { min-width: 52px; }
.check-status { margin: .25rem 0 .75rem; }
.check-status .tag { font-size: .95rem; padding: .3rem .7rem; }
.attention-card { background: var(--orange-50); border-color: #F6C79E; margin-bottom: 1rem; }
.note-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.note-list li { border-top: 1px solid #D9D5F2; padding: .7rem 0 .3rem; }
.note-list p { margin: 0 0 .2rem; white-space: pre-line; }
.note-list small { display: block; color: #4B3F9A; }
.note-list .inline-form .btn { min-height: 36px; padding: .2rem .5rem; font-size: .9rem; }

/* ---------- New job form (session L3) ---------- */
/* Phones: one step per screen with Back and Next (public/js/app.js adds .wizard-on). Computers: every step, with a side panel. */
.job-form-grid { display: grid; gap: 1rem; }
.job-aside { display: none; }
@media (min-width: 960px) {
  .job-form-grid { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; }
  .job-aside { display: block; position: sticky; top: 84px; }
  .job-form-grid .match-inline, .job-form-grid .match-final { display: none; }
}
.job-aside .eyebrow { margin-bottom: .5rem; }
.step-links { margin: 1rem 0 0; padding-left: 1.4rem; display: grid; gap: .3rem; }
.step-links a { font-weight: 700; }
.form-section > h2:focus { outline: none; }

/* The live count of matching helpers. */
.match-count { display: flex; align-items: flex-start; gap: .65rem; margin: 0 0 1rem; padding: .75rem 1rem; background: var(--navy); color: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.match-count > .icon { width: 26px; height: 26px; flex-shrink: 0; margin-top: 2px; }
.match-count strong { display: block; font-size: 1.15rem; line-height: 1.25; }
.match-count small { display: block; color: var(--navy-100); margin-top: .15rem; }
.match-inline { position: sticky; top: 72px; z-index: 5; }
.match-side { margin: 0; }

/* "When?" */
.when-block { margin: 0 0 1rem; }
.when-block > h3 { font-size: 1.05rem; margin: .25rem 0 .35rem; }
.slot-row { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .6rem .8rem .1rem; margin: 0 0 .75rem; min-width: 0; }
.slot-row > legend { font-weight: 700; padding: 0 .35rem; color: var(--navy); }
.slot-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .75rem; }
.slot-fields .slot-day { grid-column: 1 / -1; }
.slot-fields .field { margin-bottom: .75rem; }
@media (min-width: 640px) { .slot-fields { grid-template-columns: 1.4fr 1fr 1fr; } .slot-fields .slot-day { grid-column: auto; } }
.slot-remove { margin: -.35rem 0 .45rem; min-height: 36px; padding: .2rem .4rem; }

/* Steps on a phone. */
.wizard-bar { position: sticky; top: 64px; z-index: 6; background: var(--bg); padding: .5rem 0 .6rem; margin: 0 0 .5rem; }
.wizard-bar p { margin: 0 0 .35rem; }
.wizard-bar progress { width: 100%; height: 10px; appearance: none; border: 0; border-radius: 999px; background: #E2E8EF; overflow: hidden; }
.wizard-bar progress::-webkit-progress-bar { background: #E2E8EF; border-radius: 999px; }
.wizard-bar progress::-webkit-progress-value { background: var(--orange); border-radius: 999px; }
.wizard-bar progress::-moz-progress-bar { background: var(--orange); border-radius: 999px; }
.wizard-nav { display: none; }
.wizard-on [data-step]:not(.is-current) { display: none; }
.wizard-on .wizard-nav { display: grid; gap: .5rem; margin: .5rem 0 1rem; }
.wizard-on .form-final .form-actions { margin-top: .5rem; }
/* The live count sticks just under the step bar. The page's script measures where the bar ends (its height changes with a
   title on two lines, or larger text); 146px is where it ends at the usual size, for a browser that can't measure. */
.wizard-on .match-inline { top: var(--wizard-bar-end, 146px); }
.step-error { background: var(--red-50); color: #8E1B12; border-left: 6px solid var(--red); border-radius: var(--radius-sm); padding: .65rem .85rem; font-weight: 700; }
.job-summary { margin: 0 0 1rem; }

/* A job's times, and the Leader's scheduler. */
.slot-list { margin: .25rem 0 .35rem; padding-left: 1.2rem; }
.pick-form { display: grid; gap: .45rem; }
.pick-crew { margin: .25rem 0 0; }
.pick-crew > legend { font-size: .98rem; }
.pick-crew .check-row { padding: .55rem .75rem; }
.pick-fixed { margin: .35rem 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.pick-fixed small { color: var(--muted); }
.pick-form .btn { justify-self: start; }
/* Room for "11:00 AM" and the clock icon in the time boxes on a phone. */
.slot-row { padding: .5rem .65rem .1rem; }
.slot-fields input[type=date], .slot-fields input[type=time] { padding-left: .55rem; padding-right: .4rem; }

/* ---------- Messages (session L4) ---------- */
.message-list { padding: 0 1rem; }
.message-main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.message-main small { overflow-wrap: anywhere; }
.bubble p + p { margin-top: .4rem; }
.bubbles + #latest + .card, .bubbles + #latest + .notice { margin-top: 1.25rem; }
#latest { display: block; scroll-margin-top: 90px; }
.message-head { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.filter-tabs + .list-gap, .filter-tabs + .notice, .filter-tabs + .empty { margin-top: 1rem; }

/* ---------- Events (session L5) ---------- */
.filter-tabs + .list-grid { margin-top: 1rem; }
.event-card { padding: 0; overflow: hidden; }
.event-photo { display: block; width: 100%; aspect-ratio: 16 / 7; object-fit: cover; background: #EEF1F4; }
.event-body { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.1rem; }
.event-main { flex: 1; min-width: 0; }
.event-main h3 { margin: .3rem 0 .3rem; font-size: 1.15rem; }
.event-main .meta { margin-bottom: .25rem; flex-wrap: nowrap; align-items: flex-start; }
.event-main .meta .icon-sm { flex-shrink: 0; margin-top: .2rem; }
.event-count { margin: 0; font-size: .95rem; }
.event-card.is-off h3 { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
/* A calendar page: the month over the day. */
.date-box { flex-shrink: 0; width: 56px; border-radius: 12px; overflow: hidden; border: 2px solid var(--purple); text-align: center; background: #fff; line-height: 1.1; }
.date-box small { display: block; background: var(--purple); color: #fff; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .2rem 0; }
.date-box b { display: block; font-size: 1.5rem; color: var(--ink-strong); padding: .2rem 0 .3rem; }
.date-box.off { border-color: var(--line-strong); }
.date-box.off small { background: var(--line-strong); }
.agenda-date.event { background: var(--purple); }
.agenda-count { display: inline-flex; align-items: center; gap: .3rem; }
.event-banner { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: #EEF1F4; margin: 0 0 1rem; }
.event-title { margin: .4rem 0 .25rem; }
.event-details { overflow-wrap: anywhere; }
.facts dd a { white-space: nowrap; }
.detail-grid > *, .detail-aside > * { min-width: 0; }
/* Going / Maybe / Can't come: three buttons in a row. The radio circle is hidden (still there for keyboards and screen readers). */
.rsvp-set .radio-set { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.rsvp-set .radio-card { position: relative; justify-content: center; align-items: center; text-align: center; min-height: 58px; padding: .55rem .35rem; }
.rsvp-set .radio-card input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.rsvp-set .radio-card strong { line-height: 1.2; }
.rsvp-set .radio-card:has(input:checked) strong::before { content: "✓ "; }
.rsvp-set .radio-card:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.rsvp-set + .field input[type=number] { max-width: 8rem; }
.headcount-note { margin: .75rem 0; }
#headcount .btn-stack { margin-top: .75rem; }
.people-head { display: flex; align-items: center; gap: .5rem; font-size: 1.02rem; margin: 1rem 0 .35rem; }
.people-head:first-of-type { margin-top: .5rem; }
.people-list { list-style: none; margin: 0; padding: 0; }
.people-list li { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .55rem 0; border-top: 1px solid var(--line); }
.people-list li:first-child { border-top: 0; }
.people-name { min-width: 0; overflow-wrap: anywhere; }
.event-when { display: grid; gap: 0 1rem; }
@media (min-width: 560px) { .event-when { grid-template-columns: 1.4fr 1fr 1fr; } }
.event-when input[type=date], .event-when input[type=time] { padding-left: .55rem; padding-right: .4rem; }
.event-form-photo { display: block; width: 100%; max-width: 320px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); margin: .25rem 0 .6rem; }
.event-form-photo + .check-row { margin-bottom: .6rem; }

/* ---------- Trusted vendors (session L6) ---------- */
.vendor-card h3 { margin: .45rem 0 .3rem; }
.vendor-card .meta { margin-bottom: .2rem; }
.vendor-card p:last-child { margin-bottom: 0; }
.attention-card { background: var(--orange-50); border-color: #F6C79E; }
.vendor-work { padding: .75rem 0; border-top: 1px solid var(--line); }
.vendor-work:first-of-type { border-top: 0; padding-top: .25rem; }
.vendor-work > p { margin: 0 0 .5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.attention-card .vendor-work > p { display: block; }
.rate-form { display: grid; gap: .25rem; }
.rate-form .btn { justify-self: start; }
.rating-set .radio-card { padding: .65rem .8rem; }
.row-list .section-tight, .section-tight { margin-top: .5rem; }
.cost-note { display: block; }
.row-list li > .disclosure { margin-top: .5rem; }
.row-list li > .inline-form { margin-top: .5rem; display: inline-block; }

/* ---------- Blocks in phone order, with a right-hand column on computers (orderedColumns in components.ts) ---------- */
/* Phones: one column, in the HTML's order, which is the order the blocks are listed (screen readers and Tab follow it).
   Computers: grid placement moves the side group to the right, from the top; the main blocks after it carry on down the
   left. Never reorder with `order` (audit 2026-10-31-2: it moves only the picture). */
.ocols { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.ocols-main, .ocols-side { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.ocols > div > div > :first-child { margin-top: 0; }
.ocols > div > div > .notice:last-child { margin-bottom: 0; }
@media (min-width: 960px) {
  /* Row 2 is flexible, so a tall side column adds its extra height there, not between the left-hand blocks. */
  .ocols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; gap: 0 1.25rem; }
  .ocols-main { grid-column: 1; grid-row: 1; }
  .ocols-main.ocols-after { grid-row: 2; margin-top: 1rem; }
  .ocols-side { grid-column: 2; grid-row: 1 / span 2; }
  .ocols-single { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; max-width: 760px; }
}

/* ---------- A job, as a helper sees it (session H2) ---------- */
.job-title { margin: .45rem 0 .3rem; }
/* Photos: an odd number puts the first one full width, so the rest pair up. */
.job-photos { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: 0 0 1rem; }
.job-photos > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.job-photos a { display: block; }
.job-photos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #EEF1F4; }
.job-photos > :first-child:nth-last-child(odd) img { aspect-ratio: 16 / 10; }
.job-report { margin: 0; }
.job-report a { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); }
/* The crew page: when, where and who. */
.crew-card { border: 2px solid #B5DEC8; }
.crew-flag { display: flex; align-items: center; gap: .5rem; margin: -1.1rem -1.15rem 0; padding: .8rem 1.15rem; background: var(--green-50); color: #0F5634; border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0; font-size: 1.2rem; }
.crew-flag .icon { color: var(--green); }
.crew-card .facts { gap: 1.1rem; }
.crew-card dd { overflow-wrap: anywhere; }
.crew-card dd a { white-space: normal; }
.crew-card dd .btn { white-space: nowrap; }
.crew-big { font-size: 1.15rem; color: var(--ink-strong); }
.crew-btns { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .55rem; }
.keep-lines { white-space: pre-line; }
.crew-times { margin-top: 1rem; padding-top: .85rem; border-top: 1px solid var(--line); }
.crew-times + .facts { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.crew-private { display: flex; gap: .4rem; align-items: flex-start; margin: 1.1rem 0 0; color: #2D2556; }
.crew-private .icon-sm { flex-shrink: 0; margin-top: .2rem; color: #4B3F9A; }
#crew-people .people-list li { align-items: center; }

/* ---------- A helper's Me page (session H3) ---------- */
.check-line { margin: .3rem 0 .45rem; }
.check-line .tag { font-size: .92rem; padding: .25rem .65rem; }
.see-list { margin: .25rem 0 .85rem; padding-left: 1.2rem; }
.see-list li + li { margin-top: .35rem; }
#what-leaders-see p:last-child { margin-bottom: 0; }
#my-jobs .row-list small { display: block; }
#verifications .btn-row { margin-bottom: .85rem; }
details.disclosure > summary > span { display: inline-flex; align-items: center; gap: .5rem; }

/* ---------- Helper home (session H1) ---------- */
.agenda-date.tbd { background: #EEF1F4; color: var(--muted); }
.agenda-date .icon { width: 22px; height: 22px; }
.home-note-title { font-size: 1.05rem; margin: .5rem 0 .25rem; }
.home-story { display: block; color: inherit; text-decoration: none; margin-top: .5rem; }
.home-story strong { display: block; color: var(--navy); text-decoration: underline; }
.home-story span { display: block; color: var(--muted); margin-top: .2rem; }
/* Videos (src/views/video.ts): the player, "Getting the video ready", and the upload on a Leader's form. */
.video { margin: .75rem 0 1rem; }
.video video { display: block; width: 100%; max-height: 70vh; aspect-ratio: 16 / 9; background: #10202E; border-radius: var(--radius-sm); }
.video figcaption { display: flex; align-items: center; gap: .35rem; margin-top: .35rem; }
.video-pending { display: flex; align-items: center; gap: .6rem; margin: .75rem 0 1rem; padding: .85rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius-sm); background: #F5F7F9; color: var(--muted); }
.video-pending p { margin: 0; }
.video-pending > .icon { flex-shrink: 0; color: var(--navy); }
.video-current { margin: 0 0 .75rem; }
.video-field input[type=file] { max-width: 100%; }
.video-progress { display: block; width: 100%; height: .75rem; margin: .5rem 0 0; accent-color: var(--navy); }
.video-status { margin: .4rem 0 0; }
.video-status:empty { display: none; }
.video-error, .photo-error { color: var(--red); font-weight: 600; }
.video-off { display: flex; align-items: center; gap: .35rem; }
/* Administration: the town search, and a removable tag for each town added (src/views/places.ts). */
.town-picker-row { display: flex; gap: .5rem; }
.town-picker-row input { flex: 1; min-width: 0; }
.town-message { margin: .4rem 0 0; color: var(--muted); }
.town-message:empty { display: none; }
.town-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 0; padding: 0; }
.town-chips li { display: inline-flex; align-items: center; gap: .15rem; padding: .2rem .2rem .2rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--navy-50); }
.town-chip-remove { border: 0; background: transparent; color: var(--navy); font-size: 1.25rem; line-height: 1; min-width: 36px; min-height: 36px; border-radius: 999px; cursor: pointer; }
.town-chip-remove:hover, .town-chip-remove:focus-visible { background: #fff; }
/* Administration: jumping to a form keeps its heading clear of the top bar. */
#add-community, #appoint, #privacy, #backups, #video, #concerns { scroll-margin-top: 90px; }
/* Community settings → Skills: the icon to pick for a new skill. */
.icon-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: .4rem; }
.icon-option { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-size: 1.5rem; cursor: pointer; }
.icon-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.icon-option:has(input:checked) { border: 2px solid var(--navy); background: var(--navy-50); }
.icon-option:has(input:focus-visible) { outline: 3px solid var(--amber, #F0A500); outline-offset: 2px; }
#skills, #towns { scroll-margin-top: 90px; }
/* Videos on forms: "Record a video" (phones) and "Choose a video". */
.video-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.video-pick-btn { cursor: pointer; }
.video-pick-btn:focus-within { outline: 3px solid var(--navy); outline-offset: 2px; }
.video-field > legend { display: block; font-weight: 700; font-size: 1.05rem; margin-bottom: .35rem; color: var(--ink-strong); padding: 0; }
/* The job form's closed "More details" sections. */
.form-more { margin: .25rem 0 1rem; }
.job-checks .check-row { margin-bottom: .25rem; }

/* The job form, kept short (John, 2026-11-05): kinds of help in two columns on a phone, one line saying who sees a step. */
.job-form .notice { padding: .6rem .8rem; font-size: .98rem; line-height: 1.35; }
.job-form textarea[name=private_notes], .job-form textarea[name=materials] { min-height: 76px; }
.job-form .chip-set .chip-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
@media (min-width: 720px) { .job-form .chip-set .chip-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* The icon flows with the words, so on a narrow phone the word moves under it instead of breaking in the middle (a word breaks only if it can't fit a whole line). */
.job-form .chip-check { display: flex; border-radius: var(--radius-sm); padding: .25rem .3rem; gap: .25rem; font-size: .9rem; line-height: 1.15; min-width: 0; }
.job-form .chip-check input[type=checkbox] { width: 20px; height: 20px; }
.job-form .chip-check > span { display: block; min-width: 0; overflow-wrap: break-word; }
/* Too narrow for two columns of words like "Technology". */
@media (max-width: 339px) { .job-form .chip-set .chip-options { grid-template-columns: minmax(0, 1fr); } }
.crew-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .75rem; }
.field-title { display: block; font-weight: 700; font-size: 1.05rem; margin: 0 0 .35rem; color: var(--ink-strong); }
.job-media-note { margin: -.6rem 0 1rem; }
[data-photo-count]:empty { display: none; }
[data-photo-count] { margin: .35rem 0 0; }
.town-set { display: flex; align-items: center; gap: .5rem; margin: 0 0 1.1rem; }
.town-set > .icon { color: var(--navy); flex-shrink: 0; }
.town-set strong { display: block; line-height: 1.25; color: var(--ink-strong); }
.town-set small { display: block; color: var(--muted); line-height: 1.2; }
.link-button { margin-left: auto; font: inherit; font-weight: 700; color: var(--navy); background: none; border: 0; text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 .3rem; cursor: pointer; }
.match-count small:empty { display: none; }
.match-inline.match-none, .wizard-on .match-inline.match-none { position: static; }
.match-add { display: block; margin-top: .5rem; background: #fff; color: var(--navy); border: 0; border-radius: 10px; min-height: 44px; padding: .25rem .8rem; font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; }
.match-add:focus-visible { outline-color: var(--orange); }
.job-summary h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.job-summary .kv div { grid-template-columns: 5.5rem minmax(0, 1fr); gap: .5rem; }
.sum-warn { color: var(--amber-ink); background: var(--amber-50); border-radius: 8px; padding: .1rem .4rem; }
.wizard-on .btn-cancel { display: none; }
@media (max-width: 959px) { .job-back { display: none; } }
.see-who .people-list { margin: 0; }
.test-tool { margin: .75rem 0; display: grid; gap: .35rem; justify-items: start; }
.test-tool p { margin: 0; }
/* The address drop-down (New job, step 1). */
.address-box { position: relative; margin: 0 0 1.1rem; }
.address-box .field { margin-bottom: 0; }
.address-box input[name=street_address] { scroll-margin-top: 9.5rem; }
.address-off { margin: .35rem 0 0; }
.address-message { margin: .4rem 0 0; }
.address-message:empty { display: none; }
.address-pop { position: absolute; left: 0; right: 0; z-index: 20; margin-top: .25rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(7, 59, 104, .18); padding: .25rem; }
.address-pop ul { list-style: none; margin: 0; padding: 0; }
.address-opt { padding: .45rem .65rem; border-radius: 8px; cursor: pointer; line-height: 1.25; min-height: 48px; }
.address-opt:hover, .address-opt.is-active { background: var(--navy-50); }
.address-opt strong { display: block; color: var(--ink-strong); }
.address-opt small { display: block; color: var(--muted); }
.address-opt.address-typed { display: flex; align-items: center; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: .15rem; color: var(--navy); font-weight: 700; }
.address-none { margin: 0; padding: .45rem .65rem; color: var(--muted); font-size: .95rem; }
/* Google's rule for its name beside its suggestions: this text, on one line, in this gray, at 12 to 16 points. */
.address-credit { margin: 0; padding: .2rem .65rem .1rem; text-align: right; font-family: Roboto, var(--font); font-style: normal; font-weight: 400; font-size: .75rem; letter-spacing: normal; white-space: nowrap; color: #5E5E5E; }

/* A job's costs (views/pages/costs.ts). */
.cost-list { list-style: none; margin: .75rem 0 0; padding: 0; }
.cost-line { padding: .8rem 0; border-top: 1px solid var(--line); }
.cost-line:first-child { border-top: 0; }
.cost-cards .cost-line { border-top: 1px solid var(--line); padding: 1rem; margin-top: .75rem; }
.cost-cards .cost-line:first-child { margin-top: 0; }
.cost-head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }
.cost-head strong { overflow-wrap: anywhere; }
.cost-amount { font-weight: 700; white-space: nowrap; }
.cost-line > p { margin: .3rem 0 0; }
.cost-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
.cost-line > .inline-form { margin-top: .75rem; }
.cost-filters { margin-top: 1.25rem; }
.cost-total { margin: .75rem 0 0; }
.cost-glance .stat:first-child { grid-column: 1 / -1; }
.cost-glance .cost-num { font-size: 1.5rem; overflow-wrap: anywhere; }
@media (min-width: 720px) { .cost-glance { grid-template-columns: repeat(3, 1fr); } .cost-glance .stat:first-child { grid-column: auto; } }

/* "Complete job" (John, 2026-11-11): a green button that opens to who helped (an ✕ takes off anyone who didn't come) and
   one hours box. Once the job's day has passed it starts open, and its button reads as the heading. */
details.complete-box > summary { list-style: none; cursor: pointer; }
details.complete-box > summary::-webkit-details-marker { display: none; }
details.complete-box[open] > summary { background: transparent; color: var(--ink-strong); border-color: transparent; justify-content: flex-start; padding-left: 0; padding-right: 0; font-size: 1.1rem; cursor: default; pointer-events: none; }
.complete-form { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; background: var(--surface); }
.complete-form fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.complete-form legend { font-weight: 700; padding: 0; }
.who-list { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .5rem; }
.who-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 48px; padding: .5rem .5rem .5rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; }
.who-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.who-x { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 .6rem; border-radius: 999px; color: var(--muted); font-weight: 700; }
.who-x::before { content: "✕"; font-size: 1.05rem; }
.who-row:hover .who-x { background: var(--red-50); color: var(--red); }
.who-check:not(:checked) ~ .who-name { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.who-check:not(:checked) ~ .who-name::after { content: "Didn’t come"; display: inline-block; width: 100%; font-size: .9rem; font-weight: 600; color: var(--red); }
.who-check:not(:checked) ~ .who-x::before { content: "Undo"; font-size: .95rem; color: var(--navy); }
.who-check:not(:checked) ~ .who-x { background: transparent; }
.who-row:has(.who-check:not(:checked)) { background: var(--bg); border-style: dashed; }
.who-check:focus-visible ~ .who-x { outline: 3px solid var(--orange); outline-offset: 2px; }
.hours-input { max-width: 8rem; }

/* A success story: one card with the title, the story, photos and a video (John, 2026-11-11). */
.story-form .notice { padding: .6rem .8rem; font-size: .98rem; line-height: 1.35; }
/* The crew a story lists ("Crew: Tom N., Grace K."), and the form's note saying who it will be (John, 2026-11-11). */
.story-crew, .story-crew-note { display: flex; align-items: flex-start; gap: .5rem; }
.story-crew { margin: 1rem 0; padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--navy-50); color: var(--ink); }
.story-crew .icon, .story-crew-note .icon { flex: none; margin-top: .15rem; }

/* A phone's Menu (John, 2026-11-11): the computer's side menu as a page, the same items, names and counts. */
.menu-nav { display: flex; flex-direction: column; gap: .15rem; padding: .25rem 0 1rem; }
.menu-nav .side-link { min-height: 54px; font-size: 1.05rem; background: var(--surface); border: 1px solid var(--line); }
.menu-nav .side-link + .side-link { margin-top: .35rem; }
.menu-nav .side-head { margin-top: 1.25rem; }

/* An event's Where (John, 2026-11-11): the place people know, then its address with the job form's drop-down. */
.event-where { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .75rem .9rem .25rem; }
.event-where > .hint { margin-top: -.15rem; }
.event-where .field { margin-bottom: .9rem; }
.event-where .address-box { margin-bottom: .75rem; }

/* From a Leader's own job spreadsheet (John, 2026-11-13). */
/* Work notes: what was done, and on which day, oldest first like a log. */
.work-notes { list-style: none; margin: .5rem 0 .75rem; padding: 0; }
.work-notes > li { padding: .7rem 0; border-top: 1px solid var(--line); }
.work-notes > li:first-child { border-top: 0; }
.work-note-head { margin: 0 0 .2rem; }
/* Each note's Edit: a small link, not a box, so a long log stays easy to read. Open, it's a box like the others. */
.work-notes details.note-edit { border-color: transparent; background: transparent; margin-top: .1rem; }
.work-notes details.note-edit > summary { display: inline-flex; justify-content: flex-start; min-height: 44px; padding: .2rem 0; font-size: .92rem; }
.work-notes details.note-edit > summary::after { content: none; }
.work-notes details.note-edit[open] { border-color: var(--line); background: #fff; }
.work-notes details.note-edit[open] > summary { padding: .2rem 1rem; }
/* Their feedback: three choices in a row, like an event's Going / Maybe / Can't come. */
.feedback-set .radio-set > .hint { grid-column: 1 / -1; margin-top: -.2rem; }
.feedback-set .radio-card strong { font-size: .95rem; }
/* "How did <vendor> do?" on Complete job (John, 2026-11-13): the four ratings two by two, like "Their feedback" above it. */
.vendor-rate-set .radio-set { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.vendor-rate-set .radio-set > .hint { grid-column: 1 / -1; margin-top: -.2rem; }
.vendor-rate-set .radio-card strong { font-size: .95rem; }
/* On most phones the Complete job form is too narrow for these in a row: they stack, so no word runs over its box. */
@media (max-width: 399px) { .feedback-set .radio-set, .vendor-rate-set .radio-set { grid-template-columns: minmax(0, 1fr); } }
.feedback-words { margin: .25rem 0 .6rem; padding: .6rem .85rem; border-left: 4px solid var(--navy-100); background: var(--navy-50); border-radius: var(--radius-sm); font-style: italic; }
.after-job .people-head { margin-top: 1rem; }
.after-job .people-head:first-of-type { margin-top: .5rem; }
.check-back-due { padding: .5rem .75rem; background: var(--orange-50); border-radius: var(--radius-sm); }
.complete-form .check-back-more { margin: 0 0 1rem; }
.hours-total { margin: .4rem 0 0; font-weight: 600; color: var(--navy); }
.hours-total:empty { display: none; }
/* Helped before? under the phone number on the New job form. */
.helped-before { margin: -.25rem 0 1rem; padding: .7rem .85rem; background: var(--navy-50); border-left: 4px solid var(--orange); border-radius: var(--radius-sm); }
.helped-before > p:first-child { display: flex; gap: .5rem; align-items: flex-start; margin: 0 0 .5rem; }
.helped-before > p:first-child .icon { flex: none; margin-top: 2px; color: var(--navy); }
.helped-before .helped-detail { display: block; }
.helped-before [data-helped-done]:empty { display: none; }
.helped-before [data-helped-done] { margin: .4rem 0 0; }
/* "Sent to us by": the new partner's name sits right under the list. */
.partner-new { margin-top: .6rem; }
.partner-new .field { margin-bottom: 0; }
.partner-rename { margin-top: .35rem; }
/* "Download spreadsheet" under a list's tabs (John, 2026-11-13). */
.download-row { margin: .5rem 0 0; }
.download-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; min-height: 44px; }
/* Trusted vendors (John, 2026-11-13): "Works in" beside the profession tabs, the phone and a Call button on each card, and the
   towns they serve as tick boxes in two columns. */
.filter-row.vendor-filter { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
@media (min-width: 720px) { .filter-row.vendor-filter { grid-template-columns: minmax(0, 18rem) auto; justify-content: start; } }
.vendor-card .vendor-call { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .75rem; margin: .65rem 0 0; padding-top: .65rem; border-top: 1px solid var(--line); }
.vendor-card .vendor-call a:not(.btn) { color: inherit; font-weight: 600; }
.vendor-towns .vendor-town-list { margin-top: .6rem; }
.vendor-towns .vendor-town-list .hint { margin: 0 0 .4rem; }
.vendor-towns .chip-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.vendor-towns .chip-check { display: flex; border-radius: var(--radius-sm); padding: .4rem .6rem; gap: .5rem; min-height: 46px; min-width: 0; }
.vendor-towns .chip-check > span { min-width: 0; overflow-wrap: break-word; }

/* Get the app (/app, getAppPage in views/pages/public.ts; John, 2026-11-19): a store listing's icon and name, then one
   action for the device in hand. */
.app-listing { display: flex; align-items: center; gap: 1rem; margin: .5rem 0 1.25rem; }
.app-listing h1 { margin: 0; }
.app-listing .lead { margin: .25rem 0 0; }
.app-icon { flex: none; width: 72px; height: 72px; border-radius: 18px; box-shadow: var(--shadow); }
.get-app > .card > h2, .get-app-teaser > h2 { display: flex; align-items: center; gap: .5rem; }
.get-app > .card > h2 .icon, .get-app-teaser > h2 .icon { width: 24px; height: 24px; color: var(--navy); flex: none; }
.btn-install { min-height: 56px; font-size: 1.15rem; }
.app-steps h2 { font-size: 1.1rem; margin: 1rem 0 .25rem; }
.btn-install[hidden] + .app-steps h2, .app-steps:first-child h2 { margin-top: 0; }
.steps .icon-inline { width: 1.2em; height: 1.2em; vertical-align: -.25em; color: var(--navy); }
.qr-row { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-bottom: 1rem; }
.qr-row .steps { flex: 1 1 14rem; margin: 0; }
.qr-box { flex: none; width: 12rem; padding: .5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.qr-box svg { display: block; width: 100%; height: auto; }
/* The bar on a helper's home page (appBar in views/components.ts). */
.app-bar { display: flex; align-items: center; gap: .75rem; margin: 0 0 1rem; padding: .6rem .5rem .6rem .75rem; background: var(--navy-50); border: 1px solid var(--navy-100); border-radius: var(--radius-sm); }
.app-bar-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; }
.app-bar p { flex: 1 1 auto; min-width: 0; margin: 0; line-height: 1.3; }
.app-bar p small { display: block; color: var(--muted); }
.app-bar-close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.app-bar-close:hover { background: var(--navy-100); color: var(--ink); }
.app-bar-close .icon { width: 20px; height: 20px; }
[data-app-message]:empty { display: none; }
/* Inside the installed app, the links to get it hide before the script runs, where the browser knows display-mode, and Get
   the app says "You're using the app" (audit 2026-11-19; app.js does the same for older iPhones). */
@media (display-mode: standalone) {
  [data-not-in-app], [data-app-for], [data-app-bar] { display: none !important; }
  [data-app-done][hidden] { display: block !important; }
}

/* The Community board (2026-11-29): a post's card has its first photo beside its words. */
.board-card { padding: 0; overflow: hidden; }
.board-link { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.1rem; }
.board-thumb { flex: none; width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #EEF1F4; }
.board-main { flex: 1; min-width: 0; }
.board-main h3 { margin: .3rem 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.board-main .meta { margin-bottom: .2rem; }
.board-title { margin: .4rem 0 .3rem; overflow-wrap: anywhere; }
.board-body { margin-top: .75rem; overflow-wrap: anywhere; }
.board-reply-body p { margin: .2rem 0; overflow-wrap: anywhere; }
.board-reply .inline-form { display: inline-block; margin-top: .3rem; }
.board-reply .inline-form .btn { min-height: 36px; padding: .2rem .6rem; font-size: .9rem; }
.board-alerts h2 { display: flex; align-items: center; gap: .4rem; font-size: 1.05rem; }
.list-grid + .board-alerts, .empty + .board-alerts { margin-top: 1.25rem; }
