/* ============================================================================
   Tykeoons — 30-day pilot onboarding form
   Brand tokens carried over from the Curriculum Integration Engine.
   ========================================================================== */
:root {
  --navy:#30459e; --navy-dark:#1f2f70; --aqua:#24a9e1; --aqua-dark:#187aa8;
  --ink:#172033; --muted:#64708a; --line:#d9e3f0; --soft:#eef5fb; --white:#fff;
  --good:#2f9659;
  --maths:#c34d55; --pshe:#38761d; --computing:#674ea7; --english:#e69138; --reading:#24a9e1;
  --maths-soft:#faeeee; --pshe-soft:#eef7eb; --computing-soft:#f3effb;
  --english-soft:#fff4e8; --reading-soft:#eaf8fd; --shared-soft:#ddf4fd;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body {
  margin:0; color:var(--ink); background:var(--navy);
  font-family:"Arial Rounded MT Bold","Arial Rounded MT",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
button,input,select,textarea { font:inherit; }
button { border:0; cursor:pointer; }
h1,h2,h3,p { margin-top:0; }
a { color:var(--aqua-dark); }

/* ─── PAGE SHELL ─────────────────────────────────────────────────────────── */
.page { max-width:880px; margin:0 auto; padding:24px clamp(14px,4vw,28px) 64px; }

.topbar { display:flex; align-items:center; gap:16px; padding:8px 0 20px; color:#fff; }
.topbar .logo { width:120px; height:auto; }
.topbar .eyebrow { margin:0 0 4px; color:var(--aqua); font-size:.78rem; font-weight:900;
  text-transform:uppercase; letter-spacing:.05em; }
.topbar h1 { margin:0; font-size:clamp(1.4rem,3.2vw,2.1rem); line-height:1.1; }

.card {
  background:#fff; border-radius:14px; padding:clamp(18px,3vw,30px);
  box-shadow:0 18px 40px rgba(13,21,51,.18); margin-bottom:20px;
}

/* ─── INTRO / BOILERPLATE ────────────────────────────────────────────────── */
.intro p { font-family:Arial,sans-serif; line-height:1.5; color:var(--ink); }
.intro ul { font-family:Arial,sans-serif; line-height:1.5; color:var(--ink);
  padding-left:20px; margin:12px 0 0; }
.intro li { margin-bottom:8px; }
.intro .fineprint { font-size:.86rem; color:var(--muted); }

/* ─── SECTION HEADINGS ───────────────────────────────────────────────────── */
.section-head { display:flex; align-items:center; gap:12px; margin-bottom:14px; }
.section-num {
  flex:0 0 auto; width:32px; height:32px; border-radius:50%;
  background:var(--navy); color:#fff; display:flex; align-items:center;
  justify-content:center; font-weight:900; font-size:1rem;
}
.section-head h2 { margin:0; color:var(--navy); font-size:1.22rem; }
.section-head p { margin:2px 0 0; font-family:Arial,sans-serif; font-size:.86rem; color:var(--muted); }

/* ─── FIELDS ─────────────────────────────────────────────────────────────── */
.field { margin-bottom:14px; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
label.lbl, legend.lbl, .lbl { display:block; margin-bottom:5px; color:var(--navy);
  font-size:.84rem; font-weight:900; }
.hint { display:block; margin-top:4px; font-family:Arial,sans-serif; font-size:.78rem; color:var(--muted); }
input[type=text], input[type=email], select {
  width:100%; min-height:42px; border:2px solid var(--line); border-radius:9px;
  padding:6px 12px; color:var(--ink); background:#fff;
}
input:focus, select:focus { outline:3px solid rgba(36,169,225,.22); border-color:var(--aqua); }
input.invalid { border-color:var(--maths); background:#fff6f6; }

fieldset.fieldset { border:2px solid var(--line); border-radius:10px; padding:12px; margin:0 0 14px; }
.checks { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.check-pill { display:flex; align-items:center; justify-content:center; gap:5px;
  min-height:34px; border:2px solid var(--line); border-radius:8px; background:#f8fbff;
  font-size:.8rem; font-weight:900; cursor:pointer; }
.check-pill:has(input:checked) { border-color:var(--navy); background:#e8effc; }
.toggle { display:flex; align-items:flex-start; gap:10px; padding:10px 12px;
  border-radius:9px; background:var(--soft); font-family:Arial,sans-serif;
  font-size:.85rem; line-height:1.35; cursor:pointer; }
.toggle input { width:18px; height:18px; margin-top:1px; flex:0 0 auto; }

/* ─── COLLEAGUE / USER ROWS ──────────────────────────────────────────────── */
.domain-bar {
  display:flex; flex-wrap:wrap; align-items:center; gap:10px;
  background:var(--soft); border-radius:10px; padding:12px 14px; margin-bottom:14px;
  font-family:Arial,sans-serif; font-size:.88rem;
}
.domain-bar strong { font-family:"Arial Rounded MT Bold",Arial,sans-serif; }
.domain-bar .at { color:var(--muted); font-weight:900; }
.domain-bar input { max-width:240px; min-height:36px; }

.user-row {
  display:grid; grid-template-columns:26px 1fr 1.25fr auto; gap:10px;
  align-items:start; padding:10px; border:1px solid var(--line); border-radius:10px;
  margin-bottom:10px; background:#fbfdff;
}
.user-row.lead-row { background:#eef7ff; border-color:#b7d8f3; }
.user-row .row-num { padding-top:11px; color:var(--muted); font-weight:900; font-size:.86rem; text-align:center; }
.email-cell { min-width:0; }
.prefix-wrap { display:flex; align-items:stretch; }
.prefix-wrap input { border-top-right-radius:0; border-bottom-right-radius:0; }
.prefix-wrap .suffix {
  display:flex; align-items:center; padding:0 10px; border:2px solid var(--line);
  border-left:0; border-top-right-radius:9px; border-bottom-right-radius:9px;
  background:#eef2f8; color:var(--muted); font-family:Arial,sans-serif;
  font-size:.82rem; white-space:nowrap; max-width:55%; overflow:hidden; text-overflow:ellipsis;
}
.email-preview { margin-top:5px; font-family:Arial,sans-serif; font-size:.76rem; color:var(--muted);
  overflow-wrap:anywhere; }
.email-preview b { color:var(--navy); }
.row-actions { display:flex; flex-direction:column; gap:6px; align-items:flex-end; }
.linkbtn { background:none; color:var(--aqua-dark); font-size:.76rem; font-weight:900;
  padding:4px 2px; text-decoration:underline; }
.removebtn { background:none; color:var(--maths); font-size:1.1rem; line-height:1; padding:6px 8px; }
.removebtn:disabled { color:var(--line); cursor:default; }
.addbtn { margin-top:4px; background:var(--soft); color:var(--navy); font-weight:900;
  border-radius:9px; min-height:42px; padding:0 18px; }
.addbtn:hover { background:#e3eefb; }

.booking-note { margin:0 0 14px; padding:11px 14px; border-radius:9px; background:#eaf6ff;
  border:1px solid #b7e0f7; color:var(--navy); font-family:Arial,sans-serif;
  font-size:.88rem; line-height:1.45; }

/* ─── BOOKING ────────────────────────────────────────────────────────────── */
.booking-panel { border:2px solid var(--line); border-radius:10px; padding:18px; background:#fbfdff; text-align:center; }
.booking-lead { margin:0 0 14px; font-family:Arial,sans-serif; font-size:.92rem; line-height:1.5; color:var(--ink); }
.booking-btn { width:100%; max-width:440px; margin:0 auto; }
.booking-btn.booked { background:var(--good); box-shadow:0 5px 0 #1f6e41; }
.booking-status { margin-top:12px; padding:12px 14px; border-radius:9px; font-family:Arial,sans-serif;
  font-size:.9rem; display:flex; align-items:center; gap:10px; }
.booking-status.pending { background:#fff7e8; color:#9a6a00; border:1px solid #f0d9a3; }
.booking-status.done { background:var(--pshe-soft); color:#256016; border:1px solid #bad9ad; }

/* ─── SUBMIT ─────────────────────────────────────────────────────────────── */
.validation-msg { margin:0 0 14px; padding:12px 14px; border-radius:9px;
  background:#fff2f3; border:2px solid #e9bdc1; color:var(--maths);
  font-family:Arial,sans-serif; font-size:.88rem; line-height:1.4; }
.submit-row { display:flex; flex-direction:column; gap:10px; }
.primary { min-height:52px; border-radius:11px; background:var(--aqua); color:#fff;
  font-weight:900; font-size:1.05rem; box-shadow:0 5px 0 var(--aqua-dark);
  transition:transform .1s, box-shadow .1s; }
.primary:active { transform:translateY(2px); box-shadow:0 3px 0 var(--aqua-dark); }
.primary:disabled { background:#9fc7da; box-shadow:0 5px 0 #7da6b8; cursor:not-allowed; }
.submit-note { font-family:Arial,sans-serif; font-size:.78rem; color:var(--muted); text-align:center; }

/* ─── PROGRESS OVERLAY ───────────────────────────────────────────────────── */
.overlay { position:fixed; inset:0; background:#1f2f70; z-index:50;
  display:flex; align-items:center; justify-content:center; padding:24px; }
.overlay-card { width:min(420px,100%); background:#fff; border-radius:16px; padding:34px 28px; text-align:center; }
.overlay-card img { width:96px; margin-bottom:18px; }
.overlay-card h3 { color:var(--navy); margin-bottom:14px; }
.overlay-card p { font-family:Arial,sans-serif; color:var(--muted); font-size:.88rem; margin:0; }
.progress-track { height:10px; border-radius:99px; background:var(--soft); overflow:hidden; margin:14px 0 12px; }
.progress-bar-fill { height:100%; width:8%; border-radius:99px;
  background:linear-gradient(90deg,var(--navy),var(--aqua)); transition:width .4s ease; }

/* ─── CONFIRMATION SCREEN ────────────────────────────────────────────────── */
.confirm-hero { text-align:center; padding:8px 0 6px; }
.confirm-hero .tick { width:74px; height:74px; border-radius:50%; background:var(--pshe-soft);
  display:flex; align-items:center; justify-content:center; margin:0 auto 16px; }
.confirm-hero h2 { color:var(--navy); font-size:1.6rem; margin-bottom:8px; }
.confirm-hero p { font-family:Arial,sans-serif; line-height:1.55; color:var(--ink); max-width:560px; margin:0 auto; }
.confirm-links { display:grid; gap:12px; margin-top:22px; }
.link-card { display:flex; align-items:center; gap:14px; text-decoration:none;
  border:2px solid var(--line); border-radius:11px; padding:14px 16px; background:#fbfdff; color:var(--ink); }
.link-card:hover { border-color:var(--aqua); background:#f4fbff; }
.link-card .ic { flex:0 0 auto; width:42px; height:42px; border-radius:10px; background:var(--soft);
  display:flex; align-items:center; justify-content:center; font-size:1.3rem; }
.link-card .lc-title { font-weight:900; color:var(--navy); }
.link-card .lc-sub { font-family:Arial,sans-serif; font-size:.82rem; color:var(--muted); }
.confirm-note { margin-top:20px; padding:14px; border-radius:10px; background:var(--soft);
  font-family:Arial,sans-serif; font-size:.85rem; color:var(--muted); line-height:1.5; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width:680px) {
  .grid-2 { grid-template-columns:1fr; }
  .checks { grid-template-columns:repeat(3,1fr); }
  .user-row { grid-template-columns:22px 1fr auto; }
  .user-row .email-cell { grid-column:2 / 4; }
}

/* ============================================================================
   PDF DOCUMENT STYLES  (rendered off-screen, captured by html2pdf)
   Fixed-width screen styling so the capture is deterministic regardless of
   viewport / print media. ~1040px content ≈ A4 landscape.
   ========================================================================== */
/* Rendered INSIDE the viewport (fixed at 0,0) so html2canvas can capture it,
   but kept hidden behind the opaque progress overlay during generation.
   (An off-screen left:-99999px container makes html2canvas capture a blank page.) */
.pdf-doc { position:fixed; left:0; top:0; width:1040px; background:#fff; z-index:1;
  color:var(--ink); font-family:"Arial Rounded MT Bold","Arial Rounded MT",Arial,sans-serif; padding:28px; }
.pdf-doc .report-header { display:flex; justify-content:space-between; align-items:center;
  border-bottom:4px solid var(--line); padding-bottom:18px; margin-bottom:18px; }
.pdf-doc .report-header .eyebrow { margin:0 0 6px; color:var(--aqua); font-size:.8rem;
  font-weight:900; text-transform:uppercase; letter-spacing:.05em; }
.pdf-doc .report-header h2 { margin:0; color:var(--navy); font-size:1.9rem; }
.pdf-doc .report-logo { width:150px; height:auto; }
.pdf-doc .summary-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:18px; }
.pdf-doc .summary-card { padding:14px; border-radius:10px; background:var(--soft); border-left:6px solid var(--aqua); }
.pdf-doc .summary-card strong { display:block; color:var(--navy); font-size:1.25rem; line-height:1.15; }
.pdf-doc .summary-card span { display:block; margin-top:5px; color:var(--muted); font-size:.78rem; }
.pdf-doc .option-intro { display:grid; grid-template-columns:1fr auto; gap:18px;
  background:#f8fbff; border:1px solid var(--line); border-radius:10px; padding:18px; margin-bottom:18px; }
.pdf-doc .option-intro h3 { color:var(--navy); margin:0 0 6px; font-size:1.3rem; }
.pdf-doc .option-intro p { margin:0; font-family:Arial,sans-serif; color:var(--muted); line-height:1.45; }
.pdf-doc .legend { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; align-content:start; max-width:260px; }
.pdf-doc .chip { display:inline-flex; align-items:center; min-height:26px; padding:4px 10px;
  border-radius:8px; color:#fff; font-size:.72rem; font-weight:900; }
.pdf-doc .maths{background:var(--maths);} .pdf-doc .pshe{background:var(--pshe);}
.pdf-doc .reading{background:var(--reading);} .pdf-doc .computing{background:var(--computing);}
.pdf-doc .english{background:var(--english);}
.pdf-doc .year-block { border:2px solid var(--line); border-radius:10px; overflow:hidden; margin-bottom:18px; }
.pdf-doc .year-heading { display:flex; justify-content:space-between; align-items:center;
  padding:12px 16px; background:var(--navy); color:#fff; }
.pdf-doc .year-heading h3 { margin:0; font-size:1.15rem; }
.pdf-doc .year-heading span { color:#d7f4ff; font-size:.82rem; }
.pdf-doc .grid { display:grid; grid-template-columns:repeat(6,1fr); }
.pdf-doc .half-term { border-right:1px solid var(--line); min-height:150px; }
.pdf-doc .half-term:last-child { border-right:0; }
.pdf-doc .half-term h4 { margin:0; padding:8px 9px; color:var(--navy); background:#edf5fc;
  border-bottom:1px solid var(--line); font-size:.8rem; }
.pdf-doc .event { margin:7px; padding:8px; border-radius:8px; border:1px solid var(--line); background:#fbfdff; }
.pdf-doc .event.maths-bg{background:var(--maths-soft);border-color:#e9bdc1;}
.pdf-doc .event.pshe-bg{background:var(--pshe-soft);border-color:#bad9ad;}
.pdf-doc .event.computing-bg{background:var(--computing-soft);border-color:#d4c4ed;}
.pdf-doc .event.english-bg{background:var(--english-soft);border-color:#f0c797;}
.pdf-doc .event.reading-bg{background:var(--reading-soft);border-color:#b7e5f6;}
.pdf-doc .event.recap-card{border-style:dashed;}
.pdf-doc .event.shared-reading-card{background:var(--shared-soft);border-color:#82d8f5;}
.pdf-doc .event-icon { display:block; width:100%; max-width:120px; height:auto; margin-bottom:6px; }
.pdf-doc .event strong { display:block; margin:4px 0 3px; color:var(--ink); font-size:.78rem; line-height:1.22; }
.pdf-doc .event-type-label { display:inline-block; margin-bottom:4px; padding:2px 7px; border-radius:4px;
  background:rgba(0,0,0,.06); color:var(--ink); font-size:.66rem; font-weight:900; }
.pdf-doc .event small { display:block; color:var(--muted); font-size:.7rem; line-height:1.25; font-family:Arial,sans-serif; }
.pdf-doc .rationale { border:2px solid var(--line); border-radius:10px; margin-bottom:18px; overflow:hidden; }
.pdf-doc .rationale h4 { margin:0; padding:12px 16px; background:var(--navy); color:#fff; font-size:1.1rem; }
.pdf-doc .rationale-list { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:14px; }
.pdf-doc .rationale-item { padding:10px 12px; border-radius:8px; background:#fbfdff; border:1px solid var(--line);
  font-family:Arial,sans-serif; font-size:.8rem; line-height:1.4; }
.pdf-doc .rationale-item b { display:block; margin-bottom:4px; color:var(--navy);
  font-family:"Arial Rounded MT Bold",Arial,sans-serif; }
.pdf-doc .rationale-item p { margin:0; }
/* html2pdf page-break helpers */
.pdf-doc .html2pdf__page-break { height:0; }
.pdf-doc .pb-before { page-break-before:always; break-before:page; }
