:root {
  /* CAMRA brand colours (from the brand guide), used throughout. Shades for text and tints for backgrounds are
     mixed from these, so everything stays on-brand and readable. */
  --camra-amber: #f9b13c; --camra-aqua: #00b3c4; --camra-slate: #41495a; --camra-tango: #eb5b25;
  --camra-lilac: #9d4a96; --camra-blue: #5b6fb3; --camra-emerald: #60bb9b; --camra-watermelon: #e8335e;
  --deep-blue: color-mix(in srgb, var(--camra-blue) 62%, #000); --tint-blue: color-mix(in srgb, var(--camra-blue) 14%, #fff);
  --deep-amber: color-mix(in srgb, var(--camra-amber) 45%, #000); --tint-amber: color-mix(in srgb, var(--camra-amber) 18%, #fff);
  --deep-emerald: color-mix(in srgb, var(--camra-emerald) 45%, #000); --tint-emerald: color-mix(in srgb, var(--camra-emerald) 16%, #fff);
  --deep-watermelon: color-mix(in srgb, var(--camra-watermelon) 62%, #000); --tint-watermelon: color-mix(in srgb, var(--camra-watermelon) 12%, #fff);
  --ink: #1d1d1f;
  --muted: #6b6b70;
  --line: #dcdce0;
  --soft: #f4f4f6;
  --panel: #ffffff;
  --bg: #f2f2f4;
  --focus: var(--camra-blue);
  --focus-glow: rgba(91, 111, 179, .35);
  --link: var(--camra-blue);
  --danger: color-mix(in srgb, var(--camra-watermelon) 80%, #000);
  /* Arboria sits low in its line box (ascent 1.02em, descent 0.18em), so padding is shifted up by this much */
  --up: .095em;
  /* Area colours: the brand colours, plus a grey */
  --c-black: var(--camra-slate); --c-purple: var(--camra-lilac); --c-red: var(--camra-watermelon); --c-yellow: var(--camra-amber);
  --c-grey: #a7a7ad; --c-orange: var(--camra-tango); --c-green: var(--camra-emerald); --c-blue: var(--camra-blue); --c-aqua: var(--camra-aqua);
  /* Parts of the day, as on the old staffing form: one grey for the times the festival isn't open */
  --k-setup: #c7c9d1; --k-preview: var(--camra-emerald); --k-open: var(--camra-amber); --k-most: var(--camra-tango);
  --k-shutdown: #c7c9d1; --k-takedown: #c7c9d1; --k-other: #e4e4e8;
  font-family: arboria, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 0 20px; min-height: 56px; background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; /* above the shift key and work table headings as the form scrolls */
}
.topbar h1 { font-size: 16px; font-weight: 700; margin: 0; white-space: nowrap; }
.topbar .spacer { flex: 1; }
.festival-select {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; max-width: 320px;
  padding: calc(6px - var(--up)) 8px calc(6px + var(--up));
}
.tabs { display: flex; align-self: stretch; margin-left: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button {
  display: flex; align-items: center; background: none; border: none; border-bottom: 2px solid transparent;
  padding: calc(2px - var(--up)) 12px calc(2 * var(--up)); color: var(--muted); font-weight: 700; font-size: 14px;
  cursor: pointer; white-space: nowrap;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.save-status { font-size: 13px; color: var(--muted); }
.save-status.error { color: var(--danger); font-weight: 700; }
.topbar .user { color: var(--muted); font-size: 14px; }
.topbar .user a { color: var(--ink); margin-left: 6px; }
@media (max-width: 720px) {
  .topbar { padding: 8px 16px 0; gap: 10px; position: static; }
  .topbar .spacer { display: none; }
  .tabs { order: 10; width: 100%; margin: 0 -10px; min-height: 44px; }
  .tabs button { flex: 1 0 auto; justify-content: center; }
}

/* ---------- Messages ---------- */
.alert {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 20px; background: var(--tint-watermelon); color: var(--deep-watermelon); font-size: 14px;
}
.alert.info { background: var(--tint-blue); color: var(--deep-blue); }
.view-only { grid-column: 1 / -1; margin: 0; padding: 10px 14px; background: var(--tint-amber); color: var(--deep-amber); border-radius: 10px; font-size: 14px; }

/* ---------- Layout ---------- */
.app { max-width: 1240px; margin: 0 auto; padding: 24px; }
.app.single { max-width: 860px; }
.app.settings { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; align-items: start; }
.sidebar { position: sticky; top: 80px; display: grid; gap: 2px; }
.side-item {
  display: block; width: 100%; text-align: left; border: none; background: none; border-radius: 8px;
  cursor: pointer; font-size: 14px; padding: calc(8px - var(--up)) 12px calc(8px + var(--up));
}
.side-item:hover { background: #e9e9ee; }
.side-item[aria-current="true"] { background: #fff; font-weight: 700; box-shadow: 0 0 0 1px var(--line); }
.panel { border: none; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.panel h1, .app.single > h1 { font-size: 22px; margin: 0; }
.intro { margin: -6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; max-width: 760px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.app.single .card { margin-top: 18px; }
.card h2 { font-size: 15px; margin: 0 0 12px; font-weight: 700; }
.card h3 { font-size: 13px; margin: 0 0 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.card > p:first-child, .card > .help:first-child { margin-top: 0; }
@media (max-width: 860px) {
  .app { padding: 16px; }
  .app.settings { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sidebar { position: static; display: flex; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .side-item { white-space: nowrap; width: auto; }
}

/* ---------- Fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field > .label { font-size: 14px; font-weight: 700; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=time], textarea, select {
  min-width: 0; border: 1px solid #cfcfd5; border-radius: 8px; background: #fff;
  padding: calc(8px - var(--up)) 10px calc(8px + var(--up));
}
.field input, .field textarea, .field select { width: 100%; }
textarea { resize: vertical; line-height: 1.4; width: 100%; }
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible {
  outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-glow);
}
fieldset:disabled input, fieldset:disabled textarea, fieldset:disabled select { background: var(--soft); color: var(--ink); }
fieldset:disabled button, fieldset:disabled .tools { display: none; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.row.end { align-items: end; }
.row .field { margin-bottom: 0; }
.help { font-size: 13px; color: var(--muted); line-height: 1.4; }
/* A question's explanation (formatted, so it can have links) looks like any other note under a question */
.help.prose p, .help.prose li, body.form-page .help.prose p, body.form-page .help.prose li { font-size: inherit; line-height: inherit; margin-bottom: 4px; }
.help.prose > :last-child { margin-bottom: 0; }
.signup-form .help.prose { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; cursor: pointer; }
.check input { margin: 0; width: 16px; height: 16px; }
.prefixed { display: flex; align-items: stretch; }
.prefixed .prefix {
  display: flex; align-items: center; padding: 0 0 0 10px; border: 1px solid #cfcfd5; border-right: none;
  border-radius: 8px 0 0 8px; background: var(--soft); color: var(--muted); font-size: 13px; white-space: nowrap;
}
.prefixed input { border-radius: 0 8px 8px 0; }
.spaced { margin-top: 14px; }
code { font-size: 13px; background: var(--soft); padding: 1px 5px; border-radius: 4px; }

/* Rows of controls */
.rows { display: grid; gap: 8px; margin-bottom: 10px; }
.line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.line.wrap { flex-wrap: wrap; gap: 8px 18px; }
.line .grow { flex: 1 1 160px; min-width: 0; }
.line input[type=time] { width: 96px; flex: none; }
.tools { display: inline-flex; gap: 2px; flex: none; }
.icon {
  width: 30px; height: 30px; border: none; border-radius: 50%; background: none; color: var(--muted);
  cursor: pointer; font-size: 15px; line-height: 1; padding: 0 0 calc(2 * var(--up)); flex: none;
}
.icon:hover { background: var(--soft); color: var(--ink); }
.icon.danger:hover { color: var(--danger); }
.btn {
  border-radius: 999px; padding: calc(9px - var(--up)) 18px calc(9px + var(--up));
  border: 1px solid #c4c4cb; background: #fff; cursor: pointer; font-weight: 700; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn.small { padding: calc(5px - var(--up)) 12px calc(5px + var(--up)); font-size: 14px; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.linkish { background: none; border: none; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; font-size: 14px; }
.linkish.danger { color: var(--danger); }
select.small { padding: calc(4px - var(--up)) 6px calc(4px + var(--up)); font-size: 13px; }
.tag { font-size: 12px; background: #e6e6ea; border-radius: 999px; padding: 1px 8px; margin-left: 6px; }

/* Chips for picking roles */
.role-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--soft);
  border-radius: 999px; padding: calc(3px - var(--up)) 4px calc(3px + var(--up)) 10px; font-size: 13px;
}
.chip-x { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 15px; line-height: 1; padding: 0 4px; border-radius: 50%; }
.chip-x:hover { color: var(--danger); }
.role-picker select { font-size: 13px; padding: calc(4px - var(--up)) 6px calc(4px + var(--up)); color: var(--muted); max-width: 240px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-block; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.c-black { --sw: var(--c-black); } .c-purple { --sw: var(--c-purple); } .c-red { --sw: var(--c-red); } .c-yellow { --sw: var(--c-yellow); }
.c-grey { --sw: var(--c-grey); } .c-orange { --sw: var(--c-orange); } .c-green { --sw: var(--c-green); } .c-blue { --sw: var(--c-blue); }
.c-aqua { --sw: var(--c-aqua); }

/* ---------- Days and shifts ---------- */
.day-list { display: grid; gap: 18px; }
.day-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.day-head h2 { margin: 0; flex: 1; }
.day-cols { display: grid; gap: 16px; margin-top: 14px; }
.day-cols .line { gap: 6px; }
.day-cols .line select { width: 108px; flex: none; }
.day-cols .tools .icon { width: 26px; }
.line.shift .grow { flex: 1 1 200px; }
@media (max-width: 720px) {
  .day-cols .line { flex-wrap: wrap; }
  .day-cols .line select { flex: 1 1 100px; }
  .area-head { flex-wrap: wrap; }
}

.timeline { position: relative; background: var(--soft); border-radius: 8px; overflow: hidden; min-height: 60px; }
.timeline .hour {
  position: absolute; bottom: 0; transform: translateX(-50%); font-size: 10px; color: var(--muted);
  padding-bottom: 1px;
}
.timeline .hour::before { content: ""; position: absolute; left: 50%; bottom: 13px; width: 1px; height: 400px; background: rgba(0,0,0,.06); }
.timeline .bar {
  position: absolute; height: 18px; border-radius: 4px; font-size: 11px; line-height: 18px; padding: 0 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.timeline .period { top: 4px; border-radius: 4px; color: #333; font-weight: 700; }
.timeline .shift.most { box-shadow: inset 4px 0 0 var(--k-most); padding-left: 7px; }
.timeline .shift { background: #fff; border: 1px solid #b9b9c0; line-height: 16px; }
.timeline .shift.off { border-style: dashed; color: var(--muted); }
.k-setup { background: var(--k-setup); } .k-preview { background: var(--k-preview); } .k-open { background: var(--k-open); }
.k-shutdown { background: var(--k-shutdown); } .k-takedown { background: var(--k-takedown); }
.k-other { background: var(--k-other); }

/* ---------- Areas and roles ---------- */
.area-list { display: grid; gap: 18px; }
.area-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.area-head .area-name { flex: 1; font-weight: 700; font-size: 16px; }
.area-head .swatch { width: 18px; height: 18px; }
.role-list { display: grid; gap: 4px; margin-bottom: 10px; }
.role { border-radius: 8px; }
.role.open { background: var(--soft); padding-bottom: 12px; }
.role .line { padding: 2px 4px; flex-wrap: wrap; }
.role-details { padding: 8px 12px 0 42px; }

/* ---------- Sign-up form ---------- */
.choice { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.choice:first-child { border-top: none; padding-top: 0; }
.questions { display: grid; gap: 12px; margin-bottom: 12px; }
.question { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.question .field { margin-bottom: 0; }
.q-options { display: grid; gap: 8px; }
.q-options:empty { display: none; }

/* ---------- People needed ---------- */
.table-scroll { overflow: auto; max-height: calc(100vh - 170px); background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table.targets { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.targets th, .targets td { padding: 0; border-bottom: 1px solid #ececf0; }
.targets thead th { position: sticky; top: 0; background: #fff; z-index: 2; font-weight: 700; padding: 6px 2px; text-align: center; }
.targets thead tr:nth-child(2) th { top: 29px; font-weight: 400; color: var(--muted); font-size: 11px; line-height: 1.2; }
.targets tbody th, .targets tfoot th, .targets .corner {
  position: sticky; left: 0; background: #fff; z-index: 1; text-align: left; padding: 4px 12px 4px 10px;
  white-space: nowrap; font-weight: 400; border-right: 1px solid var(--line);
}
.targets .corner { z-index: 3; }
.targets .area-row th { font-weight: 700; background: var(--soft); display: table-cell; padding-top: 8px; }
.targets .area-row .swatch { margin-right: 6px; vertical-align: -2px; }
.targets td input {
  width: 38px; border: none; border-radius: 0; text-align: center; padding: 6px 0; background: none;
  -moz-appearance: textfield;
}
.targets td input::-webkit-outer-spin-button, .targets td input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.targets td input:focus-visible { background: var(--tint-blue); box-shadow: inset 0 0 0 2px var(--focus); }
.targets td:hover { background: #fafafb; }
.targets .day-start { border-left: 2px solid var(--line); }
.targets tfoot th, .targets tfoot td { position: sticky; bottom: 0; background: #fff; font-weight: 700; border-top: 1px solid var(--line); }
.targets .total { text-align: center; padding: 6px 0; }

/* ---------- Access and festivals ---------- */
.add-staff { margin-top: 14px; flex-wrap: wrap; }
.add-staff input { flex: 1 1 180px; }
.line.staff { padding: 6px 0; border-bottom: 1px solid var(--line); }
.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: 14px; max-height: 420px; overflow: auto; }
.history .when { color: var(--muted); font-size: 13px; }
.app.single form.line input { flex: 1 1 200px; }
.app.single .rows .line { padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- Login and "not set up" page ---------- */
.gate { max-width: 520px; margin: 48px auto; padding: 0 16px; }
.gate .card { padding: 28px; }
.gate .gate-title { font-size: 22px; margin: 0 0 12px; }
.gate p { line-height: 1.5; }
.gate .btn { display: inline-block; text-decoration: none; }
.gate-number { font-size: 28px; font-weight: 900; letter-spacing: .05em; }

/* ---------- Shared bits for the volunteer screens ---------- */
:root {
  /* Status (coverage) and answer colours. Values are always shown as text beside them. */
  --good: var(--camra-emerald); --warning: var(--camra-amber); --critical: var(--camra-watermelon); --track: #e9e9ee;
  --yes: var(--camra-emerald); --maybe: var(--camra-amber); --no: var(--camra-watermelon); --bar: var(--camra-blue);
}
.prose p { margin: 0 0 10px; line-height: 1.5; }
.prose ul { margin: 0 0 10px; padding-left: 22px; line-height: 1.5; }
.prose > :last-child { margin-bottom: 0; }
.prose a, .public a { color: var(--link); }
.error-text { display: block; color: var(--danger); font-size: 14px; font-weight: 700; margin-top: 6px; }
.error-text[hidden] { display: none; }
.optional { font-weight: 400; color: var(--muted); }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
details > summary { cursor: pointer; font-weight: 700; padding: 4px 0; }
details[open] > summary { margin-bottom: 8px; }
.tag.new { background: var(--tint-blue); color: var(--deep-blue); }
.tag.changed { background: var(--tint-amber); color: var(--deep-amber); }
.tag.note { background: var(--tint-watermelon); color: var(--deep-watermelon); margin: 0 0 0 6px; padding: 1px 8px; font-size: 12px; border-radius: 999px; }

/* ---------- Public pages ---------- */
.public-page .topbar h1 a { color: inherit; text-decoration: none; }
.topbar-link { color: var(--ink); font-size: 14px; font-weight: 700; }
main.public { max-width: 760px; margin: 0 auto; padding: 24px 16px 60px; display: flex; flex-direction: column; gap: 16px; }
.page-title { font-size: 28px; margin: 4px 0 0; line-height: 1.15; }
.form-head .help { margin: 6px 0 0; }
.section-title { font-size: 18px; margin: 12px 0 0; }
.form-list { display: grid; gap: 12px; }
.festival-card h2 { font-size: 18px; margin-bottom: 4px; }
.festival-card .btn, .public .btn { display: inline-block; text-decoration: none; }
.public a.btn.primary { color: #fff; }
.note { margin: 12px 0 0; padding: 10px 14px; background: var(--soft); border-radius: 10px; font-size: 14px; }
.card > .note:first-child { margin-top: 0; }
.btn.big { font-size: 17px; padding: calc(12px - var(--up)) 28px calc(12px + var(--up)); }
.send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.footer-note { text-align: center; }
.link-form input { flex: 1 1 220px; }
.status-line { padding: 10px 14px; border-radius: 10px; background: var(--tint-emerald); color: var(--deep-emerald); margin: 12px 0; }
.status-line.s-spare { background: var(--tint-amber); color: var(--deep-amber); }
.status-line.s-not_required, .status-line.s-withdrawn { background: var(--soft); color: var(--ink); }
.signup-card h2.big { font-size: 20px; margin-bottom: 2px; }
.signup-card h3 { margin-top: 16px; }
.offered { margin: 0 0 8px; padding-left: 20px; line-height: 1.6; }
.actions { margin: 14px 0; }
.signup-card details { border-top: 1px solid var(--line); padding: 8px 0; }
.what-you-told-us { border: none !important; width: 100%; }

/* ---------- The form ---------- */
.signup-form { border: none; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.signup-form .card h2 { font-size: 18px; }

.signup-form input.short, .signup-form select.short { max-width: 200px; }
/* Options one to a line, as on the old form: easier to scan and to tap */
.signup-form .choices { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.signup-form .check { white-space: normal; align-items: flex-start; line-height: 1.35; }
.signup-form .check input { margin-top: 2px; flex: none; }
.check.wrap { white-space: normal; align-items: flex-start; }
.check.wrap input { margin-top: 2px; }
.tick-list { display: grid; gap: 8px; }
.other-text { margin-top: 8px; max-width: 360px; }
.agree { margin-top: 12px; font-weight: 700; flex-wrap: wrap; }
.agree .error-text, .check .error-text { flex-basis: 100%; }
.signup-form .row { align-items: end; }
.invalid { border-radius: 8px; box-shadow: 0 0 0 2px var(--danger); padding: 8px; }
.signup-form:disabled input, .signup-form:disabled textarea, .signup-form:disabled select { background: var(--soft); }
/* Form layout: one rhythm throughout the form. A section is its heading, its wording, then its questions; a question
   is its label in bold, then the answers, then its help in grey just beneath them (as on the old form). The gaps,
   smallest to largest: answers to help 6px, between options (and an Other box) 10px, label to the answers 12px,
   between the parts of a section 28px, and between sections 48px on the volunteers' page. (The cream panels keep their own reading layout.) */
.signup-form { --gap-help: 6px; --gap-answers: 12px; --gap-part: 28px; }
.signup-form .card { padding: 20px; }
.signup-form .card:not(.working) > * { margin-top: 0; margin-bottom: 0; }
.signup-form .card:not(.working) > * + * { margin-top: var(--gap-part); }
.signup-form .card:not(.working) > h2 { margin-bottom: 16px; }
.signup-form .card:not(.working) > h2 + * { margin-top: 0; }
.signup-form .field { gap: 0; margin: 0; }
.signup-form .field > * { margin-top: 0; margin-bottom: 0; }
.signup-form .field > .help { margin-top: var(--gap-help); }
.signup-form .field > * + :not(.help) { margin-top: var(--gap-answers); }
.signup-form .field > .error-text { margin-top: 10px; }
.signup-form .row { gap: var(--gap-part) 14px; }
.signup-form .row .field { margin: 0; }
.signup-form .prose { margin: 0; }
.signup-form .card > .check { display: flex; }
.signup-form .choices, .signup-form .tick-list { gap: 10px; }
.signup-form .other-text { margin-top: 0; }
.signup-form .choices + .other-text { margin-top: 10px; } /* the box under a picked Other, a gap like the options' */
/* Volunteers' copy of the form: a plain white page, sections set apart by big heavy headings instead of boxes.
   (Staff editing someone's form keep the boxes.) */
body.form-page { background: #fff; }
/* The form's type, as on the old form: soft dark Slate rather than near-black, help in a lighter Slate, questions a
   size bigger than the text around them, and roomier paragraphs */
body.form-page { --ink: var(--camra-slate); --muted: color-mix(in srgb, var(--camra-slate) 82%, #fff); color: var(--ink); --box-border: 3px solid var(--ink); }
body.form-page .field > .label, body.form-page .label { font-size: 16px; }
body.form-page .prose:not(.help) p, body.form-page .prose:not(.help) li { font-size: 15px; }
body.form-page .prose:not(.help) p, body.form-page .prose:not(.help) ul { line-height: 1.6; }
.form-page .page-title { font-weight: 900; font-size: 34px; } /* the biggest words on the page, as on the old form: bigger than the section headings */
.form-page main.public > .card, .public .signup-form .card { background: none; border: none; border-radius: 0; padding: 0; }
.public .signup-form { gap: 48px; }
.form-page main.public { gap: 22px; }
.form-page .signup { margin-top: 26px; }
.public .signup-form .card h2 {
  font-size: 26px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; line-height: 1.15; margin-bottom: 16px;
}
.public .signup-form .card h2.spaced { margin-top: 40px; }
.form-page .send { margin-top: 40px; }
.signup-card h2.big + form { margin-top: 28px; }
/* On the volunteers' pages: square corners throughout, and the same 3px black border on typing boxes, tick boxes and
   radio buttons so it's clear where to type or tick. Tick boxes and radio buttons are drawn here at one size (24px),
   as browsers draw their own small, rounded ones. */
:root { --box-border: 3px solid var(--ink); --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.public input[type=text], .public input[type=email], .public input[type=tel], .public input[type=time], .public textarea, .public select {
  border: var(--box-border); border-radius: 0;
}
.public input:focus-visible, .public textarea:focus-visible, .public select:focus-visible { box-shadow: 0 0 0 4px var(--focus-glow); }
.public .note, .public .tt-chosen, .public .invalid, .public .tt-legend .legend-key { border-radius: 0; }
.public .check { gap: 14px; font-size: 15px; }
.public .check > span { padding-top: 2px; }
.public .check input[type=checkbox], .public .check input[type=radio] {
  -webkit-appearance: none; appearance: none; flex: none; width: 24px; height: 24px; margin: 0;
  border: var(--box-border); border-radius: 0; background: #fff; cursor: pointer;
}
.public .check input[type=radio] { border-radius: 50%; }
.public .check input[type=checkbox]:checked { border-color: var(--ink); background: var(--ink) var(--tick) center / 85% no-repeat; }
.public .check input[type=radio]:checked { border-color: var(--ink); background: radial-gradient(circle, var(--ink) 0 5px, #fff 5.5px); }
.public .check input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
fieldset:disabled .check, fieldset:disabled .check input { cursor: default; }
@media (forced-colors: active) { .public .check input { appearance: auto; -webkit-appearance: auto; } }

/* The shift timetable: days across, times down. Shifts and hour lines are placed by signup.js from the times. */
.tt-intro { margin: 14px 0 0; }
/* The key: a swatch and name for each category; a dotted underline marks a name with an explanation from the
   wording, shown in a tooltip under it when tapped */
.tt-legend { position: relative; z-index: 6; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 16px; font-size: 13px; color: var(--muted); }
.tt-term { display: inline-flex; align-items: center; gap: 6px; }
.tt-term .legend-key { flex: none; width: 12px; height: 12px; }
/* Key swatches: little pieces of the grid, 90% colour with its 1px white edge, one per colour the thing is on */
.key-cells { display: inline-flex; flex: none; gap: 2px; }
.key-cell { width: 22px; height: 14px; opacity: .9; box-shadow: inset 0 0 0 1px var(--panel); }
button.tt-term { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.tt-word { text-decoration: underline dotted #9a9ba3; text-underline-offset: 3px; }
button.tt-term:hover, button.tt-term[aria-expanded=true] { color: var(--ink); }
button.tt-term:hover .tt-word, button.tt-term[aria-expanded=true] .tt-word { text-decoration-color: currentColor; }
button.tt-term:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tt-about {
  position: absolute; width: min(100%, 42ch); padding: 9px 12px; border: 1px solid #d6d7dc; background: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.12); color: var(--ink); font-size: 13px; line-height: 1.45;
}
.tt-about::before {
  content: ""; position: absolute; top: -6px; left: calc(var(--arrow, 24px) - 5px); width: 10px; height: 10px;
  border: solid #d6d7dc; border-width: 1px 0 0 1px; background: #fff; transform: rotate(45deg);
}
.tt-about p { margin: 0 0 6px; line-height: inherit; }
.tt-about[hidden] { display: none; }
/* Measured from the old form's grid: 40px an hour; 2px white gaps between days and along the top of every shift and
   handover; slate hour lines (solid 2px every 3 hours, dashed 1px between) sitting just above each hour and showing
   faintly through the shifts; handovers striped at 12% darker, 5px and 5px. */
.legend-key.tt-hatch { background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(0,0,0,.12) 5px 10px); }
.legend-key.tt-hatch { background-color: var(--k-setup); }
.tt-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px 2px; }
.tt {
  --tt-axis: 46px; --tt-line: var(--camra-slate);
  isolation: isolate; display: grid; column-gap: 0; /* days touch, as on the old form: the white between them is their edges */ row-gap: 6px; min-width: 0; padding-top: 2px;
}
.tt-head { grid-row: 1; display: flex; flex-direction: column; align-items: center; line-height: 1.2; font-size: 14px; font-weight: 700; color: var(--tt-line); }
.tt-head strong { font-size: 14px; }
.tt-corner { grid-row: 1; grid-column: 1; }
.tt-axis, .tt-lines, .tt-col { grid-row: 2; position: relative; margin: 10px 0 4px; } /* room for half the last time below its line */
.tt-axis { grid-column: 1; position: sticky; left: 0; z-index: 4; }
.tt-axis span { position: absolute; right: 10px; transform: translateY(-50%); margin-top: -1px; font-size: 12px; line-height: 1; color: var(--tt-line); font-variant-numeric: tabular-nums; background: var(--panel); }
.tt-axis span.major { font-weight: 700; }
.tt-lines { pointer-events: none; grid-column: 1 / -1; margin-left: calc(var(--tt-axis) - 6px); }
/* Borders, as on the old form, so they land on whole screen pixels and stay crisp on a scaled screen. As there, each
   line sits just above its time, along the top of the white gap between shifts (2px solid / 1px dashed, both centred
   1px above the time). */
.tt-lines span { position: absolute; left: 0; right: 0; height: 0; margin-top: -1.5px; border-top: 1px dashed var(--tt-line); }
.tt-lines span.major { margin-top: -2px; border-top: 2px solid var(--tt-line); }
/* The stacking inside .tt: hour lines, shift colours (1), tick boxes and labels (3), times (4). As on the old form,
   each shift fills its whole time with a 1px white edge inside it, and the lot (white edge too) is 90% solid, so the
   hour lines just show through the colours and, fainter, the white gaps. A ticked
   shift just shows its tick. The focused one is shaded blue over its colours, and the one under the pointer is a
   deeper blue, each with its handovers (the same blue, measured from the old form, at 42% and 88%). */
.tt { --tt-focus: rgba(91, 111, 179, .42); --tt-hover: rgba(91, 111, 179, .88); }
.tt-shift, .tt-over { position: absolute; }
.tt-shift::before, .tt-over::before {
  content: ""; position: absolute; z-index: 1; background: var(--bg);
  inset: 0; opacity: .9;
  box-shadow: inset 0 0 0 1px var(--panel); /* the white edge: 2px of white between shifts, 1px from each */
}
.tt-shift.focus::before, .tt-over.focus::before { background: linear-gradient(var(--tt-focus), var(--tt-focus)), var(--bg); }
.tt-shift.hover::before, .tt-over.hover::before { background: linear-gradient(var(--tt-hover), var(--tt-hover)), var(--bg); }
.tt-shift {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.tt-shift input {
  -webkit-appearance: none; appearance: none; flex: none; margin: 0; width: var(--cb); height: var(--cb);
  border: var(--box-border); border-radius: 0; background: #fff; cursor: pointer;
}
.tt-shift input:checked {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 85% no-repeat;
  border-color: var(--ink);
}
.tt-shift input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.tt-shift input, .tt-full { position: relative; z-index: 3; }
.tt-full { font-size: 10px; font-weight: 700; letter-spacing: .05em; color: #2b2b30; line-height: 1; }
.tt-shift.off::before { outline: 2px dashed #6b6b70; outline-offset: -2px; }
/* The tooltip, as on the old form but a white card with a Slate edge, like the form's boxes: it stands apart from
   the shift colours (and from the tick boxes, which a dark card ran into), and the key's colours show up on it.
   Just above the tick box, with a pointer down to it; moved in from the table's edge if it would stick out
   (--nudge, set in signup.js), with the pointer moved back so it still points at the box. It appears while the
   shift is under the pointer or has focus, and goes at once. */
.tt-tip {
  position: absolute; z-index: 5; left: 50%; bottom: calc(50% + var(--cb, 20px) / 2 + 9px);
  transform: translateX(calc(-50% + var(--nudge, 0px)));
  display: flex; flex-direction: column; width: max-content; max-width: 230px;
  padding: 7px 10px 8px; box-sizing: border-box; text-align: left; border-radius: 6px;
  background: #fff; border: 1px solid var(--camra-slate); color: var(--camra-slate); box-shadow: 0 3px 8px rgba(0, 0, 0, .2);
  font-size: 12px; font-weight: 400; line-height: 1.35; font-variant-numeric: tabular-nums; /* times line up */
  opacity: 0; pointer-events: none;
}
/* The pointer: a Slate triangle with a white one just inside it, so it carries on the card's edge */
.tt-tip::before, .tt-tip::after {
  content: ""; position: absolute; top: 100%; left: calc(50% - var(--nudge, 0px)); margin-left: -7px;
  border: 7px solid transparent; border-bottom: 0; border-top-color: var(--camra-slate);
}
.tt-tip::after { margin-top: -1.5px; border-top-color: #fff; }
.tt-tip-head { font-weight: 700; white-space: nowrap; margin-bottom: 5px; }
/* A swatch, then the times and what's on, in columns; FULL and cask bars full take both text columns */
.tt-tip-rows { display: grid; grid-template-columns: 10px auto 1fr; column-gap: 7px; row-gap: 2px; align-items: center; }
.tt-tip-key.legend-key { width: 10px; height: 10px; border-radius: 2px; }
.tt-tip-key.tt-hatch { background-image: repeating-linear-gradient(135deg, transparent 0 2px, rgba(0,0,0,.3) 2px 3.5px); }
/* These and the note wrap at the card's width rather than widening it */
.tt-tip-wide { grid-column: 2 / -1; width: 0; min-width: 100%; }
.tt-tip-extra { margin-top: 6px; padding-top: 5px; border-top: 1px solid #c7c9d1; }
.tt-tip-note {
  width: 0; min-width: 100%; margin-top: 6px; padding-top: 5px; border-top: 1px solid #c7c9d1;
  font-size: 11px; color: var(--muted);
}
/* After a short pause (so it doesn't flash up while the pointer passes over), a quick fade in */
.tt-shift:hover .tt-tip, .tt-shift:focus-within .tt-tip { opacity: 1; transition: opacity .15s ease-out .4s; }
@media (prefers-reduced-motion: reduce) { .tt-shift:hover .tt-tip, .tt-shift:focus-within .tt-tip { transition: opacity 0s linear .4s; } }.tt-shift.closed { cursor: default; }
.tt-over { pointer-events: none; }
.tt-over::after {
  content: ""; position: absolute; z-index: 1; inset: 1px;
  background-image: repeating-linear-gradient(135deg, transparent 0 5px, rgba(0,0,0,.12) 5px 10px);
}
/* Next to a full shift: stripes of the normal colour (--solid) over the faded one, rather than dark stripes; between
   two full shifts, light stripes (signup.js sets --solid). */
.tt-over.split::after {
  background: var(--solid); opacity: .9;
  -webkit-mask: repeating-linear-gradient(135deg, transparent 0 5px, #000 5px 10px);
  mask: repeating-linear-gradient(135deg, transparent 0 5px, #000 5px 10px);
}
.tt-over.split.focus::after { background: linear-gradient(var(--tt-focus), var(--tt-focus)), var(--solid); }
.tt-over.split.hover::after { background: linear-gradient(var(--tt-hover), var(--tt-hover)), var(--solid); }
fieldset:disabled .tt-shift, fieldset:disabled .tt-shift input { cursor: default; }
@media (forced-colors: active) {
  .tt-shift input { appearance: auto; -webkit-appearance: auto; }
  .tt-shift { border: 1px solid CanvasText; }
}
.tt-info { min-height: 1.4em; margin: 2px 0 0; }
.tt-chosen { margin-top: 18px; padding: 12px 14px; background: var(--soft); border-radius: 10px; font-size: 14px; line-height: 1.45; }
.tt-count { margin: 0; font-weight: 700; }
.tt-chosen ul { margin-top: 6px; gap: 4px; }
@media (max-width: 600px) {
  .tt { --tt-axis: 38px; }
  .tt-axis span { font-size: 11px; right: 8px; }
  .tt-head, .tt-head strong { font-size: 13px; }
}

/* Work preferences: a table of Yes / Don't mind / No icons, with the column names sticking under the top bar */
/* As on the old form, the table is only as wide as it needs to be and the row names are right-aligned, next to their
   answers. The rows share the table's columns (subgrid), so the names all line up. */
.pt-table {
  display: grid; grid-template-columns: minmax(0, max-content) repeat(3, 58px); column-gap: 4px;
  width: fit-content; max-width: 100%; margin-bottom: 26px;
}
.pt-row {
  display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center;
  padding: 3px 4px 3px 8px; border-bottom: 1px solid #ececf0;
}
.pt-head {
  position: sticky; top: 56px; z-index: 3; background: #fff; border-bottom: 1px solid #c4c4cb;
  padding-top: 10px; padding-bottom: 8px; align-items: end; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.2;
}
@media (max-width: 720px) { .pt-head { top: 0; } } /* the top bar scrolls away on narrow screens */
.pt-all { background: var(--soft); }
.pt-label { font-size: 15px; line-height: 1.3; padding: 6px 0; overflow-wrap: break-word; text-align: right; }
.pt-opt { position: relative; display: flex; align-items: center; justify-content: center; height: 42px; cursor: pointer; }
.pt-opt input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
/* Yes / Don't mind / No as circles in CAMRA Emerald, Amber and Watermelon (from the brand guide). Unpicked, the
   symbol is in the text colour; picked, the circle fills with the colour and the symbol turns white. */
.i-yes { --pt: var(--camra-emerald); }
.i-maybe { --pt: var(--camra-amber); }
.i-no { --pt: var(--camra-watermelon); }
.pt-icon { position: relative; display: block; width: 34px; height: 34px; border-radius: 50%; }
.pt-icon::before {
  content: ""; position: absolute; inset: 8px; background: var(--ink);
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.i-yes { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.i-maybe { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h10' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.i-no { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 3.5l9 9m0-9l-9 9' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.pt-opt input:checked + .pt-icon { background: var(--pt); }
.pt-opt input:checked + .pt-icon::before { background: #fff; } /* white on the filled colour, so the picked answer stands out */
.pt-opt input:focus-visible + .pt-icon { box-shadow: 0 0 0 3px var(--focus); }
fieldset:disabled .pt-opt, fieldset:disabled .pt-opt input { cursor: default; }
/* The table's groups (Management, General, Special), each under a small heading in capitals */
.pt-group {
  grid-column: 1 / -1; padding: 26px 8px 6px; border-bottom: 1px solid #c4c4cb;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}

/* Managers & deputies: each position with a Manager and a Deputy tick, as on the old Bradford form */
/* Sized and aligned like the work preferences table */
.lead-grid {
  display: grid; grid-template-columns: minmax(0, max-content) repeat(2, 76px); column-gap: 4px;
  width: fit-content; max-width: 100%; margin-top: 6px;
}
.lg-row {
  display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center;
  padding: 3px 4px 3px 8px; border-bottom: 1px solid #ececf0;
}
.lg-head { border-bottom: 1px solid #c4c4cb; padding-top: 10px; padding-bottom: 8px; align-items: end; line-height: 1.2; text-align: center; font-size: 13px; font-weight: 700; }
.lg-label { font-size: 15px; line-height: 1.3; padding: 6px 0; overflow-wrap: break-word; text-align: right; }
.lg-opt { display: flex; align-items: center; justify-content: center; height: 42px; cursor: pointer; }
.lg-opt input {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin: 0;
  border: var(--box-border); border-radius: 0; background: #fff; cursor: pointer;
}
.lg-opt input:checked { border-color: var(--ink); background: var(--ink) var(--tick) center / 85% no-repeat; }
.lg-opt input:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
fieldset:disabled .lg-opt, fieldset:disabled .lg-opt input { cursor: default; }
@media (max-width: 600px) {
  .lead-grid { grid-template-columns: minmax(0, max-content) repeat(2, 64px); }
  .lg-row { padding-left: 6px; padding-right: 0; }
  .lg-label { font-size: 14px; }
}
@media (forced-colors: active) {
  .pt-icon::before { background: CanvasText; }
  .pt-opt input:checked + .pt-icon { outline: 3px solid Highlight; }
}
@media (max-width: 600px) {
  .pt-table { grid-template-columns: minmax(0, max-content) repeat(3, 46px); column-gap: 2px; }
  .pt-row { padding-left: 6px; padding-right: 0; }
  .pt-head { font-size: 12px; }
  .pt-label { font-size: 14px; }
  .page-title { font-size: 24px; }
}

/* ---------- Dashboard ---------- */
.app.dashboard, .app.volunteers { display: flex; flex-direction: column; gap: 18px; }
.page-head h1, h1.page-head { font-size: 22px; margin: 0; }
.page-head .help { margin: 4px 0 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
@media (max-width: 600px) { .stat:first-child { grid-column: 1 / -1; } .stat-value { font-size: 26px; } }
.stat { display: flex; flex-direction: column; gap: 2px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat.clickable { cursor: pointer; }
.stat.clickable:hover { border-color: var(--ink); }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 30px; font-weight: 700; line-height: 1.1; }
.stat:first-child .stat-value { font-size: 48px; }
.stat-note { font-size: 12px; color: var(--muted); }
.attention { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin: 8px 0 12px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-key { width: 12px; height: 12px; border-radius: 3px; background: var(--key); }
/* The key on Days and shifts: each part of the day with its colour and what it means */
.key-list { display: grid; gap: 10px; margin-top: 10px; }
.key-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; }
.key-name { display: inline-flex; align-items: center; gap: 8px; padding-top: 8px; font-weight: 600; }
.key-name .legend-key { flex: none; width: 14px; height: 14px; }
@media (max-width: 600px) { .key-row { grid-template-columns: 1fr; gap: 4px; } .key-name { padding-top: 0; } }
.m-good { --key: var(--good); } .m-warning { --key: var(--warning); } .m-critical { --key: var(--critical); } .m-none { --key: var(--track); }
.p-yes { --key: var(--yes); } .p-maybe { --key: var(--maybe); } .p-no { --key: var(--no); }

.coverage { display: grid; gap: 10px; }
.cov-day { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: start; padding-top: 10px; border-top: 1px solid #ececf0; }
.cov-day:first-child { border-top: none; padding-top: 0; }
.cov-date { font-weight: 700; font-size: 14px; padding-top: 2px; }
.cov-shifts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 12px; }
.meter { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; font-size: 12px; }
.meter.off { opacity: .6; }
.meter-time { color: var(--muted); }
.meter-n { text-align: right; font-variant-numeric: tabular-nums; }
.meter-track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 4px; background: var(--key); }
@media (max-width: 600px) { .cov-day { grid-template-columns: 1fr; gap: 6px; } }

.answer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.answer-grid .card:first-child { grid-column: 1 / -1; }
@media (max-width: 420px) { .answer-grid { grid-template-columns: minmax(0, 1fr); } }
.count-rows, .pref-rows { display: grid; gap: 6px; }
.count-row, .pref-row { display: grid; grid-template-columns: minmax(0, 55%) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.count-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count-track { height: 8px; }
.count-bar { display: block; height: 8px; border-radius: 0 4px 4px 0; background: var(--bar); min-width: 2px; }
.count-n { text-align: right; font-variant-numeric: tabular-nums; min-width: 28px; }
.pref-row { grid-template-columns: minmax(0, 30%) minmax(0, 1fr) auto; }
.pref-row .count-n { min-width: 112px; }
.stack { display: flex; gap: 2px; height: 10px; }
.seg-bar { display: block; height: 100%; background: var(--key); min-width: 2px; }
.seg-bar:first-child { border-radius: 4px 0 0 4px; }
.seg-bar:last-child { border-radius: 0 4px 4px 0; }
.seg-bar:only-child { border-radius: 4px; }

/* ---------- Volunteers ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar input[type=search] { flex: 1 1 220px; max-width: 320px; border: 1px solid #cfcfd5; border-radius: 8px; padding: calc(8px - var(--up)) 10px calc(8px + var(--up)); background: #fff; }
.toolbar .spacer, .vol-actions .spacer { flex: 1; }
.vol-scroll { max-height: none; }
.pad { padding: 16px; margin: 0; }
table.vol-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.vol-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.vol-table td { padding: 9px 12px; border-bottom: 1px solid #ececf0; vertical-align: top; }
.vol-table tbody tr { cursor: pointer; }
.vol-table tbody tr:hover, .vol-table tbody tr:focus-visible { background: #fafafb; outline: none; }
.vol-table tr.s-withdrawn td, .vol-table tr.s-not_required td { color: var(--muted); }
.vol-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.vol-table .days { white-space: nowrap; font-size: 13px; }

.app.volunteer { display: flex; flex-direction: column; gap: 16px; }
.app.single.volunteer .card { margin-top: 0; }
.back { align-self: flex-start; text-decoration: none; }
.vol-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.vol-head h1 { font-size: 24px; margin: 0; flex: 1 1 auto; }
.vol-head h1 .tag { font-size: 12px; vertical-align: 4px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.save-bar {
  position: sticky; bottom: 0; z-index: 4; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.save-bar .error-text { margin: 0; }
.email-body { white-space: pre-wrap; font: inherit; font-size: 13px; background: var(--soft); padding: 10px; border-radius: 8px; margin: 0; }
.emails li { border-bottom: 1px solid #ececf0; padding-bottom: 6px; }

/* ---------- Rota ---------- */
.app.rota { display: flex; flex-direction: column; gap: 14px; }
/* Assignments uses the whole window, like a spreadsheet: the page itself scrolls (no box scrolling inside it), with
   the days and views, the shift headings and the names column staying put */
.app.rota { max-width: none; padding: 12px 20px 48px; }
.rota-nav { position: sticky; top: var(--bar-h, 56px); z-index: 6; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: -6px 0; padding: 6px 0 8px; background: var(--bg); }
.app.rota .rota-scroll { overflow: visible; max-height: none; }
.app.rota .assign-grid thead th, .app.rota .rota-grid thead th { top: var(--rota-top, 150px); }
/* The tables always fit the window, so the page never scrolls sideways: the names column a set width, the shifts
   sharing the rest (long position names end in … in a narrow window) */
.app.rota table.assign-grid, .app.rota table.rota-grid { width: 100%; table-layout: fixed; }
.app.rota .assign-grid col.c-name, .app.rota .rota-grid col.c-name { width: 270px; }
.app.rota .assign-grid th.sh, .app.rota .rota-grid thead th { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.app.rota .rota-grid tbody th { max-width: none; overflow: hidden; text-overflow: ellipsis; }
.app.rota .rcell { overflow: hidden; }
.page-head.line h1 { font-size: 22px; margin: 0; }
.publish-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.publish-bar.pending { background: var(--tint-amber); border-color: var(--camra-amber); }
.publish-bar .grow { flex: 1 1 300px; }
/* Switchers (the days, and Volunteers / Positions / Rotas and the like): pills in a bar, the chosen one in black */
.day-chips, .view-switch { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; max-width: 100%; background: #ececf0; border-radius: 999px; }
.day-chips { align-self: flex-start; }
.day-chip, .view-switch label > span {
  display: block; border: 0; border-radius: 999px; background: none; padding: calc(6px - var(--up)) 14px calc(6px + var(--up));
  font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.view-switch label { position: relative; display: block; }
.view-switch input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.day-chip:hover, .view-switch input:not(:checked):hover + span { background: #fff; }
.day-chip[aria-pressed="true"], .view-switch input:checked + span { background: var(--ink); color: #fff; }
.day-chip:focus-visible, .view-switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 1px; }
.f-empty { --key: var(--critical); } .f-part { --key: var(--warning); } .f-full { --key: var(--good); } .f-over { --key: var(--yes); } .f-none { --key: var(--track); }
.checks { padding: 12px 16px; }
.checks summary { font-size: 14px; }
.checks ul { margin: 6px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.5; max-height: 220px; overflow: auto; }
.rota-tools { font-size: 14px; }
table.rota-grid { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.rota-grid thead th { position: sticky; top: 0; z-index: 2; background: #fff; padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); min-width: 150px; }
.rota-grid .th-time { display: block; font-weight: 700; }
.rota-grid .th-cnt { display: block; font-weight: 400; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.rota-grid tbody th, .rota-grid .corner {
  position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; font-weight: 400; padding: 6px 10px;
  border-right: 1px solid var(--line); border-bottom: 1px solid #ececf0; min-width: 200px; vertical-align: top;
}
.rota-grid .corner { z-index: 3; font-weight: 700; }
@media (max-width: 600px) { .rota-grid tbody th, .rota-grid .corner { min-width: 120px; max-width: 140px; } .rota-grid thead th { min-width: 130px; } }
.rota-grid .area-row th { background: var(--soft); font-weight: 700; padding-top: 8px; }
.rota-grid .area-row .swatch { margin-right: 6px; vertical-align: -2px; }
.rota-grid .lvl { margin-left: 6px; font-size: 11px; color: var(--muted); }
.rcell { vertical-align: top; padding: 4px 6px 18px; border-bottom: 1px solid #ececf0; border-left: 1px solid #f2f2f4; position: relative; min-height: 34px; }
.rcell.clickable { cursor: pointer; }
.rcell.clickable:hover, .rcell:focus-visible { background: var(--tint-amber); outline: none; }
.rcell.open { box-shadow: inset 0 0 0 2px var(--ink); }
.rcell::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--key); }
.rcell.f-none::before { display: none; }
.rcell .nm { line-height: 1.35; padding-left: 4px; }
.rcell .nm.warn { color: var(--deep-amber); }
.warn-mark { display: inline-block; width: 14px; height: 14px; line-height: 14px; text-align: center; border-radius: 50%; background: var(--warning); color: var(--ink); font-size: 10px; font-weight: 700; margin-right: 4px; vertical-align: 1px; }
.rcell .cnt { position: absolute; right: 6px; bottom: 3px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.rota-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 20; width: min(400px, 100vw); overflow: auto;
  background: #fff; border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(0,0,0,.1); padding: 16px 18px 40px;
}
.panel-head { display: flex; gap: 8px; align-items: flex-start; }
.panel-head h2 { font-size: 18px; margin: 0; }
.panel-head .help { margin: 4px 0 0; }
.panel-count { font-weight: 700; margin: 12px 0 8px; }
.placed { display: grid; gap: 2px; margin-bottom: 8px; }
.placed-row { padding: 6px 0; border-bottom: 1px solid #ececf0; }
.warn-text { font-size: 12px; color: var(--deep-amber); }
.rota-panel h3 { margin: 16px 0 8px; }
.panel-search { width: 100%; margin-bottom: 8px; border: 1px solid #cfcfd5; border-radius: 8px; padding: calc(8px - var(--up)) 10px calc(8px + var(--up)); }
.cands { display: grid; gap: 0; margin-top: 10px; }
.cand { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid #ececf0; font-size: 14px; }
.cand .grow, .panel-head .grow, .placed-row .grow { flex: 1 1 auto; min-width: 0; }
.cand.busy { opacity: .7; }
.cand .tag { margin-left: 0; margin-right: 4px; font-size: 11px; }
.cand .help { font-size: 12px; margin-top: 2px; }
.tag.pref-yes { background: var(--tint-emerald); color: var(--deep-emerald); }
.tag.pref-no { background: var(--tint-watermelon); color: var(--deep-watermelon); }

/* ---------- Assignments: the volunteers' way round, like the old sheet ---------- */
/* Yellow for offered and purple for assigned, as on the old Assignments sheet (CAMRA Amber and Lilac) */
:root { --offered: color-mix(in srgb, var(--camra-amber) 38%, #fff); --assigned: color-mix(in srgb, var(--camra-lilac) 30%, #fff); --assigned-ink: color-mix(in srgb, var(--camra-lilac) 55%, #000); }
table.assign-grid { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.assign-grid thead th { position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: bottom; }
.assign-grid .corner, .assign-grid .who { position: sticky; left: 0; background: #fff; text-align: left; }
.assign-grid .corner { z-index: 3; font-weight: 700; padding-left: 8px; }
.assign-grid .who { z-index: 1; font-weight: 400; white-space: nowrap; padding: 3px 10px 3px 8px; border-bottom: 1px solid #ececf0; max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.assign-grid .who-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; font-size: 13px; color: var(--ink); cursor: pointer; }
.assign-grid .who-btn .caret { display: inline-block; width: 12px; color: var(--muted); font-size: 10px; }
.assign-grid .who-btn:hover { text-decoration: underline; }
.assign-grid .who-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.assign-grid tr.open > th, .assign-grid tr.open > td { border-bottom-color: transparent; }
/* A volunteer's details, opened beneath their row */
.assign-grid .vd-row td { padding: 4px 10px 14px 38px; border-bottom: 1px solid var(--line); background: #fafafb; }
.vd { display: grid; grid-template-columns: repeat(2, minmax(260px, 420px)); gap: 6px 32px; font-size: 13px; position: sticky; left: 38px; width: max-content; max-width: calc(100vw - 120px); }
.vd-col { display: grid; gap: 6px; align-content: start; }
.vd-fact { display: grid; gap: 1px; }
.vd-label { font-size: 11px; font-weight: 700; color: var(--muted); }
.vd-text { white-space: pre-wrap; }
.vd-flag .vd-text { font-weight: 700; }
.vd-pref { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; line-height: 1.5; }
.vd-pref .pdot { margin-right: 2px; }
.pdot-lead.inline { position: static; transform: none; font-size: 9px; margin-left: 2px; }
.vd-open { justify-self: start; font-size: 13px; }
.assign-grid .who .num { display: inline-block; width: 30px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.assign-grid .who .marks, .assign-grid .who .exp { margin-left: 5px; font-size: 12px; }
.assign-grid .who .tag { margin-left: 5px; font-size: 11px; }
.assign-grid tr.s-withdrawn .who, .assign-grid tr.s-not_required .who { opacity: .6; }
.assign-grid th.sh { min-width: 150px; padding-left: 8px; }
.assign-grid .th-time { display: block; font-weight: 700; }
.assign-grid .th-cnt { display: block; font-weight: 400; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.assign-grid td.acell-td { padding: 2px 3px; border-bottom: 1px solid #ececf0; }
.acell {
  display: flex; align-items: center; gap: 5px; width: 100%; min-height: 28px; padding: 0 8px; border: 0; border-radius: 4px;
  background: transparent; font: inherit; font-size: 12.5px; text-align: left; color: var(--ink); cursor: pointer; white-space: nowrap;
}
.acell:disabled { cursor: default; }
.acell:not(:disabled):hover { box-shadow: inset 0 0 0 1px #9a9ba3; }
.acell.off { background: var(--offered); }
.acell.as { background: var(--assigned); color: var(--assigned-ink); font-weight: 700; }
.acell.open, .acell:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.acell .aname { overflow: hidden; text-overflow: ellipsis; }
.acell .moves { font-weight: 400; }
.acell .warn-mark { margin: 0 0 0 auto; }
/* A person's answer for a kind of work: green yes, amber don't mind, red no, an empty ring where they weren't asked */
.pdot { position: relative; display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex: none; vertical-align: -1px; }
.pdot.p-yes { background: var(--camra-emerald); } .pdot.p-maybe { background: var(--camra-amber); } .pdot.p-no { background: var(--camra-watermelon); }
.pdot.p-none { background: #fff; box-shadow: inset 0 0 0 1.5px #9a9ba3; }
.pdot-lead { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); font-size: 8px; line-height: 1; color: var(--camra-lilac); }
.empty-note { padding: 12px 8px; }
/* The dropdown */
.assign-menu {
  position: absolute; z-index: 30; width: 330px; max-width: calc(100vw - 16px); background: #fff; border: 1px solid #d6d7dc;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.16); font-size: 13px; display: flex; flex-direction: column; max-height: 460px;
}
.am-head { padding: 10px 12px 6px; border-bottom: 1px solid #ececf0; }
.am-facts { display: grid; gap: 2px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.am-note { color: var(--ink); white-space: pre-wrap; }
.am-search { margin: 8px 10px 4px; border: 1px solid #cfcfd5; border-radius: 6px; padding: calc(6px - var(--up)) 8px calc(6px + var(--up)); }
.am-list { overflow: auto; padding: 4px 0; flex: 1 1 auto; min-height: 60px; }
.am-opt { display: flex; align-items: center; gap: 8px; padding: 6px 12px; cursor: pointer; }
.am-opt.active { background: var(--tint-blue); }
.am-opt.full { color: var(--muted); }
.am-opt.current { font-weight: 700; }
.am-opt.current .am-name::after { content: " ✓"; }
.am-opt .am-name { flex: 1 1 auto; min-width: 0; }
.am-opt .am-name small { margin-left: 6px; color: var(--muted); font-weight: 400; font-size: 11px; }
.am-opt em { font-style: normal; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.am-opt.remove { color: var(--danger); border-bottom: 1px solid #ececf0; }
.am-x { width: 11px; text-align: center; font-size: 11px; }
.am-empty { padding: 8px 12px; }
.am-all { padding: 6px 12px 10px; border-top: 1px solid #ececf0; font-size: 12px; }

/* ---------- Emails ---------- */
.app.single.emails-screen { display: flex; flex-direction: column; gap: 16px; }
.app.single.emails-screen .card { margin-top: 0; }
.recipients { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; max-height: 320px; overflow: auto; margin-top: 10px; }
.recipients .check { white-space: normal; }
.email-preview { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.email-body-preview { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- A volunteer's own rota ---------- */
.my-rota { margin: 8px 0 16px; }
.rota-sum h3 { margin: 0; }
.rota-sum .spacer { flex: 1; }
.rota-day h4 { margin: 14px 0 6px; font-size: 15px; }
.rota-shift { border: 1px solid var(--line); border-left: 6px solid var(--sw); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.rota-role { margin-top: 2px; }
.rota-role .swatch { display: none; }
.rota-shift .with { margin: 6px 0 0; }
.rota-shift details { border-top: none !important; padding: 4px 0 0 !important; }

/* ---------- Badges (settings and volunteer) ---------- */
.line input.symbol { width: 72px; flex: none; text-align: center; }
.vol-head .line input[aria-label="Badge title"] { width: 180px; }

/* ---------- On the day ---------- */
.app.single.today { display: flex; flex-direction: column; gap: 12px; }
.today-stats { margin: 0; font-size: 18px; font-weight: 700; }
.today-search { width: 100%; font-size: 17px; border: 1px solid #cfcfd5; border-radius: 10px; padding: calc(10px - var(--up)) 12px calc(10px + var(--up)); background: #fff; }
.today .view-switch { align-self: flex-start; }
.arrivals { display: flex; flex-direction: column; }
.arrival-time { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; }
.arrival { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 6px; }
.arrival .grow { flex: 1 1 auto; min-width: 0; }
.arrival .help { margin-top: 2px; }
.arrival .tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.arrival .tags .tag { margin-left: 0; }
.cand .tag.note { margin-left: 0; }
.arrival.here { background: var(--tint-emerald); border-color: var(--camra-emerald); }
.arrival.late { border-color: var(--camra-amber); box-shadow: inset 4px 0 0 var(--warning); }
.arrival .btn { flex: none; padding-left: 20px; padding-right: 20px; }
.arrival .signed { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.arrival .at { font-weight: 700; color: var(--deep-emerald); }

/* Import report */
.import-report { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.import-report li.warn::marker { content: '⚠ '; color: var(--deep-amber); }
.map-positions { display: grid; gap: 6px; margin-top: 6px; }
.map-positions select { max-width: 60%; }

/* ---------- Parts of the form brought back from the old JotForm forms ---------- */
/* The festival's logo, big at the top, then "Staffing form" */
.form-head.with-logo { text-align: left; } /* the title under the logo starts at the left, as on the old forms */
.festival-name { display: block; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
/* "STAFFING FORM" under the logo, in capitals: heavy on its own (the logo has the name, like Steel City's), normal
   weight under the festival's name (Bradford's), as on the old forms */
.form-kind { display: block; text-transform: uppercase; letter-spacing: .04em; }
.festival-name + .form-kind { font-weight: 400; }
.festival-logo { display: block; max-width: 100%; max-height: 320px; height: auto; margin: 0 auto 14px; } /* full width, as banners with white margins were on the old form */
.logo-preview { display: block; max-width: 260px; max-height: 160px; margin-bottom: 12px; border: 1px solid var(--line); background: #fff; }
.logo-field .row { display: flex; align-items: center; gap: 14px; }
/* "Contacting us": boxed near the top */
.contact-box { border: 4px solid var(--camra-blue); padding: 16px 20px; color: var(--camra-blue); }
.contact-box h2, .contact-box a { color: var(--camra-blue); }
.contact-box h2 { font-size: 19px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; margin: 0 0 8px; }
.contact-box p { margin: 0 0 6px; line-height: 1.45; font-weight: 600; }
.contact-box p:last-child { margin-bottom: 0; }
.contact-box a { font-weight: 700; }
/* Subheadings within a section (from "## " in the wording, and Getting there / Arrival) */
.prose h3, .signup-form .card > h3 {
  font-size: 16px; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; line-height: 1.2; margin: 22px 0 8px;
  color: var(--ink); /* the same shade as the section headings */
}
.prose > h3:first-child, .callout > h3:first-child { margin-top: 0; }
/* The IMPORTANT box ("> " lines in the wording) */
.callout { margin: 0 0 14px; padding: 15px 18px; background: var(--camra-amber); color: var(--ink); } /* as on the old form: dark text on CAMRA Amber */
.callout h3 { color: var(--ink); }
.callout a { color: var(--ink); }
.callout > :last-child { margin-bottom: 0; }
.prose .callout p, .prose .callout ul { margin-bottom: 8px; }
.prose .callout > :last-child { margin-bottom: 0; }
/* "Working at the festival" and the CAMRA Volunteer Charter: cream panels in the old form's colour (#fff9ed), so
   it's clear how much there is to read (or skip) */
.public .signup-form .card.working { background: #fff9ed; padding: 22px 20px; box-shadow: 0 2px 5px rgba(0, 0, 0, .16); } /* the old form's shadow too */
.signup-form .working > .prose { margin-bottom: 0; }
.signup-form .working > .prose + h3, .signup-form .working > .prose + .prose { margin-top: 22px; }
/* Postcode: just the first part, or a tick for Outside UK */
.signup-form input.postcode-box { width: 110px; text-transform: uppercase; }
/* Full, and the festival's "open but bar full" state, in the shift grid and its key */
.key-none { display: none; }
.key-name .tt-full { font-size: 12px; }
.key-stack { display: grid; gap: 6px; }
/* Most needed: a Tango strip down the left side (drawn in signup.js's gradient()). Full: the colours faded. Cask bars
   full: faded, with diagonal dots of the full colours (--solid) showing through a mask, so it reads as nearly full. */
.legend-key.key-most { background: var(--k-open); box-shadow: inset 3px 0 0 var(--k-most); }
.legend-key.key-full { background: color-mix(in srgb, var(--k-open) 38%, #fff); }
.legend-key.key-bar-full {
  background: radial-gradient(circle, var(--k-open) 1.3px, transparent 1.7px) 0 0 / 6px 6px,
    radial-gradient(circle, var(--k-open) 1.3px, transparent 1.7px) 3px 3px / 6px 6px, color-mix(in srgb, var(--k-open) 38%, #fff);
}
.tt-shift.bar-full::after {
  content: ""; position: absolute; z-index: 1; pointer-events: none; inset: 1px; opacity: .9; background: var(--solid);
  --dot: radial-gradient(circle, #000 2.2px, transparent 2.7px);
  -webkit-mask: var(--dot) 0 0 / 10px 10px, var(--dot) 5px 5px / 10px 10px;
  mask: var(--dot) 0 0 / 10px 10px, var(--dot) 5px 5px / 10px 10px;
}
.tt-shift.bar-full.focus::after { background: linear-gradient(var(--tt-focus), var(--tt-focus)), var(--solid); }
.tt-shift.bar-full.hover::after { background: linear-gradient(var(--tt-hover), var(--tt-hover)), var(--solid); }

/* Section headings: large, heavy capitals as on the old form; a size smaller on phones */
@media (max-width: 600px) {
  .public .signup-form .card h2 { font-size: 23px; }
  .form-page .page-title { font-size: 30px; }
  .festival-logo { max-height: 220px; }
}

/* ---------- The sign-up form on a desktop: a size up from the phone layout, so it reads as easily as the old form ---------- */
@media (min-width: 721px) {
  .form-page .page-title { font-size: 44px; }
  .public .signup-form .card h2 { font-size: 32px; }
  body.form-page .prose h3, body.form-page .signup-form .card > h3 { font-size: 18px; }
  .contact-box h2 { font-size: 22px; }
  body.form-page .prose:not(.help) p, body.form-page .prose:not(.help) li { font-size: 16px; }
  body.form-page .field > .label, body.form-page .label { font-size: 18px; }
  body.form-page .help, body.form-page .tt-intro { font-size: 15px; }
  body.form-page .check { font-size: 16px; }
  body.form-page input:not([type=checkbox]):not([type=radio]), body.form-page select, body.form-page textarea { font-size: 17px; }
  body.form-page .pt-label, body.form-page .lg-label { font-size: 16px; }
  body.form-page .pt-head span, body.form-page .lg-head span { font-size: 14px; }
  body.form-page .tt-legend, body.form-page .tt-about { font-size: 14px; }
}

/* ---------- Rosters (rosters.js): the old staffing sheet's position roster, volunteer roster and arrivals ---------- */
.rr { display: grid; column-gap: 3px; row-gap: 3px; align-items: stretch; font-size: 11px; color: #1d1d1f; background: #fff; }
.rr-title { grid-row: 1; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 4px; border-bottom: 1px solid #cfcfd5; }
.rr-title strong { font-size: 14px; }
.rr-title span { font-size: 13px; }
.rr-time { grid-row: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 0 4px 2px; font-size: 13px; color: var(--camra-slate); border-bottom: 1px solid #cfcfd5; }
.rr-time .rr-day { font-size: 15px; color: #1d1d1f; }
.rr-area { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; font-weight: 700; }
.rr-area .swatch { width: 11px; height: 11px; border-radius: 1px; box-shadow: none; }
.rr-label { grid-column: 1; text-align: right; padding-right: 8px; color: #41495a; align-self: center; }
.rr-track { background: #f2f2f4; min-height: 18px; z-index: 0; }
.rr-seg, .rr-bar { z-index: 1; display: flex; align-items: center; min-width: 0; padding: 0 5px; background: #d9d9de; white-space: nowrap; overflow: hidden; }
.rr-seg { font-weight: 400; }
.rr-seg.start { font-weight: 700; }
.rr-bar { font-weight: 700; }
.rr-bar.nr { background: #e6e6ea; color: #41495a; }
.rr-mark { font-weight: 400; }
.rr-move { z-index: 1; display: flex; align-items: center; padding: 0 4px; color: #41495a; white-space: nowrap; overflow: hidden; font-size: 10.5px; }
.rr-move.in { justify-content: flex-end; }
.rr-arrow { font-weight: 400; }
.rr-letter { grid-column: 1; font-weight: 900; font-size: 12px; align-self: center; }
.rr-letter.new { border-top: 1px solid #9a9ba3; align-self: stretch; padding-top: 2px; }
.rr-arrivals .rr-letter { font-weight: 700; font-size: 11px; }
.rr-name { grid-column: 2; text-align: right; padding-right: 6px; align-self: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-mk { grid-column: 3; align-self: center; font-size: 9px; }
.rr-shirt { grid-column: 4; align-self: stretch; display: flex; align-items: center; justify-content: center; font-size: 10.5px; }
.rr-shirt.new { background: color-mix(in srgb, var(--camra-blue) 30%, #fff); font-weight: 700; }
.roster-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
/* A position carried on from the shift before: one continuous bar, named only where it starts */
.assign-grid td.join-l { padding-left: 0; }
.assign-grid td.join-r { padding-right: 0; }
.assign-grid td.join-l .acell { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.assign-grid td.join-r .acell { border-top-right-radius: 0; border-bottom-right-radius: 0; }
/* A carried-on bar's name runs on across it, rather than stopping at the end of its first shift */
.assign-grid td.join-r:not(.join-l) .acell { position: relative; z-index: 1; overflow: visible; }
.assign-grid td.join-r:not(.join-l) .aname { overflow: visible; }
/* Blank columns on shorter days, so the shift columns stay the same width from day to day and view to view */
.assign-grid td.pad, .rota-grid td.pad { border-bottom: 1px solid #ececf0; }
/* One header for both views, so the shift headings sit in exactly the same place whichever view is showing */
.app.rota .assign-grid thead th, .app.rota .rota-grid thead th {
  height: 48px; padding: 6px 8px; vertical-align: top; text-align: left; font-size: 13px; line-height: 1.35; background: #fff; border-bottom: 1px solid var(--line);
}
.app.rota .assign-grid .th-time, .app.rota .rota-grid .th-time { display: block; font-weight: 700; }
.app.rota .assign-grid .th-cnt, .app.rota .rota-grid .th-cnt { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
/* In the app the rosters line up with the other views: no gap between columns (the bars keep a small gap of their
   own), starting at the same edge, and the shift times placed like the tables' headings */
.rr { column-gap: 0; }
.rr-seg, .rr-bar, .rr-track { margin-right: 3px; }
.rr-move.in { margin-right: 3px; }
.roster-wrap { padding: 0 0 14px; }
.roster-wrap .rr { min-width: 0; }
.roster-wrap .rr-title { height: 48px; padding: 6px 8px; justify-content: flex-end; }
.roster-wrap .rr-time { height: 48px; padding: 6px 8px; justify-content: flex-end; }
.roster-wrap .rr-letter { padding-left: 8px; }
/* Printing a roster from the Rotas view: just the roster */
@media print {
  body.printing-roster { background: #fff; }
  body.printing-roster .topbar, body.printing-roster .alert, body.printing-roster #app > :not(.roster-wrap) { display: none !important; }
  body.printing-roster #app { padding: 0; }
  body.printing-roster .roster-wrap { border: 0; border-radius: 0; padding: 0; }
  body.printing-roster .rr { font-size: 8pt; row-gap: 0.6mm; }
  body.printing-roster .rr-track { min-height: 4.2mm; }
}
/* On screen the roster's heading row matches the tables': just the shift times, at the top, in the same type.
   Printed, the festival, roster name and day come back. */
@media screen {
  .roster-wrap .rr-title > *, .roster-wrap .rr-time .rr-day { display: none; }
  .roster-wrap .rr-time { justify-content: flex-start; font-size: 13px; line-height: 1.35; font-weight: 700; color: var(--ink); }
}
@media screen {
  .app.rota .roster-wrap { overflow: visible; }
  .app.rota .roster-wrap .rr-title, .app.rota .roster-wrap .rr-time { position: sticky; top: var(--rota-top, 150px); z-index: 3; background: #fff; }
}

/* Sign-up form settings: a manager and deputy position, with its two roles beneath */
.lead-roles { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.lead-roles .mini { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.lead-roles .mini select { max-width: 230px; }
/* Dashboard: who ticked each manager and deputy position */
.lead-rows { display: grid; gap: 8px; }
.lead-row { display: flex; flex-wrap: wrap; column-gap: 14px; row-gap: 2px; font-size: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.lead-row strong { flex: 1 0 100%; }
.lead-kind { color: var(--muted); }
