/* ============================================================
   LinguaLane — primary Spanish + 1-2-1 tutoring
   Identity per the LinguaLane brand kit: road mark, Lalo, jade/sun/poncho.
   ============================================================ */

/* ── LinguaLane identity ──────────────────────────────────────
   Palette and type from the brand kit. The rules that shape the
   mapping below:
     · Jade is the primary accent — the one button on the page.
     · Sun means MOVEMENT only: lane markings, progress, XP.
       Never body text, never a large field.
     · Poncho Rose is streaks, timers and corrections — sparing
       enough that it still means something.
   ──────────────────────────────────────────────────────────── */
:root {
  /* brand tokens */
  --ink:        #132229;   /* Ruta Ink */
  --ink-soft:   #516468;
  --jade:       #0E9E7A;   /* Cordillera Jade — primary */
  --jade-deep:  #0A7A5E;
  --sun:        #EFA81C;   /* Sendero Sun — movement only */
  --poncho:     #D6483F;   /* Poncho Rose */
  --poncho-deep:#B23A32;
  --fleece:     #F3E8D3;
  --paper:      #F8FAF6;   /* card surface */
  --cream:      #E7EDE7;   /* Sage Paper — page ground */
  --line:       #C9D5C9;

  /* legacy aliases, mapped onto the brand */
  --coral:      var(--jade);
  --coral-dark: var(--jade-deep);
  --teal:       var(--jade);
  --teal-dark:  var(--jade-deep);
  --indigo:     var(--ink);
  --plum:       var(--jade-deep);
  --leaf:       var(--jade);

  --radius:     18px;
  --radius-sm:  10px;
  --shadow:     0 2px 0 var(--line), 0 12px 28px -18px rgba(19,34,41,.35);
  --shadow-lg:  0 4px 0 var(--line), 0 28px 56px -28px rgba(19,34,41,.4);

  --wrap: 1140px;
  --font:         "Instrument Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-mono:    "DM Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.035em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1em; }
a  { color: var(--teal-dark); }

img { max-width: 100%; display: block; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 780px); margin-inline: auto; }

section { padding: 4.5rem 0; }
section.tight { padding: 3rem 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--jade-deep);
  margin-bottom: .6rem;
}

.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:active { transform: translateY(2px); }
.btn-primary {
  background: var(--coral); color: #fff;
  box-shadow: 0 4px 0 var(--coral-dark);
}
.btn-primary:hover { background: #ff7f70; }
.btn-primary:active { box-shadow: 0 2px 0 var(--coral-dark); }
.btn-secondary {
  background: var(--paper); color: var(--ink);
  border-color: var(--ink); box-shadow: 0 4px 0 var(--ink);
}
.btn-secondary:hover { background: var(--sun); }
.btn-secondary:active { box-shadow: 0 2px 0 var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,248,240,.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; padding: .8rem 0; }

.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); margin-right: auto; }
/* The mark is the road: two mirrored Ls tapering to a vanishing point,
   with lane markings that shrink as they climb. Never recolour the
   markings, never stretch it — the taper is the whole idea. */
.brand-mark {
  width: 42px; height: 42px; flex: none;
  font-size: 0;                 /* hides the fallback letters */
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M44 22 L52 22 L44 102 L6 102 L6 84 L32 84 Z' fill='%23132229' stroke='%23132229' stroke-width='5' stroke-linejoin='round'/%3E%3Cpath d='M76 22 L68 22 L76 102 L114 102 L114 84 L88 84 Z' fill='%23132229' stroke='%23132229' stroke-width='5' stroke-linejoin='round'/%3E%3Cg fill='%23EFA81C'%3E%3Crect x='57.25' y='78' width='5.5' height='20' rx='1.8'/%3E%3Crect x='58.2' y='52' width='3.6' height='16' rx='1.5'/%3E%3Crect x='58.9' y='30' width='2.2' height='10' rx='1.1'/%3E%3C/g%3E%3C/svg%3E");
}
/* on ink grounds the letters go fleece, the markings stay sun */
.site-footer .brand-mark, .admin-bar .brand-mark {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M44 22 L52 22 L44 102 L6 102 L6 84 L32 84 Z' fill='%23F3E8D3' stroke='%23F3E8D3' stroke-width='5' stroke-linejoin='round'/%3E%3Cpath d='M76 22 L68 22 L76 102 L114 102 L114 84 L88 84 Z' fill='%23F3E8D3' stroke='%23F3E8D3' stroke-width='5' stroke-linejoin='round'/%3E%3Cg fill='%23EFA81C'%3E%3Crect x='57.25' y='78' width='5.5' height='20' rx='1.8'/%3E%3Crect x='58.2' y='52' width='3.6' height='16' rx='1.5'/%3E%3Crect x='58.9' y='30' width='2.2' height='10' rx='1.1'/%3E%3C/g%3E%3C/svg%3E");
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.3rem;
  letter-spacing: -.045em; line-height: .86;
}
.brand-name b { color: var(--jade); font-weight: inherit; }
.site-footer .brand-name b, .admin-bar .brand-name b { color: var(--fleece); }
.brand-tag { display: block; font-family: var(--font-mono); font-size: .64rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin-top: .2rem; }

.nav { display: flex; align-items: center; gap: .35rem; }
.nav a {
  padding: .5rem .85rem; border-radius: 999px;
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: .95rem;
}
.nav a:hover { background: rgba(255,193,69,.35); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }

.nav-toggle { display: none; background: none; border: 2px solid var(--ink); border-radius: 10px; padding: .45rem .6rem; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2.5px; background: var(--ink); border-radius: 2px; }
.nav-toggle span + span { margin-top: 4px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; inset: 100% 1.25rem auto 1.25rem;
    flex-direction: column; align-items: stretch;
    background: var(--paper); border: 2px solid var(--line);
    border-radius: var(--radius); padding: .6rem; box-shadow: var(--shadow-lg);
    display: none;
  }
  .nav.open { display: flex; }
  .nav .btn { justify-content: center; margin-top: .35rem; }
}

/* ---------- Hero ---------- */
.hero { padding: 4rem 0 3.5rem; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 2rem; } }

.hero h1 span { color: var(--coral-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.hero-note { margin-top: 1.2rem; font-size: .95rem; color: var(--ink-soft); }

.hero-card {
  background: var(--paper); border: 2px solid var(--line);
  border-radius: 24px; padding: 1.6rem; box-shadow: var(--shadow-lg);
  transform: rotate(-1.2deg);
}
.hero-card h3 { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.price-badge {
  background: var(--teal); color: #fff; border-radius: 999px;
  padding: .3rem .85rem; font-size: .95rem; font-weight: 900; white-space: nowrap;
}
.hero-card ul { list-style: none; padding: 0; margin: 1rem 0 1.4rem; }
.hero-card li { display: flex; gap: .6rem; padding: .4rem 0; font-size: .97rem; }
.hero-card li::before { content: "✓"; color: var(--leaf); font-weight: 900; }

/* ---------- Flag strip ---------- */
.langbar { background: var(--ink); color: #fff; padding: .9rem 0; }
.langbar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2.2rem; font-weight: 700; font-size: .95rem; }
.langbar-inner span { display: flex; align-items: center; gap: .5rem; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.5rem;
  margin-bottom: .9rem; background: rgba(255,193,69,.3);
}

.step-num {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--indigo); color: #fff;
  display: grid; place-items: center; font-weight: 900;
  margin-bottom: .8rem;
}

/* ---------- Year group / unit browser ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 2rem; align-items: center; }
.filter-label { font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin-right: .3rem; }
.chip {
  border: 2px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: .4rem 1rem;
  font: inherit; font-size: .9rem; font-weight: 800; cursor: pointer;
  transition: all .12s ease;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.2rem; }
.unit {
  background: var(--paper); border: 2px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.unit-top { padding: .55rem 1rem; color: #fff; font-weight: 800; font-size: .82rem; display: flex; justify-content: space-between; gap: .5rem; }
.unit-body { padding: 1.1rem 1.1rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.unit-body h3 { font-size: 1.08rem; margin-bottom: .35rem; }
.unit-body p { font-size: .93rem; color: var(--ink-soft); margin-bottom: .9rem; }
.unit-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: .4rem; }
.tag {
  font-size: .74rem; font-weight: 800; border-radius: 6px;
  padding: .2rem .5rem; background: rgba(76,76,224,.1); color: var(--indigo);
}
.tag.alt { background: rgba(31,167,158,.14); color: var(--teal-dark); }
.empty-state { padding: 3rem 1rem; text-align: center; color: var(--ink-soft); font-weight: 700; }

/* year colours */
.y1, .y3 { background: var(--jade); }
.y2, .y4 { background: var(--jade-deep); }
.y5 { background: #0A5F4C; }
.y6 { background: var(--ink); }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 2rem; } }

.panel {
  border: 2px solid var(--line); border-radius: 24px;
  background: var(--paper); padding: 1.8rem; box-shadow: var(--shadow-lg);
}
.panel-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel-dark .lede, .panel-dark p { color: rgba(255,255,255,.82); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: .7rem; padding: .45rem 0; }
.checklist li::before { content: "→"; font-weight: 900; color: var(--coral); }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: stretch; }
@media (max-width: 900px) { .price-grid { grid-template-columns: 1fr; } }
.price-card { display: flex; flex-direction: column; position: relative; }
.price-card.featured { border-color: var(--coral); box-shadow: 0 4px 0 var(--coral-dark), var(--shadow-lg); }
.price-flag {
  position: absolute; top: -14px; right: 1.2rem;
  background: var(--coral); color: #fff; font-size: .74rem; font-weight: 900;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .25rem .8rem; border-radius: 999px;
}
.price-amount { font-size: 2.6rem; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.price-amount small { font-size: .95rem; font-weight: 700; color: var(--ink-soft); letter-spacing: 0; }
.price-card .btn { margin-top: auto; justify-content: center; }
.price-card ul { list-style: none; padding: 0; margin: 1.1rem 0 1.4rem; }
.price-card li { padding: .35rem 0; font-size: .95rem; display: flex; gap: .55rem; }
.price-card li::before { content: "•"; color: var(--teal); font-weight: 900; }

/* ---------- Quotes ---------- */
.quote { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.quote blockquote { margin: 0 0 .9rem; font-size: 1.02rem; }
.quote cite { font-style: normal; font-weight: 800; font-size: .9rem; }
.quote cite span { display: block; font-weight: 600; color: var(--ink-soft); font-size: .85rem; }
.stars { color: var(--sun); letter-spacing: .1em; margin-bottom: .6rem; }

/* ---------- FAQ ---------- */
details.faq {
  background: var(--paper); border: 2px solid var(--line);
  border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-bottom: .8rem;
}
details.faq summary { font-weight: 800; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--coral-dark); }
details.faq[open] summary::after { content: "–"; }
details.faq p { margin: .8rem 0 0; color: var(--ink-soft); font-size: .97rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; border-radius: 28px; padding: 3rem 2rem; text-align: center; }
.cta-band p { color: rgba(255,255,255,.82); margin-inline: auto; }

/* ---------- Booking ---------- */
.booking-layout { display: grid; grid-template-columns: 1fr 360px; gap: 2rem; align-items: start; }
@media (max-width: 980px) { .booking-layout { grid-template-columns: 1fr; } }

.step-block { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.4rem; }
.step-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.1rem; }
.step-head .step-num { margin: 0; flex: none; }
.step-head h2 { font-size: 1.25rem; margin: 0; }
.step-head p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; }
.option {
  position: relative; border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem; cursor: pointer; background: var(--cream); display: block;
  transition: all .12s ease;
}
.option:hover { border-color: var(--ink); }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option strong { display: block; font-size: 1rem; }
.option span { display: block; font-size: .88rem; color: var(--ink-soft); margin-top: .2rem; }
.option .opt-price { display: inline-block; margin-top: .55rem; font-weight: 900; color: var(--teal-dark); }
.option:has(input:checked) { border-color: var(--coral); background: rgba(255,107,90,.08); box-shadow: 0 3px 0 var(--coral-dark); }
.option input:focus-visible + .opt-inner { outline: 3px solid var(--indigo); outline-offset: 3px; }

.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; gap: 1rem; }
.cal-head strong { font-size: 1.05rem; }
.cal-nav { display: flex; gap: .4rem; }
.cal-nav button {
  width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--line);
  background: var(--paper); font: inherit; font-weight: 900; cursor: pointer;
}
.cal-nav button:hover:not(:disabled) { border-color: var(--ink); }
.cal-nav button:disabled { opacity: .35; cursor: not-allowed; }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.cal-dow { text-align: center; font-size: .74rem; font-weight: 800; text-transform: uppercase; color: var(--ink-soft); padding-bottom: .3rem; }
.cal-day {
  aspect-ratio: 1; border: 2px solid transparent; border-radius: 10px;
  background: var(--cream); font: inherit; font-weight: 700; font-size: .95rem;
  cursor: pointer; position: relative; color: var(--ink);
}
.cal-day.blank { background: none; cursor: default; }
.cal-day:disabled { color: #BDB6AC; background: transparent; cursor: not-allowed; }
.cal-day.has-slots::after {
  content: ""; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--teal);
}
.cal-day:hover:not(:disabled) { border-color: var(--ink); }
.cal-day[aria-pressed="true"] { background: var(--ink); color: #fff; }
.cal-day[aria-pressed="true"]::after { background: var(--sun); }

.cal-legend { display: flex; gap: 1.2rem; font-size: .82rem; color: var(--ink-soft); margin-top: .9rem; flex-wrap: wrap; }
.cal-legend span { display: flex; align-items: center; gap: .4rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); display: inline-block; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .6rem; margin-top: 1.2rem; }
.slot {
  border: 2px solid var(--line); background: var(--paper); border-radius: 10px;
  padding: .6rem .3rem; font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer;
}
.slot:hover { border-color: var(--ink); }
.slot[aria-pressed="true"] { background: var(--coral); color: #fff; border-color: var(--coral-dark); box-shadow: 0 3px 0 var(--coral-dark); }
.slot-hint { margin-top: 1rem; font-size: .92rem; color: var(--ink-soft); }

.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 800; font-size: .9rem; margin-bottom: .35rem; }
.field .hint { font-weight: 600; color: var(--ink-soft); font-size: .84rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .7rem .85rem; font: inherit; font-size: .97rem;
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  background: var(--cream); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--indigo); background: var(--paper);
}
.field textarea { min-height: 110px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field .error { color: var(--coral-dark); font-size: .85rem; font-weight: 700; margin-top: .3rem; display: none; }
.field.invalid input, .field.invalid select { border-color: var(--coral-dark); }
.field.invalid .error { display: block; }

.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-size: .93rem; }
.checkbox input { width: auto; margin-top: .25rem; }

/* summary rail */
.summary {
  position: sticky; top: 90px;
  background: var(--paper); border: 2px solid var(--ink);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-lg);
}
.summary h3 { font-size: 1.1rem; }
.summary dl { margin: 0 0 1rem; }
.summary .row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.summary .row dt { color: var(--ink-soft); font-weight: 700; }
.summary .row dd { margin: 0; font-weight: 800; text-align: right; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; margin: 1rem 0; }
.summary .total strong { font-size: 1.8rem; font-weight: 900; }
.summary .btn { width: 100%; justify-content: center; }
.summary .fineprint { font-size: .82rem; color: var(--ink-soft); margin: .9rem 0 0; }
.unset { color: #B9B1A6 !important; font-weight: 700 !important; }

.confirmation {
  background: var(--paper); border: 2px solid var(--leaf); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow-lg); text-align: center;
}
.confirmation .tick {
  width: 64px; height: 64px; border-radius: 50%; background: var(--leaf); color: #fff;
  display: grid; place-items: center; font-size: 2rem; margin: 0 auto 1rem;
}
.receipt { text-align: left; background: var(--cream); border-radius: var(--radius-sm); padding: 1.2rem; margin: 1.4rem 0; }
.receipt .row { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; font-size: .95rem; }
.receipt .row span:first-child { color: var(--ink-soft); font-weight: 700; }
.receipt .row span:last-child { font-weight: 800; text-align: right; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.75); padding: 3.5rem 0 2rem; margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: .25rem 0; }
.site-footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.site-footer a:hover { color: var(--sun); }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-tag { color: rgba(255,255,255,.6); }
.footer-bottom {
  margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.15);
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .85rem;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 10px 10px;
  text-decoration: none; font-weight: 800; transition: top .15s ease;
}
.skip-link:focus { top: 0; }

/* ============================================================
   Unit pages, practice tools and the parent dashboard
   ============================================================ */

.btn-sm { padding: .45rem 1rem; font-size: .88rem; }

.backlink { font-weight: 800; text-decoration: none; font-size: .92rem; }
.unit-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.free-flag {
  background: var(--leaf); color: #fff; border-radius: 999px;
  padding: .3rem .9rem; font-size: .8rem; font-weight: 900;
}

.unit-facts { display: flex; flex-wrap: wrap; gap: 2.2rem; margin: 1.6rem 0; }
.unit-facts div { display: flex; flex-direction: column; }
.unit-facts strong { font-size: 1.4rem; font-weight: 900; line-height: 1.1; }
.unit-facts span { font-family: var(--font-mono); font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }

.focus-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.2rem; }
@media (max-width: 700px) { .focus-row { grid-template-columns: 1fr; } }
.focus { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.1rem; }
.focus h4 { margin: 0 0 .3rem; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--coral-dark); }
.focus p { margin: 0; font-size: .95rem; }

/* progress ring */
.ring-card { text-align: center; }
.ring {
  --pct: 0;
  width: 118px; height: 118px; border-radius: 50%; margin: 0 auto .9rem;
  display: grid; place-items: center;
  background: conic-gradient(var(--sun) calc(var(--pct) * 1%), var(--line) 0);
}
.ring span {
  width: 88px; height: 88px; border-radius: 50%; background: var(--paper);
  display: grid; place-items: center; font-weight: 900; font-size: 1.35rem;
}
.ring-sm { width: 46px; height: 46px; margin: 0; }
.ring-sm span { width: 34px; height: 34px; font-size: .72rem; background: var(--cream); }

/* lesson accordion */
.lesson {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius);
  margin-bottom: .8rem; overflow: hidden; box-shadow: var(--shadow);
}
.lesson.done { border-color: var(--leaf); }
.lesson summary {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem;
  cursor: pointer; list-style: none;
}
.lesson summary::-webkit-details-marker { display: none; }
.lesson-n {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--indigo); color: #fff; display: grid; place-items: center; font-weight: 900;
}
.lesson.done .lesson-n { background: var(--leaf); }
.lesson-title { flex: 1; min-width: 0; }
.lesson-title strong { display: block; }
.lesson-title span { font-size: .9rem; color: var(--ink-soft); }
.lesson-state { font-weight: 800; font-size: .85rem; color: var(--leaf); white-space: nowrap; }
.lesson summary::after { content: "+"; font-size: 1.4rem; color: var(--coral-dark); line-height: 1; }
.lesson[open] summary::after { content: "–"; }
.lesson-body { padding: 0 1.2rem 1.3rem 4.2rem; }
@media (max-width: 560px) { .lesson-body { padding-left: 1.2rem; } }
.lesson-body h4 { font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .5rem; }
.step-list { list-style: none; margin: 0 0 1.1rem; padding: 0; counter-reset: step; }
.step {
  display: grid; grid-template-columns: 92px 1fr; gap: .8rem; align-items: start;
  padding: .55rem 0; border-bottom: 1px dashed var(--line); font-size: .96rem;
}
.step:last-child { border-bottom: 0; }
.step-tag {
  display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  font-size: .74rem; font-weight: 900; border-radius: 6px; padding: .25rem .5rem;
  white-space: nowrap;
}
.step-watch .step-tag { background: rgba(76,76,224,.12); color: var(--indigo); }
.step-say   .step-tag { background: rgba(31,167,158,.14); color: var(--teal-dark); }
.step-play  .step-tag { background: rgba(255,193,69,.28); color: #8A6100; }
.step-do    .step-tag { background: rgba(139,79,216,.13); color: var(--plum); }
.step-check .step-tag { background: rgba(63,163,77,.15); color: var(--leaf); }
@media (max-width: 520px) {
  .step { grid-template-columns: 1fr; gap: .3rem; }
  .step-tag { justify-self: start; }
}
.pill { font-size: .78rem; font-weight: 800; background: rgba(31,167,158,.14); color: var(--teal-dark); border-radius: 6px; padding: .22rem .55rem; }

/* practice tools */
.tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
@media (max-width: 860px) { .tools { grid-template-columns: 1fr; } }
.tool { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.tool-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.tool-head h3 { margin: 0; font-size: 1.1rem; }
.tool-head p { margin: 0; font-size: .86rem; color: var(--ink-soft); }
.tool-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }

.speak {
  border: 2px solid var(--line); background: var(--cream); border-radius: 8px;
  width: 32px; height: 32px; font-size: .95rem; cursor: pointer; flex: none; line-height: 1;
}
.speak:hover { border-color: var(--teal); background: rgba(31,167,158,.12); }
.speak.lg { width: 44px; height: 44px; font-size: 1.2rem; }

/* vocabulary */
.vocab { list-style: none; padding: 0; margin: 0; max-height: 420px; overflow-y: auto; }
.vocab-row {
  display: grid; grid-template-columns: 32px 1fr 1fr; gap: .8rem; align-items: center;
  padding: .45rem 0; border-bottom: 1px dashed var(--line);
}
.vocab-row .es { font-weight: 800; }
.vocab-row .en { color: var(--ink-soft); font-size: .95rem; }

/* flashcards */
#flashcard {
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--cream);
  min-height: 190px; display: grid; place-items: center; cursor: pointer; text-align: center;
  padding: 1.4rem; box-shadow: 0 4px 0 var(--ink);
}
#flashcard:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.card-side { font-size: .74rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.card-word { font-size: clamp(1.4rem, 4vw, 2rem); font-weight: 900; margin: .5rem 0; }
.card-hint { font-size: .82rem; color: var(--ink-soft); display: block; margin-top: .6rem; }
.card-nav { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: 1rem; }
.card-nav strong { font-weight: 800; font-size: .9rem; color: var(--ink-soft); }

/* match game */
.match-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
@media (max-width: 480px) { .match-board { grid-template-columns: repeat(2, 1fr); } }
.tile {
  border: 2px solid var(--line); background: var(--cream); border-radius: 10px;
  padding: .8rem .5rem; font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
  min-height: 62px; transition: all .12s ease;
}
.tile.es { font-weight: 900; background: rgba(255,193,69,.18); }
.tile:hover { border-color: var(--ink); }
.tile.picked { border-color: var(--indigo); background: rgba(76,76,224,.12); }
.tile.wrong { border-color: var(--coral-dark); background: rgba(255,107,90,.18); }
.tile.gone { opacity: .25; pointer-events: none; border-style: dashed; }
.match-status { margin-top: .9rem; font-weight: 800; font-size: .92rem; }

/* quiz */
.quiz-head { display: flex; align-items: center; gap: .9rem; font-size: .84rem; font-weight: 800; color: var(--ink-soft); margin-bottom: .9rem; }
.quiz-bar { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.quiz-bar i { display: block; height: 100%; background: var(--sun); transition: width .3s ease; }
.quiz-prompt { font-size: 1.05rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.quiz-options { display: grid; gap: .55rem; }
.quiz-opt {
  border: 2px solid var(--line); background: var(--cream); border-radius: 10px;
  padding: .7rem 1rem; font: inherit; font-weight: 700; text-align: left; cursor: pointer;
}
.quiz-opt:hover { border-color: var(--ink); }
.quiz-opt.right { background: rgba(63,163,77,.18); border-color: var(--leaf); }
.quiz-opt.wrong { background: rgba(255,107,90,.18); border-color: var(--coral-dark); }
#quiz.locked .quiz-opt { cursor: default; }
.quiz-result { text-align: center; }
.quiz-score { font-size: 3rem; font-weight: 900; color: var(--teal-dark); line-height: 1; margin-bottom: .5rem; }
.quiz-best { font-size: .88rem; color: var(--ink-soft); }
.quiz-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }

/* fridge card */
.fridge {
  border: 3px dashed var(--ink); border-radius: var(--radius); background: var(--paper);
  padding: 1.4rem; max-width: 420px;
}
.fridge h4 { margin: 0 0 .2rem; font-size: 1.15rem; }
.fridge-sub { font-size: .82rem; color: var(--ink-soft); margin-bottom: .8rem; }
.fridge ol { margin: 0; padding-left: 1.2rem; }
.fridge li { padding: .2rem 0; }
.fridge-foot { font-size: .78rem; color: var(--ink-soft); margin: .9rem 0 0; }

/* unit pager */
.unit-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; }
@media (max-width: 600px) { .unit-pager { grid-template-columns: 1fr; } }
.pager {
  display: block; padding: 1rem 1.2rem; border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--paper); text-decoration: none; color: var(--ink);
}
.pager:hover { border-color: var(--ink); }
.pager span { display: block; font-size: .8rem; font-weight: 800; color: var(--ink-soft); }
.pager.next { text-align: right; }

/* unit cards on the lessons page */
.unit { text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
a.unit:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.unit-progress { display: flex; align-items: center; gap: .6rem; margin-top: .9rem; }
.unit-progress small { font-size: .8rem; font-weight: 800; color: var(--ink-soft); }
.year-head { display: flex; align-items: baseline; gap: 1rem; margin: 2.5rem 0 1rem; flex-wrap: wrap; }
.year-head h3 { margin: 0; font-size: 1.35rem; }
.year-head span { font-size: .88rem; color: var(--ink-soft); font-weight: 700; }

/* parent dashboard */
.dash { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 860px) { .dash { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 2.2rem; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.stat span { font-size: .84rem; font-weight: 700; color: var(--ink-soft); }
.offer { display: flex; gap: 1rem; align-items: flex-start; }
.offer-icon { font-size: 1.6rem; flex: none; }
.offer h3 { font-size: 1.05rem; margin-bottom: .25rem; }
.offer p { font-size: .94rem; margin: 0; color: var(--ink-soft); }

@media print {
  body * { visibility: hidden; }
  .fridge, .fridge * { visibility: visible; }
  .fridge { position: absolute; inset: 0 auto auto 0; border-color: #000; box-shadow: none; }
}

/* ---------- listen and choose ---------- */
.listen-play {
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  width: 100%; padding: 1.4rem; margin-bottom: .9rem;
  border: 2px solid var(--ink); border-radius: var(--radius-sm);
  background: var(--sun); font: inherit; font-weight: 900; font-size: 1.05rem;
  cursor: pointer; box-shadow: 0 4px 0 var(--ink);
}
.listen-play:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.listen-play span:first-child { font-size: 1.6rem; }
#listen-game.locked .quiz-opt { cursor: default; }

/* ---------- beat the clock ---------- */
.clock-hud {
  display: flex; gap: 1.2rem; align-items: baseline; flex-wrap: wrap;
  padding: .6rem .9rem; margin-bottom: .9rem;
  background: var(--cream); border-radius: var(--radius-sm); font-size: .9rem; font-weight: 700;
}
.clock-hud strong { font-size: 1.3rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.clock-hud span:last-child { margin-left: auto; color: var(--ink-soft); }
.clock-idle { font-size: .95rem; color: var(--ink-soft); margin: 0; }
.clock-prompt {
  font-size: 1.6rem; font-weight: 900; text-align: center; margin: .4rem 0 1rem;
}
.clock-options { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
@media (max-width: 480px) { .clock-options { grid-template-columns: 1fr; } }
.clock-opt {
  border: 2px solid var(--line); background: var(--cream); border-radius: 10px;
  padding: .8rem .6rem; font: inherit; font-weight: 800; cursor: pointer;
}
.clock-opt:hover { border-color: var(--ink); }
.clock-opt.wrong { background: rgba(255,107,90,.2); border-color: var(--coral-dark); }

/* ============================================================
   Module review arcade
   ============================================================ */

.game-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 1.5rem; }
@media (max-width: 900px) { .game-picker { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .game-picker { grid-template-columns: 1fr; } }
.game-card {
  display: flex; flex-direction: column; gap: .3rem; text-align: left;
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; font: inherit; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.game-card:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: var(--shadow-lg); }
.game-icon { font-size: 2.2rem; line-height: 1; margin-bottom: .3rem; }
.game-card strong { font-size: 1.05rem; }
.game-blurb { font-size: .9rem; color: var(--ink-soft); }
.game-best {
  margin-top: .7rem; font-size: .78rem; font-weight: 900; text-transform: uppercase;
  letter-spacing: .07em; color: var(--teal-dark);
}

.game-stage {
  margin-top: 1.6rem; background: var(--paper); border: 2px solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.game-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.4rem; background: var(--ink); color: #fff;
}
.game-head h2 { margin: 0; font-size: 1.15rem; color: #fff; }
.game-head .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.game-head .btn-ghost:hover { border-color: #fff; }
.game-body { padding: 1.6rem; }
.game-note { font-size: .95rem; color: var(--ink-soft); text-align: center; margin-bottom: 1.2rem; }
.spacer { margin-left: auto; }

/* --- spin the wheel --- */
.wheel-wrap { position: relative; width: min(100%, 340px); aspect-ratio: 1; margin: 0 auto 1.2rem; }
.wheel {
  width: 100%; height: 100%; border-radius: 50%; position: relative; overflow: hidden;
  border: 6px solid var(--ink); background: var(--cream);
  transition: transform 3s cubic-bezier(.17,.67,.21,1);
}
.wheel-seg {
  position: absolute; inset: 0;
  clip-path: polygon(50% 50%, 50% 0, 93% 13%);
  transform: rotate(calc(var(--i) * (360deg / var(--n))));
  display: grid; justify-items: center;
  background: rgba(31,167,158,.16);
}
.wheel-seg:nth-child(even) { background: rgba(255,193,69,.3); }
.wheel-seg span {
  margin-top: 12%; font-size: .72rem; font-weight: 900; max-width: 5.5em;
  text-align: center; transform: rotate(22deg); line-height: 1.1;
}
.wheel-pointer {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  font-size: 1.8rem; color: var(--coral-dark); z-index: 2;
}
.wheel-actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.wheel-result { text-align: center; margin-top: 1.1rem; font-size: 1.05rem; font-weight: 700; }

/* --- balloon pop --- */
.pop-hud, .ana-hud, .show-hud {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .7rem 1rem; margin-bottom: 1rem;
  background: var(--cream); border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem;
}
.pop-hud strong, .ana-hud strong, .show-hud strong { font-weight: 900; }
.pop-field { position: relative; height: 340px; overflow: hidden; border-radius: var(--radius-sm); background: linear-gradient(#EAF6FF, #FFF8F0); }
.balloon {
  position: absolute; bottom: -90px; width: 84px; height: 100px;
  border: 0; border-radius: 50% 50% 46% 46%; color: #fff; cursor: pointer;
  font: inherit; font-weight: 900; font-size: .78rem; padding: .3rem;
  animation: float-up linear forwards;
  box-shadow: inset -8px -8px 0 rgba(0,0,0,.08);
}
.balloon::after {
  content: ""; position: absolute; bottom: -14px; left: 50%;
  width: 2px; height: 14px; background: rgba(31,36,48,.3); transform: translateX(-50%);
}
@keyframes float-up { from { bottom: -120px; } to { bottom: 380px; } }
.balloon.popped { animation: none; transform: scale(1.5); opacity: 0; transition: all .3s ease; }
.balloon.dud { animation-play-state: paused; filter: grayscale(.7); }

/* --- anagram --- */
.ana-clue { text-align: center; font-size: 1.5rem; font-weight: 900; margin-bottom: 1.2rem; }
.ana-slots { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.4rem; }
.ana-slot {
  width: 44px; height: 52px; border-bottom: 4px solid var(--line); display: grid; place-items: center;
  font-size: 1.5rem; font-weight: 900;
}
.ana-slot.filled { border-color: var(--ink); }
.ana-slot.right { border-color: var(--leaf); color: var(--leaf); }
.ana-slot.wrong { border-color: var(--coral-dark); color: var(--coral-dark); }
.ana-tiles { display: flex; gap: .45rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.2rem; }
.ana-tile {
  width: 48px; height: 52px; border: 2px solid var(--ink); border-radius: 10px;
  background: var(--sun); font: inherit; font-size: 1.4rem; font-weight: 900; cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
}
.ana-tile:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.ana-tile.used { opacity: .25; pointer-events: none; }
.ana-actions { display: flex; gap: .6rem; justify-content: center; }

/* --- gameshow --- */
.show-timer { flex: 1; min-width: 90px; height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.show-timer i { display: block; height: 100%; width: 100%; background: var(--poncho); transition: width .1s linear; }
.show-prompt { text-align: center; font-size: 1.7rem; font-weight: 900; margin: .4rem 0 1.2rem; }
#show-body.locked .quiz-opt { cursor: default; }

/* module link on the lessons page */
.module-cta {
  display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: 1.1rem 1.4rem; margin: 1.2rem 0 .5rem;
}
.module-cta h4 { margin: 0; color: #fff; font-size: 1.05rem; }
.module-cta p { margin: 0; font-size: .9rem; color: rgba(255,255,255,.75); }
.module-cta .btn { margin-left: auto; }
@media (max-width: 620px) { .module-cta .btn { margin-left: 0; width: 100%; justify-content: center; } }

/* ---------- billing toggle ---------- */
.billing-toggle { display: flex; gap: .5rem; margin: 1.2rem 0 2rem; flex-wrap: wrap; }
.billing-toggle .save {
  display: inline-block; margin-left: .4rem; padding: .1rem .45rem; border-radius: 5px;
  background: var(--leaf); color: #fff; font-size: .72rem; font-weight: 900;
}
.billing-toggle .chip[aria-pressed="true"] .save { background: var(--sun); color: var(--ink); }
.price-alt { font-size: .88rem; color: var(--ink-soft); margin: .4rem 0 0; font-weight: 700; }

/* ---------- paywall ---------- */
.lock-panel {
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 2.5rem 2rem; text-align: center; box-shadow: var(--shadow-lg);
}
.lock-icon { font-size: 2.6rem; display: block; margin-bottom: .6rem; }
.lock-panel .lede { margin-inline: auto; }
.lock-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.4rem; }
.lock-signin { margin: 1.4rem 0 0; font-size: .92rem; color: var(--ink-soft); }
.linkish {
  background: none; border: 0; padding: 0; font: inherit; font-weight: 800;
  color: var(--teal-dark); text-decoration: underline; cursor: pointer;
}
a.unit.locked { opacity: .82; }
a.unit.locked:hover { opacity: 1; }

/* Lalo — he stands beside the mark, never inside it */
.lock-panel .lalo { display: block; margin: 0 auto .8rem; transform: scaleX(-1); }

/* ---------- review form ---------- */
.review-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: 2rem; margin-top: 2rem; align-items: start; }
@media (max-width: 820px) { .review-layout { grid-template-columns: 1fr; } }

.review-form {
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow);
}
.review-form .field { margin-bottom: 1rem; }
.review-form textarea { min-height: 130px; }

.rating { border: 0; padding: 0; margin: 0 0 1.2rem; }
.rating legend { font-weight: 800; font-size: .9rem; margin-bottom: .4rem; padding: 0; }
/* Stars run 5→1 in the DOM and are reversed visually, so a checked star
   also lights the ones below it via the sibling selector. */
.stars-input { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-input label {
  font-size: 2rem; line-height: 1; cursor: pointer; color: var(--line);
  transition: color .1s ease;
}
.stars-input label:hover,
.stars-input label:hover ~ label,
.stars-input input:checked ~ label { color: var(--sun); }
.stars-input input:focus-visible + label { outline: 3px solid var(--jade); outline-offset: 2px; }

.review-aside {
  background: var(--fleece); border-radius: var(--radius); padding: 1.4rem;
  border: 2px solid var(--line);
}
.review-aside h3 { font-size: 1.05rem; }
.review-aside p { font-size: .93rem; margin-bottom: .8rem; }
.review-aside p:last-child { margin-bottom: 0; }

.review-thanks {
  background: var(--paper); border: 2px solid var(--jade); border-radius: var(--radius);
  padding: 2rem; text-align: center; box-shadow: var(--shadow-lg);
}
.review-thanks .tick {
  width: 56px; height: 56px; border-radius: 50%; background: var(--jade); color: #fff;
  display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 1rem;
}

/* ---------- legal pages ---------- */
.legal-meta {
  font-size: .88rem; color: var(--ink-soft); background: var(--fleece);
  border-radius: var(--radius-sm); padding: .9rem 1.1rem; line-height: 1.9;
}
.legal h2 { margin-top: 2.4rem; font-size: 1.5rem; }
.legal h3 { margin-top: 1.8rem; font-size: 1.1rem; color: var(--jade-deep); }
.legal p, .legal li { font-size: .98rem; }
.legal code {
  background: var(--fleece); padding: .1rem .35rem; border-radius: 4px;
  font-family: var(--font-mono); font-size: .85em;
}
.legal-note {
  border-left: 4px solid var(--sun); padding-left: 1rem;
  color: var(--ink-soft); font-size: .93rem !important;
}
.legal-table {
  width: 100%; border-collapse: collapse; margin: 1rem 0 1.4rem; font-size: .93rem;
}
.legal-table th {
  text-align: left; font-family: var(--font-mono); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft);
  font-weight: 500; padding: .4rem .8rem .4rem 0; border-bottom: 2px solid var(--line);
}
.legal-table td {
  padding: .6rem .8rem .6rem 0; border-bottom: 1px dashed var(--line);
  vertical-align: top;
}
.legal-table tr td:first-child { width: 42%; }
@media (max-width: 560px) {
  .legal-table, .legal-table tbody, .legal-table tr, .legal-table td, .legal-table th { display: block; }
  .legal-table th { border: 0; }
  .legal-table tr { border-bottom: 1px dashed var(--line); padding: .5rem 0; }
  .legal-table td { border: 0; padding: .1rem 0; }
  .legal-table tr td:first-child { width: auto; font-weight: 800; }
}

/* Unfilled legal placeholder — deliberately loud, so it can't ship unnoticed */
.todo {
  background: var(--poncho); color: #fff; font-weight: 800;
  padding: .1rem .45rem; border-radius: 5px; font-size: .85em;
}

/* ---------- magic-link sign in ---------- */
.signin { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px dashed var(--line); }
.signin-form { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-top: .6rem; }
.signin-form input {
  flex: 1 1 260px; max-width: 320px; padding: .7rem .9rem; font: inherit;
  border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--cream);
}
.signin-form input:focus { outline: none; border-color: var(--jade); background: var(--paper); }
.signin-msg {
  margin: .9rem auto 0; max-width: 44ch; font-size: .93rem;
  background: rgba(14,158,122,.1); border-radius: var(--radius-sm); padding: .8rem 1rem;
}
.signin-msg.bad { background: rgba(214,72,63,.1); color: var(--poncho-deep); font-weight: 700; }

/* ---------- the team ---------- */
.teacher-card { text-align: center; }
.teacher-face {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  margin: 0 auto .8rem; color: #fff; font-weight: 900; font-size: 1.3rem;
}
.teacher-role {
  font-family: var(--font-mono); font-size: .72rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft);
  margin-bottom: .7rem;
}

/* ---------- "stuck on this bit?" ---------- */
details.help { margin-top: .4rem; }
details.help summary {
  display: inline-block; cursor: pointer; list-style: none;
  font-size: .82rem; font-weight: 800; color: var(--jade-deep);
  border-bottom: 1px dashed var(--jade-deep);
}
details.help summary::-webkit-details-marker { display: none; }
details.help summary:hover { color: var(--ink); border-color: var(--ink); }
details.help ul {
  margin: .6rem 0 .2rem; padding-left: 1.1rem;
  background: var(--fleece); border-radius: var(--radius-sm); padding: .7rem 1rem .7rem 2rem;
}
details.help li { font-size: .9rem; padding: .18rem 0; }
.worksheet-row { margin: .2rem 0 1rem; }

/* ============================================================
   Lesson slides on the page — the same deck, as real text
   ============================================================ */
.slides { margin-bottom: 1.2rem; }

.sl-stage {
  position: relative; aspect-ratio: 16 / 9;
  background: var(--cream); border: 2px solid var(--line); border-radius: var(--radius);
  display: grid; place-items: center; overflow: hidden;
  container-type: inline-size;
}
.sl-stage:focus-visible { outline: 3px solid var(--jade); outline-offset: 2px; }

.sl-face { text-align: center; padding: 4% 42% 4% 6%; width: 100%; }
.sl-kicker {
  display: block; font-family: var(--font-mono); font-size: 3cqw; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--jade-deep); margin-bottom: 2cqw;
}
.sl-title { font-size: 7cqw; line-height: 1.08; margin: 0; }
.sl-title.sl-smaller { font-size: 5.4cqw; }
.sl-sub { font-size: 3.4cqw; color: var(--ink-soft); margin: 2cqw 0 0; }
.sl-word { font-size: 12cqw; font-weight: 800; line-height: 1; margin: 0; font-family: var(--font-display); }
.sl-word.sl-mid { font-size: 9cqw; }
.sl-mean { font-size: 5cqw; font-weight: 800; color: var(--jade-deep); margin: 2.5cqw 0 0; }
.sl-turn {
  display: inline-block; background: var(--sun); color: var(--ink);
  font-weight: 900; font-size: 3.2cqw; padding: 1cqw 3cqw; border-radius: 999px; margin: 2.5cqw 0 0;
}
.sl-wait { font-size: 2.8cqw; color: var(--ink-soft); margin: 2cqw auto 0; max-width: 30ch; }
.sl-say {
  margin-top: 3cqw; border: 2px solid var(--ink); background: var(--paper);
  border-radius: 999px; padding: 1cqw 3cqw; font: inherit; font-size: 2.8cqw;
  font-weight: 800; cursor: pointer;
}
.sl-say:hover { background: var(--sun); }
.sl-recap-head {
  display: flex; align-items: center; justify-content: center; gap: 3cqw;
  margin-bottom: 1.6cqw; flex: none;
}
.sl-recap-head .sl-kicker { margin: 0; }
.sl-playall {
  border: .25cqw solid var(--ink); background: var(--paper); border-radius: 999px;
  padding: .8cqw 2.4cqw; font: inherit; font-size: 2.5cqw; font-weight: 800; cursor: pointer;
}
.sl-playall:hover:not(:disabled) { background: var(--sun); }
.sl-playall:disabled { opacity: .55; cursor: default; }

/* The recap fills the slide and scrolls inside it, so a twelve-word
   revision list is never clipped.

   `height: 100%` will not do here: the stage centres its items, so a
   percentage height resolves against the item's own content and the
   face simply grows. It has to stretch into the grid area instead. */
.sl-face.sl-recap {
  display: flex; flex-direction: column;
  align-self: stretch; justify-self: stretch;
  min-height: 0; max-height: 100%;
  /* Lucas gets less room here than on a word slide — the list needs the
     width, or the type (sized against the whole stage) wraps inside a
     narrow column and rows balloon. */
  padding: 3.5% 20% 3.5% 5%;
}
.sl-stage:has(.sl-face.sl-recap) .sl-lucas { width: 18%; }
.sl-words {
  list-style: none; margin: 0; padding: 0 1cqw 0 0; text-align: left;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(30cqw, 1fr));
  gap: .3cqw 2.5cqw;
  align-content: start; overflow-y: auto; flex: 1; min-height: 0;
  scrollbar-width: thin;
}
.sl-words li { min-width: 0; }
.sl-row {
  width: 100%; display: grid; grid-template-columns: 2.8cqw 1fr auto;
  align-items: baseline; gap: 1cqw; text-align: left;
  background: none; border: 0; border-bottom: .18cqw dashed var(--line);
  padding: .45cqw .3cqw; font: inherit; cursor: pointer; border-radius: .6cqw;
}
.sl-row:hover { background: var(--fleece); }
.sl-row.playing { background: rgba(239,168,28,.28); }
.sl-row-icon { font-size: 1.8cqw; line-height: 1; }
.sl-row b { font-size: 2.1cqw; font-weight: 800; overflow-wrap: break-word; }
.sl-row-en { font-size: 1.8cqw; color: var(--ink-soft); text-align: right; overflow-wrap: break-word; }

@media (max-width: 560px) {
  .sl-words { grid-template-columns: 1fr; }
  .sl-face.sl-recap { padding: 3.5% 5%; }
}

.sl-lucas {
  position: absolute; right: 2%; bottom: 0; width: 34%; height: auto;
  transform: scaleX(-1); pointer-events: none;
}
.sl-brand {
  position: absolute; left: 3%; bottom: 3%; font-family: var(--font-mono);
  font-size: 2.4cqw; color: var(--ink-soft);
}

.sl-bar { display: flex; align-items: center; gap: .7rem; margin-top: .7rem; flex-wrap: wrap; }
.sl-dots { display: flex; gap: 3px; flex: 1; min-width: 80px; }
.sl-dots i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.sl-dots i.done { background: var(--jade); }
.sl-dots i.now { background: var(--sun); }
.sl-count { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-soft); white-space: nowrap; }

/* the mascot would crowd a narrow phone */
@media (max-width: 560px) {
  .sl-face { padding: 4% 6%; }
  .sl-lucas { width: 24%; opacity: .35; }
}

/* The honeypot on the booking form. Off-screen rather than
   display:none — some bots skip anything explicitly hidden. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* When the booking email could not be sent, this has to be impossible
   to skim past. */
.send-failed {
  margin: 1.2rem auto; max-width: 34rem; padding: .9rem 1.1rem;
  border: 2px solid var(--poncho); border-radius: var(--radius);
  background: #fdecea; color: var(--ink); text-align: left;
}


/* ============================================================
   Children in the house — the switcher in the header and the
   cards on the parents page.
   ============================================================ */

.who { display: flex; align-items: center; gap: .45rem; margin-left: auto; }
.who-dot { width: .85rem; height: .85rem; border-radius: 50%; flex: none; }
.who-pick {
  font: inherit; font-size: .88rem; font-weight: 700; color: var(--ink);
  padding: .35rem 1.6rem .35rem .6rem; border: 2px solid var(--line);
  border-radius: 999px; background: var(--paper); cursor: pointer;
  max-width: 9rem; text-overflow: ellipsis;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23516468' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .55rem center;
  background-size: .6rem;
}
.who-pick:hover { border-color: var(--jade); }

@media (max-width: 900px) {
  /* the burger already sits at the right on small screens */
  .who { margin-left: 0; order: 3; }
}

.kid-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.kid {
  border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--paper); padding: 1.1rem 1.2rem;
}
.kid.on { border-color: var(--kid, var(--jade)); }

.kid-head { display: flex; align-items: center; gap: .7rem; margin-bottom: .9rem; }
.kid-dot {
  width: 2.4rem; height: 2.4rem; border-radius: 50%; flex: none;
  background: var(--kid, var(--jade)); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
}
.kid-id { min-width: 0; }
.kid-id strong { display: block; font-size: 1.05rem; overflow-wrap: anywhere; }
.kid-id span { font-size: .82rem; color: var(--ink-soft); }
.kid-badge {
  margin-left: auto; font-size: .68rem; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--kid, var(--jade));
  border: 1.5px solid currentColor; border-radius: 999px; padding: .15rem .5rem;
  white-space: nowrap;
}

.kid-bar {
  height: .55rem; border-radius: 999px; background: var(--cream);
  overflow: hidden; margin-bottom: .55rem;
}
.kid-bar i { display: block; height: 100%; background: var(--kid, var(--jade)); }
.kid-figures { font-size: .85rem; color: var(--ink-soft); margin: 0 0 .9rem; }

.kid-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }
.kid-current { font-size: .82rem; font-weight: 700; color: var(--ink-soft); }
.linkish.danger { color: var(--poncho); }
.kid-full { margin: .8rem 0 0; font-size: .9rem; color: var(--ink-soft); }

.kid-form {
  margin-top: 1rem; padding: 1.1rem 1.2rem; max-width: 30rem;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--fleece);
}
.kid-form-actions { display: flex; gap: .6rem; margin-top: .4rem; }
#kid-add-wrap { margin-top: 1.2rem; }

.welcome-banner {
  margin: 0 0 1.6rem; padding: 1rem 1.2rem;
  border: 2px solid var(--jade); border-left-width: 6px;
  border-radius: var(--radius); background: var(--paper);
}
.welcome-banner strong { display: block; margin-bottom: .2rem; }
.lock-foot { margin: 1.2rem 0 0; font-size: .92rem; color: var(--ink-soft); }

/* ---------- bookings on the parent dashboard ---------- */
.bk-head { margin: 1.4rem 0 .6rem; font-size: 1.05rem; }
.bk-head span { color: var(--ink-soft); font-weight: 600; }

.bk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.bk {
  display: grid; gap: .3rem 1rem; align-items: baseline;
  grid-template-columns: minmax(9rem, 13rem) 1fr auto;
  border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--paper); padding: .85rem 1rem;
}
.bk-past { opacity: .72; }
.bk-when strong, .bk-what strong { display: block; }
.bk-when span, .bk-what span { display: block; font-size: .85rem; color: var(--ink-soft); }
.bk-unit { font-style: italic; }
.bk-side { text-align: right; white-space: nowrap; }
.bk-fee { display: block; font-weight: 800; }
.bk-ref { display: block; font-family: var(--font-mono); font-size: .72rem; color: var(--ink-soft); }
.bk-note { font-size: .88rem; color: var(--ink-soft); margin: .7rem 0 0; }

.bk-empty {
  border: 2px dashed var(--line); border-radius: var(--radius);
  background: var(--fleece); padding: 1.6rem 1.4rem; text-align: center;
}
.bk-empty .lalo { display: block; margin: 0 auto .6rem; }
.bk-empty h3 { margin: 0 0 .4rem; font-size: 1.3rem; }
.bk-empty .lede { margin: 0 auto .9rem; max-width: 34rem; }
.bk-empty p { max-width: 34rem; margin-inline: auto; }
.bk-empty-facts {
  font-size: .88rem; color: var(--ink-soft);
  margin: 1rem auto 1.2rem; max-width: 36rem;
}

@media (max-width: 620px) {
  .bk { grid-template-columns: 1fr; }
  .bk-side { text-align: left; }
  .bk-fee { display: inline; margin-right: .6rem; }
  .bk-ref { display: inline; }
}
