/*
  styles.css — Leible brand CSS. Source of truth: docs/UI_GUIDE.md (cream
  #F5F4EE / dark sage #233022 / sage #a5b89d, Outfit font, white "glass" cards
  — NOT glass-morphism). No AI-slop patterns. 1:1 port of the GAS Styles.html
  partial + the shared ConsultPicker.html widget styles.

  Design tokens (ui-research-2026 §4 items 1–2): the whole system lives in :root
  — palette, spacing scale (4px rhythm), radius scale (collapsed from 7 ad-hoc
  radii to 5), and motion durations. Prefer a token over a hardcoded value.
*/
:root {
  /* ── Palette ── */
  --bg: #F5F4EE;
  --ink: #233022;
  --sage: #a5b89d;
  --muted: #626e5f;      /* was #889486 — darkened to pass WCAG AA as body text
                            (~4.85:1 on --bg, ~5.4:1 on white; old value ~2.9:1) */
  --border: #e0e5ec;
  --card: #ffffff;
  --err-bg: #fbecec;
  --err-border: #e0b4b4;
  --valid: #5f7355;      /* AA-safe deep sage for positive-validation ticks */

  /* ── Spacing scale (4px rhythm) ── */
  --space-1: .25rem;     /* 4px  */
  --space-2: .5rem;      /* 8px  */
  --space-3: .75rem;     /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */

  /* ── Radius scale (collapsed from 2/6/8/10/12/14/16/20/25 → 5 tokens) ── */
  --radius-xs: 2px;      /* progress segments        */
  --radius-chip: 8px;    /* small tags, answer table */
  --radius-input: 14px;  /* inputs, tick/select/time cards, alert boxes */
  --radius-card: 20px;   /* glass cards, modals, overlay */
  --radius-pill: 25px;   /* buttons, badges, chips   */

  /* ── Motion durations (transform/opacity only) ── */
  --dur-fast: 150ms;
  --dur-med: 250ms;
  --dur-slow: 300ms;
  --ease: ease;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: var(--space-5);
  background: var(--bg);
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  line-height: 1.5;
  font-variant-emoji: text;
}

.wrap { max-width: 640px; margin: 0 auto; }

h1, h2, h3 { font-weight: 800; color: var(--ink); margin: 0 0 var(--space-3); }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); }

.muted { color: var(--muted); }

.glass-card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 15px rgba(0, 0, 0, .05);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}

label { display: block; font-weight: 600; margin: var(--space-3) 0 var(--space-2); }

.deep-input,
textarea.deep-input,
select.deep-input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: var(--radius-input);
  padding: var(--space-2) var(--space-3);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  background: transparent;
  color: var(--ink);
}
.deep-input:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: inset 2px 2px 5px rgba(165, 184, 157, .2);
}

.liquid-btn {
  background: var(--sage);
  border: none;
  border-radius: var(--radius-pill);
  color: #000;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  padding: var(--space-4) var(--space-5);
  width: 100%;
  cursor: pointer;
}
.liquid-btn:disabled { background: #ccc; color: #555; cursor: not-allowed; }

.badge {
  display: inline-block;
  padding: 2px var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--sage);
  color: #000;
  font-weight: 600;
  font-size: .85rem;
}

.error-card {
  background: var(--err-bg);
  border: 1px solid var(--err-border);
  border-radius: var(--radius-input);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.icon { color: var(--sage); }

a { color: var(--ink); }
a.fallback-link { text-decoration: underline; }

/* `!important` is deliberate: .hidden is a utility whose whole job is to beat
   whatever `display` a component rule sets. Without it, ANY later same-specificity
   rule silently wins — .cp-days (display:grid) did exactly that to
   portal.html's `class="cp-days hidden"`, so classList.add('hidden') was a no-op
   and every pre-phase-6 student saw an empty Day 1/Day 2 grid under their module
   list. Nothing in the app ever overrides .hidden intentionally (verified: every
   usage is add/remove for visibility), so this cannot mask a legitimate rule. */
.hidden { display: none !important; }

/* ── Skeleton loading (item 7) — perceived speed; shimmer is decorative,
      suppressed under prefers-reduced-motion below. ── */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #ece9e0;
  border-radius: var(--radius-chip);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
  animation: skeleton-shimmer 1.3s ease-in-out infinite;
}
@keyframes skeleton-shimmer { to { transform: translateX(100%); } }
.skeleton-line { height: 14px; margin: var(--space-3) 0; }
.skeleton-line.short { width: 45%; }
.skeleton-line.med { width: 70%; }
.skeleton-title { height: 22px; width: 55%; margin-bottom: var(--space-4); }

/* ── Empty state (item 8) — icon + line + optional next action ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4);
  color: var(--muted);
}
.empty-state svg { width: 2rem; height: 2rem; color: var(--sage); }
.empty-state p { margin: 0; }

@media (max-width: 480px) {
  body { padding: var(--space-3); }
  .glass-card { padding: 18px; }
}

/* ── consult picker (wizard reskin) ── */
.cp-day-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.cp-day-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-3);
  text-align: center;
  min-height: 80px;
}

.cp-day-weekday {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--sage);
  letter-spacing: 1px;
}

.cp-day-date {
  font-size: .95rem;
  font-weight: 600;
  margin-top: 2px;
}

.cp-day-count {
  font-size: .8rem;
  color: var(--muted);
  margin-top: var(--space-1);
}

.cp-time-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.cp-time-card {
  background: #f8f9f6;
  border: 2px solid #e8ebe5;
  border-radius: var(--radius-input);
  padding: 18px var(--space-4);
  text-align: center;
  cursor: pointer;
  transition: all var(--dur-med);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--ink);
  font-size: .95rem;
}

.cp-time-card:hover {
  border-color: #c5d1bf;
}

.cp-time-card:focus-visible {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(165,184,157,.2);
}

.cp-time-card:disabled {
  background: #ddd;
  color: #555;
  cursor: not-allowed;
  border-color: #ddd;
}

/* Booking-in-progress + booked morph (items 3, 5-polish) — transform/opacity only */
.cp-time-card.booking { color: var(--muted); }
.cp-time-card.booked {
  background: rgba(165,184,157,.18);
  border-color: var(--sage);
  color: var(--ink);
}
.cp-inline-spinner {
  display: inline-block;
  width: 15px; height: 15px;
  border: 2px solid rgba(35,48,34,.25);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: wz-spin .6s linear infinite;
  vertical-align: middle;
  margin-right: var(--space-2);
}

.cp-back {
  width: 100%;
  margin-top: var(--space-3);
}

.cp-booked-done {
  margin: 0;
}

/* ── Survey page ── */
.help { color: var(--muted); font-size: .9rem; margin: var(--space-1) 0 0; font-weight: 400; }
.req { color: var(--sage); }
.opts { display: grid; gap: var(--space-2); margin-top: 6px; }
.opt { display: flex; align-items: center; gap: var(--space-2); font-weight: 400; margin: 0; }
.opt input { width: auto; }
fieldset { border: none; padding: 0; margin: 0; }
.section-title { margin-top: var(--space-1); }

/* ── Portal page ── */
.plan-list { margin: var(--space-2) 0 0; padding-left: 18px; }
.plan-list li { margin: 6px 0; }
.note { color: var(--muted); }
.module-note { color: var(--muted); }
.mat a { font-weight: 600; }
.prog-group-heading {
  font-size: 1rem; margin: var(--space-3) 0 var(--space-1);
}
.prog-group-heading:first-child { margin-top: 0; }
.prog-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--border);
}
.prog-row:last-child { border-bottom: none; }
.state-not-started { background: var(--border); color: var(--ink); }
.state-practising { background: #efe7c9; color: var(--ink); }
.state-signed-off { background: var(--sage); color: #000; }
.loading { color: var(--muted); }

/* ── Admin console (wider — operational tool, not a public face) ── */
.admin-wrap { max-width: 960px; }
.topbar { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.topbar .who { color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--ink);
  border-radius: var(--radius-pill); padding: 6px var(--space-4); font-weight: 600; font-size: .85rem; cursor: pointer;
}
.chip.active { background: var(--sage); border-color: var(--sage); }
.search { margin-bottom: var(--space-4); }
.student { border-bottom: 1px solid var(--border); padding: var(--space-4) 0; }
.student:last-child { border-bottom: none; }
.student .row1 { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.student .name { font-weight: 800; font-size: 1.05rem; }
.student .meta { color: var(--muted); font-size: .9rem; margin-top: var(--space-1); }
.student .dates { color: var(--muted); font-size: .82rem; margin-top: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.btn {
  width: auto; padding: var(--space-2) var(--space-4); font-size: .9rem; border-radius: var(--radius-pill);
  background: var(--sage); color: #000; border: none; font-family: 'Outfit', sans-serif;
  font-weight: 800; cursor: pointer;
}
.btn.secondary { background: #fff; border: 1px solid var(--border); }
.btn.danger { background: var(--err-bg); border: 1px solid var(--err-border); }
.btn:disabled { background: #ccc; color: #555; cursor: not-allowed; }
/* Confirm-button success morph (item: consult-flow polish) — green ✓ flash; the
   :disabled variant keeps the green visible while the button stays disabled through
   the flash (mirrors .wz-btn-submit.done). */
.btn.done, .btn.done:disabled { background: var(--valid); color: #fff; }
.status-lead { background:#e8eef0; } .status-consult-booked,.status-consult-done{ background:#dfe7da; }
.status-offered{ background:#f0e7cf; } .status-paid,.status-active{ background:#cfe0c8; }
.status-alumni{ background:#a5b89d; }
.status-declined,.status-ghosted,.status-hold-expired{ background:#ecdcdc; }
.level-beginner { background:#e8eef0; } .level-intermediate { background:var(--sage); }
.empty { color: var(--muted); padding: var(--space-5) 0; }

/* ── Course settings — essential-modules tickbox grid ── */
.essentials-table { width:100%; border-collapse:collapse; font-size:.9rem; margin-top:var(--space-2); }
.essentials-table th, .essentials-table td { text-align:left; padding:6px var(--space-2); border-bottom:1px solid var(--border); vertical-align:middle; }
.essentials-table th:nth-child(2), .essentials-table th:nth-child(3),
.essentials-table td:nth-child(2), .essentials-table td:nth-child(3) { text-align:center; }
.essentials-table input[type=checkbox] { width:18px; height:18px; accent-color:var(--sage); }

.overlay { position: fixed; inset: 0; background: rgba(35,48,34,.45); display: none; align-items: center; justify-content: center; padding: var(--space-4); z-index: 50; }
.overlay.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius-card); padding: var(--space-6); max-width: 480px; width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,.2); max-height: 90vh; overflow:auto; }
.modal h2 { margin-bottom: 6px; }
.modal .sub { color: var(--muted); font-size: .9rem; margin-bottom: var(--space-2); }
.modal-actions { display: flex; gap: var(--space-3); margin-top: 18px; }
.modal-actions .btn { flex: 1; text-align: center; }
.modal.wide { max-width: 640px; }
.answers-table { display: flex; flex-direction: column; gap: 1px; background: var(--border); padding: 1px; border-radius: var(--radius-chip); overflow: hidden; margin: var(--space-3) 0; }
.answer-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); padding: var(--space-3) var(--space-3); background: var(--card); }
.answer-label { font-size: .75rem; font-weight: 800; text-transform: uppercase; color: var(--muted); letter-spacing: 0.5px; }
.answer-value { color: var(--ink); font-weight: 600; word-break: break-word; }
.comp-group { margin-top: var(--space-3); }
.comp-group h3 { font-size: 1rem; margin-bottom: var(--space-1); }
.comp-item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin: 6px 0; }
.comp-item span { font-size: .9rem; }
.toast { position: fixed; bottom: var(--space-5); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: var(--space-3) 18px; border-radius: var(--radius-pill); font-weight: 600; display: none; z-index: 60; }
.toast.show { display: block; }
.logs-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.logs-table th, .logs-table td { text-align: left; padding: 6px var(--space-2); border-bottom: 1px solid var(--border); vertical-align: top; }
.logs-filter { display: flex; gap: var(--space-3); align-items: flex-end; flex-wrap: wrap; margin-bottom: var(--space-3); }
.logs-filter .deep-input { width: auto; }

/* ── Consult-outcome module tailoring cards ── */
.tailor-card { margin-top: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-input); padding: var(--space-4); }
.tailor-card-label { font-weight: 800; font-size: 1rem; display: block; }
.tailor-card-tag { font-weight: 600; font-size: .75rem; color: var(--muted); margin-left: var(--space-2); }
.tailor-card-competencies { color: var(--muted); font-size: .85rem; margin: var(--space-1) 0 0; }
.tailor-radios { display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.tailor-radios.cols-2 { grid-template-columns: 1fr 1fr; }
.tailor-radios.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.tailor-radio-opt { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-weight: 600; font-size: .85rem; padding: var(--space-2) var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-chip); cursor: pointer; }
.tailor-radio-opt input { width: auto; margin: 0; }

/* ── Curriculum preview (consult-outcome two-step) ─────────────────────────
   Shown on the instructor's screen TO THE STUDENT, so it reads as a course
   plan, not a debug dump. Sage is border/accent only — #a5b89d is 2.11:1 and
   fails AA as text; text uses --ink / --muted / --valid. */
.cp-preview { margin-top: var(--space-6); border-top: 1px solid var(--border); padding-top: var(--space-5); }
.cp-preview-head { display: flex; align-items: flex-start; justify-content: space-between;
                   gap: var(--space-4); margin-bottom: var(--space-4); }
.cp-preview-heading { min-width: 0; }
.cp-preview-title { font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.cp-preview-sub { color: var(--muted); font-size: .85rem; margin-top: var(--space-1); }
.cp-preview-back { flex: none; font-size: .8rem; padding: var(--space-2) var(--space-3); }

.cp-days { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 768px) { .cp-days { grid-template-columns: 1fr; } }

.cp-day { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--space-4); }
.cp-day-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--space-3); }
.cp-day-num { font-weight: 800; font-size: 1rem; color: var(--ink); }
/* NOT .cp-day-count — that name belongs to the consult PICKER (the "N times"
   caption at :206, emitted by consultpicker.js). Same specificity + later in the
   file meant this rule silently won and restyled the student-facing consult
   page, which nothing else in this phase touches. `.cp-` was already the
   picker's prefix; this is the one preview class that collided. */
.cp-preview-day-count { font-size: .75rem; color: var(--muted); font-weight: 600; }

.cp-dropzone { min-height: 120px; display: flex; flex-direction: column; gap: var(--space-2);
               border-radius: var(--radius-input); transition: background var(--dur-fast) var(--ease); }
.cp-dropzone.cp-over { background: #eef1ea; outline: 2px dashed var(--sage); outline-offset: 3px; }

.cp-cluster { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
              color: var(--valid); margin: var(--space-2) 0 0; }
.cp-cluster:first-child { margin-top: 0; }

.cp-card { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--sage);
           border-radius: var(--radius-chip); padding: var(--space-3); cursor: grab;
           transition: box-shadow var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease); }
.cp-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.cp-card:active { cursor: grabbing; }
.cp-card.cp-dragging { opacity: .5; }
.cp-card-head { display: flex; align-items: center; gap: var(--space-2); }
.cp-grip { color: var(--muted); font-size: .8rem; line-height: 1; flex: none; }
.cp-card-label { font-weight: 600; font-size: .9rem; color: var(--ink); flex: 1; }
.cp-tag { flex: none; font-size: .7rem; font-weight: 800; color: var(--ink);
          background: #e7ece3; border: 1px solid var(--sage); border-radius: var(--radius-pill); padding: 2px 8px; }
.cp-card-note { color: var(--muted); font-size: .78rem; margin-top: var(--space-2); line-height: 1.45; }
.cp-empty { color: var(--muted); font-size: .8rem; font-style: italic; padding: var(--space-3); text-align: center; }

/* ============================================================
   Survey wizard (survey.html) — faithful port of the wholesale
   inquiry questionnaire look. All classes are .wz-* prefixed so
   nothing on portal/consult/admin (which share this file) changes.
   Palette bound to the existing :root tokens where identical.
============================================================ */
.wz-view { padding: var(--space-5) var(--space-5) var(--space-8); }
.wz-container { max-width: 480px; margin: 0 auto; }

/* Progress bar */
.wz-progress { display: flex; align-items: center; gap: var(--space-1); margin-bottom: 28px; }
.wz-seg { flex: 1; height: 4px; border-radius: var(--radius-xs); background: #ddd; transition: background var(--dur-slow); }
.wz-seg.filled { background: var(--sage); }
.wz-counter { font-size: .75rem; font-weight: 600; color: var(--muted); margin-left: var(--space-2); white-space: nowrap; }

/* Step glass card (own padding — do NOT reuse .glass-card, other pages depend on it) */
.wz-card { background: var(--card); border-radius: var(--radius-card); box-shadow: 0 4px 15px rgba(0,0,0,.05); padding: 28px var(--space-6); margin-bottom: var(--space-5); }

/* Steps */
.wz-step { display: none; }
.wz-step.active { display: block; animation: wz-fade var(--dur-med) ease; }
@keyframes wz-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wz-label { color: var(--sage); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: var(--space-2); }
.wz-icon { display: block; color: var(--sage); margin-bottom: var(--space-3); }
.wz-icon svg { width: 2.37rem; height: 2.37rem; }
.wz-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 6px; line-height: 1.3; color: var(--ink); }
.wz-subtitle { font-size: .85rem; color: var(--muted); margin-bottom: var(--space-6); line-height: 1.4; }

/* Text inputs / textarea */
.wz-input { width: 100%; border: 1.5px solid #e0e5ec; border-radius: var(--radius-input); padding: var(--space-4) var(--space-4); font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 600; color: var(--ink); background: transparent; transition: border-color var(--dur-med), box-shadow var(--dur-med); }
.wz-input + .wz-input { margin-top: var(--space-3); }
.wz-input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(165,184,157,.15); }
.wz-input::placeholder { color: #bbb; font-weight: 400; }
.wz-input.invalid { border-color: #d4605a; }

/* Positive inline validation (item 6) — green tick as a field becomes valid */
.wz-input.valid {
  border-color: var(--valid);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f7355' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  background-size: 18px 18px;
  padding-right: 44px;
}
textarea.wz-input { min-height: 120px; resize: vertical; margin-top: var(--space-3); }

.wz-optional-tag { display: inline-block; font-size: .7rem; font-weight: 600; color: var(--muted); background: #f0f1ed; border-radius: var(--radius-chip); padding: 2px var(--space-2); margin-left: 6px; vertical-align: middle; }

/* Card select (single choice) */
.wz-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.wz-card-grid.single-col { grid-template-columns: 1fr; }
.wz-select-card { background: #f8f9f6; border: 2px solid #e8ebe5; border-radius: var(--radius-input); padding: 18px var(--space-4); text-align: center; cursor: pointer; transition: all var(--dur-med); user-select: none; -webkit-tap-highlight-color: transparent; }
.wz-select-card:hover { border-color: #c5d1bf; }
.wz-select-card:focus-visible { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(165,184,157,.2); }
.wz-select-card.selected { border-color: var(--sage); background: rgba(165,184,157,.1); box-shadow: 0 0 0 2px rgba(165,184,157,.2); }
.wz-card-icon { margin-bottom: var(--space-2); display: block; color: var(--sage); }
.wz-card-icon svg { width: 2.86rem; height: 2.86rem; }
.wz-card-label { font-size: .85rem; font-weight: 700; line-height: 1.3; }

/* Multi-select tick items */
.wz-tick-list { display: flex; flex-direction: column; gap: var(--space-3); }
.wz-tick-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-4); background: #f8f9f6; border: 2px solid #e8ebe5; border-radius: var(--radius-input); cursor: pointer; transition: all var(--dur-med); user-select: none; -webkit-tap-highlight-color: transparent; }
.wz-tick-item.checked { border-color: var(--sage); background: rgba(165,184,157,.1); }
.wz-tick-item:focus-visible { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(165,184,157,.2); }
.wz-tick-circle { width: 24px; height: 24px; border: 2px solid #c5d1bf; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all var(--dur-med); }
.wz-tick-item.checked .wz-tick-circle { background: var(--sage); border-color: var(--sage); }
.wz-tick-check { display: none; color: #fff; font-size: .7rem; font-weight: 800; }
.wz-tick-item.checked .wz-tick-check { display: block; }
.wz-tick-icon { color: var(--sage); flex-shrink: 0; width: 39px; min-width: 39px; display: inline-flex; align-items: center; justify-content: center; }
.wz-tick-icon svg { width: 1.6rem; height: 1.6rem; }
.wz-tick-label { font-size: .9rem; font-weight: 600; }

/* Navigation buttons */
.wz-nav { display: flex; gap: var(--space-3); margin-top: var(--space-6); }
.wz-btn { flex: 1; border: none; border-radius: var(--radius-pill); padding: 15px var(--space-5); font-family: 'Outfit', sans-serif; font-size: .95rem; font-weight: 800; cursor: pointer; transition: all var(--dur-med); -webkit-tap-highlight-color: transparent; }
.wz-btn:disabled { opacity: .4; cursor: not-allowed; }
.wz-btn-back { background: #e8ebe5; color: var(--ink); flex: .4; }
.wz-btn-next { background: var(--sage); color: #000; }
.wz-btn-next:active:not(:disabled) { transform: scale(.97); }
.wz-btn-submit { background: var(--sage); color: var(--bg); flex: 1; }
.wz-btn-submit:active:not(:disabled) { transform: scale(.97); }
/* Submit success morph (item 3) — spinner → ✓, opacity/transform only */
.wz-btn-submit.done { background: var(--valid); color: #fff; }

/* Loading spinner */
.wz-spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: wz-spin .6s linear infinite; vertical-align: middle; margin-right: var(--space-2); }
@keyframes wz-spin { to { transform: rotate(360deg); } }

/* Error toast */
.wz-toast { position: fixed; bottom: var(--space-8); left: 50%; transform: translateX(-50%) translateY(100px); background: #d4605a; color: #fff; padding: var(--space-3) var(--space-6); border-radius: var(--radius-input); font-size: .85rem; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.15); z-index: 9999; transition: transform var(--dur-slow) ease; max-width: 90%; text-align: center; }
.wz-toast.visible { transform: translateX(-50%) translateY(0); }

/* Success / thank-you (hands off to consult picker — no redirect) */
.wz-success-icons { display: flex; justify-content: center; gap: 1.2rem; color: var(--sage); margin-bottom: var(--space-4); }
.wz-success-icons svg { width: 3.04rem; height: 3.04rem; }

/* Validation shake */
@keyframes wz-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.wz-shake { animation: wz-shake .4s ease; }

@media (max-width: 480px) {
  .wz-card { padding: 22px 18px; }
  .wz-title { font-size: 1.15rem; }
  .wz-card-grid { gap: var(--space-3); }
  .wz-select-card { padding: var(--space-4) var(--space-3); }
}

/* ── admin consult calendar ── */
.ad-cal-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.ad-cal-nav .btn { flex: 0 0 auto; }

.ad-cal {
  display: grid;
  grid-template-columns: 80px repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  padding: 1px;
  border-radius: var(--radius-input);
  overflow: hidden;
  font-size: .8rem;
}

.ad-cal-header {
  display: contents;
}

.ad-cal-day-header {
  background: var(--card);
  padding: var(--space-3) var(--space-2);
  font-weight: 800;
  text-align: center;
  color: var(--sage);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--sage);
}

.ad-cal-header > .ad-cal-day-header:first-child {
  grid-column: 2;
}

.ad-cal-time-label {
  background: #f8f9f6;
  padding: var(--space-2) var(--space-1);
  font-weight: 600;
  text-align: center;
  color: var(--muted);
  font-size: .7rem;
}

.ad-cal-cell {
  background: var(--card);
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-1);
  border: 1px solid var(--border);
  position: relative;
}

.ad-cal-cell.clickable {
  cursor: pointer;
  transition: background-color var(--dur-med), border-color var(--dur-med);
}

.ad-cal-cell.clickable:hover {
  background-color: #f8f9f6;
  border-color: var(--sage);
}

.ad-cal-cell.filled {
  background: #f0f1ed;
}

.ad-cal-cell.booked {
  background-color: #efe7c9;
}

.ad-cal-cell-btn {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: inherit;
}

.ad-cal-cell-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================================
   Reduced motion (ui-research-2026 §4 item 4 / F2 · F6) — honour the
   OS "reduce motion" setting. Decorative motion is removed; the loading
   spinner is functional state (F2) and is deliberately preserved.
============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .wz-step.active { animation: none; }
  .wz-shake { animation: none; }
  .wz-btn-next:active:not(:disabled),
  .wz-btn-submit:active:not(:disabled) { transform: none; }
  .skeleton::after { animation: none; }
  /* Functional loading spinners stay — they communicate ongoing state. */
  .wz-spinner,
  .cp-inline-spinner { animation: wz-spin .6s linear infinite !important; }
}
