/*
 * Feza Schools brand theme -- owned by the platform, loaded last on every
 * client-facing page (see render_brand_head() in shared/branding.php).
 *
 * Colours: navy #002147 (fezaschools.org's --rt-primary-color) and gold
 * #e88b00. Gold is only ever a fill with navy text on it (navy on this gold
 * is 6.4:1); it is never used for text or thin lines on white or on navy.
 *
 * Type: Newsreader (a book serif with optical sizes) for the few headings
 * that greet a parent; Figtree for everything they read or tap. Both from
 * Google Fonts, which the page's CSP already allows.
 *
 * Texture: one guilloche line pattern (the fine interlaced curves printed on
 * certificates and banknotes) is the brand's only ornament. It sits faintly
 * behind the hero and, drifting slowly, behind the gate pass, where a
 * screenshot freezes it and the live page doesn't.
 *
 * Sections: 1. tokens  2. shared pages (check-in, privacy, terms)
 *           3. landing.php  4. checkin_confirmed.php (the gate pass)
 */
@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700;800&family=Newsreader:opsz,wght@6..72,500;6..72,600&display=swap");

/* ---- 1. Tokens ------------------------------------------------------------ */

:root {
  --fz-navy: #002147;
  --fz-navy-deep: #00152e;
  --fz-navy-2: #0b2f5c;
  --fz-gold: #e88b00;
  --fz-gold-press: #d17d00;
  --fz-ink: #0d1a2b;
  --fz-grey: #4f5d72;
  --fz-faint: #7d8aa0;
  --fz-line: #d6dde8;
  --fz-hair: #e7ecf3;
  --fz-bg: #f2f5f9;
  --fz-tint: #eaf0f7;
  --fz-white: #ffffff;
  --fz-link: #0a3d80;
  --fz-ok: #1f9d57;
  --fz-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --fz-font: "Figtree", ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  --fz-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fz-shadow: 0 1px 2px rgba(0, 33, 71, 0.06), 0 8px 24px -12px rgba(0, 33, 71, 0.22);
  --fz-shadow-lift: 0 2px 4px rgba(0, 33, 71, 0.08), 0 16px 32px -14px rgba(0, 33, 71, 0.32);

  /* Guilloche tile, navy and white versions. */
  --fz-guilloche-navy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cg fill='none' stroke='%23002147' stroke-width='.7'%3E%3Cpath d='M0 20Q10 0 20 20T40 20T60 20T80 20'/%3E%3Cpath d='M0 20Q10 40 20 20T40 20T60 20T80 20'/%3E%3Cpath d='M-10 20Q0 6 10 20T30 20T50 20T70 20T90 20' opacity='.55'/%3E%3Cpath d='M-10 20Q0 34 10 20T30 20T50 20T70 20T90 20' opacity='.55'/%3E%3C/g%3E%3C/svg%3E");
  --fz-guilloche-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cg fill='none' stroke='%23ffffff' stroke-width='.7'%3E%3Cpath d='M0 20Q10 0 20 20T40 20T60 20T80 20'/%3E%3Cpath d='M0 20Q10 40 20 20T40 20T60 20T80 20'/%3E%3Cpath d='M-10 20Q0 6 10 20T30 20T50 20T70 20T90 20' opacity='.55'/%3E%3Cpath d='M-10 20Q0 34 10 20T30 20T50 20T70 20T90 20' opacity='.55'/%3E%3C/g%3E%3C/svg%3E");

  /* Tokens every client page already reads. */
  --ink: var(--fz-ink);
  --paper: var(--fz-bg);
  --panel: var(--fz-tint);
  --card: var(--fz-white);
  --muted: var(--fz-grey);
  --border-soft: #8391a6;
  --border: #c3ccd8;
  --accent: var(--fz-navy);
  --error: #b3261e;

  --panel-dark: var(--fz-navy);
  --panel-dark-mid: var(--fz-navy-2);
  --panel-dark-accent: var(--fz-gold);
  --on-dark-ink: #ffffff;
  --on-dark-muted: rgba(255, 255, 255, 0.78);
  --on-dark-hairline: rgba(255, 255, 255, 0.18);
  --shadow-rgb: 0, 33, 71;
  --glow-rgb: 232, 139, 0;
  --card-frame: rgba(0, 33, 71, 0.25);
}

::selection {
  background: var(--fz-navy);
  color: var(--fz-white);
}

/* The shared check-in page has no [hidden] rule of its own, and base.css
   gives .field and buttons a display, so the children fieldset and the
   lone child's remove button showed when they shouldn't. */
body [hidden] {
  display: none !important;
}

/* ---- 2. Shared pages (check-in, privacy, terms) --------------------------- */

body {
  font-family: var(--fz-font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

body h1,
body h2,
body h3 {
  font-family: var(--fz-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fz-navy);
}

body legend {
  font-family: var(--fz-font);
}

body .serif {
  font-family: var(--fz-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

body .site-header {
  position: relative;
  align-items: center;
  padding: 16px 20px 18px;
  background: var(--fz-navy);
  border-bottom: 0;
  color: var(--fz-white);
}

/* A gold rule under the navy bar: a fill, never a line on white. */
body .site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--fz-gold);
}

body .site-header .org-name {
  font-family: var(--fz-font);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--fz-white);
}

body .site-header nav a {
  color: rgba(255, 255, 255, 0.82);
}

body .site-header nav a:hover {
  color: var(--fz-white);
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

body .header-meta {
  color: rgba(255, 255, 255, 0.72);
}

body .brand-mark,
body .content-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--fz-gold);
  color: var(--fz-navy);
}

body img.brand-mark {
  background: var(--fz-white);
  padding: 3px;
  object-fit: contain;
}

/* The form sits on a white sheet, like the landing page's panel. */
body .form-panel {
  padding: 16px 12px 40px;
  align-items: flex-start;
}

body .form-panel-inner {
  max-width: 480px;
  padding: 24px 20px 28px;
  border-radius: 20px;
  background: var(--fz-white);
  box-shadow: var(--fz-shadow);
}

body form {
  gap: 22px;
}

body .field {
  gap: 8px;
}

/* Sentence-case labels, not the default tracked capitals. */
body label,
body .field-label {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--fz-ink);
}

body label span[style] {
  color: var(--fz-faint);
}

body input[type="text"],
body input[type="tel"],
body input[type="email"],
body input[type="password"],
body input[type="url"],
body textarea,
body .student-class select {
  font-family: var(--fz-font);
  font-weight: 500;
  font-size: 1.05rem;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--fz-line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--fz-ink);
  transition: border-color 160ms var(--fz-ease), box-shadow 160ms var(--fz-ease), background-color 160ms var(--fz-ease);
}

body input[type="text"]:focus,
body input[type="tel"]:focus,
body input[type="email"]:focus,
body input[type="password"]:focus,
body input[type="url"]:focus,
body textarea:focus,
body .student-class select:focus {
  outline: none;
  border-color: var(--fz-navy);
  background: var(--fz-white);
  box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.14);
}

body input[type]::placeholder,
body textarea::placeholder {
  color: #94a0b3;
  font-weight: 400;
}

body .student-class select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23002147' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6 -6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
}

body .phone-row {
  gap: 0;
  border: 1px solid var(--fz-line);
  border-radius: 12px;
  background: #f8fafc;
  transition: border-color 160ms var(--fz-ease), box-shadow 160ms var(--fz-ease);
}

body .phone-row:focus-within {
  border-color: var(--fz-navy);
  background: var(--fz-white);
  box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.14);
}

body .phone-prefix {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 12px 0 14px;
  border-right: 1px solid var(--fz-line);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fz-grey);
}

body .phone-row input[type="tel"],
body .phone-row input[type="tel"]:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
}

body .id-type-hint,
body .field-error {
  font-size: 0.85rem;
}

body .banner {
  border-radius: 12px;
}

/* The reason chosen on the landing page, shown fixed. */
body .purpose-fixed {
  padding: 12px 14px 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--fz-tint);
  box-shadow: inset 4px 0 0 var(--fz-navy);
}

body .purpose-fixed-value {
  color: var(--fz-navy);
  font-weight: 700;
}

body .purpose-fixed a {
  padding: 6px 2px;
  color: var(--fz-link);
  font-weight: 600;
  font-size: 0.92rem;
}

body .purpose-pill {
  min-height: 44px;
  border-radius: 999px;
  border-color: var(--border);
  background: var(--fz-white);
  color: var(--fz-ink);
}

body .purpose-pill.selected {
  background: var(--fz-navy);
  border-color: var(--fz-navy);
  color: var(--fz-white);
}

body .purpose-pill:not(.selected):hover {
  border-color: var(--fz-navy);
  background: var(--fz-white);
}

/* Children on a pickup or drop-off. */
body .students-field {
  display: grid;
  gap: 12px;
  padding: 18px 14px 14px;
  border-radius: 16px;
  background: var(--fz-tint);
}

body .students-field legend {
  float: left;
  width: 100%;
  margin: 0 0 4px;
  font-family: var(--fz-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fz-navy);
}

body .student-rows {
  gap: 10px;
}

/* Name on its own line, class below it (with room for "Baby class"), and
   the remove button beside the class when there is more than one child. */
body .student-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 8px;
  padding: 12px 10px 12px 12px;
  border-radius: 12px;
  background: var(--fz-white);
  box-shadow: 0 1px 2px rgba(0, 33, 71, 0.06);
}

body .student-name {
  grid-column: 1 / -1;
}

body .student-row label {
  font-size: 0.8rem;
  color: var(--fz-grey);
}

body .student-row input[type="text"],
body .student-class select {
  font-size: 1rem;
  padding-left: 12px;
}

body .student-remove {
  width: 40px;
  height: 50px;
  border-radius: 10px;
  color: var(--fz-grey);
  transition: background-color 160ms var(--fz-ease), color 160ms var(--fz-ease);
}

body .student-remove:hover {
  background: #fbe3e1;
  color: #8c1d18;
}

body .student-add {
  justify-self: stretch;
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  border: 1.5px dashed #9fb0c7;
  border-radius: 12px;
  background: transparent;
  color: var(--fz-navy);
  font-weight: 700;
  transition: border-color 160ms var(--fz-ease), background-color 160ms var(--fz-ease);
}

body .student-add:hover {
  border-color: var(--fz-navy);
  background: rgba(255, 255, 255, 0.6);
}

body label.consent {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--fz-grey);
}

body .consent input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--fz-navy);
  flex-shrink: 0;
}

body .actions {
  margin-top: 4px;
}

body .btn-primary,
body form button[type="submit"] {
  min-height: 54px;
  padding: 14px 22px;
  background: var(--fz-gold);
  border: 0;
  border-color: var(--fz-gold);
  border-radius: 14px;
  color: var(--fz-navy);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 8px 18px -10px rgba(232, 139, 0, 0.9);
  transition: background-color 160ms var(--fz-ease), transform 120ms var(--fz-ease);
}

body form button[type="submit"] {
  width: 100%;
}

body .btn-primary:hover,
body form button[type="submit"]:hover {
  background: var(--fz-gold-press);
  filter: none;
}

body .btn-primary:active,
body form button[type="submit"]:active {
  transform: translateY(1px) scale(0.99);
}

body .btn-secondary {
  border-color: var(--border-soft);
  border-radius: 12px;
}

body :focus-visible {
  outline: 3px solid var(--fz-navy);
  outline-offset: 2px;
}

body a:not([class]) {
  color: var(--fz-link);
  text-underline-offset: 3px;
}

body .confirm-panel {
  gap: 0;
  padding: 22px 20px;
  border-radius: 16px;
  background: var(--fz-white);
  border-color: var(--fz-hair);
}

body .confirm-panel p {
  margin: 0 0 14px;
  line-height: 1.55;
}

body .confirm-panel p:last-child {
  margin-bottom: 0;
}

body .eyebrow {
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.85rem;
  color: var(--fz-grey);
}

body > footer {
  justify-content: center;
  gap: 6px 18px;
  padding: 18px 20px 24px;
  border-top: 0;
  font-size: 0.82rem;
  text-align: center;
}

@media (min-width: 640px) {
  body .site-header {
    padding: 20px clamp(24px, 6vw, 64px) 22px;
  }

  body .form-panel {
    padding-top: 40px;
  }

  body .form-panel-inner {
    padding: 32px 32px 36px;
  }

  body .student-row {
    grid-template-columns: minmax(0, 1fr) 150px auto;
  }

  body .student-name {
    grid-column: auto;
  }
}

/* ---- 3. Landing page (landing.php) ---------------------------------------- */

body[data-brand-landing] {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--fz-bg);
  color: var(--fz-ink);
  font-family: var(--fz-font);
}

.fz-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow-x: clip;
}

.fz-page :focus-visible {
  outline: 3px solid var(--fz-navy);
  outline-offset: 2px;
}

/* Navy masthead: wordmark and greeting, the guilloche fading in from the
   right edge. */
.fz-masthead {
  position: relative;
  isolation: isolate;
  background: var(--fz-navy);
  color: var(--fz-white);
  padding: 18px 20px 76px;
}

.fz-masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--fz-guilloche-white);
  background-size: 80px 40px;
  opacity: 0.09;
  -webkit-mask-image: linear-gradient(200deg, #000 10%, transparent 70%);
  mask-image: linear-gradient(200deg, #000 10%, transparent 70%);
}

.fz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fz-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fz-white);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.005em;
}

.fz-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--fz-gold);
  color: var(--fz-navy);
  font-family: var(--fz-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
}

.fz-logo {
  height: 30px;
  width: auto;
}

.fz-hero {
  display: grid;
  gap: 10px;
  padding-top: 34px;
  max-width: 30rem;
}

.fz-title {
  margin: 0;
  font-family: var(--fz-display);
  font-size: clamp(2.05rem, 9vw, 2.75rem);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--fz-white);
  text-wrap: balance;
}

.fz-hero-sub {
  margin: 0;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.5;
  text-wrap: pretty;
}

/* The white sheet the steps live on, pulled up over the masthead. */
.fz-panel {
  position: relative;
  flex: 1;
  width: 100%;
  margin-top: -44px;
  padding: 26px 20px 28px;
  border-radius: 26px 26px 0 0;
  background: var(--fz-white);
  box-shadow: 0 -12px 32px -20px rgba(0, 21, 46, 0.6);
  display: grid;
  gap: 20px;
  align-content: start;
}

.fz-step {
  display: grid;
  gap: 18px;
  animation: fz-rise 420ms var(--fz-ease) both;
}

.fz-step-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.fz-question {
  margin: 0;
  font-family: var(--fz-display);
  font-size: 1.55rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--fz-navy);
}

.fz-question:focus {
  outline: none;
}

/* "1 of 2": the two steps really are a sequence. */
.fz-count {
  flex-shrink: 0;
  color: var(--fz-faint);
  font-size: 0.85rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.fz-lead {
  margin: -10px 0 0;
  color: var(--fz-grey);
  font-size: 0.98rem;
  line-height: 1.45;
}

/* Pickup and drop-off: the two everyday reasons, as full-width cards with
   their picture on a tinted plate. */
.fz-cards {
  display: grid;
  gap: 12px;
}

.fz-card {
  font: inherit;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 14px 14px 14px 18px;
  border: 1px solid var(--fz-hair);
  border-radius: 18px;
  background: var(--fz-white);
  color: var(--fz-ink);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--fz-shadow);
  transition: transform 200ms var(--fz-ease), box-shadow 200ms var(--fz-ease), border-color 200ms var(--fz-ease);
  -webkit-tap-highlight-color: transparent;
}

.fz-card:hover {
  border-color: #b9c6d8;
  box-shadow: var(--fz-shadow-lift);
}

.fz-card:active {
  transform: scale(0.985);
}

.fz-card-text {
  display: grid;
  gap: 4px;
}

.fz-card-label {
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fz-navy);
}

.fz-card-note {
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--fz-grey);
}

.fz-card-plate {
  display: grid;
  place-items: center;
  height: 84px;
  border-radius: 14px;
  background: var(--fz-tint);
  overflow: hidden;
}

.fz-card-image {
  max-width: 78px;
  max-height: 58px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 260ms var(--fz-ease);
}

.fz-card:hover .fz-card-image {
  transform: translateY(-2px) scale(1.04);
}

.fz-card-icon {
  width: 40px;
  height: 40px;
  color: var(--fz-navy);
}

/* The other reasons: one grouped list with hairline dividers. */
.fz-others {
  display: grid;
  gap: 8px;
}

.fz-others-title {
  margin: 4px 0 0;
  color: var(--fz-grey);
  font-size: 0.9rem;
  font-weight: 600;
}

.fz-rows {
  display: grid;
  border: 1px solid var(--fz-hair);
  border-radius: 16px;
  background: var(--fz-white);
  overflow: hidden;
}

.fz-row {
  font: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--fz-hair);
  background: var(--fz-white);
  color: var(--fz-ink);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 160ms var(--fz-ease);
  -webkit-tap-highlight-color: transparent;
}

.fz-row:first-child {
  border-top: 0;
}

.fz-row:hover {
  background: #f7f9fc;
}

.fz-row:active {
  background: var(--fz-tint);
}

.fz-row:focus-visible {
  outline-offset: -3px;
}

.fz-row-tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--fz-tint);
  color: var(--fz-navy);
  flex-shrink: 0;
}

.fz-row-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

img.fz-row-icon {
  width: 28px;
  height: 28px;
}

.fz-row-label {
  flex: 1;
}

.fz-row-chevron {
  width: 18px;
  height: 18px;
  color: var(--fz-faint);
  flex-shrink: 0;
  transition: transform 200ms var(--fz-ease);
}

.fz-row:hover .fz-row-chevron {
  transform: translateX(2px);
}

.fz-safety,
.fz-privacy {
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--fz-grey);
  font-size: 0.88rem;
  line-height: 1.45;
}

.fz-safety svg,
.fz-privacy svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--fz-navy);
}

/* Step 2. */
.fz-step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: -6px 0 -4px;
}

.fz-back {
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 12px 6px 6px;
  margin-left: -6px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--fz-link);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 160ms var(--fz-ease);
}

.fz-back:hover {
  background: var(--fz-tint);
}

.fz-back svg {
  width: 18px;
  height: 18px;
}

.fz-chosen {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  background: var(--fz-navy);
  color: var(--fz-white);
  font-size: 0.86rem;
  font-weight: 600;
}

.fz-chosen::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fz-gold);
  flex-shrink: 0;
}

.fz-stage {
  display: grid;
  gap: 18px;
}

/* The scan block: an ID card in a viewfinder, then the gold button. */
.fz-scan {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 22px 18px 18px;
  border-radius: 20px;
  background: var(--fz-tint);
  text-align: center;
}

.fz-scan-figure {
  width: 168px;
  height: auto;
  color: var(--fz-navy);
}

.fz-scan-hint {
  max-width: 30ch;
  text-wrap: balance;
  color: var(--fz-grey);
  font-size: 0.9rem;
  line-height: 1.45;
}

.fz-cta {
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--fz-gold);
  color: var(--fz-navy);
  font-size: 1.08rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 10px 20px -12px rgba(232, 139, 0, 0.95);
  transition: background-color 160ms var(--fz-ease), transform 120ms var(--fz-ease);
  -webkit-tap-highlight-color: transparent;
}

.fz-cta svg {
  width: 22px;
  height: 22px;
}

.fz-cta:hover {
  background: var(--fz-gold-press);
}

.fz-cta:active {
  transform: translateY(1px) scale(0.99);
}

.fz-cta.is-dragover {
  outline: 3px dashed var(--fz-navy);
  outline-offset: 3px;
}

.fz-scan-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff4e0;
  color: var(--fz-ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.fz-manual {
  text-align: center;
  margin-top: -6px;
}

.fz-manual-link {
  display: inline-block;
  padding: 12px 10px;
  color: var(--fz-link);
  font-weight: 600;
  text-underline-offset: 3px;
}

.fz-notice {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fbe3e1;
  color: #8c1d18;
}

.fz-notice:focus {
  outline: none;
}

.fz-notice svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.fz-notice-title {
  margin: 0;
  font-weight: 700;
}

.fz-notice-body {
  margin: 2px 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

/* Reading the ID. */
.fz-reading {
  display: grid;
  gap: 16px;
  animation: fz-rise 420ms var(--fz-ease) both;
}

.fz-field {
  display: grid;
  gap: 6px;
}

.fz-field-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--fz-grey);
}

.fz-field-value {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--fz-line);
  border-radius: 12px;
  background: #f8fafc;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fz-ink);
}

.fz-mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.fz-field-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--fz-grey);
}

.fz-field-hint:empty {
  display: none;
}

.fz-skeleton {
  display: block;
  width: 70%;
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e3e9f1, #f4f7fb, #e3e9f1);
  background-size: 200% 100%;
  animation: fz-shimmer 1.2s infinite linear;
}

.fz-skeleton-short {
  width: 45%;
}

@keyframes fz-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

.fz-match {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: #e1f2e9;
  color: #17603b;
  font-size: 0.88rem;
  font-weight: 600;
}

.fz-match svg {
  width: 15px;
  height: 15px;
}

.fz-status {
  margin: 0;
  color: var(--fz-grey);
  font-size: 0.92rem;
}

.fz-footer {
  padding: 16px 20px 24px;
  border-top: 0;
  display: grid;
  justify-content: center;
  gap: 6px;
  justify-items: center;
  background: var(--fz-white);
}

.fz-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 18px;
}

body .fz-legal a {
  padding: 8px 0;
  color: var(--fz-grey);
  font-size: 0.85rem;
  text-decoration: none;
}

body .fz-legal a:hover {
  color: var(--fz-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fz-kete {
  margin: 0;
  color: var(--fz-faint);
  font-size: 0.78rem;
}

.fz-kete span {
  font-weight: 700;
}

@keyframes fz-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Wider screens: the same single column, a sheet on navy. */
@media (min-width: 768px) {
  body[data-brand-landing] {
    background: var(--fz-navy);
  }

  .fz-masthead {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 44px 0 80px;
  }

  .fz-masthead::before {
    left: -50vw;
    right: -50vw;
  }

  .fz-panel {
    max-width: 560px;
    margin: -44px auto 0;
    padding: 32px;
    border-radius: 26px;
    flex: 0 0 auto;
  }

  .fz-footer {
    background: transparent;
    padding-top: 24px;
  }

  body .fz-legal a,
  .fz-kete {
    color: rgba(255, 255, 255, 0.7);
  }

  body .fz-legal a:hover {
    color: var(--fz-white);
  }
}

/* ---- 4. Gate pass (checkin_confirmed.php) --------------------------------- */

body[data-brand-confirmed] {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--fz-navy-deep);
  background-image: radial-gradient(120% 70% at 50% 0%, var(--fz-navy) 0%, var(--fz-navy-deep) 70%);
  font-family: var(--fz-font);
  overflow-x: hidden;
}

body[data-brand-confirmed] :focus-visible {
  outline: 3px solid var(--fz-white);
  outline-offset: 2px;
}

.fz-pass {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 18px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--fz-white);
}

.fz-pass-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.fz-pass-top-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  font-weight: 600;
}

/* The pass itself. */
.fz-ticket {
  position: relative;
  border-radius: 22px;
  background: var(--fz-white);
  color: var(--fz-ink);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  animation: fz-rise 460ms var(--fz-ease) both;
}

.fz-ticket-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 22px 22px 0 0;
  background: var(--fz-gold);
  color: var(--fz-navy);
}

.fz-ticket-kind {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.15;
}

/* "Live": a white pill with a pulsing green dot. Together with the moving
   guilloche below, it is how the guard tells the real page from a
   screenshot. */
.fz-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 6px 11px 6px 9px;
  border-radius: 999px;
  background: var(--fz-white);
  color: var(--fz-navy);
  font-size: 0.82rem;
  font-weight: 800;
}

.fz-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fz-ok);
  animation: fz-ping 1.6s infinite;
}

@keyframes fz-ping {
  0% { box-shadow: 0 0 0 0 rgba(31, 157, 87, 0.65); }
  100% { box-shadow: 0 0 0 11px rgba(31, 157, 87, 0); }
}

.fz-ticket-body {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 18px;
  padding: 22px 18px 24px;
}

/* Guilloche watermark, drifting one tile every few seconds. */
.fz-ticket-body::before {
  content: "";
  position: absolute;
  top: -40px;
  left: -80px;
  right: -80px;
  bottom: -40px;
  z-index: -1;
  background-image: var(--fz-guilloche-navy);
  background-size: 80px 40px;
  opacity: 0.08;
  animation: fz-drift 9s linear infinite;
}

@keyframes fz-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(80px, 40px, 0); }
}

.fz-ticket-who {
  display: grid;
  gap: 4px;
}

.fz-ticket-label {
  margin: 0;
  color: var(--fz-grey);
  font-size: 0.88rem;
  font-weight: 600;
}

.fz-ticket-name {
  margin: 0;
  font-family: var(--fz-font);
  font-size: clamp(1.9rem, 9.4vw, 2.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--fz-navy);
  overflow-wrap: anywhere;
}

.fz-kids {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fz-kids li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 10px 10px 10px 14px;
  border-radius: 12px;
  background: rgba(234, 240, 247, 0.92);
}

.fz-kid-name {
  min-width: 0;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fz-ink);
  overflow-wrap: anywhere;
}

.fz-kid-class {
  flex-shrink: 0;
  padding: 6px 11px;
  border-radius: 8px;
  background: var(--fz-navy);
  color: var(--fz-white);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

/* Stub: date and time, below a perforation with punched notches. */
.fz-ticket-stub {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 18px 18px 20px;
  border-top: 2px dashed var(--fz-line);
}

.fz-ticket-stub::before,
.fz-ticket-stub::after {
  content: "";
  position: absolute;
  top: -12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--fz-navy-deep);
}

.fz-ticket-stub::before {
  left: -11px;
}

.fz-ticket-stub::after {
  right: -11px;
}

.fz-stub-item {
  display: grid;
  gap: 2px;
  margin: 0;
}

.fz-stub-item dt {
  color: var(--fz-grey);
  font-size: 0.82rem;
  font-weight: 600;
}

.fz-stub-item dd {
  margin: 0;
  color: var(--fz-navy);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.fz-stub-item + .fz-stub-item {
  text-align: right;
}

.fz-pass-hint {
  margin: 4px 4px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}

.fz-pass-done {
  margin: auto 0 0;
  padding-top: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  text-align: center;
}

body .fz-pass-done a {
  color: var(--fz-white);
  font-weight: 600;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .fz-step,
  .fz-reading,
  .fz-ticket,
  .fz-skeleton {
    animation: none;
  }

  .fz-card,
  .fz-card-image,
  .fz-row-chevron {
    transition: none;
  }

  /* The pass keeps a slower drift and the Live dot: they are what tells a
     live page from a screenshot, not decoration. */
  .fz-ticket-body::before {
    animation-duration: 30s;
  }
}
