/* Public learning pages share the site's navigation and retain the arcade inside play. */
.site-header .nav { max-width:none; padding:0; flex-wrap:nowrap; }
.site-header a { text-decoration:none; }
.site-header .brand { font-family:Rag,Arial,sans-serif; }
.footer-learn { color:inherit; margin-inline:24px; }
.learn-callout { padding-block:56px; }
.learn-callout h2 { max-width:760px; font-size:clamp(28px,4vw,44px); }
.learn-callout p { max-width:680px; line-height:1.7; }
.learn-callout a { display:inline-block; margin-top:16px; color:#3838d5; font-weight:700; }
.learn-breadcrumb { margin-bottom:20px; font:14px Rag,Arial,sans-serif; color:#62586e; }
.learn-breadcrumb a { color:#3838d5; text-underline-offset:4px; }
body.playing .learn-breadcrumb { display:none; }
.learn-eyebrow,.learn-label { font:700 12px Rag,Arial,sans-serif; text-transform:uppercase; letter-spacing:.08em; color:#3838d5; }
.learn-product h2 { font:700 clamp(25px,3vw,36px)/1.15 Rag,Arial,sans-serif; letter-spacing:-.03em; }
.learn-product { padding:30px; border-radius:16px; background:#f1eff8; margin:36px 0; }
.learn-product p { max-width:720px; font:17px/1.7 Rag,Arial,sans-serif; }
.learn-product a { color:#3838d5; text-underline-offset:4px; }
.learn-actions { display:flex; align-items:center; gap:24px; flex-wrap:wrap; margin:24px 0; }
.learn-actions .learn-button { display:inline-flex; align-items:center; justify-content:center; min-height:48px; background:#211d28; color:#fffdf7; padding:14px 20px; border-radius:7px; text-decoration:none; font:400 14px Rag,Arial,sans-serif; }
.completion-links { background:#eef4e5; border:1px solid #cfddbd; padding:12px 16px; border-radius:10px; margin:12px 0; font:14px/1.5 Rag,Arial,sans-serif; }
.completion-links p { margin:5px 0; }
.completion-links a { color:#3838d5; }
.completion-links[hidden] { display:none; }
.learn-hub { margin:0; color:#211d28; background:#fffdf7; font-family:Rag,Arial,sans-serif; }
.learn-hub * { box-sizing:border-box; }
.learn-main { width:min(1100px,calc(100% - 48px)); margin:64px auto; }
.learn-hub h1 { font-size:clamp(36px,5vw,64px); line-height:1.05; letter-spacing:-.045em; margin:18px 0; }
.learn-lead { max-width:760px; font-size:19px; line-height:1.7; color:#62586e; }
.lesson-card { display:grid; grid-template-columns:1fr 1fr; overflow:hidden; color:inherit; text-decoration:none; border:1px solid #d8d1df; border-radius:20px; background:#f1effb; margin:40px 0; }
.lesson-card img { width:100%; height:100%; object-fit:cover; }
.lesson-card div { padding:32px; }
.lesson-card h2 { font-size:30px; letter-spacing:-.03em; }
.lesson-card p,.hub-details p { font:17px/1.7 Rag,Arial,sans-serif; }
.lesson-card strong { color:#3838d5; text-decoration:underline; text-underline-offset:5px; }
.lesson-card:hover { border-color:#7772f2; }
.hub-details { max-width:850px; margin:48px 0; }
.learn-footer { display:flex; flex-wrap:wrap; gap:32px; background:#211d28; padding:32px max(24px,calc((100% - 1100px)/2)); }
.learn-footer a { color:#fffdf7; }
a:focus-visible { outline:2px solid #3838d5; outline-offset:5px; }
@media(max-width:760px) {
 .lesson-card { grid-template-columns:1fr; }
 .learn-product { padding:22px; }
 .learn-main { margin-block:32px; }
 .lesson-card img { height:auto; }
}

/* Portrait reading stays at a natural text size without shrinking the game. */
@media (max-width:760px) and (orientation:portrait) {
 body.entry-locked main { padding:20px 20px 28px; }
 .learn-breadcrumb { margin-bottom:16px; font-size:14px; }
 .intro h1 { font-size:clamp(30px,8vw,36px); line-height:1.12; letter-spacing:-.035em; }
 .intro .game-intro { font-size:16px; line-height:1.55; max-width:36ch; }
 body.rotation-required .entry-gate { padding:24px 20px; }
 body.rotation-required .entry-card { display:block; padding:0; text-align:center; }
 body.rotation-required .rotate-phone { margin:4px auto 22px; }
 body.rotation-required .entry-card h2 { font-size:24px; line-height:1.3; letter-spacing:-.6px; }
 body.rotation-required #entry-description { font-size:16px; line-height:1.6; margin:12px 0; }
 body.rotation-required #entry-hint { font-size:14px; line-height:1.6; margin-top:16px; }
 .lesson-footer { flex-direction:column; align-items:flex-start; gap:10px; font-size:13px; line-height:1.6; }
 .learn-product h2 { font-size:28px; line-height:1.2; }
 .learn-product p { font-size:16px; line-height:1.7; }
 .reading:not(.learn-product) { font-size:14px; line-height:1.7; }
 .learn-actions { align-items:stretch; gap:12px; }
 .learn-actions a { display:flex; align-items:center; justify-content:center; min-height:44px; padding:10px 14px; }
 .learn-main { width:calc(100% - 40px); }
 .lesson-card div { padding:22px; }
}

/* Learning index: scoped to the hub so the game keeps its existing layout. */
.learn-hub .learn-main { width:min(1100px,calc(100% - 64px)); margin:0 auto; padding:48px 0 40px; }
.hub-intro { max-width:820px; }
.hub-brand { display:flex; align-items:center; gap:10px; margin:0 0 24px; font-size:19px; font-weight:700; letter-spacing:-.03em; }
.hub-brand span { background:#d9fb68; color:#272331; padding:6px 12px; border-radius:7px; }
.learn-hub h1 { font-size:clamp(38px,4.4vw,58px); line-height:1.08; margin:0; letter-spacing:-.045em; }
.learn-hub .learn-lead { max-width:640px; margin:18px 0 0; font-size:18px; line-height:1.6; color:#5b5360; }
.lesson-index { margin-top:36px; }
.index-heading { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:14px; }
.index-heading h2 { font-size:18px; margin:0; letter-spacing:-.02em; }
.index-heading > span { font:12px ui-monospace,SFMono-Regular,monospace; color:#62586e; }
.hub-lesson { display:grid; grid-template-columns:1.1fr 1fr; color:inherit; text-decoration:none; border:1px solid #d5c9f3; border-radius:18px; overflow:hidden; background:#f3effc; }
.hub-lesson h3 a { color:inherit; text-decoration:none; }
.hub-lesson h3 a:hover { color:#3838d5; text-decoration:underline; text-underline-offset:4px; }
.hub-lesson-copy { padding:28px; min-width:0; }
.hub-topic { color:#3838d5; font:700 12px/1.5 Rag,Arial,sans-serif; }
.hub-lesson h3 { margin:12px 0; font-size:30px; letter-spacing:-.035em; line-height:1.15; }
.hub-lesson p { margin:0; font:16px/1.6 Rag,Arial,sans-serif; color:#51485f; max-width:48ch; }
.hub-topics { display:flex; flex-wrap:wrap; gap:7px; margin:18px 0 24px; padding:0; list-style:none; }
.hub-topics li { background:#fffdf7; border:1px solid #d5c9f3; border-radius:6px; padding:6px 9px; font-size:12px; color:#211d28; }
.hub-lesson-bottom { display:flex; align-items:center; flex-wrap:wrap; gap:14px; }
.hub-open {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:12px 18px;
  border:1px solid #211d28;
  border-radius:7px;
  background:#211d28;
  color:#fffdf7;
  font-size:14px;
  font-weight:400;
  line-height:1.3;
  text-align:center;
  text-decoration:none;
}
.hub-open:hover,.learn-actions .learn-button:hover { background:#3838d5; border-color:#3838d5; }
.hub-open:focus-visible { outline:2px solid #3838d5; outline-offset:4px; }
.hub-lesson-bottom > span:last-child { color:#62586e; font-size:12px; }
.hub-lesson-art { display:flex; align-items:center; background:#e7def8; padding:22px; border-left:1px solid #d5c9f3; }
.hub-lesson-art img { display:block; width:100%; height:auto; border-radius:10px; box-shadow:0 8px 24px #40307812; }
.hub-reading-note { font-size:14px; color:#62586e; margin:14px 0 0; }
.hub-product { display:flex; gap:16px; align-items:center; justify-content:space-between; padding:28px 0 0; border-top:1px solid #d4cec6; margin-top:32px; font-size:15px; }
.hub-product p { margin:0; color:#62586e; }
.hub-product a { color:#3838d5; text-underline-offset:4px; }
@media(max-width:760px) {
 .learn-hub .learn-main { width:calc(100% - 40px); padding:28px 0 32px; }
 .hub-brand { font-size:17px; margin-bottom:20px; }
 .learn-hub .learn-lead { font-size:16px; }
 .lesson-index { margin-top:28px; }
 .hub-lesson { grid-template-columns:1fr; }
 .hub-lesson-copy { padding:22px; }
 .hub-lesson h3 { font-size:27px; }
 .hub-lesson-art { border-left:0; border-top:1px solid #d5c9f3; padding:18px; }
 .hub-product { flex-direction:column; align-items:flex-start; gap:10px; }
}
@media(prefers-reduced-motion:reduce) { .hub-lesson { transition:none; } }

.onboarding-preview{width:100%;padding:18px;color:#211d28}.preview-label{font-size:12px;color:#3838d5}.onboarding-preview h3{font-family:inherit;font-size:27px;line-height:1.25;margin:14px 0 24px}.preview-task{display:flex;gap:16px;align-items:center;padding:13px 0;border-top:1px solid #cec2ea;font-size:16px}.preview-task>span{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#d9fb68;font-size:12px;color:#211d28}.preview-task small{display:block;margin-top:4px;font-size:12px;color:#554c62}@media(max-width:570px){.onboarding-preview{padding:8px}.onboarding-preview h3{font-size:24px}}

.lesson-entry-links { display:flex; flex-wrap:wrap; gap:24px; }

.learn-skip { position:fixed; top:-100px; left:20px; z-index:1000; background:#211d28; color:#fffdf7; padding:14px 20px; border-radius:7px; }
.learn-skip:focus { top:12px; }
.lesson-recap li { margin-block:12px; }
.lesson-depth { margin-block:32px; }
.lesson-depth > summary { cursor:pointer; color:#3838d5; text-underline-offset:4px; }
.lesson-depth[open] > summary { margin-bottom:20px; }
@media(max-width:760px) { .reading.lesson-recap,.reading.lesson-depth { font-size:16px; } }

.hub-open,.learn-actions .learn-button { gap:12px; }
.public-cta-arrow { color:#d9fb68; font-size:18px; line-height:1; }
