/* public.css - the pages anyone sees before signing in: the landing page (land-), sign-in (si-), privacy and
   terms (legal-), the product previews drawn in HTML (pv-) and what they share (pub-: Lola's stage, the
   footer). Colors only through the tokens in app.css, so light and dark both follow; every column can
   shrink to a 320 px phone, every control there is at least 44 px tall with 8 px between neighbours, text
   people read is 14 px or more, and nothing sits in a phone's notch band when it lies on its side. */

/* Frames: the landing page runs edge to edge; sign-in and the legal pages keep the page width and end in
   the footer instead of the room the tutor needs when signed in. A page shorter than the window puts its
   footer on the window's foot (no band of bare background under it); a longer one ends 64 px after it. */
.page.public.land-page { max-width: none; padding: 0; }
.page.public.pub-page { padding-bottom: 0; display: flex; flex-direction: column; min-height: calc(100dvh - var(--bar-h) - env(safe-area-inset-top, 0px)); }
.pub-page > :first-child { width: 100%; margin-bottom: 64px; }
/* full-width bands keep their backgrounds edge to edge; only what is in them keeps clear of the notch */
.pub-wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gut-r) 0 var(--gut-l); }
.pub-page .pub-wrap { padding: 0; }
/* On the sign-in page the bar's own Sign in button would only point back at itself. */
body.signed-out:has(#main .si) #pubnav .primary { display: none; }

/* Lola's stage: a speech bubble beside her head, its sharp corner toward her beak. */
.pub-stage { position: relative; display: flex; align-items: flex-start; justify-content: flex-end; min-width: 0; }
.pub-lola { position: relative; z-index: 1; display: block; flex: none; width: 250px; height: 312px; padding: 0; border: 0; background: none; min-height: 0; border-radius: 48px; }
button.pub-lola { cursor: pointer; }
button.pub-lola:hover { border: 0; }
.pub-lola svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 10px 14px color-mix(in srgb, var(--fg) 16%, transparent)); }
.pub-lola .bob { animation: pub-bob 3.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes pub-bob { 50% { transform: translateY(-4px) rotate(-1.5deg); } }
/* her art leaves the left third of its box empty above the perch, so the bubble may sit over it */
.pub-bubble { position: relative; z-index: 2; flex: 0 1 250px; min-width: 0; margin: 22px -22px 0 0; padding: 14px 16px; border-radius: 18px 18px 4px 18px; background: var(--panel);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); transition: opacity .17s, transform .17s; }
.pub-bubble.swap { opacity: 0; transform: translateY(4px); }
.pub-stage.no-art .pub-bubble { margin: 0; border-radius: 18px; }
.pub-es { display: block; font: 500 18px/1.35 var(--serif); color: var(--fg); overflow-wrap: anywhere; }
.pub-en { display: block; margin-top: 6px; font-size: 14.5px; line-height: 1.4; color: var(--mute); }

/* Hero */
.land-hero { overflow: hidden; padding: clamp(40px, 7vw, 92px) 0 clamp(40px, 6vw, 76px); border-bottom: 1px solid var(--line);
  background: radial-gradient(60% 80% at 88% 18%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 70%),
    radial-gradient(55% 70% at 4% 100%, color-mix(in srgb, var(--accent-2) 7%, transparent), transparent 70%), var(--bg); }
.land-hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 36px 40px; align-items: center; }
.land-stage .pub-lola { width: 320px; height: 400px; }
.land-stage .pub-bubble { flex-basis: 240px; margin: 40px -76px 0 0; }
.land-eyebrow { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 650; }
.land-copy h1 { font: 600 clamp(38px, 5.2vw, 64px)/1.04 var(--serif); letter-spacing: -.025em; margin: 18px 0; text-wrap: balance; }
.land-lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--mute); max-width: 32em; margin: 0 0 28px; }
.land-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.land-fine { margin: 16px 0 0; color: var(--mute); font-size: 14.5px; }
.land-stage::before { content: ''; position: absolute; right: -30px; bottom: -20px; width: 400px; height: 400px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 17%, transparent), transparent 68%); }

/* Bands */
.land-band { padding: clamp(52px, 7vw, 92px) 0; }
.land-band.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.land-head { max-width: 680px; margin-bottom: 34px; }
.land-head .kicker { display: block; font-size: 14px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.land-head h2 { font: 600 clamp(28px, 3.4vw, 40px)/1.12 var(--serif); letter-spacing: -.02em; margin: 10px 0 12px; text-wrap: balance; }
.land-head p { font-size: 17.5px; color: var(--mute); margin: 0; }
.land-two { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px 64px; align-items: start; }
.land-ic { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); flex: none; }
.land-ic svg { width: 23px; height: 23px; }

/* How it works */
.land-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.land-steps li { padding: 24px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.land-step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.land-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 750; }
.land-steps h3, .land-features h3 { font-size: 18px; margin: 0 0 6px; }
.land-steps p, .land-features p { margin: 0; color: var(--mute); }

/* What you get */
.land-features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px 30px; }
.land-features li { min-width: 0; }
.land-features .land-ic { margin-bottom: 14px; background: var(--accent-2-soft); color: var(--accent-2); }

/* The previews: the product drawn in HTML, each on a tray with a caption under it. */
.pv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 22px; }
.pv { margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pv-frame { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 28px; border-radius: 24px; min-width: 0;
  background: linear-gradient(160deg, var(--sunk), color-mix(in srgb, var(--sunk) 55%, var(--bg))); border: 1px solid var(--line); }
.pv figcaption { color: var(--mute); font-size: 15px; padding: 0 4px; }
.pv figcaption b { color: var(--fg); }
.pv-flash, .pv-chat, .pv-plan, .pv-say { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); min-width: 0; }
.pv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pv-icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--sunk); color: var(--mute); flex: none; }
.pv-icon svg { width: 18px; height: 18px; }
.pv-flash { padding: 16px 18px 22px; text-align: center; }
.pv-es { font: 500 clamp(28px, 3.2vw, 38px)/1.2 var(--serif); margin: 12px 0 14px; overflow-wrap: anywhere; }
.pv-ans { padding-top: 14px; border-top: 1px dashed var(--line2); font-weight: 600; font-size: 17px; }
.pv-ex { margin-top: 6px; color: var(--mute); font: italic 15.5px/1.4 var(--serif); }
.pv-grades { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pv-grades span { display: grid; place-items: center; min-height: 46px; border-radius: 14px; font-weight: 650; }
.pv-again { background: var(--bad-soft); color: var(--bad); }
.pv-got { background: var(--good-soft); color: var(--good); }
.pv-chat { display: flex; flex-direction: column; gap: 10px; padding-bottom: 16px; overflow: hidden; }
.pv-chathead { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.pv-mini { width: 28px; height: 35px; flex: none; }
.pv-mini svg { width: 100%; height: 100%; }
.pv-msg { max-width: 86%; margin: 0 14px; padding: 9px 13px; border-radius: 16px; font-size: 15px; overflow-wrap: anywhere; }
.pv-msg.bot { align-self: flex-start; background: var(--sunk); border-bottom-left-radius: 4px; }
.pv-msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.pv-fix { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line2); color: var(--accent-2); font-weight: 600; }
.pv-plan { padding: 18px 20px; display: grid; gap: 10px; justify-items: start; }
.pv-title { font-weight: 650; font-size: 19px; line-height: 1.25; }
.pv-days { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 9px; width: 100%; }
.pv-days li { display: flex; align-items: center; gap: 10px; font-size: 15px; min-width: 0; }
.pv-box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--field); flex: none; display: grid; place-items: center; }
.pv-days .done .pv-box { background: var(--accent-2); border-color: var(--accent-2); color: var(--panel); }
.pv-box svg { width: 14px; height: 14px; }
.pv-day { font-weight: 700; color: var(--accent-2); font-size: 13px; min-width: 44px; flex: none; }
.pv-days .done > span:last-child { color: var(--mute); text-decoration: line-through; }
.pv-say { padding: 18px 20px; display: grid; gap: 12px; }
.pv-say .pv-row:first-child { justify-content: flex-start; }
.pv-icon.mic { background: var(--accent); color: var(--accent-ink); }
.pv-sentence { margin: 0; font: 500 clamp(24px, 2.8vw, 30px)/1.3 var(--serif); overflow-wrap: anywhere; }
.pv-sentence .ok { color: var(--good); }
.pv-sentence .near { color: var(--warn); text-decoration: underline wavy; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.pv-meter { height: 10px; border-radius: 999px; background: var(--sunk); overflow: hidden; }
.pv-meter i { display: block; height: 100%; width: 82%; background: var(--good); border-radius: 999px; }
.pv-tip { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--warn-soft); font-size: 14.5px; }

/* Your Spanish: a place and how people there say hello, four across, two on a phone. */
.land-accents { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.land-accents li { display: grid; gap: 6px; align-content: start; padding: 18px 20px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.land-accents b { font-size: 15.5px; }
.land-accents span { font: 500 19px/1.3 var(--serif); color: var(--accent); overflow-wrap: anywhere; }
.land-accents + .land-fine { margin: 0; }

/* Talk live: what it is beside a call, drawn (Lola talking, a slip said back right, the End button). */
.land-live { align-items: center; }
.land-checks.plain { background: none; padding: 0; }
.land-call { margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.land-call figcaption { color: var(--mute); font-size: 15px; padding: 0 4px; }
.land-call figcaption b { color: var(--fg); }
.pv-call { display: flex; flex-direction: column; gap: 10px; padding-bottom: 16px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); min-width: 0; }
.pv-call .pv-chathead { flex-wrap: wrap; }
.pv-live { display: inline-flex; align-items: center; gap: 3px; margin-left: 4px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--accent-2-soft); color: var(--accent-2); font-size: 13px; font-weight: 650; }
.pv-live i { display: block; width: 3px; height: 10px; margin-right: 1px; border-radius: 2px; background: currentColor; animation: pv-talk 1s ease-in-out infinite; }
.pv-live i:nth-child(2) { animation-delay: -.25s; }
.pv-live i:nth-child(3) { animation-delay: -.5s; }
.pv-live i:nth-child(4) { animation-delay: -.75s; margin-right: 5px; }
@keyframes pv-talk { 50% { transform: scaleY(.35); } }
.pv-clock { margin-left: auto; color: var(--mute); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.pv-call mark { background: var(--good-soft); color: var(--good); font-weight: 650; padding: 0 3px; border-radius: 4px; }
.pv-end { display: flex; justify-content: center; padding-top: 4px; }
.pv-hang { display: grid; place-items: center; min-width: 96px; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--bad); color: var(--panel); font-weight: 700; }

/* Your material stays yours */
.land-yours .land-head { margin-bottom: 22px; }
.land-checks { list-style: none; margin: 0; padding: 24px; display: grid; gap: 18px; border-radius: 22px; background: var(--accent-2-soft); }
.land-checks li { display: flex; gap: 14px; align-items: flex-start; }
.land-tick { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-2); color: var(--panel); }
.land-tick svg { width: 16px; height: 16px; }

/* Questions */
.land-faq { border-top: 1px solid var(--line); }
.land-faq details { border-bottom: 1px solid var(--line); }
.land-faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 12px 4px; font-weight: 650; font-size: 17px; cursor: pointer; border-radius: 10px; }
.land-faq summary::-webkit-details-marker { display: none; }
.land-faq summary::after { content: ''; flex: none; width: 10px; height: 10px; margin-right: 6px; border-right: 2px solid var(--mute); border-bottom: 2px solid var(--mute); transform: translateY(-3px) rotate(45deg); transition: transform .2s; }
.land-faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
@media (hover: hover) { .land-faq summary:hover { color: var(--accent); } }
.land-faq details p { margin: 0 4px 20px; color: var(--mute); max-width: 62ch; }

/* Ask for an invitation (the page's scroll-padding, in app.css, keeps it clear of the bar) */
.land-next { list-style: none; margin: 24px 0 0; padding: 0; counter-reset: next; display: grid; gap: 12px; }
.land-next li { counter-increment: next; display: flex; gap: 12px; align-items: flex-start; color: var(--mute); }
.land-next li::before { content: counter(next); flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 750; font-size: 14px; }
.land-joinbox { padding: 26px; }
.land-notefield { display: grid; gap: 6px; }
.land-notefield label.field { display: block; }
.land-notehint { display: flex; justify-content: space-between; gap: 10px; }
.land-formnote { margin: 0; }
.pub-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.land-done { display: grid; gap: 4px; justify-items: start; padding: 6px 0; }
.land-done:focus { outline: none; }
.land-done h3 { font: 600 24px/1.2 var(--serif); margin: 10px 0 4px; }
.land-done p { margin: 0 0 6px; }
.land-done-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--good-soft); color: var(--good); }
.land-done-ic svg { width: 26px; height: 26px; }

/* Footer */
.pub-foot { border-top: 1px solid var(--line); padding: 26px 0 32px; }
.land .pub-foot { background: var(--sunk); }
.pub-page .pub-foot { margin-top: auto; }
.pub-foot .pub-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; }
.pub-foot-brand { display: grid; gap: 2px; }
.pub-foot-brand span { color: var(--mute); font-size: 14px; }
.pub-foot-nav { display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: flex-end; }
.pub-foot-nav a, .pub-foot-nav button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 0; background: none; color: var(--fg); font: 600 15px/1 var(--font); text-decoration: none; }
@media (hover: hover) { .pub-foot-nav a:hover, .pub-foot-nav button:hover { background: color-mix(in srgb, var(--fg) 7%, transparent); } }
.pub-copy { grid-column: 1 / -1; margin: 6px 0 0; color: var(--mute); font-size: 14px; }

/* Sign in */
.si { max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 28px 56px; align-items: center; padding: clamp(8px, 5vh, 56px) 0 8px; }
.si-side { display: grid; gap: 22px; justify-items: center; min-width: 0; }
.si-stage { justify-content: center; }
.si-stage .pub-lola { width: 200px; height: 250px; }
.si-aside { color: var(--mute); max-width: 25em; text-align: center; margin: 0; }
.si-card { padding: 30px; }
.si-card h1 { font: 600 32px/1.15 var(--serif); letter-spacing: -.015em; }
.si-card form { margin-top: 18px; }
.si-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--fg); font-weight: 600; }
input.si-code { font: 700 26px/1 var(--mono); letter-spacing: .5em; text-align: center; padding-left: calc(12px + .5em); }
/* The address on a line of its own, breaking only before its @ and dots (welcome.js marks them). */
.si-addr { display: block; margin: 0 0 6px; font-weight: 700; color: var(--fg); overflow-wrap: anywhere; }
.si-sent { margin-bottom: 4px; }
.si-more { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px; }
.si-more button { padding: 0 14px; }
#si-resend { gap: .3em; }
.si-wait { font-weight: 500; }
.si-wait:empty { display: none; }
.si-alt { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }

/* Privacy and terms */
.legal { max-width: 740px; margin: 0 auto; }
.legal .back { min-height: 44px; }
.legal h1 { font: 600 clamp(34px, 4.6vw, 48px)/1.08 var(--serif); letter-spacing: -.02em; margin: 6px 0; }
.legal-date { color: var(--mute); font-size: 14.5px; margin-bottom: 24px; }
.legal-short { padding: 20px 22px; border-radius: 18px; background: var(--accent-soft); }
.legal .legal-short h2 { font-size: 14px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin: 0 0 8px; }
.legal-short ul { margin: 0; }
.legal h2 { font-size: 22px; margin: 38px 0 10px; }
.legal p, .legal li, .legal dd { font-size: 17px; line-height: 1.65; }
.legal ul { padding-left: 22px; display: grid; gap: 8px; margin: 0 0 12px; }
.legal-who { margin: 14px 0 0; border-top: 1px solid var(--line); }
.legal-who dt { font-weight: 700; padding-top: 14px; }
.legal-who dd { margin: 2px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--mute); }
.legal-who dd ul { margin: 8px 0 0; }
.legal-end { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (min-width: 721px) {
  .legal-who { display: grid; grid-template-columns: 190px minmax(0, 1fr); }
  .legal-who dt { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
  .legal-who dd { margin: 0; padding: 14px 0; }
}

@media (max-width: 900px) {
  .land-hero-in, .land-two, .si { grid-template-columns: minmax(0, 1fr); }
  .land-stage { justify-content: center; }
  .land-stage .pub-lola { width: 220px; height: 275px; }
  .land-stage .pub-bubble { margin-right: -60px; }
  .land-steps, .pv-grid { grid-template-columns: minmax(0, 1fr); }
  .land-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .land-accents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .si { max-width: 520px; }
}
@media (max-width: 720px) {
  .pub-wrap { padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
  .land-cta > * { flex: 1 1 100%; }
  .pub-lola, .land-stage .pub-lola { width: 160px; height: 200px; }
  .pub-bubble, .land-stage .pub-bubble { flex-basis: 220px; margin: 14px -32px 0 0; padding: 12px 14px; }
  .pub-es { font-size: 16.5px; }
  .land-stage::before { width: 240px; height: 240px; right: 50%; margin-right: -170px; bottom: -20px; }
  .land-features { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .land-accents { gap: 10px; }
  .land-accents li { padding: 14px; border-radius: 16px; }
  .land-accents span { font-size: 17px; }
  .land-steps li { padding: 20px; }
  .pv-frame { padding: 16px; border-radius: 20px; }
  .land-checks { padding: 20px 18px; }
  .land-joinbox { padding: 20px 18px; }
  .pub-foot .pub-wrap { grid-template-columns: minmax(0, 1fr); }
  .pub-foot-nav { justify-content: flex-start; margin-left: -12px; }
  .si { gap: 16px; }
  .si-side { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .si-stage .pub-lola { width: 104px; height: 130px; }
  .si-stage .pub-bubble { margin-right: -14px; }
  .si-aside { display: none; }
  .si-card { padding: 22px 18px; }
  .si-card h1 { font-size: 28px; }
  .si-more { margin: 12px 0 6px; }
  .si-more button { flex: 1 1 100%; min-height: 48px; }
  .si-alt .btn { flex: 1 1 100%; }
  .legal-end > * { flex: 1 1 100%; }
}
/* A phone on its side: the sign-in card is on the first screen, with a small Lola beside it, not above it. Keyed
   on the width, not the orientation: an upright phone with the keyboard up is wider than it is tall too, and
   keeps its one column (phones on their side are 568 px wide or more). */
@media (max-height: 520px) and (min-width: 560px) {
  .si { max-width: 820px; grid-template-columns: auto minmax(0, 460px); align-items: start; gap: 16px 24px; padding-top: 8px; }
  .si-side { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .si-stage .pub-lola { width: 96px; height: 120px; }
  .si-stage .pub-bubble { flex-basis: 170px; margin: 10px -14px 0 0; padding: 10px 12px; }
  .si-stage .pub-es { font-size: 15.5px; }
  .si-aside { display: none; }
  .si-card { padding: 18px 20px; }
  .si-card h1 { font-size: 26px; }
}
