@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,500&family=Figtree:wght@400;500;600;700;800&family=Fira+Code:wght@400;500;600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;1,8..60,300&display=swap');

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

:root {
  --serif: 'Playfair Display', Georgia, serif;
  --body-serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Fira Code', Consolas, monospace;

  /* Brand */
  --midnight: #0F172A;
  --teal: #0D9488;          /* decorative only */
  --primary: #0F766E;       /* buttons + teal text (AA on white) */
  --primary-hover: #115E59;
  --teal-bright: #14B8A8;   /* on midnight */
  --teal-soft: #5EEAD4;     /* on midnight */
  --mint-50: #F0FDFA;
  --mint-100: #CCFBF1;
  --mint-200: #99F6E4;
  --sky-50: #EFF6FF;
  --sky-100: #DBEAFE;
  --sky-ink: #1E3A8A;
  --sun: #FBBF24;
  --sun-100: #FEF3C7;
  --sun-ink: #78350F;
  --miss: #F97316;          /* wrong answers: warm orange, never red */
  --miss-bg: #FFEDD5;
  --miss-ink: #9A3412;
  --mint-ink: #115E59;

  /* Neutrals */
  --bg: #ffffff;
  --paper: #F7F6F3;
  --bg-secondary: #F7F6F3;
  --bg-tertiary: #EEF2F6;
  --border: rgba(15,23,42,0.08);
  --border-strong: #CBD5E1;
  --text: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #64748B;

  /* Status (kept for pages that still use them) */
  --success: #0F766E;
  --success-bg: #F0FDFA;
  --success-border: #99F6E4;
  --danger: #B91C1C;
  --danger-bg: #FEF2F2;
  --danger-border: #FECACA;
  --info: #0F766E;
  --info-bg: #F0FDFA;
  --info-border: #99F6E4;
  --warning: #92400E;
  --warning-bg: #FEF3C7;
  --warning-border: #FDE68A;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-card: 0 12px 30px rgba(15,23,42,0.07);
  --bounce: cubic-bezier(.34,1.56,.64,1);
  --max-width: 860px;
  --nav-height: 60px;
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--sans); color: var(--text); background: var(--paper); min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 2px; }

.page-wrap { max-width: var(--max-width); margin: 0 auto; padding: 1.5rem 1.25rem 4.5rem; width: 100%; }

/* Typography */
.display { font-family: var(--serif); font-size: clamp(2rem, 5.5vw, 2.9rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
.headline { font-family: var(--serif); font-size: clamp(1.6rem, 4.5vw, 2.35rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; }
.subhead { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.55; }
.label { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.tag { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--primary); }
em.accent { font-style: italic; font-weight: 500; color: var(--primary); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 1.35rem; font-size: 1rem; font-weight: 800; font-family: var(--sans); border: 1.5px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--bg); color: var(--text); cursor: pointer; white-space: nowrap; text-decoration: none; transition: transform .2s var(--bounce), background .15s, border-color .15s, opacity .15s; }
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--midnight); color: #fff; border-color: var(--midnight); }
.btn-primary:hover { color: #fff; }
.btn-teal { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-teal:hover { color: #fff; }
.btn-full { width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.06rem; }
.btn-sm { min-height: 44px; padding: 0 1rem; font-size: 0.92rem; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.92rem; font-weight: 700; color: var(--text); margin-bottom: 0.45rem; }
.form-input { width: 100%; min-height: 48px; padding: 0.7rem 1rem; border: 1.5px solid var(--border-strong); border-radius: var(--radius-md); font-size: 1rem; background: var(--bg); color: var(--text); transition: border-color 0.15s, box-shadow .15s; font-family: var(--sans); }
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(20,184,166,.18); }

/* Cards */
.card { background: var(--bg); border: 0; border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-card); }
.card-secondary { background: var(--mint-50); border: 0; border-radius: var(--radius-lg); padding: 1.5rem; }

/* Choice buttons (builder pages) */
.choice-btn { width: 100%; text-align: left; min-height: 56px; padding: 0.85rem 1.1rem; border: 2px solid var(--border); border-radius: var(--radius-md); background: var(--bg); font-size: 1rem; color: var(--text); cursor: pointer; margin-bottom: 0.6rem; font-family: var(--sans); transition: border-color 0.15s, background 0.15s, transform .2s var(--bounce); }
.choice-btn:hover { border-color: var(--teal); transform: translateX(3px); }
.choice-btn.selected { border-color: var(--primary); background: var(--mint-50); }
.choice-title { font-weight: 700; display: block; margin-bottom: 2px; }
.choice-desc { font-size: 0.9rem; color: var(--text-secondary); }

/* Nav */
.top-nav { min-height: var(--nav-height); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1.25rem; background: var(--midnight); position: sticky; top: 0; z-index: 100; }
.nav-logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 1.4rem; font-weight: 700; cursor: pointer; background: none; border: none; color: var(--teal-soft); min-height: 44px; }
.nav-links { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.top-nav .btn { background: transparent; color: #CBD5E1; border-color: transparent; }
.top-nav .btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.top-nav .btn.is-active { color: #fff; background: rgba(255,255,255,.1); }
.top-nav .btn-primary { background: var(--teal-bright); color: var(--midnight); border-color: var(--teal-bright); }
.top-nav .btn-primary:hover { background: var(--teal-soft); color: var(--midnight); }
@media (max-width: 560px) { .nav-hide-sm { display: none; } .top-nav { padding: 0 0.75rem; } }

/* Progress pips (legacy) */
.pip-row { display: flex; gap: 4px; }
.pip { flex: 1; height: 8px; border-radius: 999px; background: #E2E8F0; }
.pip.done { background: var(--primary); }
.pip.active { background: var(--midnight); }

/* Measuring-tape progress */
.tape { height: 12px; border-radius: 999px; background: #E2E8F0; overflow: hidden; }
.tape-fill { height: 100%; border-radius: 999px; background: var(--teal-bright); background-image: repeating-linear-gradient(90deg, rgba(15,23,42,.28) 0 1.5px, transparent 1.5px 11px); transition: width .6s var(--bounce); }
.dots-row { display: flex; gap: 6px; flex: 1; }
.dots-row > span { flex: 1; height: 8px; border-radius: 999px; background: #E2E8F0; transition: background .3s; }
.dots-row > .is-done { background: var(--primary); }
.dots-row > .is-current { background: var(--midnight); }
.dots-row > .is-learning { background: var(--sun); }
.dots-row > .is-miss { background: var(--miss); }

/* Loading */
.loading-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 1rem; gap: 1rem; color: var(--text-secondary); font-size: 1rem; font-weight: 600; }
.spinner { width: 30px; height: 30px; border: 3px dashed var(--teal); border-radius: 50%; animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Generating */
.generating { text-align: center; padding: 3rem 1rem; color: var(--text-secondary); }
.generating .spinner { margin: 0 auto 1rem; }
.generating-text { font-size: 1rem; font-weight: 600; }
.generating-sub { font-size: 0.9rem; color: var(--text-tertiary); margin-top: 0.35rem; }

/* Meta row (legacy item headers) */
.meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 1rem; }
.meta-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--text-tertiary); }

/* Code blocks */
pre { background: var(--midnight); color: #E2E8F0; border: 0; border-radius: var(--radius-md); padding: 1rem 1.15rem; font-family: var(--mono); font-size: 0.92rem; line-height: 1.75; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
code { font-family: var(--mono); font-size: 0.92em; }

/* ── Motion ─────────────────────────────────────────────────────────────── */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes t-pop { 0% { transform: scale(.7); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes t-snap { 0% { transform: scale(.88); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes t-bounce { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 70% { transform: scale(.98); } 100% { transform: scale(1); } }
@keyframes t-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
@keyframes t-rise { 0% { opacity: 0; transform: translateY(12px); } 100% { opacity: 1; transform: none; } }
@keyframes t-ring { 0% { box-shadow: 0 0 0 0 rgba(20,184,166,.55); } 100% { box-shadow: 0 0 0 20px rgba(20,184,166,0); } }
@keyframes t-wiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
@keyframes t-glow { 0% { background: rgba(94,234,212,.55); } 100% { background: rgba(94,234,212,.16); } }
@keyframes t-burst { 0% { transform: scale(0) rotate(0); opacity: 1; } 100% { transform: scale(1.5) rotate(40deg); opacity: 0; } }
@keyframes t-wave { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1.1); } }
.t-pop { animation: t-pop .45s var(--bounce) both; }
.t-snap { animation: t-snap .45s var(--bounce); }
.t-bounce { animation: t-bounce .5s var(--bounce); }
.t-shake { animation: t-shake .45s ease; }
.t-rise { animation: t-rise .45s ease-out both; }
.t-ring { animation: t-ring 1.6s ease-out infinite; }
.t-wiggle { display: inline-block; animation: t-wiggle 1.6s ease-in-out infinite; }
.t-spin { animation: spin 2.4s linear infinite; }

/* Stitch: the dashed inner border that runs through the brand */
.stitch { position: relative; }
.stitch::before { content: ''; position: absolute; inset: 9px; border: 1.5px dashed var(--stitch, var(--mint-200)); border-radius: calc(var(--r, 24px) - 8px); pointer-events: none; }
.stitch > * { position: relative; }

/* ── Item pages ─────────────────────────────────────────────────────────── */
.item-page { max-width: 780px; display: flex; flex-direction: column; gap: 14px; }
.back-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--primary); cursor: pointer; }
.back-link:hover { color: var(--primary-hover); }
.item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.item-pos { color: var(--text-secondary); font-weight: 600; }
.item-title { font-family: var(--serif); font-weight: 700; font-size: clamp(1.85rem, 5vw, 2.4rem); line-height: 1.1; letter-spacing: -0.02em; }
.item-body { margin-top: 8px; display: flex; flex-direction: column; gap: 18px; }
.item-body.is-legacy > .meta-row,
.item-body.is-legacy > .meta-row + .headline,
.item-body.is-legacy > .meta-row + h1 { display: none; }

.type-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.type-chip svg { width: 14px; height: 14px; }
.tone-mint { background: var(--mint-100); color: var(--mint-ink); }
.tone-sky { background: var(--sky-100); color: var(--sky-ink); }
.tone-sun { background: var(--sun-100); color: var(--sun-ink); }
.tone-night { background: var(--midnight); color: #fff; }

.item-nav { display: flex; gap: 12px; margin-top: 2rem; }
.item-nav .btn { flex: 1; min-height: 56px; min-width: 0; white-space: normal; line-height: 1.2; text-align: center; }
.item-nav #nav-next { flex: 2; }

.counter { font-weight: 800; white-space: nowrap; }
.progress-line { display: flex; align-items: center; gap: 12px; }

/* Panel: the white rounded card items are built from */
.panel { background: var(--bg); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 16px; }
.panel-flat { background: var(--bg); border-radius: var(--radius-lg); padding: 20px 22px; }
.kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }

/* Payoff: the little celebration at the end of an item */
.payoff { --r: 28px; position: relative; background: var(--bg); border-radius: 28px; padding: 34px 26px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.payoff h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.7rem, 4.5vw, 2.1rem); line-height: 1.15; }
.payoff p { max-width: 480px; font-size: 1.1rem; line-height: 1.5; color: var(--text-secondary); }
.payoff-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.payoff-strip { --r: 24px; position: relative; background: var(--bg); border-radius: 24px; padding: 20px 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.payoff-star { width: 50px; height: 50px; flex: none; border-radius: 50%; background: var(--sun); display: flex; align-items: center; justify-content: center; }
.payoff-star svg { width: 26px; height: 26px; }

/* Quiz */
.q-text { font-family: var(--serif); font-weight: 700; font-size: clamp(1.3rem, 3.6vw, 1.6rem); line-height: 1.3; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 10px 16px; border-radius: 18px; border: 2px solid #E2E8F0; background: var(--bg); color: var(--text); font: inherit; font-size: 1.06rem; font-weight: 600; text-align: left; cursor: pointer; transition: transform .2s var(--bounce), background .25s, border-color .25s, opacity .25s; }
.choice:hover:not(:disabled) { transform: translateX(4px); border-color: var(--teal); }
.choice:disabled { cursor: default; }
.choice-key { width: 36px; height: 36px; flex: none; border-radius: 12px; background: #F1F5F9; color: var(--text); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.choice.is-right { background: var(--mint-100); border-color: var(--primary); }
.choice.is-right .choice-key { background: var(--primary); color: #fff; }
.choice.is-wrong { background: var(--miss-bg); border-color: var(--miss); }
.choice.is-wrong .choice-key { background: var(--miss); color: #fff; }
.choice.is-faded { opacity: .55; }
.q-feedback { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; line-height: 1.5; font-weight: 500; }
.q-feedback strong { white-space: nowrap; font-weight: 800; }
.q-feedback.is-right { background: var(--mint-100); color: #134E4A; }
.q-feedback.is-wrong { background: var(--miss-bg); color: var(--miss-ink); }
.score-ring { width: 132px; height: 132px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.score-ring > div { width: 104px; height: 104px; border-radius: 50%; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-ring b { font-family: var(--serif); font-size: 2.1rem; line-height: 1; }
.score-ring span { font-size: 13px; font-weight: 700; color: var(--text-secondary); }

/* Flashcards */
.fc-scene { perspective: 1400px; cursor: pointer; border-radius: 28px; }
.fc-card { display: grid; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.34,1.3,.64,1), box-shadow .3s; border-radius: 28px; }
.fc-scene:hover .fc-card { box-shadow: 0 22px 44px rgba(15,23,42,.12); }
.fc-card.is-flipped { transform: rotateY(180deg); }
.fc-face { --r: 28px; grid-area: 1 / 1; position: relative; min-height: 300px; border-radius: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 36px 28px; text-align: center; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fc-front { background: var(--bg); box-shadow: var(--shadow-card); }
.fc-back { --stitch: rgba(255,255,255,.35); background: var(--primary); color: #fff; transform: rotateY(180deg); }
.fc-term { font-family: var(--mono); font-weight: 600; font-size: clamp(1.9rem, 7vw, 3.2rem); letter-spacing: -0.02em; line-height: 1.15; word-break: break-word; }
.fc-def { max-width: 540px; font-size: clamp(1.1rem, 3vw, 1.3rem); line-height: 1.5; font-weight: 500; }
.fc-example { padding: 8px 14px; border-radius: 12px; background: rgba(255,255,255,.14); font-family: var(--mono); font-size: 1rem; }
.fc-rate { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.fc-rate .btn { min-height: 58px; border-radius: 18px; font-size: 1.06rem; }
.btn-learning { background: var(--sun-100); border: 2px solid var(--sun); color: var(--sun-ink); }
.fc-move { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fc-move span { color: var(--text-secondary); font-weight: 600; text-align: center; }
.fc-tally { display: flex; justify-content: center; gap: 18px; color: var(--text-secondary); font-weight: 700; flex-wrap: wrap; }

/* Matching */
.match-cols { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,3fr); gap: 14px; }
.match-col { display: flex; flex-direction: column; gap: 10px; }
.match-chip { width: 100%; min-height: 60px; border-radius: 18px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; font: inherit; font-size: 1rem; font-weight: 600; color: var(--text); background: var(--bg); border: 2px solid #E2E8F0; box-shadow: 0 2px 0 rgba(15,23,42,.05); transition: transform .25s var(--bounce), background .2s, border-color .2s, box-shadow .2s; }
.match-chip:hover:not(.is-matched) { transform: translateY(-2px); }
.match-chip.is-term { font-family: var(--mono); }
.match-chip.is-selected { background: var(--sun-100); border-color: var(--midnight); box-shadow: 4px 5px 0 rgba(15,23,42,.14); }
.match-chip.is-matched { background: var(--mint-100); border-color: var(--primary); box-shadow: none; cursor: default; }
.match-chip.is-wrong { background: var(--miss-bg); border-color: var(--miss); }
.match-chip > span:first-child { flex: 1; min-width: 0; }
.match-check { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.match-tag { flex: none; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--primary); font-family: var(--mono); font-size: 12px; font-weight: 600; }
.hint-line { color: var(--text-secondary); font-weight: 600; min-height: 1.6em; }
@media (max-width: 640px) {
  .match-cols { grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); gap: 10px; }
  .match-chip { padding: 10px 12px; font-size: 0.92rem; }
  .match-tag { display: none; }
}

/* Worked example */
.we-scenario { display: flex; gap: 16px; align-items: flex-start; }
.we-scenario p { font-size: 1.1rem; line-height: 1.55; }
.round-icon { width: 44px; height: 44px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.data-card { background: var(--bg); border-radius: var(--radius-lg); overflow: hidden; }
.data-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 14px 18px 8px; }
.legend { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-secondary); font-weight: 600; }
.legend i { width: 14px; height: 14px; border-radius: 4px; background: var(--mint-100); border: 1.5px solid var(--teal-soft); }
.t-table-wrap { overflow-x: auto; }
.t-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 14px; }
.t-table th { padding: 10px 14px; text-align: left; font-family: var(--sans); font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); border-bottom: 1.5px solid #E2E8F0; white-space: nowrap; }
.t-table td { padding: 10px 14px; border-bottom: 1px solid #F1F5F9; white-space: nowrap; }
.t-table tr.is-hit { background: var(--mint-100); }
.we-done-step { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.6); font-weight: 700; color: #334155; }
.tick { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.step-num { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 2px dashed var(--teal); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--primary); }
.step-title { font-family: var(--serif); font-weight: 700; font-size: 1.45rem; line-height: 1.2; }
.code-box { border-radius: 18px; background: var(--midnight); padding: 16px 0; font-family: var(--mono); font-size: 15px; line-height: 1.75; overflow-x: auto; }
.code-line { display: flex; gap: 16px; padding: 0 18px; white-space: pre; color: #CBD5E1; }
.code-line .ln { width: 18px; flex: none; text-align: right; color: #64748B; }
.code-line.is-new { color: #fff; animation: t-glow 1.4s ease-out forwards; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--sun-100); color: var(--sun-ink); font-weight: 600; line-height: 1.5; }
.result-card { position: relative; background: var(--mint-50); border: 2px solid var(--teal-soft); border-radius: var(--radius-lg); overflow: hidden; }
.burst { position: absolute; pointer-events: none; animation: t-burst .9s ease-out forwards; }

/* Interactive */
.tip { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; background: var(--bg); border: 1.5px dashed var(--teal-soft); line-height: 1.55; font-weight: 600; color: #134E4A; }
.frame-card { background: var(--bg); border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-card); }
.frame-card iframe { width: 100%; border: 0; display: block; min-height: 480px; }
.done-pill { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 999px; background: var(--mint-100); color: var(--mint-ink); font-weight: 800; text-align: center; padding: 0 16px; }

/* Audiogram */
.ag-player { position: relative; overflow: hidden; background: var(--midnight); color: #fff; border-radius: 30px; padding: 30px 26px 24px; display: flex; flex-direction: column; gap: 22px; }
.ag-hook { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.3rem, 3.6vw, 1.65rem); line-height: 1.4; color: #F1F5F9; }
.ag-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 72px; }
.ag-wave span { width: 5px; flex: none; border-radius: 4px; background: rgba(255,255,255,.22); transform-origin: center; transition: background .3s; }
.ag-wave.is-playing span { background: var(--teal-bright); animation: t-wave .9s ease-in-out infinite; }
.ag-track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.15); overflow: hidden; cursor: pointer; }
.ag-fill { height: 100%; width: 0; border-radius: 999px; background: var(--teal-bright); }
.ag-controls { display: flex; align-items: center; gap: 16px; }
.ag-play { width: 68px; height: 68px; flex: none; border: 0; border-radius: 50%; background: var(--teal-bright); color: var(--midnight); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s var(--bounce); }
.ag-play:hover { transform: scale(1.06); }
.ag-play:disabled { opacity: .4; cursor: not-allowed; }
.ag-status { font-weight: 800; font-size: 1.06rem; }
.ag-sub { font-size: 14px; color: #CBD5E1; }
.ag-transcript { font-size: 1.15rem; line-height: 1.7; max-height: 280px; overflow-y: auto; }
.ag-transcript .said { color: var(--text); }
.ag-transcript .unsaid { color: #CBD5E1; }
.matters { --r: 24px; --stitch: var(--sun); position: relative; background: var(--sun-100); border-radius: 24px; padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.matters p { font-size: 1.1rem; line-height: 1.55; font-weight: 600; }

/* Explainer */
.ex-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 28px; overflow: hidden; background: var(--mint-50); box-shadow: 0 16px 40px rgba(15,23,42,.10); }
.ex-stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.ex-start { position: absolute; inset: 0; border: 0; background: rgba(240,253,250,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: pointer; font: inherit; color: var(--text); }
.ex-start[hidden] { display: none; }
.ex-start .ex-big { width: clamp(64px, 12vw, 92px); height: clamp(64px, 12vw, 92px); border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; }
.ex-start b { font-size: 1.1rem; font-weight: 800; }
.ex-controls { display: flex; align-items: center; gap: 14px; }
.ex-btn { width: 56px; height: 56px; flex: none; border: 0; border-radius: 50%; background: var(--midnight); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .2s var(--bounce); }
.ex-btn:hover { transform: scale(1.06); }
.ex-btn.is-light { width: 48px; height: 48px; background: var(--bg); color: var(--text); border: 1.5px solid var(--border-strong); }
.ex-dots { display: flex; gap: 8px; flex: 1; align-items: center; flex-wrap: wrap; }
.ex-dot { width: 12px; height: 12px; min-width: 12px; border: 0; border-radius: 999px; background: #CBD5E1; padding: 0; cursor: pointer; transition: width .3s var(--bounce), background .3s; }
.ex-dot.is-past { background: var(--primary); }
.ex-dot.is-now { width: 40px; background: var(--primary); }

/* Course outline */
.outline-head { display: flex; flex-direction: column; gap: 14px; }
.notice { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px; background: var(--bg); border: 1.5px dashed var(--teal-soft); color: var(--mint-ink); font-weight: 600; }
.notice-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--teal); animation: pulse 1.6s ease-in-out infinite; }
.up-next { position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 26px; border-radius: 26px; background: var(--midnight); color: #fff; border: 0; width: 100%; text-align: left; font: inherit; cursor: pointer; transition: transform .25s var(--bounce); }
.up-next:hover { transform: translateY(-3px); }
.up-next-art { position: absolute; right: -36px; top: -36px; pointer-events: none; }
.up-next-icon { position: relative; width: 56px; height: 56px; flex: none; border-radius: 18px; background: var(--teal-bright); color: var(--midnight); display: flex; align-items: center; justify-content: center; }
.up-next-icon svg { width: 26px; height: 26px; }
.up-next-text { position: relative; flex: 1 1 240px; display: flex; flex-direction: column; gap: 4px; }
.up-next-text .kicker { color: var(--teal-soft); }
.up-next-text b { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; line-height: 1.15; }
.up-next-go { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 999px; background: var(--teal-bright); color: var(--midnight); font-weight: 800; }
.module { display: flex; flex-direction: column; gap: 12px; }
.module-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.module-num { width: 36px; height: 36px; flex: none; border-radius: 50%; border: 2px dashed var(--teal); display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--primary); }
.module-head h2 { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; line-height: 1.2; }
.module-head p { color: var(--text-secondary); }
.item-row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 18px; background: var(--bg); border: 2px solid transparent; color: var(--text); text-align: left; font: inherit; cursor: pointer; transition: transform .25s var(--bounce), box-shadow .2s; }
.item-row:hover:not(:disabled) { transform: translateX(4px); box-shadow: 0 6px 18px rgba(15,23,42,.06); }
.item-row.is-done { background: var(--mint-50); }
.item-row.is-next { border-color: var(--teal); }
.item-row.is-waiting { background: rgba(255,255,255,.55); border: 1.5px dashed var(--border-strong); cursor: default; }
.item-row.is-failed { background: rgba(255,255,255,.55); cursor: default; }
.row-icon { width: 44px; height: 44px; flex: none; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.row-icon svg { width: 20px; height: 20px; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-text b { font-weight: 700; font-size: 1.06rem; }
.row-text span { font-size: 14px; color: var(--text-secondary); }
.row-pill { padding: 5px 12px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; }
.row-wait { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2.5px dashed var(--teal); animation: spin 2.4s linear infinite; }
.more-card { --r: 26px; --stitch: var(--sun); position: relative; background: var(--sun-100); border-radius: 26px; padding: 26px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.done-card { --r: 28px; position: relative; overflow: hidden; background: var(--midnight); color: #fff; border-radius: 28px; padding: 32px 26px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; --stitch: rgba(94,234,212,.45); }
.done-card h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.4rem); line-height: 1.1; }
.done-card p { color: #CBD5E1; font-size: 1.06rem; max-width: 460px; }
.done-card .btn-teal { background: var(--teal-bright); border-color: var(--teal-bright); color: var(--midnight); }
.confetti { position: absolute; width: 10px; height: 10px; border-radius: 3px; pointer-events: none; animation: t-confetti 1.6s ease-out forwards; }
@keyframes t-confetti { 0% { transform: translate(0,0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }

/* Dashboard */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.link-btn { background: none; border: 0; font: inherit; font-weight: 800; color: var(--primary); cursor: pointer; min-height: 44px; }
.dash-wrap { max-width: 1160px; margin: 0 auto; padding: 2.25rem 1.25rem 4.5rem; display: flex; flex-direction: column; gap: 2rem; }
.dash-hello { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-end; justify-content: space-between; }
.dash-date { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.dash-title { font-family: var(--serif); font-weight: 700; font-size: clamp(2.2rem, 6vw, 3.1rem); letter-spacing: -0.03em; line-height: 1.05; }
.dash-search { flex: 1 1 380px; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 999px; padding: 6px 6px 6px 20px; box-shadow: 0 8px 24px rgba(15,23,42,.07); }
.dash-search:focus-within { box-shadow: 0 0 0 4px rgba(20,184,166,.25), 0 8px 24px rgba(15,23,42,.07); }
.dash-search input { flex: 1; min-width: 0; min-height: 44px; border: 0; font: inherit; font-size: 1rem; background: transparent; color: var(--text); outline: none; }
.dash-hero { position: relative; overflow: hidden; background: var(--midnight); color: #fff; border-radius: 30px; padding: 36px; display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.dash-hero-art { position: absolute; right: -60px; top: -70px; pointer-events: none; }
.dash-hero-text { position: relative; flex: 999 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.dash-hero-text h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.5rem); letter-spacing: -0.02em; line-height: 1.08; }
.dash-hero-text p { font-size: 1.06rem; color: #CBD5E1; }
.dash-hero-text p strong { color: #fff; }
.dash-go { min-height: 60px; padding: 0 30px; background: var(--teal-bright); border-color: var(--teal-bright); color: var(--midnight); font-size: 1.1rem; }
.dash-go:hover { color: var(--midnight); }
.dash-cols { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.dash-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 48px; }
.dash-aside { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.dash-h2row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.6rem, 4vw, 1.9rem); letter-spacing: -0.02em; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.dash-card { display: flex; flex-direction: column; gap: 14px; background: var(--bg); border-radius: 22px; padding: 22px; border: 0; font: inherit; color: var(--text); cursor: pointer; text-align: left; transition: transform .25s var(--bounce), box-shadow .2s; }
.dash-card:hover, .dash-make:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(15,23,42,.08); }
.dash-done { --r: 24px; position: relative; border-radius: 24px; padding: 26px; display: flex; flex-direction: column; gap: 12px; }
.dash-done ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.45; color: #1E293B; }
.dash-done-title { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; line-height: 1.15; }
.dash-badge { align-self: flex-start; padding: 5px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 800; color: var(--primary); }
.dash-make { background: var(--bg); border-radius: 20px; padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; cursor: pointer; transition: transform .25s var(--bounce), box-shadow .2s; }
.st-pill { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.st-draft { background: #F1F5F9; color: #334155; }
.st-gen { background: var(--sky-100); color: var(--sky-ink); }
.st-review { background: var(--sun-100); color: var(--sun-ink); }
.st-live { background: var(--mint-100); color: var(--mint-ink); }
.dash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dash-stats div { background: var(--mint-50); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; }
.dash-stats b { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; color: var(--primary); }
.dash-stats span { font-size: 14px; color: var(--text-secondary); font-weight: 600; }
@media (max-width: 640px) { .dash-hero { padding: 26px 22px; } .dash-wrap { padding-top: 1.5rem; } }

@media (max-width: 640px) {
  .page-wrap { padding-left: 1rem; padding-right: 1rem; }
  .panel { padding: 20px; }
  .up-next { padding: 22px; }
}

/* ---------- Reading ---------- */
.rd-progress { position: sticky; top: var(--nav-height); z-index: 20; padding: 10px 0; margin: -10px 0 8px; background: var(--paper); }
.rd-progress-track { height: 6px; border-radius: 999px; background: #E2E8F0; overflow: hidden; }
.rd-progress-fill { height: 100%; width: 0; background: var(--teal-bright); border-radius: 999px; transition: width .15s linear; }
.rd-lede { font-family: var(--body-serif); font-style: italic; font-size: 1.2rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 28px; }
.rd-article { font-family: var(--body-serif); color: var(--text); }
.rd-p { font-size: 1.12rem; line-height: 1.85; margin-bottom: 1.4rem; }
.rd-article strong { font-weight: 600; background: linear-gradient(transparent 62%, var(--sun-100) 62%); }
.rd-article code { font-family: var(--mono); font-size: .85em; background: var(--mint-50); color: var(--mint-ink); padding: .1em .4em; border-radius: 6px; }
.rd-h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.4rem, 4vw, 1.7rem); line-height: 1.25; margin: 2.4rem 0 .8rem; }
.rd-figure { margin: 2rem 0; }
.rd-figure-frame { border-radius: 22px; overflow: hidden; background: var(--mint-50); box-shadow: var(--shadow-card); }
.rd-figure img { width: 100%; display: block; }
.rd-figure figcaption { font-family: var(--sans); font-size: .88rem; color: var(--text-secondary); margin: 10px 6px 0; text-align: center; }
.rd-img-wait { aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; font-family: var(--sans); font-weight: 600; color: var(--mint-ink); background: repeating-linear-gradient(-45deg, var(--mint-50) 0 14px, #E6FBF6 14px 28px); background-size: 200% 200%; animation: rd-shimmer 3s linear infinite; }
@keyframes rd-shimmer { to { background-position: 100% 100%; } }
.rd-concept { --r: 22px; --stitch: var(--sun); display: flex; gap: 14px; align-items: flex-start; background: var(--sun-100); border-radius: 22px; padding: 22px; margin: 1.8rem 0; font-family: var(--sans); }
.rd-concept .round-icon { background: var(--sun); color: var(--sun-ink); }
.rd-concept-label { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--sun-ink); margin-bottom: 4px; }
.rd-concept p { font-size: 1.04rem; line-height: 1.6; font-weight: 500; }
.rd-quote { position: relative; margin: 2.2rem 0; padding: 4px 0 4px 26px; border-left: 4px solid var(--teal-bright); font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 4vw, 1.55rem); line-height: 1.45; color: var(--midnight); }
.rd-code { margin: 1.8rem 0; border-radius: 20px; overflow: hidden; background: var(--midnight); font-family: var(--mono); }
.rd-code-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.rd-code-lang { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-soft); }
.rd-copy { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #E2E8F0; font: 600 .82rem var(--sans); cursor: pointer; transition: background .2s, transform .2s var(--bounce); }
.rd-copy:hover { background: rgba(255,255,255,.08); transform: scale(1.04); }
.rd-code pre { font-variant-ligatures: none; margin: 0; padding: 16px 18px; overflow-x: auto; font-size: .86rem; line-height: 1.7; color: #E2E8F0; }
.rd-code .code-line { display: block; white-space: pre; }
.rd-code .ln { display: inline-block; width: 2.2em; margin-right: 14px; text-align: right; color: #64748B; user-select: none; }
.rd-end { margin-top: 2.4rem; }

/* ---------- Video ---------- */
.vd-stage { width: 100%; aspect-ratio: 16 / 9; border-radius: 26px; overflow: hidden; background: var(--midnight); box-shadow: var(--shadow-card); }
.vd-stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.vd-wait { aspect-ratio: auto; min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 32px 24px; text-align: center; color: #fff; }
.vd-clapper { width: 64px; height: 64px; border-radius: 50%; background: var(--teal-bright); color: var(--midnight); display: flex; align-items: center; justify-content: center; animation: t-wiggle 2.6s ease-in-out infinite; }
.vd-clapper svg { width: 26px; height: 26px; }
.vd-wait-title { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; }
.vd-wait-sub { color: #CBD5E1; max-width: 380px; line-height: 1.5; }
.vd-dots { display: flex; gap: 6px; margin-top: 6px; }
.vd-dots span { width: 9px; height: 9px; border-radius: 50%; background: var(--teal-soft); animation: vd-hop 1.2s ease-in-out infinite; }
@keyframes vd-hop { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-7px); opacity: 1; } }
.vd-dots span:nth-child(2) { animation-delay: .15s; }
.vd-dots span:nth-child(3) { animation-delay: .3s; }
.vd-miss { background: var(--miss-bg); color: var(--miss-ink); box-shadow: none; }
.vd-miss .vd-wait-sub { color: var(--miss-ink); }
#video-done-wrap { margin-top: 18px; }
#video-done svg { width: 20px; height: 20px; }


/* ---------- Animated diagram ---------- */
.dg-stage { position: relative; display: block; width: 100%; max-width: 600px; margin: 0 auto; padding: 0; border: 0; aspect-ratio: 1 / 1; border-radius: 24px; overflow: hidden; background: #F7F6F3; box-shadow: 0 16px 40px rgba(15,23,42,.10); cursor: zoom-in; font: inherit; color: inherit; }
.dg-stage.is-wide { max-width: none; }
.dg-stage:focus-visible { outline: 3px solid var(--teal-bright, #14B8A8); outline-offset: 3px; }
.dg-img { width: 100%; height: 100%; display: block; object-fit: contain; }
.dg-zoom-hint { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 10px; border-radius: 999px; background: rgba(15,23,42,.78); color: #fff; font-weight: 700; font-size: .85rem; opacity: 0; transform: translateY(4px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.dg-zoom-hint svg { width: 15px; height: 15px; }
.dg-stage:hover .dg-zoom-hint, .dg-stage:focus-visible .dg-zoom-hint { opacity: 1; transform: none; }
@media (hover: none), (max-width: 640px) { .dg-zoom-hint { opacity: 1; transform: none; } }
@media (max-width: 640px) { .dg-zoom-hint { right: 8px; bottom: 8px; padding: 7px; } .dg-zoom-hint span { display: none; } }
.dg-controls { display: flex; align-items: center; gap: 14px; max-width: 600px; margin: 16px auto 0; }
.dg-hint { color: var(--text-secondary); font-weight: 600; line-height: 1.4; }
.dg-controls.is-wide, .dg-controls.is-wide + #dg-done { max-width: none; }
.dg-zoom { position: fixed; inset: 0; z-index: 1000; overflow: hidden; background: rgba(15,23,42,.92); cursor: zoom-out; animation: dg-zoom-in .22s ease both; }
.dg-zoom img { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: block; border-radius: 16px; background: #F7F6F3; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.dg-zoom img.is-turned { transform: translate(-50%, -50%) rotate(90deg); }
.dg-zoom-close { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 999px; background: #fff; color: var(--midnight, #0F172A); font-size: 28px; line-height: 1; font-weight: 700; cursor: pointer; }
@keyframes dg-zoom-in { from { opacity: 0; } to { opacity: 1; } }
#dg-done { max-width: 600px; margin: 18px auto 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ── Sign in (pages/auth.js) ─────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2.5rem 16px; background: var(--bg-secondary); }
.auth-box { width: 100%; max-width: 440px; text-align: center; }
.auth-logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--primary); text-decoration: none; margin-bottom: 1.5rem; }
.auth-title { margin-bottom: 0.5rem; }
.auth-sub { margin-bottom: 1.75rem; }
.auth-card { text-align: left; padding: 1.75rem; display: flex; flex-direction: column; gap: 0.6rem; }
.auth-card .form-label { margin-bottom: 0; }
.auth-card .btn-full { margin-top: 0.4rem; }
.auth-google { display: flex; justify-content: center; min-height: 44px; }
.auth-or { display: flex; align-items: center; gap: 0.75rem; margin: 0.4rem 0; color: var(--text-tertiary); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; border-top: 1.5px dashed var(--border-strong); }
.auth-password { display: flex; flex-direction: column; gap: 0.6rem; }
.auth-password[hidden], .auth-google[hidden], .auth-or[hidden], .auth-note[hidden] { display: none; }
.auth-note { padding: 0.7rem 0.95rem; border-radius: var(--radius-md); background: var(--bg-secondary); color: var(--text); font-size: 0.92rem; line-height: 1.45; }
.auth-alt { display: flex; justify-content: center; gap: 1.25rem; margin-top: 0.2rem; }
.auth-text-btn { background: none; border: 0; padding: 0.5rem 0.25rem; min-height: 44px; font: inherit; font-size: 0.92rem; font-weight: 700; color: var(--primary); cursor: pointer; }
.auth-text-btn:hover { text-decoration: underline; }
.auth-foot { margin-top: 1.25rem; font-size: 0.9rem; color: var(--text-secondary); }
.auth-sent { text-align: center; display: flex; flex-direction: column; gap: 0.75rem; }
.auth-sent-icon { width: 64px; height: 64px; margin: 0.25rem auto 0.25rem; border-radius: 50%; display: grid; place-items: center; background: var(--mint-50); color: var(--primary); }
.auth-sent-icon svg { width: 30px; height: 30px; }
.auth-sent-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; }
.auth-sent-text { color: var(--text-secondary); line-height: 1.55; }
.auth-legal { margin-top: 0.5rem; font-size: 0.85rem; }
.auth-legal a { color: var(--text-secondary); }
