/* Bongo Bongo guest forms — shared styles for guest and staff screens.
   Design language mirrors divebongo.com (Webflow): Poppins, deep teal-navy, sand and brand green, pill buttons,
   uppercase green eyebrow labels. Fonts are self-hosted (nothing loaded from third parties). */
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/Poppins-Regular.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/Poppins-Medium.woff") format("woff"); }
@font-face { font-family: "Poppins"; font-weight: 600 700; font-style: normal; font-display: swap; src: url("/assets/fonts/Poppins-Bold.woff") format("woff"); }

:root {
  /* Brand (from the website's variables) */
  --navy: #0D313E;          /* Brand Color 1 */
  --navy-2: #173E4D;        /* bluelite */
  --navy-3: #224A58;        /* box light */
  --sand: #E0E0DB;          /* Brand Color 2 */
  --sand-2: #EBEBE5;        /* litelite-2 */
  --green: #6BBE45;         /* Brand Color 2-3 */
  --lime: var(--green);
  /* Surfaces & text */
  --bg: #EBEBE5;
  --surface: #FFFFFF;
  --surface-2: #F4F4EF;
  --ink: #0D313E;
  --muted: #4E6470;
  --line: #D4D4D4;
  --line-strong: #A7B3B8;
  --primary: #6BBE45;
  --on-primary: #0D313E;
  --focus: #2F7FD8;
  --ok: #2E8B3A;
  --ok-tint: #E4F3E1;
  --warn: #8A5A00;
  --warn-tint: #FFF4D6;
  --bad: #B3261E;
  --bad-tint: #FCEBEA;
  --info: #1F5E99;
  --info-tint: #E5EFF7;
  --sel: #0D313E;
  --sel-ink: #FFFFFF;
  --sig-ink: #0D313E;
  --shadow: 0 1px 2px rgba(13, 49, 62, .06), 0 8px 24px rgba(13, 49, 62, .07);
  --radius: 16px;
  --pill: 999px;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D313E; --surface: #173E4D; --surface-2: #224A58; --ink: #F1F1F1; --muted: #B9C6CC; --line: #2E5566; --line-strong: #4C7385;
    --primary: #6BBE45; --on-primary: #0D313E; --focus: #8CC2FF;
    --ok: #7FD66A; --ok-tint: #1B3A24; --warn: #F3C35B; --warn-tint: #3A2E12; --bad: #FF8A80; --bad-tint: #3A1A18; --info: #8CC2FF; --info-tint: #163A50;
    --sel: #6BBE45; --sel-ink: #0D313E; --sig-ink: #F1F1F1; --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D313E; --surface: #173E4D; --surface-2: #224A58; --ink: #F1F1F1; --muted: #B9C6CC; --line: #2E5566; --line-strong: #4C7385;
  --primary: #6BBE45; --on-primary: #0D313E; --focus: #8CC2FF;
  --ok: #7FD66A; --ok-tint: #1B3A24; --warn: #F3C35B; --warn-tint: #3A2E12; --bad: #FF8A80; --bad-tint: #3A1A18; --info: #8CC2FF; --info-tint: #163A50;
  --sel: #6BBE45; --sel-ink: #0D313E; --sig-ink: #F1F1F1; --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 18px; line-height: 1.5; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--info); }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0; font-weight: 700; letter-spacing: -.01em; }
/* Uppercase green label, as the website uses above its headings */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--green); }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.mono { font-family: var(--mono); font-size: .9em; }
.stack { display: grid; gap: 14px; }
.stack-lg { display: grid; gap: 22px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar { background: var(--navy); color: #F1F1F1; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; position: sticky; top: 0; z-index: 20; }
.topbar-inner { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.topbar img.logo { height: 38px; width: auto; display: block; }
.topbar .title { font-weight: 500; font-size: 15px; color: var(--sand); }
.badge-demo { background: #FFE08A; color: #3D2B00; font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; }
.save-state { font-size: 14px; color: rgba(255,255,255,.85); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.save-state .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); }
.save-state.saving .dot { background: #FFE08A; }
.save-state.lost { color: #FFD1CC; font-weight: 600; }
.save-state.lost .dot { background: #FF6B5E; }
.btn-help { background: transparent; color: #F1F1F1; border: 1.5px solid rgba(224,224,219,.55); border-radius: var(--pill); padding: 6px 14px; font: inherit; font-size: 15px; font-weight: 600; min-height: 40px; cursor: pointer; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.page { max-width: 980px; margin: 0 auto; padding-inline: 16px; padding-block: 18px 120px; }
.narrow { max-width: 720px; margin-inline: auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h2 { font-size: 24px; }
.card h3 { font-size: 19px; }
.banner { border-radius: 14px; padding: 12px 16px; font-size: 16px; border: 1.5px solid; }
.banner.info { background: var(--info-tint); border-color: var(--info); }
.banner.warn { background: var(--warn-tint); border-color: var(--warn); }
.banner.bad { background: var(--bad-tint); border-color: var(--bad); }
.banner.ok { background: var(--ok-tint); border-color: var(--ok); }
.banner b { font-weight: 700; }

/* ── Progress ────────────────────────────────────────────────────────────── */
.progress { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.progress button { flex: none; display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--pill); padding: 7px 16px 7px 8px; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; min-height: 42px; transition: border-color .3s ease, background-color .3s ease; }
.progress .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface-2); border: 1.5px solid var(--line-strong); }
.progress button.done .n { background: var(--green); border-color: var(--green); color: var(--navy); }
.progress button.attention .n { background: var(--warn-tint); border-color: var(--warn); color: var(--warn); }
.progress button.current { border-color: var(--navy); background: var(--navy); color: #F1F1F1; font-weight: 700; }
.progress button.current .n { background: var(--green); border-color: var(--green); color: var(--navy); }

/* ── Buttons & inputs ────────────────────────────────────────────────────── */
button { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--pill); border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 10px 24px; min-height: 52px; font-weight: 600; font-size: 17px; cursor: pointer; text-decoration: none; transition: background-color .3s ease, border-color .3s ease, color .3s ease; }
.btn:hover:not(:disabled) { border-color: var(--navy); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: #5DAE39; border-color: #5DAE39; }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn-small { min-height: 40px; padding: 6px 16px; font-size: 15px; }
.btn-link { text-align: left; background: none; border: none; color: var(--info); text-decoration: underline; padding: 0; min-height: 0; font-weight: 600; cursor: pointer; }
label { font-weight: 600; font-size: 16px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field .hint { font-size: 14.5px; color: var(--muted); font-weight: 400; }
.field .err { font-size: 14.5px; color: var(--bad); font-weight: 700; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--bad); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=search], input[type=number], select, textarea {
  font: inherit; font-size: 18px; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 11px 14px; min-height: 52px; width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.dmy { display: grid; grid-template-columns: 1fr 1.6fr 1.3fr; gap: 8px; }
.check { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; padding: 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); cursor: pointer; font-weight: 600; }
.check input { width: 26px; height: 26px; margin: 1px 0 0; accent-color: var(--primary); }
.check.optional { font-weight: 500; }

/* ── Yes / No (neutral styling: neither answer looks "better") ──────────── */
.q { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); display: grid; gap: 12px; }
.q.missing { border-color: var(--warn); background: var(--warn-tint); }
.q-head { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.q-num { min-width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1.5px solid var(--line-strong); font-weight: 700; font-size: 15px; }
.q-text { font-size: 17.5px; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 360px; }
.yn button { min-height: 54px; border-radius: var(--pill); border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); font-weight: 700; font-size: 18px; cursor: pointer; }
.yn button[aria-pressed="true"] { background: var(--sel); border-color: var(--sel); color: var(--sel-ink); }
.box { border-left: 4px solid var(--line-strong); margin-left: 8px; padding-left: 14px; display: grid; gap: 10px; }
.box-title { font-weight: 700; font-size: 13px; letter-spacing: .15em; text-transform: uppercase; color: var(--green); }

/* ── Documents ───────────────────────────────────────────────────────────── */
.doc-pages { display: grid; gap: 12px; }
.doc-pages img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; display: block; }
.doc-scroll { max-height: 70vh; overflow-y: auto; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; background: var(--surface-2); }
.prefill { display: grid; gap: 4px; }
.prefill div { display: flex; gap: 10px; flex-wrap: wrap; }
.prefill dt { color: var(--muted); min-width: 140px; }
.prefill dd { margin: 0; font-weight: 600; }

/* ── Signature ───────────────────────────────────────────────────────────── */
.signer { border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 14px; background: var(--surface); }
.signer.signed { border-color: var(--ok); background: var(--ok-tint); }
.pad-wrap { position: relative; aspect-ratio: 5 / 2; width: 100%; max-width: 760px; outline: 2px dashed var(--line-strong); outline-offset: -2px; border-radius: 16px; background: var(--surface); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overflow: hidden; }
.pad-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.pad-line { position: absolute; left: 6%; right: 6%; bottom: 24%; border-bottom: 2px solid var(--line-strong); pointer-events: none; }
.pad-hint { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); pointer-events: none; padding: 0 10% 10%; font-size: 16px; line-height: 1.3; }

/* ── Bottom nav ──────────────────────────────────────────────────────────── */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 15; }
.bottom-nav-inner { max-width: 980px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.bottom-nav .btn { min-width: 130px; }

/* ── Overlays ────────────────────────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; background: rgba(13, 49, 62, .72); display: grid; place-items: center; z-index: 50; padding: 16px; }
.dialog { background: var(--surface); color: var(--ink); border-radius: 20px; padding: 24px; max-width: 520px; width: 100%; display: grid; gap: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.dialog h2 { font-size: 22px; }

/* ── Status pills (text + icon + colour) ─────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 14px; font-weight: 700; border: 1.5px solid; white-space: nowrap; }
.pill::before { font-size: 13px; }
.pill.ok { color: var(--ok); border-color: var(--ok); background: var(--ok-tint); }
.pill.ok::before { content: "✓"; }
.pill.warn { color: var(--warn); border-color: var(--warn); background: var(--warn-tint); }
.pill.warn::before { content: "!"; }
.pill.bad { color: var(--bad); border-color: var(--bad); background: var(--bad-tint); }
.pill.bad::before { content: "✕"; }
.pill.info { color: var(--info); border-color: var(--info); background: var(--info-tint); }
.pill.info::before { content: "…"; }
.pill.neutral { color: var(--muted); border-color: var(--line-strong); background: var(--surface-2); }
.pill.neutral::before { content: "○"; }

/* ── Start screens ───────────────────────────────────────────────────────── */
.hero { background: var(--navy); color: #F1F1F1; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; text-align: center; }
.hero .inner { max-width: 560px; display: grid; gap: 22px; justify-items: center; }
.hero img.logo { width: min(320px, 70vw); height: auto; }
.hero h1 { font-size: clamp(28px, 5vw, 40px); }
.hero p { color: var(--sand); font-size: 19px; }
.hero .btn { border-color: rgba(224,224,219,.55); color: #F1F1F1; background: transparent; }
.hero .btn-primary { background: var(--green); border-color: var(--green); color: var(--navy); font-size: 22px; min-height: 68px; padding: 12px 48px; }
.hero .muted-light { color: rgba(224,224,219,.75); font-size: 15px; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  .card { padding: 16px; }
  .topbar .title { display: none; }
  .bottom-nav .btn { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .topbar, .bottom-nav, .progress { display: none !important; } }
h2[tabindex="-1"]:focus { outline: none; }
/* Keep programmatic scrolling (jump to a missing answer, focus) clear of the fixed top and bottom bars. */
html { scroll-padding-top: 90px; scroll-padding-bottom: 110px; }

.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.todo li { padding-left: 1.4em; position: relative; }
.todo li::before { content: '→'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.todo .btn-link { font-size: 17px; line-height: 1.35; }

/* Activity picker (guest) */
.act-cat { display: grid; gap: 10px; }
.act-cat h3 { font-size: 13px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--green); }
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.act-tile { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; text-align: left; width: 100%; min-height: 76px;
  padding: 14px 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer;
  transition: border-color .12s, background-color .12s; -webkit-tap-highlight-color: transparent; }
.act-tile:hover:not(:disabled) { border-color: var(--line-strong); }
.act-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.act-tile.on { border-color: var(--green); background: var(--surface); box-shadow: inset 0 0 0 1px var(--green); }
.act-tile:disabled { cursor: not-allowed; opacity: .6; }
.act-check { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; margin-top: 1px; }
.act-tile.on .act-check { background: var(--green); border-color: var(--green); }
.act-tile.on .act-check::after { content: ''; width: 8px; height: 14px; border: solid var(--navy); border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }
.act-text { display: grid; gap: 2px; }
.act-name { font-weight: 700; font-size: 18px; line-height: 1.25; }
.act-desc { font-size: 15px; color: var(--muted); line-height: 1.35; }
.act-summary { display: grid; gap: 10px; padding: 18px; border-radius: 16px; background: var(--navy); color: #F1F1F1; }
.act-summary .muted { color: var(--sand); }
.act-summary .banner { color: var(--ink); }
.act-forms { margin: 0; padding-left: 1.4em; display: grid; gap: 4px; }

/* Confirmation after signing */
.toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%) scale(.96); opacity: 0; z-index: 60;
  display: flex; align-items: center; gap: 12px; padding: 18px 26px; border-radius: 999px; background: var(--navy); color: #F1F1F1;
  font-weight: 700; font-size: 19px; box-shadow: 0 16px 40px rgba(13,49,62,.35); transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.toast-check { width: 30px; height: 30px; border-radius: 50%; background: var(--green); display: grid; place-items: center; }
.toast-check::after { content: ''; width: 7px; height: 13px; border: solid var(--navy); border-width: 0 3px 3px 0; transform: translateY(-2px) rotate(45deg); }

/* Thank-you screen */
.thanks { display: grid; justify-items: center; text-align: center; gap: 16px; padding: 40px 24px; }
.thanks h2 { font-size: clamp(28px, 4.5vw, 38px); }
.thanks p { max-width: 520px; }
.thanks-lead { font-size: 20px; font-weight: 500; }
.thanks-mark { width: 84px; height: 84px; border-radius: 50%; background: var(--green); display: grid; place-items: center; animation: pop .45s ease-out; }
.thanks-mark::after { content: ''; width: 20px; height: 38px; border: solid var(--navy); border-width: 0 7px 7px 0; transform: translateY(-4px) rotate(45deg); border-radius: 2px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.btn-xl { min-height: 64px; font-size: 20px; padding: 12px 40px; }

/* Gentle nudge when something still needs doing */
.nudge { animation: nudge .5s ease; }
@keyframes nudge { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.nudge-tip { grid-column: 1 / -1; margin-top: 6px; color: var(--bad); font-weight: 600; font-size: 15px; }
label.check.nudge, .signer.nudge { border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-tint); }
.sign-why { font-size: 14.5px; line-height: 1.5; color: var(--muted); text-align: right; min-height: 1.5em; }
.form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form-head h2 { flex: 1 1 260px; }
.ref-line { margin-top: 10px; }
/* Signature pad fills its panel on large screens */
.pad-wrap { max-width: 100%; }
/* Date of birth: never squash the day box */
.dmy { grid-template-columns: minmax(76px, 1fr) minmax(130px, 1.6fr) minmax(96px, 1.3fr); }
.dmy select { padding-inline: 10px; }
/* Documents flow with the page instead of scrolling inside a box */
.doc-scroll { max-height: none; overflow: visible; padding: 8px; }
