/* The Barn Waivers — official palette (applies to guests, host, assisted mode, Admin and Reception):
     --primary #7b8e46 olive: primary buttons, accents, icons, highlights (always with black text: 5.8:1; white would be 3.6:1)
     --soft    #b8c48a sage: soft backgrounds, selections, tags and support lines
     --surface #f4f2ed ivory: secondary backgrounds and content blocks
     --text    #000000 black: titles, headings, links and text on light greens
     --muted   #686664 warm gray: paragraphs and secondary text on white or ivory (5.7:1 / 5.1:1)
     --bg      #ffffff white: main background and forms
   Links are black with an olive underline; focus is a black outline. Only functional states (error, warning, success)
   use extra colors, always together with text. */
:root {
  --bg: #ffffff;
  --surface: #f4f2ed;
  --soft: #b8c48a;
  --text: #000000;
  --muted: #686664;
  --border: #686664;
  --line: #b8c48a;
  --primary: #7b8e46;
  --primary-ink: #000000;
  --primary-hover: #b8c48a;
  --focus: #000000;
  --error: #a3001b;
  --error-bg: #fdecee;
  --ok: #17602f;
  --ok-bg: #e5f4ea;
  --warn: #7a4b00;
  --warn-bg: #fff3d6;
  --radius: 10px;
  font-size: 112.5%; /* 18px base */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-wrap: break-word; /* long names without spaces never overflow on narrow screens */
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--bg); color: var(--text); padding: .5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 1rem; top: 1rem; }

main { max-width: 720px; margin: 0 auto; padding: 1rem 16px 4rem; }
main.wide { max-width: 1180px; }

h1 { font-size: 1.65rem; line-height: 1.25; margin: .75rem 0 .5rem; }
h2 { font-size: 1.3rem; margin: 1.5rem 0 .5rem; }
h3 { font-size: 1.1rem; margin: 1rem 0 .4rem; }
h1:focus, h2:focus { outline: none; }
p { margin: .5rem 0; }
main p { color: var(--muted); }
main .doc-section p, main .notice p, main .error-summary p, main .field-slot p, main.poster p { color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.steps { color: var(--muted); font-weight: 600; margin: .5rem 0 0; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
}
.card > :first-child { margin-top: 0; }

.field { margin: 1rem 0; }
label, .label { display: block; font-weight: 600; margin-bottom: .3rem; }
.hint { display: block; color: var(--muted); font-size: .92rem; margin: -.1rem 0 .35rem; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%;
  min-height: 3rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: .55rem .7rem;
}
textarea { min-height: 7rem; }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--error); background: var(--error-bg); }
/* MM / DD / YYYY boxes (US order, 2026-11-14): sized to their digits, labels kept on one line. */
.date-row { display: grid; grid-template-columns: minmax(0, 5.5rem) minmax(0, 5.5rem) minmax(0, 7rem); gap: .5rem; justify-content: start; } /* shrink inside narrow cards, never past their edge */
.date-row input { width: 100%; }
.date-row label { font-weight: 500; font-size: .9rem; }

.check { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-start; margin: 1rem 0; }
.check > label { flex: 1 1 0; min-width: 0; }
.check > .field-error { flex: 1 0 calc(100% - 2.35rem); margin: 0 0 0 2.35rem; min-width: 0; } /* the error goes below, not in a column beside the label */
.check input { width: 1.6rem; height: 1.6rem; margin-top: .15rem; flex: none; accent-color: var(--primary); }
.check label { font-weight: 500; margin: 0; }

.field-error {
  display: block;
  color: var(--error);
  font-weight: 600;
  margin-top: .3rem;
}
.field-error::before { content: "⚠ "; }

.error-summary {
  border: 3px solid var(--error);
  background: var(--error-bg);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin: 1rem 0;
}
.error-summary h2 { margin: 0 0 .4rem; font-size: 1.1rem; color: var(--error); }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary a { color: var(--error); font-weight: 600; }

.notice { border-radius: var(--radius); padding: .75rem 1rem; margin: 1rem 0; border-left: 6px solid; }
.notice.ok { background: var(--ok-bg); border-color: var(--ok); }
.notice.warn { background: var(--warn-bg); border-color: var(--warn); }
.notice.info { background: var(--surface); border-color: var(--primary); }
.notice.err { background: var(--error-bg); border-color: var(--error); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 3rem; min-width: 3rem;
  padding: .6rem 1.2rem;
  font: inherit; font-weight: 700;
  border-radius: 8px;
  border: 2px solid var(--primary);
  background: var(--bg); color: var(--text);
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--surface); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { border-color: var(--error); color: var(--error); }
.btn.small { min-height: 2.5rem; padding: .35rem .8rem; font-size: .92rem; }
.btn[disabled], .btn[aria-disabled=true], .btn.primary[disabled], .btn.primary[aria-disabled=true] { background: var(--surface); color: var(--muted); border-color: var(--muted); border-style: dashed; cursor: not-allowed; }
.btn.block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 .5rem; }
.actions.split { justify-content: space-between; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--text); text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }

.person { border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; background: var(--bg); }
.person legend, .person h3 { font-weight: 700; font-size: 1.1rem; padding: 0 .3rem; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.person { border: 2px solid var(--line); padding: 1rem; }

.badge {
  display: inline-block; border-radius: 999px; padding: .1rem .65rem; font-size: .85rem; font-weight: 700;
  border: 2px solid currentColor; white-space: nowrap;
}
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.pending { color: var(--warn); background: var(--warn-bg); }
.badge.err { color: var(--error); background: var(--error-bg); }
.badge.info { color: var(--text); background: var(--surface); border-color: var(--primary); }
.badge.neutral { color: var(--muted); background: var(--surface); }

.list { list-style: none; padding: 0; margin: 0; }
.list > li { border-bottom: 1px solid var(--line); padding: .75rem 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }

.doc-section { background: var(--bg); border: 2px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.doc-section .doc-body { white-space: pre-wrap; font-size: 1.05rem; line-height: 1.65; }
.progress { height: .6rem; background: var(--surface); border-radius: 999px; overflow: hidden; margin: .5rem 0 1rem; }
.progress > span { display: block; height: 100%; background: var(--primary); }

.sig-wrap { border: 2px dashed var(--border); border-radius: var(--radius); background: var(--bg); position: relative; touch-action: none; }
.sig-wrap canvas { display: block; width: 100%; height: 200px; cursor: crosshair; }
.sig-line { position: absolute; left: 8%; right: 8%; bottom: 40px; border-bottom: 1px solid var(--muted); pointer-events: none; }
.typed-sig { font-family: "Segoe Script", "Brush Script MT", cursive; font-size: 2rem; padding: .5rem 1rem; border-bottom: 2px solid var(--muted); min-height: 3.5rem; }

.status-line { display: flex; gap: .5rem; align-items: center; margin: .35rem 0; }

/* Staff panel */
/* Staff panel: grouped side menu (navigation), header with each screen's actions, and lightweight filters. */
main.staff-app { max-width: none; padding: 0; }
.login-card { max-width: 28rem; margin: 2rem auto; }
.login-card .brand, .side-brand .brand { font-weight: 800; color: var(--text); margin: 0; }
.staff-shell { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: calc(100vh - 2.5rem);
  background: linear-gradient(to right, var(--surface) 15rem, var(--bg) 15rem); }
.side-nav { background: var(--surface); border-right: 1px solid var(--line); padding: 1rem .6rem; display: flex; flex-direction: column; gap: .25rem;
  position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; }
.side-brand { padding: 0 .6rem .5rem; display: flex; flex-direction: column; }
.side-role { font-size: .85rem; color: var(--muted); }
.nav-group-title { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: .9rem .6rem .2rem; }
.nav-item { display: flex; align-items: center; gap: .5rem; width: 100%; min-height: 2.75rem; padding: .45rem .7rem; border: 0; border-radius: 8px;
  background: transparent; color: var(--text); font: inherit; font-size: .95rem; text-align: left; cursor: pointer; }
.nav-item:hover { background: var(--bg); }
.nav-item[aria-current=page] { background: var(--bg); font-weight: 700; box-shadow: inset 4px 0 0 var(--primary); }
.nav-item .count { margin-left: auto; min-width: 1.6rem; text-align: center; border-radius: 999px; padding: 0 .45rem; font-size: .8rem; font-weight: 700;
  color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn); }
.nav-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: .5rem; }
.staff-mobilebar { display: none; }
.staff-body { padding: .75rem 1.75rem 3rem; min-width: 0; max-width: 1240px; }
/* Notices in the page flow (never overlaid): at the top of the section, and each arrival confirmation also next to its
   row. They do not disappear on their own. */
.flash { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin: .5rem 0; }
.row-note { margin: .35rem 0 0; font-size: .88rem; font-weight: 600; max-width: 22rem; }
main .row-note.ok { color: var(--ok); }
main .row-note.warn { color: var(--warn); }
main .row-note.err { color: var(--error); }
.row-note::before { content: "✓ "; }
.row-note.warn::before, .row-note.err::before { content: "⚠ "; }
dialog.ask { width: min(34rem, calc(100vw - 32px)); padding: 1rem 1.25rem; }
dialog.ask h2 { margin-top: .25rem; }
.flash p { margin: 0; }
.btn-quiet { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.75rem; min-width: 2.75rem; padding: .3rem .6rem;
  border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.btn-quiet:hover { background: var(--surface); }
.icon { display: inline-flex; flex: none; }
.icon svg { display: block; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .5rem 1.5rem; margin: .25rem 0 .75rem; }
.page-head h1 { margin: 0; }
.page-head .field { margin: 0; }
.event-pick { flex: 0 1 28rem; min-width: min(100%, 16rem); }
.event-pick label, .recep-tools label { font-size: .9rem; }
.recep-tools { margin: 0 0 .75rem; }
.recep-tools .field.search { flex: 1 1 18rem; }
.indicators { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .5rem; margin: .5rem 0 .25rem; }
.ind { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: .1rem; padding: .5rem .75rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.ind strong { font-size: 1.35rem; line-height: 1.15; }
.ind span { font-size: .86rem; color: var(--muted); }
.ind:hover { border-color: var(--primary); }
.ind[aria-pressed=true] { border: 2px solid var(--primary); background: var(--surface); padding: calc(.5rem - 1px) calc(.75rem - 1px); }
.ind.attn { border-color: var(--error); }
.ind.attn strong, .ind.attn span { color: var(--error); }
.event-more { margin: .25rem 0 .5rem; }
.event-more > summary, .admin-tools > summary { cursor: pointer; color: var(--text); font-weight: 600; font-size: .95rem; padding: .35rem 0; }
.event-more[open] { background: var(--surface); border-radius: var(--radius); padding: .25rem .9rem .5rem; }
.filter-row, .active-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .4rem 0; }
.filter-label { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; font-size: .9rem; color: var(--muted); margin-right: .2rem; }
.fchip { min-height: 2.5rem; padding: .25rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.fchip:hover { background: var(--surface); }
.fchip[aria-pressed=true] { background: var(--soft); border-color: var(--primary); font-weight: 700; }
.fchip[aria-pressed=true]::before { content: "✓ "; }
.fchip.more { border-style: dashed; color: var(--text); font-weight: 600; }
.tag { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.5rem; padding: .2rem .45rem .2rem .75rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.tag:hover { border-color: var(--primary); }
.tag .icon svg { width: 16px; height: 16px; }
main .res-count { color: var(--text); font-weight: 700; margin: .6rem 0 .2rem; }
.res-count:focus { outline: none; }
.res-count:focus-visible { outline: 3px solid var(--focus); }
.legend { margin: 0 0 .4rem; }
table.people td, table.ev-table td { vertical-align: middle; }
table.people .badge, dl.states .badge, .ev-table .badge, .list .badge { white-space: normal; }
@media (max-width: 480px) { .badge { white-space: normal; } }
.list li { overflow-wrap: anywhere; }
.pname { overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.row-actions .btn { white-space: nowrap; }
.row-cell { min-width: 0; flex: 1 1 auto; } /* buttons and, below them, the confirmation of the last action */
@media (min-width: 641px) { table.people td[data-label=Person] { min-width: 11rem; } }
table.people .badge, .ev-table .badge { border-radius: 12px; }
table.people td[data-label=Arrival] { min-width: 6.5rem; }
.btn.act { background: var(--soft); color: var(--text); border-color: var(--primary); }
.btn.act:hover { background: var(--primary); }
.empty { text-align: center; padding: 1.75rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg); margin: .5rem 0; }
.empty-art { color: var(--primary); display: inline-block; }
main .empty-title { color: var(--text); font-weight: 700; }
.loading { color: var(--muted); }
dl.states { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 0 0 1rem; }
dl.states > div { background: var(--surface); border-radius: 8px; padding: .5rem .75rem; }
dl.states dt { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
dl.states dd { margin: .2rem 0 0; }
.admin-tools { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .5rem; }
.back { display: inline-flex; align-items: center; gap: .25rem; min-height: 2.75rem; text-decoration: none; font-weight: 600; }
.section-fold { border: 1px solid var(--line); border-radius: var(--radius); padding: .25rem 1rem; margin: .75rem 0; background: var(--bg); }
.section-fold > summary { cursor: pointer; font-weight: 700; padding: .5rem 0; }
.card.narrow { max-width: 44rem; }
dialog.drawer { margin: 0 0 0 auto; width: min(680px, 100vw); height: 100vh; max-height: 100vh; border-radius: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.toolbar .field { margin: 0; flex: 1 1 220px; }
.toolbar .field.wide { flex: 2 1 420px; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chips .btn { white-space: nowrap; }
.chips button[aria-pressed=true] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); }
.table-wrap { overflow-x: auto; }
code, .mono { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; word-break: break-all; }

dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
dialog::backdrop { background: rgba(0,0,0,.55); }
dialog .dlg-body { padding: 1rem 1.25rem 1.25rem; }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line); padding: .5rem 1.25rem; position: sticky; top: 0; background: var(--bg); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1rem; margin: .5rem 0; }
dl.kv dt { font-weight: 700; }
dl.kv dd { margin: 0; word-break: break-word; }
pre.mail { white-space: pre-wrap; background: var(--surface); padding: .75rem; border-radius: 8px; font-size: .9rem; }
.qr img { width: 220px; height: 220px; background: var(--bg); border: 1px solid var(--line); }

@media (max-width: 640px) {
  h1 { font-size: 1.45rem; }
  .actions .btn { flex: 1 1 100%; }
  .actions.split .btn { flex: 1 1 100%; }
  dl.kv { grid-template-columns: 1fr; }
  .resp-table thead { display: none; }
  .resp-table tr { display: block; border: 1px solid var(--line); border-radius: 8px; margin: .6rem 0; padding: .4rem; }
  .resp-table td { display: flex; gap: .5rem; border: 0; padding: .3rem .4rem; }
  .resp-table td::before { content: attr(data-label); font-weight: 700; min-width: 7.5rem; }
}

@media (max-width: 900px) {
  .staff-shell { grid-template-columns: minmax(0, 1fr); background: var(--bg); }
  html:has(.staff-mobilebar) { scroll-padding-top: 4.5rem; } /* a focused control never ends up under the fixed bar */
  .staff-mobilebar { display: flex; align-items: center; gap: .75rem; position: sticky; top: 0; z-index: 6; background: var(--bg);
    border-bottom: 1px solid var(--line); padding: .25rem 16px; }
  .mobile-where { font-weight: 700; }
  .side-nav { position: fixed; top: 0; left: 0; bottom: 0; width: min(18rem, 85vw); z-index: 20; display: none; }
  .side-nav.open { display: flex; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .staff-body { padding: .25rem 16px 3rem; }
}
@media (max-width: 640px) {
  .recep-tools .btn { flex: 1 1 auto; }
  .indicators { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ind strong { font-size: 1.2rem; }
  dl.states { grid-template-columns: minmax(0, 1fr); }
  .resp-table.people td::before, .resp-table.ev-table td::before { min-width: 5.5rem; }
  /* The person heads the card: name and details as a block, without the "Person" label. */
  .resp-table.people td[data-label=Person], .resp-table.ev-table td[data-label=Event] { display: block; border-bottom: 1px solid var(--line); padding-bottom: .4rem; margin-bottom: .2rem; }
  .resp-table.people td[data-label=Person]::before, .resp-table.ev-table td[data-label=Event]::before { display: none; }
  .ind:last-child:nth-child(odd) { grid-column: span 2; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, .fchip, .ind, .nav-item { transition: background-color .15s, border-color .15s; }
  .side-nav.open { animation: drawer-in .2s ease; }
  dialog.drawer[open] { animation: drawer-in .2s ease; }
  .flash { animation: fade-in .2s ease; }
  @keyframes drawer-in { from { transform: translateX(30px); } }
  @keyframes fade-in { from { opacity: 0; } }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Adopted signature applied with one tap (legacy provisional templates) */
.apply-box { background: var(--bg); }
.sig-img { display: block; max-width: 100%; height: 90px; object-fit: contain; border-bottom: 2px solid var(--muted); margin: .25rem 0; }

/* Printable poster */
.poster { text-align: center; }
.poster h1 { font-size: 2.2rem; }
.poster-event { font-size: 1.3rem; font-weight: 700; }
.poster-qr { width: min(80vw, 420px); height: auto; aspect-ratio: 1; background: var(--bg); }
.poster-qr { border: 6px solid var(--primary); border-radius: 14px; padding: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.poster-steps { border-left: 4px solid var(--soft); padding: .25rem 0 .25rem 1.75rem; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.poster-steps { text-align: left; display: inline-block; font-size: 1.25rem; }
.poster-url { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
@media print {
  .no-print, .skip-link { display: none !important; }
  main { max-width: none; }
}

a { color: var(--text); text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--text); }
main p:not([class]):not(.notice *) { color: var(--muted); }

/* Host Waiver: agreement text readable on a phone, without changing its content. */
.host-doc { font-family: Georgia, "Times New Roman", serif; line-height: 1.6; }
.host-doc .doc-title { font-weight: 700; text-align: center; margin: 0; color: var(--text); }
/* Header as in the originals: logo (original aspect ratio, undistorted) with the title beside it. */
.doc-brand { display: flex; align-items: center; justify-content: center; gap: .9rem; margin: 0 0 1rem; flex-wrap: wrap; }
.doc-brand img { height: 3.6rem; width: auto; max-width: 100%; }
.doc-brand .doc-title { text-align: left; font-family: Georgia, "Times New Roman", serif; font-size: 1.12rem; line-height: 1.3; }
@media (max-width: 420px) { .doc-brand { flex-direction: column; } .doc-brand .doc-title { text-align: center; } }
/* Trainers: two documents in one continuous column; each starts with its own logo and title, clearly separated. */
.doc-brand-zenerosity img { height: 4.2rem; }
.doc-brand .doc-subtitle { font-family: Georgia, "Times New Roman", serif; font-style: italic; margin: .1rem 0 0; }
.doc-continuous .doc-brand-zenerosity { border-top: 3px solid var(--primary); margin-top: 2.2rem; padding-top: 1.2rem; }
.doc-choice .choice-opt { white-space: nowrap; margin-right: .6rem; }
.doc-choice .choice-opt.chosen { font-weight: 700; }
.doc-minor-student { border-left: 3px solid #B8C48A; padding-left: .8rem; margin: 1rem 0; }
.doc-h3 { font-size: 1rem; margin: .4rem 0; }
.host-doc .doc-h { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
.host-doc .doc-p { color: var(--text); }
.host-doc .doc-p.bold { font-weight: 700; }
.host-doc .doc-p.indent, .host-doc .doc-list.sub { margin-left: 1.5rem; }
.host-doc .doc-list.lettered { list-style: none; padding-left: 1rem; }
.host-doc .apply-box { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; margin: .75rem 0 1.25rem; }
.ini-img { height: 56px; }
@media (max-width: 600px) { dl.kv.doc-fields { grid-template-columns: 1fr; } dl.kv.doc-fields dd { margin-bottom: .5rem; } }

.host-doc .doc-p.center { text-align: center; }
.doc-minors { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.doc-minors th, .doc-minors td { border-bottom: 1px solid var(--line); padding: .4rem .5rem; text-align: left; }

/* Signature and initials fields of the original: marker while reading, placed mark in the preview. */
.field-slot { border: 2px dashed var(--border); border-radius: var(--radius); padding: .6rem .8rem; background: var(--bg); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  width: min(22rem, 100%); margin: .8rem auto 1.1rem; text-align: center; } /* proportional, centered width, the same for signature and initials */
.field-slot.placed { border-style: solid; border-color: var(--primary); }
.field-slot .slot-label { display: block; font-weight: 700; }
.field-slot .slot-empty, .field-slot .slot-note { display: block; color: var(--muted); font-size: .9rem; }
.draft-banner { background: var(--warn-bg); border: 2px solid var(--warn); border-radius: var(--radius); padding: .6rem .9rem; font-weight: 700; margin: .75rem 0; }
.stage-list { padding-left: 1.2rem; }
.stage-list li { margin: .15rem 0; padding: .1rem .5rem; border-radius: 6px; }
.stage-list li.current { font-weight: 700; background: var(--soft); color: var(--text); }

/* +1 phone: visible prefix next to the field */
.tel-wrap { display: flex; align-items: stretch; }
.tel-prefix { display: flex; align-items: center; padding: 0 .7rem; border: 2px solid var(--border); border-right: 0; border-radius: 8px 0 0 8px; background: var(--surface); font-weight: 700; }
.tel-wrap input { border-radius: 0 8px 8px 0; min-width: 0; }

/* Continuous document reading */
.doc-toc { padding: .5rem .9rem; }
.doc-toc summary { cursor: pointer; font-weight: 700; padding: .3rem 0; }
.doc-toc ol { margin: .5rem 0; padding-left: 1.4rem; }
.doc-toc li { margin: .25rem 0; }
.doc-h { scroll-margin-top: 1rem; }
.field-slot .typed-sig { display: block; width: max-content; max-width: 100%; margin: .2rem auto .4rem; padding: .1rem .5rem; overflow-wrap: anywhere; }
.field-slot .sig-img { height: 84px; width: auto; max-width: 100%; object-fit: contain; margin: .25rem auto; } /* no stretching or cropping */ /* the mark does not overlap the note */
.ini-option { font-size: 1.15rem; letter-spacing: .05em; }
.doc-part { margin: 0; padding: 0; border: 0; } /* invisible marker: does not break the text */

/* Final actions: view and download, then share or send. Two columns when there is room, one on narrow screens. */
.action-group { max-width: 34rem; margin: .9rem auto; }
.action-group h3 { font-size: 1rem; margin: 0 0 .5rem; text-align: center; }
.action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.action-grid .btn { width: 100%; white-space: normal; text-align: center; }
.action-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } /* no orphan button on its own */
@media (max-width: 480px) { .action-grid { grid-template-columns: 1fr; } }
/* One-tap adult selection */
.pick-list { display: grid; gap: .5rem; }
.pick { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 3rem; padding: .55rem .8rem; text-align: left; font: inherit; font-weight: 600;
  background: var(--bg); color: var(--text); border: 2px solid var(--border); border-radius: 8px; cursor: pointer; }
.pick:hover { background: var(--surface); }
.pick.on { background: var(--soft); border-color: var(--primary); }
.pick-mark { flex: none; width: 1.5rem; height: 1.5rem; border: 2px solid var(--border); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); font-size: .9rem; }
.pick.on .pick-mark { background: var(--primary); border-color: var(--primary); color: var(--text); }
.pick-name { overflow-wrap: anywhere; } /* long names wrap onto several lines, never cut off */

/* Event record */
.quick { display: flex; flex-direction: column; gap: .6rem; }
.quick-link { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.quick-link input { flex: 1 1 18rem; min-height: 2.5rem; }
.list-tools { margin: 0 0 .5rem; align-items: center; }
.list-tools .check { margin: 1.4rem 0 0; }
.dossier-group h3 { margin: 1rem 0 .3rem; font-size: 1rem; }
.new-client { border-left: 3px solid var(--soft); padding-left: .75rem; }
[tabindex="-1"]:focus { outline: none; }
@media (min-width: 641px) {
  table.dossier { table-layout: fixed; }
  table.dossier th:nth-child(1) { width: 24%; } table.dossier th:nth-child(2) { width: 20%; } table.dossier th:nth-child(3) { width: 13%; }
  table.dossier th:nth-child(4) { width: 12%; } table.dossier th:nth-child(5) { width: 14%; } table.dossier th:nth-child(6) { width: 17%; }
  table.dossier td[data-label=Person] { min-width: 0; }
}
table.dossier .chips { margin-bottom: .25rem; align-items: center; }
.cell { min-width: 0; flex: 1 1 auto; }
@media (max-width: 640px) { .resp-table, .resp-table tbody { display: block; width: 100%; } .resp-table td { overflow-wrap: anywhere; } .resp-table td::before { overflow-wrap: normal; flex-shrink: 0; } .resp-table td > * { min-width: 0; } .resp-table td .badge { white-space: normal; } }

/* Brand header for cover and confirmation screens: centered block with a controlled width. The paragraphs, forms,
   lists and tables that follow keep their usual alignment. */
.brand-head { max-width: 34rem; margin: 1.25rem auto 1.5rem; text-align: center; }
.brand-head img { display: block; height: 4.75rem; width: auto; max-width: 100%; margin: 0 auto .6rem; }
main .brand-head .brand-eyebrow { margin: 0; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.brand-head h1 { margin: .35rem 0 .25rem; text-wrap: balance; overflow-wrap: anywhere; }
main .brand-head .brand-sub { margin: 0; color: var(--muted); text-wrap: balance; }
main p.center { text-align: center; }
@media (max-width: 640px) { .brand-head { margin-top: .75rem; } .brand-head img { height: 3.9rem; } }
h2.center { text-align: center; }
.ev-table td[data-label=Status] .badge, .ev-table h1 .badge { white-space: nowrap; }
.doc-p.underline { text-decoration: underline; text-underline-offset: 2px; }
.login-card .brand-head { margin: .25rem auto 1rem; }
.login-card .brand-head img { height: 3.6rem; }
.center-actions { justify-content: center; }
/* Read-only information inside forms (fixed venue, documents assigned automatically): same label weight as fields. */
.info-block { margin: 1rem 0; }
.info-block .label { color: var(--text); font-weight: 700; margin: 0 0 .25rem; }
.info-block p.small { margin: 0; color: var(--text); }

/* Previous documents in the event record: collapsed, ordered and kept apart from the current one. */
.prev-docs { margin-top: .4rem; }
.prev-docs summary { cursor: pointer; font-size: .9rem; }
.prev-docs ol { margin: .3rem 0 0; padding-left: 1rem; }
.prev-docs li + li { margin-top: .5rem; border-top: 1px solid var(--line); padding-top: .5rem; }

/* Create event: event type as two large single-choice options (radio inputs, keyboard accessible); none preselected. */
/* Button choices (replacing drop-down lists, 2026-11-14) share the event-type look. */
.choice-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .5rem; }
.choice-buttons.compact .choice-options { grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.choice-option { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; align-items: center; border: 2px solid var(--border); border-radius: 8px; padding: .6rem .8rem; cursor: pointer; background: var(--bg); min-height: 2.75rem; }
.choice-option .choice-name { font-weight: 600; overflow-wrap: anywhere; }
.choice-option .small { overflow-wrap: anywhere; } /* long emails never spill out of the button */
.choice-option .small { grid-column: 2; }
.choice-option:has(input:checked) { border-color: var(--text); background: var(--soft); }
.choice-option:has(input:checked) .small { color: var(--text); }
.choice-option:has(input:focus-visible) { outline: 3px solid var(--text); outline-offset: 2px; }
.type-pick .type-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .6rem; }
.type-option { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; align-items: center; border: 2px solid var(--border); border-radius: 8px; padding: .7rem .8rem; cursor: pointer; background: var(--bg); }
.type-option .type-name { font-weight: 700; font-size: 1.05rem; }
.type-option .small { grid-column: 2; }
.type-option:has(input:checked) { border-color: var(--text); background: var(--soft); }
.type-option:has(input:checked) .small { color: var(--text); } /* muted grey on sage fails contrast (axe, 2026-11-14) */
.type-option:has(input:focus-visible) { outline: 3px solid var(--text); outline-offset: 2px; }


/* Visual review 2026-11-14 ---------------------------------------------------------------------------------------
   Selection markers in the palette (no browser blue): native checkboxes take the olive accent; the radio inside a
   button choice is drawn like the guest form's .pick-mark (circle, olive fill and black dot when chosen), so every
   choice in the system looks the same. Keyboard focus stays on the native input (outline on the whole button). */
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.choice-option input[type=radio], .type-option input[type=radio] { appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 1.5rem; height: 1.5rem; border: 2px solid var(--border); border-radius: 50%; background: var(--bg); display: inline-grid; place-content: center; }
.choice-option input[type=radio]::before, .type-option input[type=radio]::before { content: ''; width: .55rem; height: .55rem; border-radius: 50%; background: var(--text); transform: scale(0); }
.choice-option input[type=radio]:checked, .type-option input[type=radio]:checked { background: var(--primary); border-color: var(--primary); }
.choice-option input[type=radio]:checked::before, .type-option input[type=radio]:checked::before { transform: scale(1); }
/* Sign-in: the whole form is centred as one block; the password label stays aligned with its field. */
.login-card .choice-buttons legend { margin: 0 auto .5rem; text-align: center; }
.login-card .choice-options { grid-template-columns: repeat(2, minmax(8rem, 10rem)); justify-content: center; }
.login-card .actions { justify-content: center; margin-top: 1.25rem; }
.login-card .actions .btn { min-width: 12rem; justify-content: center; }
.login-card .brand-head { margin-bottom: 1.25rem; }
/* Reception: the chosen event as a card with "Change event"; the full list of buttons only when asked for. */
.event-current { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .25rem 0 1rem; }
.event-current .event-name { font-weight: 700; font-size: 1.1rem; }
.event-pick .choice-options { grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
/* Destructive or test-only actions stand apart from everyday ones. */
.danger-zone { border-top: 1px solid var(--border); margin-top: 1rem; padding-top: .75rem; }
.danger-zone h3 { font-size: 1rem; margin: 0 0 .5rem; }
.help-under { margin-top: .35rem; }
/* Choices with a second line: the marker aligns with the name; wide choices (hosts: name, email, phone) get room so
   an email breaks only if it really does not fit. Grouped-field legends line up with the other labels. */
.choice-option { align-items: start; }
.choice-option input[type=radio] { margin-top: .05rem; }
.choice-buttons.wide .choice-options { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
fieldset.field > legend { padding: 0; }

/* Settings (2026-11-14): one menu entry; its sections are buttons at the top of the page, wrapping on a phone so every
   section stays visible and reachable (no sideways-scrolling row). */
.settings-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.settings-tab { min-height: 2.75rem; padding: .45rem 1rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.settings-tab:hover { background: var(--surface); }
.settings-tab[aria-current=page] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 700; }
.nav-item .icon { flex: none; }
.login-alt { text-align: center; margin: 1rem 0 0; }

/* Calendar (2026-11-14): modal dialog with day, month and year grids; every cell is a 44px touch target. */
.date-input-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: stretch; }
.date-input-row input { flex: 1 1 9rem; max-width: 12rem; }
.cal-open { margin-top: .5rem; }
.date-input-row .cal-open { margin-top: 0; }
dialog.cal { width: min(24rem, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; background: var(--bg); color: var(--text); }
dialog.cal::backdrop { background: rgba(0, 0, 0, .45); }
dialog.cal h2 { margin: 0 0 .25rem; font-size: 1.15rem; text-align: center; }
.cal-hint { text-align: center; margin: 0 0 .75rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.cal-head .cal-label { flex: 1; text-align: center; font-weight: 700; justify-content: center; }
.cal-step { min-width: 2.75rem; justify-content: center; font-size: 1.2rem; }
.cal-grid { display: grid; gap: .3rem; }
.cal-days { grid-template-columns: repeat(7, 1fr); }
.cal-months { grid-template-columns: repeat(3, 1fr); }
.cal-years { grid-template-columns: repeat(4, 1fr); }
.cal-wd { text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); padding: .2rem 0; }
.cal-cell { min-height: 2.75rem; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--text); font: inherit; cursor: pointer; padding: 0; }
.cal-cell:hover:not([disabled]) { background: var(--surface); }
.cal-cell.today { border-color: var(--border); font-weight: 700; }
.cal-cell[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 700; }
.cal-cell[disabled] { color: var(--muted); background: var(--surface); text-decoration: line-through; cursor: not-allowed; }
dialog.cal .actions { justify-content: center; margin-top: .9rem; }

/* Address check (2026-11-14): a warning to review, with text (not colour alone); never blocks. */
.field-warn { margin: -.25rem 0 1rem; padding: .5rem .75rem; border-left: 4px solid var(--warn); background: var(--warn-bg); color: var(--warn); border-radius: 6px; }
.field-warn[hidden] { display: none; }
.state-name { margin-top: .25rem; }
.optional-choice { margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
