/* House layout and components. No raw colours, fonts or radii here: every value
   comes from the theme file loaded before this one (app/theme/<org>.css).
   Floors from UX-POLICY.md: 16px body and inputs, 24px targets, 44px primary
   touch controls, visible focus, one column, labels above. Light only. */
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* buttons are inline-flex, which would otherwise beat the attribute */
html, body { margin: 0; background: var(--color-bg); color: var(--color-text); font: 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: var(--color-brand-dark); }
a:hover { color: var(--color-navy); }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--color-bg); color: var(--color-navy); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

main { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
main.wide { max-width: 1400px; }
header.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 12px 16px; border-bottom: 3px solid var(--color-brand); background: var(--color-bg); }
header .brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--color-navy); min-height: 44px; }
header .brand .logo { height: 44px; width: auto; }
header .brand .org { font-family: var(--font-heading); font-weight: 700; }
header .brand .product { font-family: var(--font-heading); font-weight: 700; color: var(--color-navy); line-height: 1.15; }
@media (max-width: 720px) {
  header .brand .product .line { display: block; }
  footer .footer-org .line { display: block; }
  footer .footer-org .sep { display: none; }
}
header nav { display: flex; gap: 20px; align-items: center; }
header nav a, header nav button.link { min-height: 24px; display: inline-flex; align-items: center; }
footer { text-align: center; padding: 24px 16px; border-top: 1px solid var(--color-line); margin-top: 24px; }
footer p { margin: 4px 0; }

h1 { font-family: var(--font-heading); font-size: clamp(24px, 3vw, 32px); line-height: 1.2; margin: 0 0 20px; color: var(--color-navy); }
h1 small { font-size: 60%; font-weight: 400; color: var(--color-text-muted); }
h2 { font-family: var(--font-heading); font-size: 20px; margin: 0 0 12px; color: var(--color-navy); }
.card { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .cols { grid-template-columns: 1fr; } }
.muted { color: var(--color-text-muted); }
.inline { display: inline; }

/* --- forms: one column, label above, hint, error, control ---------------------- */
.field { margin: 0 0 24px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 700; margin: 0 0 6px; }
.field .optional { font-weight: 400; color: var(--color-text-muted); }
.hint { margin: 0 0 6px; color: var(--color-text-muted); }
.error-message { margin: 0 0 6px; color: var(--color-error); font-weight: 700; }
.field-error { border-left: 4px solid var(--color-error); padding-left: 12px; }
.input, select.input { display: block; width: 100%; font: inherit; min-height: 44px; padding: 8px 10px; border: 2px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-bg); color: var(--color-text); }
textarea.input { min-height: 120px; }
.input-error { border-color: var(--color-error); }
.w-xs { max-width: 6ch; } .w-s { max-width: 12ch; } .w-m { max-width: 24ch; } .w-l { max-width: 36ch; } .w-full { max-width: 100%; }
.choice { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px; }
.choice input { width: 24px; height: 24px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--color-navy); }
.choice label { font-weight: 400; margin: 0; min-height: 24px; display: inline-flex; align-items: center; }
fieldset.inline .choice { display: inline-flex; margin-right: 16px; gap: 8px; }
.error-summary { border: 4px solid var(--color-error); padding: 16px; margin: 0 0 24px; background: var(--color-bg); }
.error-summary h2 { color: var(--color-error); margin: 0 0 8px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: var(--color-error); font-weight: 700; }

button, .button { font: inherit; font-weight: 700; min-height: 44px; padding: 8px 20px; border-radius: var(--radius-control); border: 2px solid var(--color-brand-dark); background: var(--color-brand-dark); color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button:hover, .button:hover { background: var(--color-navy); border-color: var(--color-navy); color: #fff; }
button.secondary, .button.secondary { background: var(--color-bg); color: var(--color-brand-dark); }
button.link { background: none; border: none; color: var(--color-brand-dark); padding: 0; min-height: 24px; font-weight: 400; text-decoration: underline; }
button.link:hover { color: var(--color-navy); background: none; }
.actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.actions .cancel { color: var(--color-text-muted); }

/* --- admin: filters, tables, chips ------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 12px; }
.filters .field { margin: 0; }
.filters .input { min-width: 160px; width: auto; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin: 0 0 12px; }
table.list { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.list th, table.list td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--color-line); vertical-align: top; }
table.list th { color: var(--color-text-muted); font-weight: 700; }
table.list th form { display: inline; }
table.list th button.sort { font-weight: 700; color: var(--color-text-muted); text-decoration: none; }
table.list th button.sort[aria-pressed="true"] { color: var(--color-navy); text-decoration: underline; }
table.list .num { text-align: right; }
.density-compact table.list th, .density-compact table.list td { padding: 4px 8px; }
table.kv th { text-align: left; color: var(--color-text-muted); font-weight: 700; width: 170px; padding: 4px 8px 4px 0; vertical-align: top; }
table.kv td { padding: 4px 0; white-space: pre-wrap; }
.flash { padding: 12px 16px; border-radius: var(--radius-control); background: var(--status-signed-bg); color: var(--status-signed-fg); border: 1px solid var(--status-signed-fg); margin: 0 0 16px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; white-space: nowrap; }
.pill-ok { background: var(--status-signed-bg); color: var(--status-signed-fg); }
.pill-warn { background: var(--status-offered-bg); color: var(--status-offered-fg); }
.status { display: inline-block; padding: 2px 10px; border-radius: var(--radius-control); white-space: nowrap; }
.status-offered { background: var(--status-offered-bg); color: var(--status-offered-fg); }
.status-held { background: var(--status-held-bg); color: var(--status-held-fg); }
.status-sent { background: var(--status-sent-bg); color: var(--status-sent-fg); }
.status-signed { background: var(--status-signed-bg); color: var(--status-signed-fg); }
.status-neutral { background: var(--status-neutral-bg); color: var(--status-neutral-fg); }
.status-assigned { background: var(--status-assigned-bg); color: var(--status-assigned-fg); }
.status-rejected { background: var(--status-rejected-bg); color: var(--status-rejected-fg); }
.rating { font-weight: 700; }
.rating-yes { color: var(--color-ok); } .rating-maybe-yes { color: var(--color-ok); } .rating-maybe-no { color: var(--color-warn); } .rating-no { color: var(--color-error); }
ul.timeline { list-style: none; padding: 0; margin: 0; }
ul.timeline li { padding: 4px 0; border-bottom: 1px dotted var(--color-line); }
@media (max-width: 480px) { table.list { display: block; overflow-x: auto; } }

/* --- review queue: narrow navigation sidebar (max ~1/3) beside the entry --------------- */
main.wide:has(.review-layout) { padding-top: 12px; }
.review-layout { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
.review-layout > * { min-width: 0; }               /* grid children otherwise grow to their content */
@media (min-width: 768px) {
  .review-layout { grid-template-columns: minmax(220px, 30%) minmax(0, 1fr); }
  .review-layout .sidebar { position: sticky; top: 8px; max-height: calc(100vh - 16px); overflow-y: auto; padding-right: 8px; border-right: 1px solid var(--color-line); }
  .review-layout .queue-list thead th { position: sticky; top: 0; background: var(--color-bg); z-index: 1; }
}
.sidebar-title { font-size: 24px; margin: 0 0 8px; }
.panel { margin: 0 0 8px; }
.panel > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; list-style: none; }
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary::before { content: '▸'; color: var(--color-navy); width: 1em; }
.panel[open] > summary::before { content: '▾'; }
.panel > summary .panel-label { font-weight: 700; color: var(--color-navy); }
.filters-stack .field { margin: 0 0 12px; }
.filters-stack .input { width: 100%; }
.small { font-size: 14px; }
.queue-list td { padding: 8px 6px; }
.queue-list td .status { margin-top: 4px; }
.main-detail { container-type: inline-size; }
.main-detail .cols { grid-template-columns: 1fr; }
@container (min-width: 900px) { .main-detail .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }   /* history beside the rating only when it has room (2026-11-11) */
.app-cols { display: grid; grid-template-columns: 1fr; gap: 8px 24px; }
@container (min-width: 620px) { .app-cols { grid-template-columns: 3fr 2fr; } }
.app-cols table.kv th { width: 110px; }
.detail h4.sub { font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); margin: 4px 0 6px; }
.queue-list tr.selected td { background: var(--color-brand-soft); }
.queue-list tr.selected td:first-child { box-shadow: inset 4px 0 0 var(--color-brand); }
.queue-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 8px; }
.queue-nav a { min-height: 24px; display: inline-flex; align-items: center; }
.entry-title { font-size: 24px; margin: 0 0 12px; }
.detail h3 { font-family: var(--font-heading); font-size: 17px; margin: 0 0 10px; color: var(--color-navy); }

/* --- Form 2: task list, day grid, photos ---------------------------------------------- */
.task-list { list-style: none; padding: 0; margin: 0 0 24px; border-top: 1px solid var(--color-line); }
.task-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--color-line); min-height: 52px; }
.task-status { white-space: nowrap; padding: 2px 10px; border-radius: var(--radius-control); }
.task-done { background: var(--status-signed-bg); color: var(--status-signed-fg); }
.task-progress { background: var(--status-held-bg); color: var(--status-held-fg); }
.task-todo { background: var(--status-neutral-bg); color: var(--status-neutral-fg); }
.daygrid { border-collapse: separate; border-spacing: 4px; width: 100%; max-width: 560px; table-layout: fixed; margin: 0 0 8px; }
.daygrid th { color: var(--color-text-muted); text-align: center; padding: 0; }
.daygrid th abbr { text-decoration: none; }
.daygrid td { padding: 0; }
.day { position: relative; }
.day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day label { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 56px; border: 2px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-bg); cursor: pointer; line-height: 1.1; font-weight: 400; margin: 0; }
.day label .m { font-size: 14px; color: var(--color-text-muted); }
.day label .n { font-size: 18px; font-weight: 700; }
.day input:checked + label { background: var(--color-navy); border-color: var(--color-navy); color: #fff; }
.day input:checked + label .m { color: #fff; }
.day input:checked + label .n::after { content: ' ✓'; font-size: 14px; }
.day input:focus-visible + label { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.grid-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 0 0 24px; }
.photo-item img, .photo-grid.admin img { width: 100%; max-height: 220px; object-fit: cover; border-radius: var(--radius-control); border: 1px solid var(--color-line); }
.photo-grid.admin { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.photo-grid.admin figure { margin: 0; }
.photo-grid.admin figcaption { font-size: 14px; color: var(--color-text-muted); }
.copy-row { display: flex; gap: 8px; }
.copy-row .input { flex: 1 1 auto; min-width: 0; }

/* --- public form flow ------------------------------------------------------------ */
.step-count { display: block; color: var(--color-text-muted); margin: 0 0 4px; }
.row-short { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: flex-end; }
.row-short .field { flex: 0 1 auto; }
.row-short .field:first-child { flex: 1 1 14ch; }
#years-block fieldset { display: flex; flex-wrap: wrap; gap: 0 8px; }
#years-block legend, #years-block .hint, #years-block .error-message { flex: 0 0 100%; }
#years-block .choice { flex: 0 0 5.5em; }
.guidelines { max-height: 16rem; overflow-y: auto; padding: 12px 16px; border: 2px solid var(--color-border); border-radius: var(--radius-control); background: var(--color-bg); margin: 0 0 12px; }
.guidelines p { margin: 0 0 12px; }
.guidelines:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.choice input:disabled + label { color: var(--color-text-muted); }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.check th { width: 40%; }
table.check td:last-child { width: 6em; text-align: right; white-space: nowrap; }
/* Long URLs and emails would otherwise push the table past a 320px screen. */
table.kv td { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  table.check th { width: 34%; }
  table.check td:last-child { width: auto; padding-left: 8px; }
}
.panel-confirm { background: var(--color-navy); color: #fff; padding: 24px; border-radius: var(--radius); text-align: center; margin: 0 0 24px; }
.panel-confirm h1 { color: #fff; margin: 0 0 12px; }
.panel-confirm p { margin: 0; }
.reference { font-size: 28px; letter-spacing: 0.04em; }
.pill-dup { background: var(--status-held-bg); color: var(--status-held-fg); }
.pill-new, .top nav .count { background: var(--status-held-bg); color: var(--status-held-fg); }
.top nav .count { display: inline-block; padding: 0 8px; border-radius: 999px; font-weight: 700; font-size: 14px; white-space: nowrap; }
ul.changes { margin: 0; padding-left: 1.1em; }
ul.changes li { margin: 0 0 6px; overflow-wrap: anywhere; }
ol.notice-list { list-style: none; padding: 0; margin: 0; }
ol.notice-list > li { border-top: 1px solid var(--color-border); padding: 8px 0; }
ol.notice-list > li > p { margin: 0 0 4px; }
table.notices td { vertical-align: top; }
table.notices button { white-space: nowrap; }

/* Scheduler (src/routes/schedule.js, public/schedule.js): two full-width admin screens. */
main.full { max-width: none; padding-top: 12px; }
.sched-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-bottom: 8px; }
.sched-bar h1 { margin: 0; font-size: 24px; }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline-form .input { width: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--color-border); vertical-align: middle; }
.tint-assigned { background: var(--status-assigned-bg); }
.tint-offered { background: var(--status-offered-bg); }
.tint-held { background: var(--status-held-bg); }
.tint-sent { background: var(--status-sent-bg); }
.tint-signed { background: var(--status-signed-bg); }
.tint-rejected { background: var(--status-rejected-bg); }
.tint-none { background: var(--color-bg); }
.status-filter fieldset { border: 0; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
label.check { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
label.check input { width: 20px; height: 20px; }

/* Screen 1: the grid scrolls inside its box so the date row and the name column stay put. */
.grid-wrap { overflow: auto; max-height: calc(100vh - 210px); border: 1px solid var(--color-line); border-radius: var(--radius-control); }
table.avail-grid { border-collapse: separate; border-spacing: 0; font-size: 14px; }
.avail-grid th, .avail-grid td { border-bottom: 1px solid var(--color-line); border-right: 1px solid var(--color-line); padding: 2px 4px; text-align: center; min-width: 38px; }
.avail-grid thead th { position: sticky; top: 0; z-index: 2; background: var(--color-bg); border-bottom: 2px solid var(--color-navy); }
.avail-grid thead th a { display: block; min-height: 24px; padding: 2px 0; text-decoration: none; font-weight: 700; }
.avail-grid thead th.sorted { background: var(--color-navy); }
.avail-grid thead th.sorted a { color: #fff; }
.avail-grid th.weekend, .avail-grid td.weekend { box-shadow: inset 0 0 0 9999px rgba(22, 44, 86, 0.06); }
.avail-grid .artist-cell { position: sticky; left: 0; z-index: 1; text-align: left; white-space: nowrap; min-width: 260px; background: inherit; }
/* Its own background: "inherit" above would take the header row's (none), and the rows scrolling
   underneath showed through the Artist heading. */
.avail-grid thead .artist-cell { z-index: 3; background: var(--color-bg); }
.avail-grid tbody tr > .artist-cell { background: inherit; }
.avail-grid tbody tr.tint-none > .artist-cell { background: var(--color-bg); }
.avail-grid td span { font-weight: 700; }
button.artist { font: inherit; font-weight: 700; min-height: 28px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-text); cursor: grab; }
button.artist:hover { background: var(--color-bg); color: var(--color-navy); border-color: var(--color-navy); }
button.artist[aria-pressed="true"] { outline: 3px solid var(--color-navy); outline-offset: 1px; }
button.artist:disabled { cursor: default; }
.count { display: inline-block; min-width: 24px; padding: 0 6px; margin-left: 4px; border-radius: 999px; text-align: center; font-weight: 700; border: 1px solid var(--color-border); }
.count-low { background: var(--color-bg); color: var(--color-text); }
.count-ok { background: var(--status-signed-bg); color: var(--status-signed-fg); }
.count-high { background: var(--color-error); color: #fff; }
.pref { margin-left: 6px; font-size: 13px; }

/* Screen 2: the calendar. */
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { font-weight: 700; color: var(--color-navy); border-bottom: 2px solid var(--color-navy); padding: 4px 0; }
/* Calendar (Andreas, 2026-11-02): site header, title, legend and the weekday row stay in view.
   --top-h is the site header's height, set by public/schedule.js. */
body.sticky-top header.top { position: sticky; top: 0; z-index: 20; }
.cal-top { position: sticky; top: var(--top-h, 0px); z-index: 15; background: var(--color-bg); }
body.sticky-top .cal-day { scroll-margin-top: calc(var(--top-h, 0px) + var(--cal-top-h, 0px) + 8px); }
.cal-week { margin: 6px 0 14px; }
.cal-day { min-width: 0; border: 1px solid var(--color-line); border-radius: var(--radius-control); padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.cal-day.weekend { background: var(--color-surface); }
.cal-day.outside { background: repeating-linear-gradient(45deg, var(--color-bg), var(--color-bg) 6px, var(--color-surface) 6px, var(--color-surface) 12px); border-style: dashed; }
.cal-day .day-h { font-size: 15px; margin: 0 0 2px; }
.cal-day .day-h a { text-decoration: none; }
.cal-day.outside .day-h { color: var(--color-text-muted); }
.seg { background: var(--color-bg); color: #000; border: 1px solid var(--color-border); border-radius: 8px; font-size: 14px; line-height: 1.3; }
.seg[role="button"] { cursor: pointer; }
.seg[role="button"]:hover { border-color: var(--color-navy); }
.seg.perf { padding: 2px 4px; }
.seg .len { color: var(--color-text-muted); font-size: 13px; }
.seg .seg-who { margin-top: 2px; padding: 1px 4px; border-radius: 4px; font-weight: 700; overflow-wrap: anywhere; }
.seg .seg-who .open { font-weight: 400; color: var(--color-text-muted); }
.seg .seg-who.out { background: var(--color-error); color: #fff; }
.seg .seg-who.out .open { color: #fff; }
.seg.co { align-self: center; padding: 0 10px; font-size: 13px; border-radius: 999px; min-height: 22px; }
.co-warn { background: var(--warn-bright-bg); }
.seg.co.co-bad, tr.co-bad td, tr.co-bad th { background: var(--color-error); color: #fff; }
tr.co-warn td, tr.co-warn th { background: var(--warn-bright-bg); color: #000; }
.seg.drop-hover { outline: 3px dashed var(--color-navy); outline-offset: 1px; background: var(--status-assigned-bg); }
dialog { border: 2px solid var(--color-navy); border-radius: var(--radius); padding: 20px; max-width: 440px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(22, 44, 86, 0.35); }
dialog h2 { margin: 0 0 8px; font-size: 20px; color: var(--color-navy); }
dialog .field { margin-bottom: 12px; }
.input-short { max-width: 8em; }
.toast, .pickbar { position: fixed; left: 50%; transform: translateX(-50%); z-index: 30; padding: 10px 16px; border-radius: var(--radius-control); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2); max-width: calc(100% - 32px); }
.toast { bottom: 16px; background: var(--color-navy); color: #fff; }
.toast button.link { color: #fff; margin-left: 8px; }
.toast.toast-error { background: var(--color-error); }
.pickbar { top: 12px; background: var(--status-assigned-bg); color: var(--status-assigned-fg); border: 2px solid var(--status-assigned-fg); font-weight: 700; }
.callout { background: var(--status-assigned-bg); color: var(--status-assigned-fg); padding: 10px 14px; border-radius: var(--radius-control); }
table.day-table { border-collapse: collapse; width: 100%; margin-bottom: 12px; }
.day-table th, .day-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--color-line); }
.day-table tr.focus-row th, .day-table tr.focus-row td { box-shadow: inset 0 0 0 9999px rgba(22, 44, 86, 0.10); font-weight: 700; }
.day-table .input-short { min-height: 36px; }
.warn-text { color: var(--color-warn); font-weight: 700; }
/* Tooltip on an assigned slot: the artist's Form 2 preferences, on hover or keyboard focus. It sits inside
   the pill, so moving the pointer onto it keeps it open; the same text is in the pill's aria-label. */
.seg.perf { position: relative; }
.seg .tip { display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 5; width: max-content; max-width: 240px; padding: 6px 10px; border-radius: var(--radius-control); background: var(--color-navy); color: #fff; font-size: 14px; line-height: 1.4; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.seg.perf:hover .tip, .seg.perf:focus-visible .tip { display: block; }
.cal-week > .cal-day:nth-child(n+6) .tip { left: auto; right: 0; }
/* Screen 1: the artist's assigned slots, under the name on hover or keyboard focus. */
.avail-grid .artist-wrap { position: relative; display: inline-block; }
.avail-grid .artist-wrap .tip { display: none; position: absolute; top: calc(100% + 2px); left: 0; z-index: 6; width: max-content; max-width: 260px; padding: 6px 10px; border-radius: var(--radius-control); background: var(--color-navy); color: #fff; font-size: 14px; font-weight: 400; line-height: 1.4; text-align: left; white-space: normal; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.avail-grid .artist-wrap:hover .tip, .avail-grid .artist-wrap:focus-within .tip { display: block; }
.avail-grid tbody .artist-cell:hover, .avail-grid tbody .artist-cell:focus-within { z-index: 4; }
.seg.perf[draggable="true"] { cursor: grab; }
.seg.dragging { opacity: 0.45; }
/* The "or" before an option that excludes the others (Form 2: Any time). */
.choice-or { margin: 4px 0 10px; color: var(--color-text-muted); }

/* Signing pages (src/routes/sign.js): the agreement or waiver text, then the signing form. */
.legal-doc { border: 1px solid var(--color-line); border-radius: var(--radius); padding: 16px 20px; margin: 16px 0 24px; background: var(--color-bg); }
.legal-doc .doc-title { font-size: 22px; text-align: center; margin: 0 0 16px; color: var(--color-navy); }
.legal-doc .doc-name { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
.legal-doc .doc-title:has(+ .doc-name) { margin-bottom: 4px; }
.legal-doc .doc-h { text-align: center; margin: 32px 0 4px; padding-top: 16px; border-top: 2px solid var(--color-line); color: var(--color-navy); }
.legal-doc .doc-sub { font-weight: 700; margin: 12px 0 6px; }
.legal-doc p { margin: 0 0 10px; }
.legal-doc .doc-kv th { width: 40%; }
.sign-form { border-top: 3px solid var(--color-brand); padding-top: 8px; }
.panel-note { background: var(--status-assigned-bg); color: var(--status-assigned-fg); border: 2px solid var(--status-assigned-fg); border-radius: var(--radius); padding: 16px; margin: 0 0 20px; }
.panel-note h2 { margin-top: 0; color: inherit; font-size: 20px; }
.panel-warn { background: var(--status-held-bg); color: var(--status-held-fg); border: 2px solid var(--status-held-fg); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 16px; }
.date-parts { display: flex; gap: 12px; flex-wrap: wrap; }
.date-parts label { display: block; font-weight: 400; margin-bottom: 4px; }

/* Fields inside the agreement and waiver text, each with Save / Edit (Andreas, 2026-11-11). */
.lock-group { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; white-space: normal; }
.lock-group .lock-controls { flex: 1 1 220px; min-width: 0; }
.lock-group .lock-controls .input { width: 100%; }
.lock-group .lock-controls .input[data-size="xs"] { width: 5em; }
.lock-group .lock-controls .input[data-size="s"] { width: 8em; }
.lock-group .lock-btn { min-height: 44px; padding: 6px 16px; }
.lock-group.locked .input { background: var(--color-surface); border-color: var(--color-line); }
.lock-group .lock-hint { flex-basis: 100%; margin: 0; color: var(--color-error); font-weight: 700; }
.mini-label { display: block; font-size: 14px; font-weight: 400; margin: 6px 0 2px; }
.mini-hint { font-size: 14px; color: var(--color-text-muted); margin: 2px 0 0; }
.inline-choices { border: 0; padding: 0; margin: 0; }
.inline-choices .choice { margin: 0 0 6px; }
.link-line { overflow-wrap: anywhere; margin: 8px 0; }
@media (max-width: 600px) {
  .legal-doc .doc-kv th, .legal-doc .doc-kv td { display: block; width: auto; }
  .legal-doc .doc-kv th { border-bottom: 0; padding-bottom: 0; }
}
.legal-doc .doc-indent { margin-left: 1.5em; }
.legal-doc table.doc-indent { width: calc(100% - 1.5em); }

/* Compact calendar (Andreas, 2026-11-11): one line per slot, smaller type, slimmer changeovers, so more
   than one week fits on the screen. The name is cut to fit; the tooltip shows it in full. */
.cal-week { margin: 4px 0 8px; gap: 4px; }
.cal-day { padding: 3px; gap: 2px; }
.cal-day .day-h { font-size: 13px; margin: 0; line-height: 1.3; }
.seg.perf { display: flex; align-items: center; gap: 4px; padding: 1px 4px; border-radius: 6px; white-space: nowrap; min-height: 22px; }
.seg.perf .seg-time { font-size: 12px; flex: 0 0 auto; }
.seg.perf .len { font-size: 11px; flex: 0 0 auto; }
.seg.perf .seg-who { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0 4px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg.co { min-height: 16px; line-height: 16px; padding: 0 8px; font-size: 11px; }
.seg.co { min-height: 10px; height: 10px; line-height: 10px; padding: 0 3px; font-size: 9px; }
.cal-day .day-h { font-size: 26px; line-height: 1.2; margin: 0 0 2px; }  /* date headings doubled (Andreas, 2026-11-11) */
/* Slot pills in columns (Andreas, 2026-11-11): time, length and name start at the same place on every
   line; digits take equal widths so 1:00 and 11:00 line up. */
.seg.perf { display: grid; grid-template-columns: 11ch 2ch minmax(0, 1fr); column-gap: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.seg.perf .seg-time { font-size: 12px; }
.seg.perf .len { font-size: 11px; text-align: right; }
/* Slot dialog: the artist's next steps in their own section at the bottom (Andreas, 2026-11-11). */
dialog .dialog-actions { border-top: 1px solid var(--color-line); margin-top: 16px; padding-top: 8px; }
dialog .dialog-actions h3 { margin: 0 0 8px; font-size: 16px; color: var(--color-navy); }
#release-list { border: 0; padding: 0; margin: 0 0 4px; }
/* Side by side in one window (Andreas, 2026-11-11). */
.split-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; margin-bottom: 6px; }
.split-bar h1 { margin: 0; font-size: 22px; }
.split-bar p { margin: 0; }
.split { --split: 45%; display: flex; height: 80vh; border: 1px solid var(--color-line); border-radius: var(--radius-control); overflow: hidden; }
.split iframe { border: 0; height: 100%; min-width: 0; }
#split-left { flex: 0 0 var(--split); }
#split-right { flex: 1 1 auto; }
.split-divider { flex: 0 0 10px; cursor: col-resize; background: var(--color-line); touch-action: none; }
.split-divider:hover, .split-divider:focus-visible { background: var(--color-navy); }
body.embed main.full { padding: 6px 8px 16px; }
/* Embedded availability half: the page itself never scrolls, the grid takes whatever height is left
   under the title and the status filter (22px = main's top and bottom padding). Before 2026-11-16 a
   fixed "100vh - 150px" left the page taller than its frame whenever the title wrapped, so the half
   scrolled twice and the date row scrolled away. */
body.embed #sched[data-page="avails"] { display: flex; flex-direction: column; height: calc(100vh - 22px); }
body.embed #sched[data-page="avails"] > * { flex: 0 0 auto; }
body.embed #sched[data-page="avails"] > .grid-wrap { flex: 1 1 auto; min-height: 160px; max-height: none; }
/* Close icon, top right of every scheduler dialog (Andreas, 2026-11-11). */
dialog:has(.dialog-close) { position: relative; }
dialog:has(.dialog-close) h2 { padding-right: 44px; }
/* The heading (title, close icon, and in the slot dialog the artist line) stays in view while a dialog
   taller than its window scrolls (Andreas, 2026-11-16). The negative margins cancel the dialog's 20px
   padding so the bar spans the full width; top is -20px for the same reason (sticky measures from
   inside the dialog's padding), so nothing shows above the bar. */
dialog .dialog-head { position: sticky; top: -20px; z-index: 2; margin: -20px -20px 12px; padding: 20px 20px 4px; background: var(--color-bg); border-bottom: 1px solid var(--color-line); }
dialog .dialog-head h2 { margin-bottom: 4px; }
dialog .dialog-head p { margin: 0 0 4px; }
dialog .dialog-head p:empty { display: none; }
dialog button.dialog-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; min-height: 0; padding: 0; border: 0; border-radius: var(--radius-control);
  background: transparent; color: var(--color-navy); font-size: 28px; line-height: 1; cursor: pointer; }
dialog button.dialog-close:hover { background: var(--status-neutral-bg); color: var(--color-navy); }
/* All waivers of a group on one page (Andreas, 2026-11-11). */
.waiver-copy { border-top: 2px solid var(--color-line); margin-top: 24px; padding-top: 8px; }
@media print { .waiver-copy { break-before: page; border-top: 0; } header.top, footer { display: none; } }
/* Parking passes (Andreas, 2026-11-11). */
.nowrap { white-space: nowrap; }
td.nowrap form.inline { display: inline; }
td.nowrap .button, td.nowrap button { margin: 2px 4px 2px 0; }
.pass-card table.kv { margin: 0 0 8px; }
.flash-error { background: var(--status-sent-bg); color: var(--status-sent-fg); border-color: var(--status-sent-fg); }
/* Admin sections as tabs on the header line, and the entry's own tabs (Andreas, 2026-11-11). */
header nav.admin-tabs { align-self: flex-end; margin-bottom: -15px; gap: 4px; flex-wrap: wrap; }
header nav.admin-tabs a { padding: 10px 14px; min-height: 44px; border: 1px solid var(--color-line); border-bottom: 3px solid var(--color-brand); border-radius: 8px 8px 0 0;
  background: var(--color-surface); color: var(--color-navy); text-decoration: none; font-weight: 600; }
header nav.admin-tabs a:hover { background: var(--color-bg); text-decoration: underline; }
header nav.admin-tabs a[aria-current="page"] { background: var(--color-bg); border-color: var(--color-brand); border-bottom-color: var(--color-bg); }
header nav.admin-tabs form.inline { margin-left: 12px; align-self: center; }
.tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--color-navy); margin: 0 0 16px; }
.tablist [role=tab] { font: inherit; font-weight: 600; min-height: 44px; padding: 8px 16px; margin-bottom: -2px; border: 1px solid var(--color-line); border-bottom: 2px solid var(--color-navy);
  border-radius: 8px 8px 0 0; background: var(--color-surface); color: var(--color-navy); cursor: pointer; }
.tablist [role=tab][aria-selected="true"] { background: var(--color-bg); border-color: var(--color-navy); border-bottom-color: var(--color-bg); }
.tablist [role=tab]:focus-visible { outline: 3px solid var(--color-navy); outline-offset: 2px; }
/* Subtabs inside a tab (Form 2 details; Andreas, 2026-11-16): lighter than the entry's own tabs. */
.tablist.sub { border-bottom-width: 1px; margin: 12px 0 16px; }
.tablist.sub [role=tab] { min-height: 36px; padding: 4px 14px; margin-bottom: -1px; border-bottom-width: 1px; font-size: 15px; }
.subtab-panel > h4.sub { margin-top: 0; }
/* With the subtab row showing, the section heading would repeat the selected subtab's label. */
.tablist.sub:not([hidden]) ~ .subtab-panel > h4.sub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.subtab-panel .sub-edit { max-width: 720px; }
.photo-choice { margin-top: 16px; }
.photo-choice fieldset { border: 0; padding: 0; margin: 0; }
.photo-choice legend { font-weight: 600; padding: 0; }
/* Photos sit on one bottom line, so the "Use this" buttons under them form one row (Andreas, 2026-11-16). */
.photo-choice .photo-grid.admin { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-bottom: 8px; align-items: end; }
.photo-choice .photo-grid.admin figcaption { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-choice figure .choice { margin-top: 4px; }
.main-detail .cols > * { min-width: 0; }
.table-scroll { overflow-x: auto; }
.history-list td:first-child { min-width: 90px; }
/* Slot response page (Andreas, 2026-11-15). */
.slot-offer-list { margin: 0 0 12px; padding-left: 20px; font-size: 18px; }
.slot-offer-list li { margin: 4px 0; }
/* Agreements page filters (Andreas, 2026-11-15). */
.ag-show { border: 0; padding: 0; margin: 0; display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.ag-filters { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin-top: 8px; }
.ag-search { display: inline-flex; align-items: center; gap: 8px; }
/* Invite sits just above Save and go to next (Andreas, 2026-11-15). */
.card form .actions + .actions { margin-top: 10px; }
