/* ============================================================================
   MrMurse Component Library
   ----------------------------------------------------------------------------
   Every reusable UI component, built ENTIRELY on tokens. Naming is BEM-lite:
     .block            component root
     .block__part      child element
     .block--variant   modifier
   Pages compose these; they must not restyle internals. If a new need arises,
   add a variant here rather than overriding in page CSS (Design System §22).
   ========================================================================== */


/* ==========================================================================
   BUTTONS
   Purpose: every actionable control. One section per page should have a single
   primary action (Design System §11). Hover lifts 1px; focus uses global ring.
   Variants: primary (navy fill), secondary (teal outline), text (low priority),
   plus sizes (sm/lg) and a full-width mobile modifier.
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-weight: var(--fw-bold); font-size: var(--fs-body-sm);
  line-height: 1; white-space: nowrap;
  min-height: var(--tap-min); padding: 0 var(--space-5);
  border-radius: var(--radius-pill);
  transition: transform var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard),
              background var(--dur-base) var(--ease-standard),
              color var(--dur-base) var(--ease-standard);
  border: var(--border-width) solid transparent;
}
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: var(--opacity-disabled); pointer-events: none;
}
.btn--primary {
  background: var(--action-primary-bg); color: var(--action-primary-text);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--action-primary-bg-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--secondary {
  background: var(--surface); color: var(--action-secondary-text);
  border-color: var(--action-secondary-border);
}
.btn--secondary:hover { background: var(--c-teal-tint-08); transform: translateY(-1px); }
.btn--text {
  background: none; color: var(--accent-strong); padding-inline: var(--space-2);
  min-height: auto; border-radius: var(--radius-sm);
}
.btn--text:hover { color: var(--c-navy); text-decoration: underline; }
/* On-dark variant for CTA blocks */
.btn--on-dark { background: #fff; color: var(--c-navy); }
.btn--on-dark:hover { background: #EAF6F8; }
/* Sizes */
.btn--sm { font-size: var(--fs-caption); min-height: 38px; padding-inline: var(--space-4); }
.btn--lg { font-size: var(--fs-body); min-height: 52px; padding-inline: var(--space-6); }
.btn--block { width: 100%; }


/* ==========================================================================
   EYEBROW / BADGE
   Purpose: a small labeled pill. Eyebrow introduces a section; status badges
   tag content (e.g. "Coming soon"). Use sparingly — they lose meaning if every
   element has one.
   ========================================================================== */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-eyebrow); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide); text-transform: uppercase;
  color: var(--accent-strong); background: var(--c-teal-tint-08);
  border: var(--border-width) solid var(--c-teal-tint-18);
  padding: 7px 14px; border-radius: var(--radius-pill);
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-caption); font-weight: var(--fw-semibold);
  padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--c-teal-tint-10); color: var(--accent-strong);
}
.badge--success { background: var(--c-success-bg); color: var(--c-success); }
.badge--warning { background: var(--c-warning-bg); color: var(--c-warning); }
.badge--info    { background: var(--c-info-bg);    color: var(--c-info); }
.badge--neutral { background: var(--bg-alt);       color: var(--text-muted); }


/* ==========================================================================
   ICON (production)
   Purpose: consistent sizing for sprite-referenced icons. Pair with the icon
   system in assets/js/icons.js:
       <svg class="icon" aria-hidden="true"><use href="#i-check"></use></svg>
   Icons inherit color via currentColor, so set color on the parent, not here.
   Decorative icons MUST carry aria-hidden="true"; an icon that is the only
   content of an interactive control needs an aria-label on that control.
   ========================================================================== */
.icon { width: 20px; height: 20px; display: inline-block; flex-shrink: 0; stroke: currentColor; fill: none; vertical-align: middle; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }

/* ==========================================================================
   ICON CHIP
   Purpose: the rounded teal square that holds a line icon at the top of cards
   and steps. Centralized so every icon container is identical.
   ========================================================================== */
.icon-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: var(--radius-md);
  background: var(--c-teal-tint-10); color: var(--accent);
  flex-shrink: 0;
}
.icon-chip svg { width: 24px; height: 24px; }
.icon-chip--sm { width: 38px; height: 38px; border-radius: var(--radius-sm); }
.icon-chip--sm svg { width: 18px; height: 18px; }


/* ==========================================================================
   CARD (base) + variants
   Purpose: the universal content container. All specific cards (feature,
   pricing, tutor, resource) extend .card so padding, radius, border, and the
   hover-lift stay identical platform-wide.
   When NOT to use: inline text callouts (use prose) or full-bleed CTA blocks
   (use .cta-block).
   ========================================================================== */
.card {
  background: var(--surface);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard),
              border-color var(--dur-base) var(--ease-standard);
}
/* Interactive lift only when the card itself is a link/has .card--interactive,
   so static informational cards don't imply clickability. */
.card--interactive { cursor: pointer; }
.card--interactive:hover,
a.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-teal-tint-18);
}
.card__title { font-size: var(--fs-h3); margin-bottom: var(--space-2); }
.card__text  { font-size: var(--fs-body-sm); color: var(--text-body); }
.card__tag {
  display: block; font-size: var(--fs-caption); font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide); text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: var(--space-2);
}
.card .icon-chip { margin-bottom: var(--space-4); }


/* ---- Feature card: icon + title + text (homepage "Practice/Feedback/Tutor") */
.feature-card .card__title { margin-top: 0; }


/* ---- Pricing card --------------------------------------------------------
   Purpose: present a tutoring plan. Phase 0 rule: the action is ALWAYS the
   waitlist (no checkout). Variant --featured visually elevates the
   recommended plan with a teal ring + label.                                */
.pricing-card { display: flex; flex-direction: column; }
.pricing-card__name { font-size: var(--fs-h3); color: var(--text-primary); }
.pricing-card__price {
  font-size: 2.4rem; font-weight: var(--fw-extra); color: var(--text-primary);
  letter-spacing: var(--ls-heading); margin-top: var(--space-2);
}
.pricing-card__price span { display: block; font-size: var(--fs-body-sm); font-weight: var(--fw-semibold); color: var(--text-muted); margin-top: 2px; }
.pricing-card__best { font-size: var(--fs-body-sm); color: var(--text-muted); margin-top: var(--space-2); }
.pricing-card__list { margin: var(--space-5) 0; display: grid; gap: var(--space-3); }
.pricing-card__list li { display: flex; gap: var(--space-3); font-size: var(--fs-body-sm); color: var(--text-body); }
.pricing-card__list svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.pricing-card .btn { margin-top: auto; }
.pricing-card--featured {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--accent);
  position: relative;
}
.pricing-card--featured::before {
  content: "Most Popular"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: var(--fs-caption);
  font-weight: var(--fw-bold); letter-spacing: var(--ls-wide); text-transform: uppercase;
  padding: 5px 14px; border-radius: var(--radius-pill); white-space: nowrap;
}


/* ---- Tutor card ----------------------------------------------------------
   Purpose: team-page profile. Reads as an education team member, not a social
   profile (Brief). Photo is a neutral placeholder until real images exist.    */
.tutor-card { text-align: left; }
.tutor-card__photo {
  width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--c-gray-bg), #E9EFF1);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); margin-bottom: var(--space-4);
  border: var(--border-width) solid var(--border);
}
.tutor-card__name { font-size: var(--fs-h3); }
.tutor-card__cred { font-size: var(--fs-caption); font-weight: var(--fw-bold); color: var(--accent-strong); letter-spacing: var(--ls-wide); text-transform: uppercase; margin-top: 2px; }
.tutor-card__meta { font-size: var(--fs-body-sm); color: var(--text-muted); margin-top: var(--space-3); display: grid; gap: 4px; }
.tutor-card__email { font-size: var(--fs-body-sm); color: var(--accent-strong); margin-top: var(--space-3); display: inline-block; }


/* ---- Resource card -------------------------------------------------------
   Purpose: a downloadable/free resource. Supports availability states via the
   badge + button label (Download / Coming soon / Waitlist).                  */
.resource-card { display: flex; flex-direction: column; }
.resource-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.resource-card__title { font-size: var(--fs-h4); font-weight: var(--fw-bold); color: var(--text-primary); }
.resource-card__text { font-size: var(--fs-body-sm); color: var(--text-body); margin-top: var(--space-2); }
.resource-card .btn { margin-top: var(--space-5); }


/* ==========================================================================
   SECTION HEADER (component form)
   .section-head lives in base.css as layout; this adds the eyebrow rhythm.
   Left-aligned variant for asymmetric sections.
   ========================================================================== */
.section-head--left { text-align: left; margin-inline: 0; }


/* ==========================================================================
   NAVIGATION (desktop) + MOBILE NAV
   Purpose: primary site nav. Sticky, blurred, single primary CTA (Join
   Waitlist). Collapses to a hamburger + slide-down panel at --bp-md.
   Interaction: hamburger toggles aria-expanded; Esc closes; focus trapped
   while open (handled in components.js).
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: var(--border-width) solid var(--border);
}
.site-nav {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-height);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-1); }
/* The logo asset is a circular badge centered on a wide canvas with white
   margins. object-fit:cover with a square box crops those margins so the
   visible circle fills the box at the intended size, without editing the file. */
.brand__logo { height: 82px; width: 82px; object-fit: contain; }
.brand__word { font-size: 1.42rem; font-weight: var(--fw-extra); letter-spacing: var(--ls-tight); }
.brand__word .mr { color: var(--accent-2); }
.brand__word .murse { color: var(--text-primary); }

.nav-links { display: flex; align-items: center; gap: var(--space-6); }
.nav-links a:not(.btn) {
  font-size: var(--fs-body-sm); font-weight: var(--fw-semibold);
  color: var(--text-body); transition: color var(--dur-base) var(--ease-standard);
}
.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"] { color: var(--text-primary); }
.nav-links a[aria-current="page"] { position: relative; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: var(--space-2); min-height: var(--tap-min); min-width: var(--tap-min); align-items: center; justify-content: center; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--c-navy); border-radius: 2px; transition: transform var(--dur-base), opacity var(--dur-base); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-links {
    position: fixed; inset: var(--header-height) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: var(--space-2);
    background: var(--surface); padding: var(--space-5) var(--container-pad) var(--space-6);
    border-bottom: var(--border-width) solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard);
  }
  .nav-links[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a:not(.btn) { padding: var(--space-3) 0; font-size: var(--fs-body); }
  .nav-links .btn { margin-top: var(--space-2); }
  .nav-toggle { display: inline-flex; }
}


/* ==========================================================================
   FOOTER
   Purpose: reinforce trust + provide full navigation + disclaimer. Not
   oversized (Design System §15).
   ========================================================================== */
.site-footer { background: var(--c-navy); color: #CDD8DE; padding: var(--space-8) 0 var(--space-6); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-7); padding-bottom: var(--space-7); border-bottom: var(--border-width) solid rgba(255,255,255,.10); }
.footer-brand .brand__word { color: #fff; }
.footer-brand .brand__logo { height: 88px; width: 88px; }
/* The .murse rule above is more specific than .footer-brand .brand__word, so on
   the navy footer "Murse" stays navy and disappears. Restore readable contrast:
   keep the teal "Mr", make "Murse" white on the dark footer. */
.footer-brand .brand__word .murse { color: #fff; }
.footer-brand .brand__word .mr { color: var(--accent-2); }
.footer-brand p { color: #9FB0B9; font-size: var(--fs-body-sm); max-width: 340px; margin-top: var(--space-4); }
.footer-col h5 { color: #fff; font-size: var(--fs-eyebrow); letter-spacing: var(--ls-wide); text-transform: uppercase; margin-bottom: var(--space-4); }
.footer-col a { display: block; color: #A7B8C0; font-size: var(--fs-body-sm); padding: 6px 0; transition: color var(--dur-base) var(--ease-standard); }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.footer-social a { width: 38px; height: 38px; border-radius: var(--radius-sm); border: var(--border-width) solid rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; color: #CDD8DE; transition: background var(--dur-base), color var(--dur-base); }
.footer-social a:hover { background: rgba(255,255,255,.08); color: #fff; }
.footer-bottom { padding-top: var(--space-5); display: flex; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap; align-items: center; }
.footer-bottom p { font-size: var(--fs-caption); color: #7F939D; max-width: 760px; line-height: var(--lh-snug); }
.footer-bottom .copy { font-size: var(--fs-caption); color: #9FB0B9; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); } }


/* ==========================================================================
   CTA BLOCK
   Purpose: full-width navy panel that closes a page with one clear action
   (e.g. "Join the waitlist"). Confident, not loud (Brand Guidelines §8).
   ========================================================================== */
.cta-block {
  background: linear-gradient(150deg, var(--c-navy-800), #17404E);
  border-radius: 28px; padding: var(--space-8) var(--space-7);
  text-align: center; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-block::after {
  content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(75,175,194,.28), transparent 70%);
  top: -120px; right: -80px; pointer-events: none;
}
.cta-block > * { position: relative; }
.cta-block h2 { color: #fff; margin-top: var(--space-4); }
.cta-block p { color: var(--text-on-dark); max-width: 560px; margin: var(--space-4) auto 0; }
.cta-block .btn { margin-top: var(--space-6); }
.cta-block .eyebrow { background: rgba(75,175,194,.18); color: #9FE3EF; border-color: rgba(75,175,194,.3); }
@media (max-width: 768px) { .cta-block { padding: var(--space-7) var(--space-5); } }


/* ==========================================================================
   TIMELINE
   Purpose: ordered, sequential steps (How It Works). Numbered markers are used
   ONLY because the content is genuinely a sequence. A connecting line implies
   progression.
   ========================================================================== */
.timeline { display: grid; gap: var(--space-5); position: relative; }
.timeline__step { display: flex; gap: var(--space-5); align-items: flex-start; background: var(--surface); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); padding: var(--space-5); box-shadow: var(--shadow-sm); transition: transform var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard); }
.timeline__step:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.timeline__num { flex-shrink: 0; width: 48px; height: 48px; border-radius: var(--radius-full); background: var(--c-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: var(--fw-extra); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--accent); }
.timeline__title { font-size: var(--fs-h4); font-weight: var(--fw-bold); color: var(--text-primary); }
.timeline__text { font-size: var(--fs-body-sm); color: var(--text-body); margin-top: 4px; }


/* ==========================================================================
   FAQ ACCORDION
   Purpose: progressive disclosure of common questions. Built on <details>/
   <summary> so it works WITHOUT JavaScript and is keyboard-accessible by
   default; JS only adds smooth height + single-open behavior as enhancement.
   ========================================================================== */
.faq { display: grid; gap: var(--space-3); }
.faq--spaced { margin-top: var(--space-5); }
.faq__item { background: var(--surface); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.faq__summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5); font-weight: var(--fw-semibold); color: var(--text-primary); cursor: pointer; list-style: none; min-height: var(--tap-min); }
.faq__summary::-webkit-details-marker { display: none; }
.faq__summary:hover { color: var(--accent-strong); }
.faq__icon { flex-shrink: 0; color: var(--accent); transition: transform var(--dur-slow) var(--ease-standard); }
.faq__item[open] .faq__icon { transform: rotate(180deg); }
.faq__body { padding: 0 var(--space-5) var(--space-5); color: var(--text-body); font-size: var(--fs-body-sm); }


/* ==========================================================================
   FORM CONTROLS
   Purpose: accessible, approachable inputs (Design System §13). Every field
   pairs a visible <label> with the control; helper/error text is wired via
   aria-describedby. Large touch targets, clear focus, obvious error state.
   ========================================================================== */
.field { display: grid; gap: var(--space-2); margin-bottom: var(--space-5); }
.field__label { font-size: var(--fs-body-sm); font-weight: var(--fw-semibold); color: var(--text-primary); }
.field__label .req { color: var(--c-error); margin-left: 2px; }
.field__hint { font-size: var(--fs-caption); color: var(--text-muted); }
.field__error { font-size: var(--fs-caption); color: var(--c-error); display: none; }

.input, .select, .textarea {
  width: 100%; min-height: var(--tap-min);
  padding: 12px var(--space-4);
  font-size: var(--fs-body);
  color: var(--text-primary); background: var(--surface);
  border: var(--border-width) solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.input::placeholder, .textarea::placeholder { color: #9AA8B0; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}
.textarea { min-height: 120px; padding-top: var(--space-3); resize: vertical; line-height: var(--lh-snug); }

/* Custom select chevron without losing native control. */
.select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23112B35' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--space-4) center;
  padding-right: var(--space-7);
}

/* Invalid state — set .field.has-error on the wrapper (JS or server). */
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea { border-color: var(--c-error); box-shadow: 0 0 0 3px var(--c-error-bg); }
.field.has-error .field__error { display: block; }

/* Checkbox & radio — custom, accessible, keyboard-focusable. */
.choice { display: flex; align-items: flex-start; gap: var(--space-3); cursor: pointer; font-size: var(--fs-body-sm); color: var(--text-body); min-height: var(--tap-min); }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice__box { flex-shrink: 0; width: 22px; height: 22px; border: 2px solid var(--border-strong); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; transition: border-color var(--dur-base), background var(--dur-base); margin-top: 1px; }
.choice--check .choice__box { border-radius: 6px; }
.choice--radio .choice__box { border-radius: var(--radius-full); }
.choice__box svg { width: 14px; height: 14px; color: #fff; opacity: 0; transition: opacity var(--dur-fast); }
.choice input:checked + .choice__box { background: var(--accent); border-color: var(--accent); }
.choice input:checked + .choice__box svg { opacity: 1; }
.choice--radio input:checked + .choice__box::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; }
.choice input:focus-visible + .choice__box { outline: var(--focus-ring) solid var(--border-focus); outline-offset: 2px; }


/* ==========================================================================
   MODAL — native <dialog>
   Purpose: focused interruption (rare on marketing pages; reserved mostly for
   future dashboard confirmations).

   IMPLEMENTATION: built on the native <dialog> element opened with
   showModal(). The browser provides the focus trap, Esc-to-close, the top-layer
   stacking, and ::backdrop — so we maintain far less JS than a div+role+manual
   trap, and accessibility is correct by default. Supported in all current
   evergreen browsers.

   Markup:
     <dialog class="modal" id="x" aria-labelledby="x-title"> … </dialog>
   Open:  document.getElementById('x').showModal()  (handled by data-modal-open)
   Close: <button data-modal-close>  or Esc  or backdrop click
   ========================================================================== */
.modal {
  width: min(520px, calc(100% - var(--space-6)));
  max-height: calc(100dvh - var(--space-7));
  position: fixed; inset: 0; margin: auto;   /* fixed-center: no page scroll jump on open */
  padding: var(--space-7);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-body);
  box-shadow: var(--shadow-lg);
}
.modal::backdrop {
  background: rgba(14, 39, 49, var(--opacity-scrim));
}
/* Open/close transition. Native dialog toggles display, so we animate with
   @starting-style where supported; it degrades to an instant open elsewhere. */
.modal[open] { animation: modal-in var(--dur-base) var(--ease-out); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .modal[open] { animation: none; } }
.modal__close { position: absolute; top: var(--space-4); right: var(--space-4); width: var(--tap-min); height: var(--tap-min); border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); }
.modal__close:hover { background: var(--bg-alt); color: var(--text-primary); }
.modal__title { font-size: var(--fs-h3); margin-bottom: var(--space-3); }


/* ==========================================================================
   TOAST
   Purpose: brief, non-blocking confirmation ("Message sent"). Auto-dismisses;
   announced to screen readers via aria-live in the container.
   ========================================================================== */
.toast-region { position: fixed; bottom: var(--space-6); left: 50%; transform: translateX(-50%); z-index: var(--z-toast); display: grid; gap: var(--space-3); width: min(420px, calc(100% - var(--space-6))); }
.toast { display: flex; align-items: flex-start; gap: var(--space-3); background: var(--surface); border: var(--border-width) solid var(--border); border-left: 4px solid var(--accent); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); padding: var(--space-4) var(--space-5); font-size: var(--fs-body-sm); color: var(--text-primary); animation: toast-in var(--dur-slow) var(--ease-out); }
.toast--success { border-left-color: var(--c-success); }
.toast--error { border-left-color: var(--c-error); }
.toast__icon { flex-shrink: 0; margin-top: 2px; }
.toast--success .toast__icon { color: var(--c-success); }
.toast--error .toast__icon { color: var(--c-error); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }


/* ==========================================================================
   STATE BLOCKS: loading / empty / success / error / 404
   Purpose: consistent, branded handling of non-ideal states. Per
   frontend-design guidance, these give DIRECTION, not mood.
   ========================================================================== */
.state { text-align: center; max-width: 460px; margin-inline: auto; padding: var(--space-8) var(--space-5); }
.state__icon { width: 64px; height: 64px; border-radius: var(--radius-full); background: var(--c-teal-tint-10); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; margin-bottom: var(--space-5); }
.state__title { font-size: var(--fs-h3); }
.state__text { color: var(--text-body); margin-top: var(--space-3); }
.state__action { margin-top: var(--space-5); }
.state--error .state__icon { background: var(--c-error-bg); color: var(--c-error); }
.state--success .state__icon { background: var(--c-success-bg); color: var(--c-success); }

/* Loading: skeleton shimmer + spinner. Spinner respects reduced motion. */
.spinner { width: 28px; height: 28px; border: 3px solid var(--c-teal-tint-18); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--c-gray-bg) 25%, #EDF1F3 37%, var(--c-gray-bg) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } .skeleton { animation: none; } }

/* 404: a large, calm numeral + redirect. Extends .state. */
.notfound__code { font-size: 4.5rem; font-weight: var(--fw-extra); color: var(--text-primary); letter-spacing: var(--ls-tight); line-height: 1; }


/* ==========================================================================
   HERO  (shared across pages: Home, How It Works, and future pages)
   --------------------------------------------------------------------------
   Purpose: the top-of-page introduction. A two-column grid (copy + visual)
   on desktop that stacks on tablet. Promoted into the system because more than
   one page uses it; page-specific hero visuals/extras live in page CSS, but the
   frame, grid, and type rhythm are shared here so every hero feels identical.

   When to use: the first section of a page that needs a headline + supporting
   visual. When NOT to use: interior sections (use .section + .section-head).
   Pair the section with .section--tight for the standard hero top rhythm.
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 520px at 78% -10%, var(--c-teal-tint-10), transparent 60%),
    radial-gradient(820px 460px at 6% 120%, var(--c-teal-tint-08), transparent 60%),
    var(--bg-page);
  padding-top: var(--space-9);
}
.hero__grid {
  display: grid; grid-template-columns: 1.04fr .96fr;
  gap: var(--space-8); align-items: center;
}
.hero__title { font-size: var(--fs-display); font-weight: var(--fw-extra); margin-top: var(--space-5); }
.hero__sub { font-size: var(--fs-body-lg); color: var(--text-body); margin-top: var(--space-5); max-width: 540px; }
.hero__cta { display: flex; gap: var(--space-3); margin-top: var(--space-6); flex-wrap: wrap; }
@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-7); text-align: center; }
  .hero__sub { margin-inline: auto; }
  .hero__cta { justify-content: center; }
}
/* Mobile only: tighten the gap between the header and the hero by about half. */
@media (max-width: 768px) {
  .hero { padding-top: var(--space-7); }
}


/* ==========================================================================
   DISCLAIMER NOTE
   Purpose: the recurring honesty note (original questions, independent
   service). Quiet, trustworthy styling — never alarming.
   ========================================================================== */
.note { font-size: var(--fs-caption); color: var(--text-muted); background: var(--bg-alt); border: var(--border-width) solid var(--border); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); }


/* ==========================================================================
   PRODUCT SURFACE  (new in Phase 0.1 — "show, don't tell")
   --------------------------------------------------------------------------
   Purpose: a lightweight, branded mock of a MrMurse product UI (a practice
   question, a feedback summary, a progress readout). The marketing site uses
   these to SHOW the learning system instead of only describing it, and they
   pre-figure the real dashboards on the Product Roadmap (Phases 4–6) so the
   visual language is already established when those ship.

   When to use: hero/section visuals that demonstrate the product; "how it
   works" moments where a real surface explains more than prose.
   When NOT to use: as a real interactive control (these are presentational),
   or more than one per viewport (they're the focal point, not decoration).

   Built entirely on tokens. .surface is the window-chrome frame; the inner
   parts (q-row, meter, summary) compose inside it.
   ========================================================================== */
.surface {
  background: var(--surface);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.surface__bar {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-alt);
  border-bottom: var(--border-width) solid var(--border);
}
.surface__dots { display: flex; gap: 6px; }
.surface__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); display: block; }
.surface__label { font-size: var(--fs-caption); font-weight: var(--fw-semibold); color: var(--text-muted); margin-left: var(--space-2); }
.surface__body { padding: var(--space-5); }
.surface__body--tight { padding: var(--space-4); }

/* --- Practice question row: a stem + answer choices, with one marked state. */
.qcard__stem { font-size: var(--fs-body-sm); font-weight: var(--fw-semibold); color: var(--text-primary); line-height: var(--lh-snug); }
.qcard__meta { display: flex; gap: var(--space-2); margin-bottom: var(--space-3); }
.qcard__choices { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.qchoice {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: var(--border-width) solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-body-sm); color: var(--text-body);
}
.qchoice__key {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-caption); font-weight: var(--fw-bold); color: var(--text-muted);
}
.qchoice--correct { border-color: var(--c-success); background: var(--c-success-bg); color: var(--text-primary); }
.qchoice--correct .qchoice__key { border-color: var(--c-success); background: var(--c-success); color: #fff; }
.qchoice--chosen { border-color: var(--border-strong); }

/* --- Progress / mastery meter: a labeled track + fill. Reusable for analytics. */
.meter { display: grid; gap: 6px; }
.meter__top { display: flex; justify-content: space-between; align-items: baseline; }
.meter__label { font-size: var(--fs-body-sm); font-weight: var(--fw-semibold); color: var(--text-primary); }
.meter__val { font-size: var(--fs-caption); font-weight: var(--fw-bold); color: var(--accent-strong); }
.meter__track { height: 8px; border-radius: var(--radius-pill); background: var(--c-gray-bg); overflow: hidden; }
.meter__fill { height: 100%; border-radius: var(--radius-pill); background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.meter + .meter { margin-top: var(--space-4); }

/* --- Feedback summary line: an icon + label + value, stacked in a surface. */
.summary { display: grid; gap: var(--space-3); }
.summary__row { display: flex; align-items: center; gap: var(--space-3); }
.summary__ic { flex-shrink: 0; width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--c-teal-tint-10); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.summary__ic svg { width: 18px; height: 18px; }
.summary__txt { font-size: var(--fs-body-sm); color: var(--text-body); }
.summary__txt b { color: var(--text-primary); font-weight: var(--fw-bold); }


/* ==========================================================================
   STAT / CREDIBILITY ITEM  (new in Phase 0.1)
   --------------------------------------------------------------------------
   Purpose: a single credibility point — a number/word + supporting label.
   Works TODAY as a method/positioning fact ("50-min focused sessions",
   "Original questions") and evolves into outcomes/statistics later
   ("1,200+ questions reviewed") without markup changes.

   When to use: a credibility strip of 3–4 items.
   When NOT to use: to invent fake metrics — keep values honest until real
   data exists (Foundation §10 trust principles).
   ========================================================================== */
.stat { text-align: left; }
.stat__num { font-size: 1.9rem; font-weight: var(--fw-extra); color: var(--text-primary); letter-spacing: var(--ls-heading); line-height: 1.1; }
.stat__num .u { color: var(--accent); }
.stat__label { font-size: var(--fs-body-sm); color: var(--text-muted); margin-top: var(--space-2); }


/* ==========================================================================
   FEATURE ROW (icon + text inline)  (new in Phase 0.1)
   --------------------------------------------------------------------------
   Purpose: a compact horizontal "icon-chip + title + text" unit for lists of
   capabilities where full cards would be heavy and repetitive. Adds rhythm
   variation vs. the card grid while staying on-system.

   When to use: secondary capability lists, "what's included", platform signals.
   When NOT to use: as the primary 3-up feature moment (use feature cards there).
   ========================================================================== */
.feature-row { display: flex; gap: var(--space-4); align-items: flex-start; }
.feature-row__title { font-size: var(--fs-h4); font-weight: var(--fw-bold); color: var(--text-primary); }
.feature-row__text { font-size: var(--fs-body-sm); color: var(--text-body); margin-top: 2px; }

/* ==========================================================================
   FORM STATUS
   Purpose: inline success/error feedback after an async form submission.
   Announced to screen readers via role="status" + aria-live on the element.
   ========================================================================== */
.form-status {
  margin-top: var(--space-4); padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm); font-size: var(--fs-body-sm); font-weight: var(--fw-medium);
  border: var(--border-width) solid transparent;
}
.form-status--success { background: var(--c-success-bg); color: var(--c-success); border-color: var(--c-success); }
.form-status--error { background: var(--c-error-bg); color: var(--c-error); border-color: var(--c-error); }
