/* Petit-owned CSS adaptations; rationale and upstream references: design-principles.md. */
:root{
 --petit-paper:#f6f5ef;--petit-surface:#fffefb;--petit-ink:#253e32;
 --petit-muted:#526557;--petit-line:#d8dfd3;--petit-accent:#284f3b;
 --petit-soft:#eaf0e5;--petit-ring:#7c5721;--petit-radius:16px;
 --petit-shadow:0 2px 4px #253e3204,0 12px 32px #253e3207;
}
body{background:var(--petit-paper);color:var(--petit-ink);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:inherit}a{text-underline-offset:4px}h1,h2,h3{text-wrap:balance}p{overflow-wrap:break-word}
header{max-width:1200px;padding:24px 32px;gap:24px;border-bottom:1px solid var(--petit-line)}
header .brand{font-size:28px;letter-spacing:-1px}header .brand img{width:36px;height:36px}
header nav{gap:4px}header nav a{font:500 14px/1.5 system-ui,sans-serif;padding:9px 14px;border-radius:9px;color:var(--petit-muted);text-decoration:none}
header nav a:hover{background:#e9ede3;text-decoration:none;color:var(--petit-ink)}
header nav a[aria-current=page]{background:var(--petit-soft);box-shadow:inset 0 0 0 1px #d3ddcd;color:var(--petit-accent);text-decoration:none}
:is(button,a,input,textarea,select,summary):focus-visible{outline:3px solid var(--petit-ring);outline-offset:4px}
:is(input[type=text],input[type=email],textarea,select){background:var(--petit-surface);color:var(--petit-ink);border:1px solid #adbca9;border-radius:10px;font-size:16px;line-height:1.5;padding:12px 14px}
:is(input[type=text],input[type=email],textarea,select):focus{border-color:var(--petit-accent);box-shadow:0 0 0 3px #284f3b12}
input[type=checkbox],input[type=radio]{accent-color:var(--petit-accent)}
:is(.primary,button.primary){background:var(--petit-accent);color:#fff;border:1px solid transparent;border-radius:10px;font-size:15px;font-weight:600;line-height:1.4;min-height:46px;padding:12px 20px;box-shadow:0 1px 2px #253e321a;text-decoration:none}
:is(.primary,button.primary):hover{background:#356247;color:#fff}
:is(button.secondary,button.retry-button,.tour-controls button){min-height:44px;border:1px solid #bac8b5;background:var(--petit-surface);border-radius:10px;font-size:14px;padding:10px 16px;color:var(--petit-ink)}
:is(button.secondary,button.retry-button):hover{background:var(--petit-soft)}button:disabled{cursor:default;opacity:.55}
:is(.card,.recall-card,.stage-panel,.placement-card,.panel,.metric,.evidence-card,.onboarding){border-color:var(--petit-line);border-radius:var(--petit-radius);background:var(--petit-surface);box-shadow:var(--petit-shadow)}
:is(.lede,.section-intro,.fine,.metric span,.metric small,.mode-card .fine,.recall-deck,.small-note){color:var(--petit-muted)}
:is(.metric span,.metric small,.mode-card .fine,.fine){font-size:13px;line-height:1.65}
.dashboard .heading h1{font-size:clamp(36px,4vw,48px);letter-spacing:-1.4px}.dashboard .metrics{gap:16px}.metric strong{font-variant-numeric:tabular-nums}
.dashboard .panel{padding:28px}.dashboard .section-head{gap:16px}.dashboard .panel h2{font-size:28px}
.dashboard .tabs,.dashboard .dashboard-tabs{gap:4px}
.journey-strip{background:var(--petit-paper);border-color:var(--petit-line)}
.game-why{color:var(--petit-muted)}.spend-counter>div,.level-details>div{background:var(--petit-surface);border-color:var(--petit-line);box-shadow:0 8px 28px #253e3217}
.home{max-width:1120px;margin:44px auto;padding:0 32px}.home .welcome{margin-bottom:36px}.home .welcome h1{font-size:clamp(34px,4vw,46px);letter-spacing:-1.4px;margin-bottom:12px}.home .welcome>a{display:inline-block;margin-top:12px;font-size:14px;color:var(--petit-accent)}
.home .learning-overview{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:32px}
.home .today{background:var(--petit-surface);border:1px solid var(--petit-line);padding:30px;border-radius:20px;box-shadow:var(--petit-shadow);border-top:4px solid #668565;top:100px}
.home .today h2{font-size:30px}.home .today p{font-size:15px;line-height:1.7;color:var(--petit-muted)}
.home .today .primary{margin-top:26px}.home .river-section{padding:24px 16px 0;border:1px solid var(--petit-line);border-radius:20px;background:#eef2e8}
.home .river-section>h2{margin:0 12px 18px;font-size:26px}.home .stop-card{background:#eef2e8}.home .river-stop.current .stop-card{background:var(--petit-surface);border-color:#9ab08e;box-shadow:0 3px 12px #253e3208}
.home .stop-token{background:var(--petit-paper)}.home .river-stop.current .stop-token{background:var(--petit-accent);box-shadow:0 0 0 5px #eef2e8,0 0 0 7px #8ea383}
.home-options{border:0;padding-top:0;margin-top:36px}.home-options>h2{font-size:28px}.home .explore-menu{border:1px solid var(--petit-line);border-radius:16px;background:var(--petit-surface)}
.home .explore-menu>summary{padding:18px 22px;font-size:15px;font-weight:600;list-style-position:inside;border-radius:16px}.home .explore-menu>summary:hover{background:var(--petit-soft)}
.home .mode-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin:0;padding:0 16px 16px;gap:12px}
.home .mode{position:relative;padding:22px 20px 38px;border:1px solid var(--petit-line);border-radius:12px;background:var(--petit-surface);transition:background-color 140ms,border-color 140ms,box-shadow 140ms}
.home .mode::after{content:'→';position:absolute;bottom:12px;right:18px;color:var(--petit-accent);font-size:20px}
.home .mode:hover,.home .mode:focus-visible{background:var(--petit-soft);border-color:#8da382;box-shadow:0 3px 12px #253e3208}.home .mode h3{font-size:23px}.home .mode p{font-size:14px;line-height:1.65;color:var(--petit-muted)}
.home .grammar-start{border:1px solid var(--petit-line);border-radius:16px;padding:24px;background:var(--petit-surface);margin-top:20px}.home .grammar-start p{font-size:14px}.home .grammar-start>a{font-size:14px;font-weight:600}
.home footer{font-size:13px;border-top:1px solid var(--petit-line)}
.privacy-document{max-width:820px}.privacy-document nav{padding:18px 0;border-block:1px solid var(--petit-line)}.privacy-document h2{margin-top:38px}.privacy-document p{line-height:1.8}
/* Public home: a real, keyboard-operable vocabulary example, not invented user progress. */
.welcome-page header{display:flex;justify-content:space-between}.welcome-page header .sign-in{position:static;display:inline-flex;align-items:center;margin:0;padding:9px 16px;border:1px solid #bac8b5;border-radius:10px;font-size:14px;text-decoration:none;background:var(--petit-surface)}
.welcome-page .welcome{max-width:1120px;margin:64px auto 72px;padding:0 32px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:64px;align-items:center}
.welcome-copy h1{font-size:clamp(42px,5.3vw,68px);letter-spacing:-2px;line-height:1.08;margin:0 0 24px}.welcome-copy>p{font-size:18px;line-height:1.8;max-width:490px;color:var(--petit-muted);margin:0 0 30px}
.welcome-copy>.primary{width:auto}.welcome-page .welcome form{padding:24px;border:1px solid var(--petit-line);border-radius:16px;background:var(--petit-surface);box-shadow:var(--petit-shadow);margin:0;max-width:100%}.welcome-page .welcome form p{color:var(--petit-muted)}
.welcome-page #age-form label{display:block}.welcome-page #age-range{display:block;width:100%;margin:8px 0 20px}.welcome-page .consent{font-size:14px;line-height:1.65;margin-bottom:16px}.welcome-page .privacy{font-size:13px;line-height:1.75}
.welcome-sample{margin:0;padding:28px;background:#e8eee1;border:1px solid #d4dec9;border-radius:24px;position:relative}
.sample-card{background:var(--petit-surface);border:1px solid #d8dfd1;border-radius:16px;padding:40px 28px;text-align:center;box-shadow:0 6px 20px #253e3208}
.sample-card h2{font:56px/1.1 Georgia,serif;letter-spacing:-1.5px;margin:12px 0 36px;color:var(--petit-ink)}
.sample-card summary{cursor:pointer;list-style-position:inside;font-size:15px;color:var(--petit-accent);padding:12px;border-radius:9px;background:var(--petit-soft)}
.sample-card details[open] summary{margin-bottom:18px}.sample-card details p{font-size:16px;color:var(--petit-muted);margin:0;line-height:1.75}.sample-card details strong{font:30px Georgia,serif;color:var(--petit-ink);display:block;margin-bottom:10px}
.welcome-sample figcaption{font-size:14px;line-height:1.7;margin:20px 4px 0;color:#4d634c;text-align:center}
.welcome-page .public-footer{max-width:1200px;display:flex;align-items:center;justify-content:space-between;gap:24px;border-top:1px solid var(--petit-line);padding:24px 32px;margin:auto;font-size:13px}.welcome-page .public-footer p{margin:0;font-size:13px}
@media(max-width:850px){
 header{padding:20px 24px;gap:18px}.home{padding:0 24px;margin-top:32px}.home .learning-overview{grid-template-columns:1fr;gap:24px}.home .today{position:static}.home .river-section{padding-inline:12px}.home .mode-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .welcome-page .welcome{gap:32px;margin:40px auto 48px;grid-template-columns:1fr;padding:0 24px}.welcome-copy h1{font-size:clamp(42px,8vw,60px)}.welcome-sample{max-width:500px;width:100%;justify-self:center}.welcome-copy>p{max-width:560px}.welcome-page .public-footer{padding:24px;flex-wrap:wrap;gap:12px}
}
@media(max-width:500px){
 header{padding:18px 20px}header .brand{font-size:25px}header .brand img{width:32px;height:32px}header nav{width:100%;gap:4px}header nav a{flex:1;text-align:center;font-size:13px;padding:9px 10px}
 .home{padding:0 20px}.home .today{padding:24px}.home .mode-grid{grid-template-columns:1fr}.home .grammar-start{padding:20px}.home .river-section{padding-inline:0}.home .river-section>h2{margin-left:20px}.dashboard .panel{padding:20px}.dashboard .metrics{grid-template-columns:1fr}.dashboard .metric{padding:18px}.dashboard .metric strong{float:left;min-width:64px;margin:0 18px 0 0}.dashboard .metric span,.dashboard .metric small{font-size:13px}
 .welcome-page .welcome{padding:0 20px;gap:36px}.welcome-sample{padding:20px}.sample-card{padding:28px 20px}.sample-card h2{font-size:48px}.welcome-page .welcome form{padding:20px}.welcome-page .public-footer{padding:20px}.welcome-page header .sign-in{padding:8px 12px}
}
@media(prefers-reduced-motion:reduce){.home .mode{transition:none}}

/* Keep the account action legible and tappable when navigation wraps. */
header nav a.sign-out{flex:0 0 auto;min-height:44px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid var(--petit-line);box-sizing:border-box}
