/* =============================================================================
   Board Travel — One Nevada Credit Union
   Theme: Executive Navy & Gold · Light / Dark via [data-theme="dark"] on <html>
   ============================================================================= */

:root {
    /* Brand */
    --brand-1: #173f66;
    --brand-2: #2d6ba3;
    --brand-3: #5b93c7;
    --brand-light: #ecf3f9;
    --brand-focus: rgba(45, 107, 163, 0.18);
    --gold: #c9a227;
    --gold-light: #faf3dc;

    /* Surfaces */
    --bg-body: #f6f8fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-input: #ffffff;
    --bg-row-alt: #fafbfc;

    /* Borders */
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Text */
    --text-primary: #14212f;
    --text-secondary: #374151;
    --text-muted: #64748b;
    --text-faint: #94a3b8;
    --text-on-brand: #ffffff;

    /* Status */
    --ok: #157347;
    --ok-bg: #e8f5ee;
    --warn: #b45309;
    --warn-bg: #fef3e2;
    --bad: #b42318;
    --bad-bg: #fdecea;

    --shadow-sm: 0 1px 3px rgba(16, 42, 67, 0.07);
    --shadow-md: 0 4px 16px rgba(16, 42, 67, 0.10);
    --shadow-lg: 0 10px 34px rgba(16, 42, 67, 0.16);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.15s ease;
}

[data-theme="dark"] {
    --brand-light: #16283c;
    --brand-focus: rgba(91, 147, 199, 0.25);
    --gold-light: #2e2712;

    --bg-body: #0e1622;
    --bg-card: #182435;
    --bg-card-hover: #1d2c40;
    --bg-input: #131e2d;
    --bg-row-alt: #15202f;

    --border: #2b3b52;
    --border-light: #1d2a3d;

    --text-primary: #edf2f7;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-faint: #64748b;

    --ok-bg: #12301f;
    --warn-bg: #33260e;
    --bad-bg: #3a1512;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 10px 34px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--brand-2); }

/* ===== Top bar ===== */
.topbar {
    background: linear-gradient(135deg, var(--brand-1), #10304f);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.topbar .brand { display: flex; flex-direction: column; line-height: 1.25; }
.topbar .brand-org {
    font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; opacity: .8;
}
.topbar .brand-app { font-size: 19px; font-weight: 650; }
.topbar .brand-app .gold { color: var(--gold); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
    background: rgba(255,255,255,0.12); border: none; color: #fff;
    width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
    font-size: 14px; display: inline-flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.icon-btn:hover { background: rgba(255,255,255,0.22); }
.user-chip {
    background: rgba(255,255,255,0.12); border-radius: 999px;
    padding: 5px 14px; font-size: 13px; white-space: nowrap;
}

/* ===== Layout ===== */
.wrap { max-width: 760px; margin: 0 auto; padding: 22px 16px 80px; }
.wrap-wide { max-width: 1240px; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    margin-bottom: 16px;
}

.section-title {
    display: flex; align-items: baseline; gap: 10px;
    margin: 0 0 4px; font-size: 17px; font-weight: 650;
}
.section-num {
    color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 1px;
    text-transform: uppercase;
}
.section-sub { color: var(--text-muted); font-size: 13.5px; margin: 0 0 14px; }

/* ===== Forms ===== */
.field { margin: 18px 0 0; }
.field-label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 3px; }
.field-label .req { color: var(--bad); margin-left: 2px; }
.field-hint { color: var(--text-muted); font-size: 13px; margin: 0 0 8px; }

input[type="text"], input[type="date"], input[type="email"], input[type="password"], textarea, select {
    width: 100%;
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-focus);
}
textarea { min-height: 84px; resize: vertical; }

/* Big tappable choice rows */
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice {
    display: flex; align-items: flex-start; gap: 11px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    cursor: pointer;
    background: var(--bg-input);
    transition: border-color var(--transition), background var(--transition);
    font-size: 15px;
}
.choice:hover { border-color: var(--brand-3); }
.choice input { margin-top: 3px; accent-color: var(--brand-2); width: 17px; height: 17px; flex: none; }
.choice.selected { border-color: var(--brand-2); background: var(--brand-light); }
.choice .choice-detail { display: block; color: var(--text-muted); font-size: 13px; }
.choice-other-input { margin-top: 8px; }

.choices-inline { display: flex; gap: 8px; flex-wrap: wrap; }
.choices-inline .choice { flex: 1 1 130px; justify-content: center; text-align: center; align-items: center; }

.field.invalid input[type="text"], .field.invalid input[type="date"],
.field.invalid input[type="password"], .field.invalid textarea { border-color: var(--bad); }
.field.invalid .choices .choice { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: 13px; margin-top: 6px; display: none; }
.field.invalid .field-error { display: block; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1.5px solid transparent; border-radius: var(--radius-sm);
    padding: 10px 20px; font-size: 14.5px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: all var(--transition); text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--brand-1); color: #fff; }
.btn-primary:hover { background: #1d4d7c; }
.btn-secondary { background: var(--bg-card); color: var(--brand-1); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--brand-2); color: var(--brand-2); }
[data-theme="dark"] .btn-secondary { color: var(--text-secondary); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-gold { background: var(--gold); color: #241c02; }
.btn-gold:hover { filter: brightness(1.06); }

/* ===== Chips & badges ===== */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 600;
}
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-brand { background: var(--brand-light); color: var(--brand-2); }
.chip-muted { background: var(--border-light); color: var(--text-muted); }
.chip-gold { background: var(--gold-light); color: #8a6d0d; }
[data-theme="dark"] .chip-gold { color: #e3c65c; }

/* ===== Banner / notices ===== */
.banner {
    border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 16px;
    font-size: 14px; border: 1px solid transparent;
}
.banner-warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(180, 83, 9, .25); }
.banner-ok { background: var(--ok-bg); color: var(--ok); border-color: rgba(21, 115, 71, .25); }
.banner-bad { background: var(--bad-bg); color: var(--bad); border-color: rgba(180, 35, 24, .25); }

/* ===== Event header (respondent form) ===== */
.event-hero {
    background: linear-gradient(140deg, var(--brand-1) 0%, #10304f 70%);
    color: #fff; border-radius: var(--radius); padding: 26px 24px;
    margin-bottom: 18px; box-shadow: var(--shadow-md);
}
.event-hero h1 { margin: 2px 0 6px; font-size: 24px; line-height: 1.2; }
.event-hero .hero-org { font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; opacity: .8; }
.event-hero .hero-meta { opacity: .92; font-size: 14.5px; }
.event-hero .hero-deadline {
    display: inline-block; margin-top: 12px; background: var(--gold); color: #241c02;
    padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px;
}
.responding-as {
    margin-top: 14px; font-size: 13.5px; background: rgba(255,255,255,0.12);
    display: inline-block; padding: 6px 13px; border-radius: 8px;
}

/* ===== Progress / summary tiles (admin) ===== */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.tile-label { font-size: 11.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--text-muted); }
.tile-value { font-size: 26px; font-weight: 700; margin-top: 2px; }
.tile-value.ok { color: var(--ok); }
.tile-value.warn { color: var(--warn); }
.tile-value.brand { color: var(--brand-2); }
.tile-detail { font-size: 12.5px; color: var(--text-muted); }
.tile .bar { height: 6px; border-radius: 3px; background: var(--border-light); margin-top: 8px; overflow: hidden; }
.tile .bar > div { height: 100%; background: linear-gradient(90deg, var(--brand-2), var(--gold)); border-radius: 3px; transition: width .4s ease; }

/* ===== Tabs ===== */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tab {
    padding: 9px 16px; cursor: pointer; font-weight: 600; font-size: 14px;
    color: var(--text-muted); border: none; background: none; font-family: inherit;
    border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.tab:hover { color: var(--brand-2); }
.tab.active { color: var(--brand-1); border-bottom-color: var(--gold); }
[data-theme="dark"] .tab.active { color: var(--text-primary); }

/* ===== Tables ===== */
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
    text-align: left; padding: 9px 10px; font-size: 11.5px; letter-spacing: .6px;
    text-transform: uppercase; color: var(--text-muted); border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--border-light); vertical-align: top; }
table.data tr:nth-child(even) td { background: var(--bg-row-alt); }
table.data tr:hover td { background: var(--bg-card-hover); }
td.nowrap, th.nowrap { white-space: nowrap; }

/* ===== Modal ===== */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(10, 22, 36, 0.55);
    display: none; align-items: flex-start; justify-content: center;
    z-index: 100; padding: 40px 16px; overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
    background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    width: 100%; max-width: 680px; padding: 24px;
}
.modal h3 { margin: 0 0 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ===== Toast ===== */
#toast {
    position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--brand-1); color: #fff; padding: 11px 22px; border-radius: 999px;
    font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg);
    opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200;
    max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--bad); }

/* ===== Misc ===== */
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.mt0 { margin-top: 0; }
.hidden { display: none !important; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) {
    .grid-2 { grid-template-columns: 1fr; }
    .wrap { padding: 14px 10px 70px; }
    .card { padding: 16px; }
    .event-hero { padding: 20px 18px; }
}

.loading-screen { text-align: center; padding: 90px 20px; color: var(--text-muted); }
.spinner {
    width: 34px; height: 34px; margin: 0 auto 16px; border-radius: 50%;
    border: 3px solid var(--border); border-top-color: var(--brand-2);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.success-check {
    width: 74px; height: 74px; border-radius: 50%; background: var(--ok-bg);
    color: var(--ok); display: flex; align-items: center; justify-content: center;
    font-size: 36px; margin: 0 auto 18px;
}

/* Print: the roster/headcounts pages print cleanly for the venue */
@media print {
    .topbar, .tabs, .btn, .no-print { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border-color: #ccc; }
}

/* =============================================================================
   Respondent form — a fixed viewport shell.

   Sized for the Board's demographic (typically 65–75): large type, large tap
   targets, high contrast. The page itself never scrolls — the header and the
   Back/Next bar are pinned, and only the question area scrolls, and only when
   a page is genuinely too tall. Most pages fit outright.

   Scoped to body.respondent so the admin dashboard keeps its denser layout.
   ============================================================================= */

body.respondent {
    font-size: 18px;
    line-height: 1.55;
    --text-muted: #4b5563;
    --text-faint: #6b7280;
}
[data-theme="dark"] body.respondent {
    --text-muted: #cbd5e1;
    --text-faint: #94a3b8;
}
body.respondent.shell-active {
    overflow: hidden;          /* the shell owns the viewport */
    overscroll-behavior: none;
}

/* ---- Shell -------------------------------------------------------------- */

.wizard-shell {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;            /* dvh keeps mobile browser chrome from clipping */
}
.wizard-inner {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 clamp(12px, 3vw, 20px);
}
.wizard-header {
    flex: none;
    padding: clamp(10px, 2vh, 18px) 0 0;
}
.wizard-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;             /* lets the scroll area actually shrink */
}
.wizard-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    position: relative;
}
/* When a page is taller than the screen, fade its bottom edge so it's obvious
   there is more below — easy to miss otherwise, and this audience won't go
   hunting for a scrollbar. */
.wizard-form { position: relative; }
.wizard-form::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 46px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
    background: linear-gradient(to bottom, rgba(246, 248, 250, 0), var(--bg-body));
}
.wizard-form.has-more::after { opacity: 1; }
[data-theme="dark"] .wizard-form::after {
    background: linear-gradient(to bottom, rgba(14, 22, 34, 0), var(--bg-body));
}
.wizard-footer {
    flex: none;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    padding: clamp(10px, 1.6vh, 16px) 0;
    padding-bottom: max(clamp(10px, 1.6vh, 16px), env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(16, 42, 67, 0.06);
}
[data-theme="dark"] .wizard-footer { box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.35); }

/* ---- Header ------------------------------------------------------------- */

body.respondent .event-hero {
    padding: clamp(14px, 2.4vh, 24px) clamp(16px, 3vw, 24px);
    margin-bottom: clamp(8px, 1.4vh, 14px);
}
body.respondent .event-hero h1 { font-size: clamp(20px, 3.4vw + 10px, 27px); margin: 2px 0 5px; }
body.respondent .event-hero .hero-meta { font-size: 16px; }
body.respondent .event-hero .hero-deadline { font-size: 15px; padding: 6px 14px; margin-top: 10px; }
body.respondent .responding-as { font-size: 15px; margin-top: 11px; }

/* Past page one the hero shrinks to a single line — the question matters more
   than the banner by then. */
.respondent .event-hero.compact { padding: 9px 16px; margin-bottom: 8px; }
.respondent .event-hero.compact .hero-org,
.respondent .event-hero.compact .hero-meta,
.respondent .event-hero.compact .hero-deadline { display: none; }
.respondent .event-hero.compact h1 { font-size: 16.5px; margin: 0; display: inline; }
.respondent .event-hero.compact .responding-as {
    display: inline; background: none; padding: 0; margin: 0 0 0 10px;
    font-size: 14px; opacity: .85;
}

body.respondent .banner { padding: 10px 14px; margin-bottom: 10px; font-size: 15px; }

/* ---- Progress ----------------------------------------------------------- */

.step-progress { margin: 0 0 clamp(8px, 1.4vh, 14px); }
.step-progress-text {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 15px; font-weight: 650; margin-bottom: 6px;
}
.step-progress-text #stepName { color: var(--text-muted); font-weight: 600; }
.step-progress-bar { height: 9px; background: var(--border); border-radius: 5px; overflow: hidden; }
.step-progress-bar > div {
    height: 100%; width: 0;
    background: linear-gradient(90deg, var(--brand-2), var(--gold));
    border-radius: 5px; transition: width .3s ease;
}

/* ---- Step card ---------------------------------------------------------- */

body.respondent .card {
    padding: clamp(16px, 2.6vh, 28px) clamp(16px, 3vw, 28px);
    margin-bottom: clamp(10px, 1.6vh, 16px);
}
.step-title {
    font-size: clamp(19px, 2.2vw + 12px, 25px);
    line-height: 1.25; margin: 0 0 8px; font-weight: 650;
}
.step-intro {
    font-size: 16.5px; color: var(--text-muted);
    margin: 0 0 clamp(12px, 2vh, 20px);
}

body.respondent .field { margin: clamp(14px, 2.2vh, 24px) 0 0; }
body.respondent .field:first-of-type { margin-top: 0; }
body.respondent .field-label { display: block; font-size: 18px; font-weight: 650; margin-bottom: 4px; }
body.respondent .field-hint { font-size: 15.5px; margin-bottom: 10px; }
body.respondent .optional { font-weight: 400; color: var(--text-muted); font-size: 15.5px; }

body.respondent input[type="text"],
body.respondent input[type="password"],
body.respondent textarea,
body.respondent select {
    font-size: 18px;
    padding: 13px 14px;
    border-width: 2px;
    border-radius: 10px;
}
body.respondent textarea { min-height: 100px; }
body.respondent input:focus,
body.respondent textarea:focus,
body.respondent select:focus { box-shadow: 0 0 0 4px var(--brand-focus); }

/* ---- Choices: responsive grid ------------------------------------------- */
/* Long option lists become two columns when there's width for it, which is
   what keeps the flight and meal pages inside one screen on a laptop. */

body.respondent .choices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 10px;
}
body.respondent .choice {
    font-size: 17.5px;
    padding: 13px 16px;
    border-width: 2px;
    border-radius: 10px;
    gap: 13px;
    min-height: 56px;
    align-items: center;
}
body.respondent .choice input { width: 23px; height: 23px; margin-top: 0; }
body.respondent .choice.selected {
    border-color: var(--brand-1);
    background: var(--brand-light);
    box-shadow: inset 0 0 0 1px var(--brand-1);
}
body.respondent .choice .choice-detail { font-size: 14.5px; margin-top: 0; line-height: 1.35; }
/* An option carrying a second detail line doesn't need the full single-line
   padding as well — this is what keeps the meal list on one screen. */
body.respondent .choice:has(.choice-detail) { padding-top: 9px; padding-bottom: 9px; min-height: 0; }
/* "None of these" and "Another airline or time" always sit on their own row. */
body.respondent .choice-wide { grid-column: 1 / -1; }

.choices-big { display: flex; flex-direction: row; gap: 12px; }
.choices-big .choice {
    flex: 1; justify-content: center; text-align: center;
    font-size: 18.5px; font-weight: 600; min-height: 62px;
}
@media (max-width: 520px) { .choices-big { flex-direction: column; } }

body.respondent .choice-other-input { font-size: 17px; padding: 11px 13px; margin-top: 9px; }

/* ---- Date of birth ------------------------------------------------------ */
/* Three dropdowns rather than a picker: a native picker opens on today, so a
   birth year is a very long scroll. */

.date-parts { display: flex; gap: 10px; }
.date-part { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.date-part-label { font-size: 14.5px; font-weight: 600; color: var(--text-muted); }
.date-part select { width: 100%; }
.date-parts .date-part:nth-child(1) { flex: 1.4; }

body.respondent .field-error { font-size: 15.5px; font-weight: 600; margin-top: 7px; }
body.respondent .field.invalid .field-label { color: var(--bad); }

/* ---- Navigation --------------------------------------------------------- */

.btn-xl {
    font-size: 18px;
    padding: 14px 30px;
    border-radius: 10px;
    min-height: 56px;
}
.wizard-nav { display: flex; align-items: center; gap: 12px; }
.wizard-nav #nextBtn, .wizard-nav #submitBtn { margin-left: auto; }
.wizard-help {
    font-size: 14.5px; color: var(--text-muted); text-align: center;
    flex: 1; min-width: 0;
}
.invisible { visibility: hidden; }

@media (max-width: 430px) {
    .btn-xl { padding: 14px 20px; font-size: 17px; }
    .wizard-help { display: none; }
}

/* ---- Review ------------------------------------------------------------- */

.review { margin: 0; }
.review-row {
    display: flex; flex-wrap: wrap; gap: 4px 16px;
    padding: 11px 0; border-bottom: 1px solid var(--border-light);
}
.review-row:last-child { border-bottom: none; }
.review dt { flex: 0 0 230px; font-weight: 650; color: var(--text-muted); font-size: 15.5px; }
.review dd {
    flex: 1 1 230px; margin: 0; display: flex;
    justify-content: space-between; align-items: flex-start; gap: 12px; font-size: 17px;
}
.review dd span { overflow-wrap: anywhere; }
.review dd .btn { flex: none; }
@media (max-width: 560px) { .review dt { flex: 1 1 100%; } }

/* ---- Short viewports ---------------------------------------------------- */
/* Laptops at 1366x768 and phones in landscape: tighten everything a notch so
   a page still lands inside one screen. */

@media (max-height: 720px) {
    body.respondent { font-size: 17px; }
    body.respondent .event-hero { padding: 12px 18px; }
    body.respondent .event-hero h1 { font-size: 20px; }
    body.respondent .event-hero .hero-meta,
    body.respondent .responding-as { font-size: 14.5px; }
    .step-title { font-size: 20px; }
    .step-intro { font-size: 15.5px; margin-bottom: 12px; }
    body.respondent .choice { min-height: 50px; padding: 10px 14px; font-size: 17px; }
    .choices-big .choice { min-height: 54px; }
    body.respondent .choices { gap: 8px; }
    body.respondent input[type="text"], body.respondent input[type="password"],
    body.respondent textarea, body.respondent select {
        padding: 11px 13px; font-size: 17px;
    }
    body.respondent textarea { min-height: 76px; }
    .btn-xl { min-height: 50px; padding: 12px 26px; }
    /* Reclaim the header: on a short screen the banner is competing with the
       question for space, and the question wins. */
    .wizard-header { padding-top: 8px; }
    .respondent .event-hero.compact { padding: 6px 14px; margin-bottom: 6px; }
    .respondent .event-hero.compact .responding-as { display: none; }
    .respondent .event-hero:not(.compact) { padding: 12px 16px; }
    .step-progress { margin-bottom: 8px; }
    .step-progress-text { font-size: 14px; margin-bottom: 4px; }
    .step-progress-bar { height: 7px; }
    body.respondent .card { margin-bottom: 8px; }
    .wizard-footer { padding: 9px 0; }
}
@media (max-height: 560px) {
    .event-hero:not(.compact) .hero-meta,
    .event-hero:not(.compact) .hero-org { display: none; }
    /* Drop the preamble inside the wizard only. On the password screen that
       sentence is what tells someone which password to type, so it stays. */
    .wizard-shell .step-intro { display: none; }
    body.respondent .choice { min-height: 46px; }
}

/* ---- Brand bar + photo hero --------------------------------------------- */
/* The logo is a JPEG on white, so it sits on its own light bar rather than on
   the navy hero, where it would show as a white box. */

.brandbar {
    flex: none;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .brandbar {
    background: #f4f6f9;          /* the mark needs a light ground in either theme */
    border-bottom-color: #cbd5e1;
}
.brandbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 9px;
    padding-bottom: 9px;
}
.brand-logo {
    height: 34px;
    width: auto;
    display: block;
}
.brandbar-title {
    font-size: 14px;
    font-weight: 650;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #5b6b7d;
    white-space: nowrap;
}

/* The hero carries the venue photo (or the built-in illustration) behind a
   navy scrim. Text sits on the darkest side of the scrim, so contrast holds
   whatever image is dropped in. */
.respondent .event-hero.has-photo {
    background-color: var(--brand-1);
    background-size: cover;
    /* Favour the upper-middle of a landscape photo — sky and horizon read
       better behind text than the busy foreground detail lower down. */
    background-position: center 42%;
    background-repeat: no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.10);
}
.respondent .event-hero.has-photo .hero-org { color: #cfe0ee; }
.respondent .event-hero.has-photo .hero-meta { color: #eaf1f7; }
.respondent .event-hero.has-photo .responding-as {
    background: rgba(4, 18, 32, 0.55);
    backdrop-filter: blur(2px);
}
/* Compact mode keeps a sliver of the photo rather than dropping it entirely. */
.respondent .event-hero.compact.has-photo { background-position: center 38%; }

@media (max-height: 720px) {
    .brandbar-inner { padding-top: 6px; padding-bottom: 6px; }
    .brand-logo { height: 28px; }
    .brandbar-title { font-size: 12.5px; }
}
@media (max-width: 430px) {
    .brandbar-title { display: none; }
    .brand-logo { height: 30px; }
}

/* Print: keep the logo, drop the photo so it doesn't waste toner. */
@media print {
    .respondent .event-hero.has-photo { background-image: none !important; }
}

/* A short page sits centred in the space rather than clinging to the top. */
.wizard-scroll.centered > .wizard-inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.respondent .event-hero.has-photo:not(.compact) { min-height: 158px; }
@media (max-height: 720px) {
    .respondent .event-hero.has-photo:not(.compact) { min-height: 0; }
}

/* Logo inside the compact header: keeps the brand present on every page
   without the standalone bar's ~52px. */
.hero-logo { display: none; }
.wizard-shell.past-first .brandbar { display: none; }
.respondent .event-hero.compact .hero-logo {
    display: inline-block;
    height: 19px;
    width: auto;
    background: #fff;
    padding: 3px 5px;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 9px;
}
@media (max-width: 430px) {
    .brandbar-inner { padding-top: 6px; padding-bottom: 6px; }
    .respondent .event-hero.compact .hero-logo { height: 17px; margin-right: 7px; }
}

/* Keep the compact header to a single line: the event name truncates rather
   than wrapping, and "Responding as" drops on narrow screens (it is shown in
   full on the first page and again on the review page). */
.respondent .event-hero.compact h1 {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}
@media (max-width: 620px) {
    .respondent .event-hero.compact .responding-as { display: none; }
    .respondent .event-hero.compact h1 { max-width: calc(100% - 44px); }
}

@media (max-width: 620px) {
    /* The taller photo hero is for desktop presence; on a phone the question
       needs that space more than the picture does. */
    .respondent .event-hero.has-photo:not(.compact) { min-height: 0; }
    .respondent .event-hero:not(.compact) .hero-org { display: none; }
}

/* Belt and braces for whatever photo an event uses: a soft shadow keeps the
   header text readable even where an image runs bright under it. */
.respondent .event-hero.has-photo h1,
.respondent .event-hero.has-photo .hero-meta,
.respondent .event-hero.has-photo .hero-org {
    text-shadow: 0 1px 3px rgba(4, 14, 24, 0.65);
}

/* =============================================================================
   Paper fallback — the blank form Michelle prints for anyone who would rather
   fill it in by hand. Hidden on screen; the print rules below reveal it.
   ============================================================================= */

#printableForm { display: none; }

@media print {
    /* Printing the blank form: hide the dashboard entirely, show only the form. */
    body.print-blank > *:not(#printableForm) { display: none !important; }
    body.print-blank #printableForm { display: block; }
    body.print-blank { background: #fff; }

    @page { size: letter portrait; margin: 0.5in 0.55in; }

    .pf-page {
        color: #000;
        font-family: "Segoe UI", Arial, sans-serif;
        font-size: 10.5pt;
        line-height: 1.35;
    }

    .pf-header {
        display: flex;
        align-items: flex-start;
        gap: 14px;
        border-bottom: 2.5px solid #173f66;
        padding-bottom: 6px;
        margin-bottom: 8px;
    }
    .pf-logo { height: 34px; width: auto; }
    .pf-headings { flex: 1; }
    .pf-headings h1 { font-size: 15pt; margin: 0 0 1px; line-height: 1.15; }
    .pf-sub { font-size: 9.5pt; color: #333; }
    .pf-title {
        text-align: right;
        font-size: 12pt;
        font-weight: 700;
        color: #173f66;
        line-height: 1.1;
        text-transform: uppercase;
        letter-spacing: .5px;
    }

    .pf-intro {
        font-size: 9.5pt;
        margin: 0 0 7px;
        padding: 6px 10px;
        border: 1px solid #999;
        border-radius: 4px;
        background: #f4f6f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .pf-section { margin-bottom: 4px; }
    /* Let long sections flow across the page break, but never strand a heading
       at the foot of a page or split a single question in half. */
    .pf-section h2, .pf-section h3 { break-after: avoid; }
    .pf-line, .pf-box, .pf-conditional, .pf-meals tr { break-inside: avoid; }
    .pf-section h2 {
        font-size: 11pt;
        margin: 0 0 5px;
        padding-bottom: 2px;
        border-bottom: 1px solid #bbb;
        display: flex;
        align-items: baseline;
        gap: 7px;
    }
    .pf-num {
        display: inline-block;
        min-width: 17px;
        height: 17px;
        line-height: 17px;
        text-align: center;
        font-size: 9pt;
        border-radius: 50%;
        background: #173f66 !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .pf-section h3 {
        font-size: 10pt;
        margin: 6px 0 3px;
    }
    .pf-note { font-size: 9pt; color: #444; margin: 0 0 6px; }

    /* Conditional blocks — paper can't branch, so they're marked instead. */
    .pf-conditional {
        border-left: 3px solid #c9a227;
        padding-left: 9px;
        margin: 7px 0 0;
    }
    .pf-only {
        font-size: 8.5pt;
        font-style: italic;
        color: #6b5500;
        margin: 0 0 4px;
        text-transform: uppercase;
        letter-spacing: .3px;
    }

    /* Write-on lines */
    .pf-line { display: flex; align-items: baseline; gap: 7px; margin: 4px 0; }
    .pf-line-label { font-size: 9.5pt; white-space: nowrap; }
    .pf-line-label em { font-style: normal; color: #666; font-size: 8.5pt; }
    .pf-rule { flex: 1; border-bottom: 1px solid #444; height: 15px; }
    .pf-rule-only { border-bottom: 1px solid #444; height: 15px; margin-top: 5px; }
    .pf-two { display: flex; gap: 22px; }
    .pf-two .pf-line { flex: 1; }

    /* Tick boxes */
    .pf-boxes { display: flex; flex-direction: column; gap: 2px; }
    .pf-boxes-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
    .pf-box { display: flex; align-items: flex-start; gap: 7px; font-size: 9.5pt; }
    .pf-tick {
        flex: none;
        width: 11px;
        height: 11px;
        border: 1.4px solid #333;
        border-radius: 2px;
        margin-top: 2px;
        display: inline-block;
    }

    /* Meals grid with a column for the guest */
    .pf-meals { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
    .pf-meals th {
        text-align: left;
        font-size: 8.5pt;
        text-transform: uppercase;
        letter-spacing: .4px;
        border-bottom: 1px solid #999;
        padding: 2px 4px;
    }
    .pf-meals th:nth-child(2), .pf-meals th:nth-child(3) { text-align: center; width: 52px; }
    .pf-meals td { padding: 1px 4px; border-bottom: 1px solid #ddd; vertical-align: middle; }
    .pf-meals .pf-detail { font-size: 8.5pt; color: #555; }
    .pf-tickcell { text-align: center; }

    .pf-footer { margin-top: 7px; border-top: 2px solid #173f66; padding-top: 8px; break-inside: avoid; }
    .pf-signature { display: flex; gap: 24px; }
    .pf-signature .pf-line { flex: 1; }
    .pf-return { font-size: 9pt; margin: 6px 0 2px; }
    .pf-privacy { font-size: 8.5pt; color: #444; margin: 0 0 5px; }
    .pf-office {
        font-size: 8pt;
        color: #666;
        border-top: 1px dashed #bbb;
        padding-top: 5px;
    }
}

@media print {
    /* Rental clubs: one line per person on the paper form. */
    .pf-inline-row { display: flex; align-items: baseline; gap: 10px; margin: 3px 0; }
    .pf-inline-row .pf-mini { font-size: 9pt; font-weight: 700; min-width: 62px; }
    .pf-boxes-inline { display: flex; gap: 16px; flex-wrap: wrap; }
    .pf-boxes-inline .pf-box { font-size: 9pt; }
}

/* =============================================================================
   Access gate — deliberately anonymous.

   No logo, no organisation, no event. A photograph and a password box. The
   only thing a stranger learns is that something is behind it.
   ============================================================================= */

body.gate {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    background: #0b1a2a;
    color: #f2f6fa;
}

/* Fixed so the photo doesn't shift when the mobile keyboard opens. */
.gate-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(180deg, rgba(6, 18, 30, 0.62) 0%, rgba(6, 18, 30, 0.72) 55%, rgba(6, 18, 30, 0.88) 100%),
        url("../img/venue.jpg");
    background-size: cover;
    background-position: center 45%;
    background-repeat: no-repeat;
    z-index: 0;
}

.gate-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
}

.gate-card {
    width: 100%;
    max-width: 420px;
    background: rgba(9, 22, 36, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.gate-title {
    margin: 0 0 22px;
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 0.1px;
    line-height: 1.3;
}

.gate-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #dbe6f0;
}

.gate-input-row { display: flex; gap: 10px; }

body.gate input[type="password"],
body.gate input[type="text"] {
    flex: 1;
    min-width: 0;
    font-size: 18px;
    padding: 14px 15px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    font-family: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
body.gate input::placeholder { color: rgba(255, 255, 255, 0.5); }
body.gate input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14);
}

.gate-go {
    flex: none;
    width: 56px;
    border: none;
    border-radius: 10px;
    background: #f2f6fa;
    color: #0b1a2a;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}
.gate-go:hover { background: #ffffff; }
.gate-go:active { transform: translateY(1px); }
.gate-go:disabled { opacity: .55; cursor: not-allowed; }
.gate-go.busy::after { content: "…"; }
.gate-go.busy { font-size: 20px; }

.gate-field.invalid input { border-color: #ff8a80; }
.gate-error {
    min-height: 0;
    margin-top: 10px;
    font-size: 14.5px;
    font-weight: 600;
    color: #ffb4ab;
    line-height: 1.4;
}
.gate-error:empty { margin-top: 0; }

.gate-show {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: 16px;
    font-size: 15px;
    color: #cddbe8;
    cursor: pointer;
}
.gate-show input { width: 20px; height: 20px; accent-color: #f2f6fa; cursor: pointer; }

.gate-help {
    margin: 22px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(226, 236, 245, 0.72);
}

@media (max-height: 520px) {
    .gate-card { padding: 22px 22px; }
    .gate-title { font-size: 19px; margin-bottom: 16px; }
    .gate-help { display: none; }
}
