/* Study zone styles */
.st-head { margin: 20px 0 22px; }
.st-tools { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 60px; }
.st-tools .g-pcard { border: 0; text-align: left; padding-top: 18px; cursor: pointer; display: grid; gap: 4px; align-content: start; }
.st-tools .g-pcard b { font-family: 'Fredoka', 'PhIcon'; font-size: 19px; }
.st-tools .g-pcard div:last-child { font-size: 14px; opacity: .85; }
.st-homechips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.st-homechips button { border: 0; background: rgba(255,255,255,.85); border-radius: 99px; padding: 7px 14px; font-weight: 800; font-size: 13.5px; color: var(--g-ink); cursor: pointer; }
.st-home2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 860px) { .st-home2 { grid-template-columns: 1fr; } }
.st-src { font-size: 13px; font-weight: 800; color: var(--g-ink2); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.st-mtag { background: #ffe1d6; color: #c8501f; border-radius: 99px; padding: 2px 9px; font-size: 11.5px; }
.g-qdots i.bad { background: #ff8b8b; }
.st-mixstats { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 16px; }
.st-mixstats span { background: rgba(255,255,255,.88); color: var(--g-ink); border-radius: 14px; padding: 8px 14px; font-weight: 700; }
.st-explain { margin-bottom: 60px; }
.st-boxes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 12px 0; }
.st-box { background: linear-gradient(180deg, #fff, var(--acc-t, #f3eefc)); border: 2px solid #ece6f5; border-radius: 14px; padding: 10px 6px; text-align: center; display: grid; }
.st-box small { font-size: 11px; font-weight: 700; color: var(--g-ink2); }
@media (max-width: 700px) { .st-boxes { grid-template-columns: repeat(4, 1fr); } }
.st-empty { text-align: center; padding: 40px; }
.st-mlist { display: grid; gap: 12px; margin-bottom: 60px; }
.st-mi { display: grid; gap: 8px; }
.st-q { font-size: 17px; }
.st-streak { margin-left: auto; background: #f6f1fd; border-radius: 99px; padding: 2px 10px; }
.st-ans { margin: 8px 0 4px; }
.st-pill { display: inline-block; border-radius: 99px; padding: 4px 12px; font-weight: 800; font-size: 13px; border: 0; }
.st-pill.ok { background: #dcf8e5; color: #1f7a39; } .st-pill.bad { background: #ffe3e3; color: #c43b3b; cursor: pointer; }
.st-exsetup { display: grid; gap: 12px; }
.st-exsetup .chip { background: rgba(255,255,255,.9); }
.st-timer { position: sticky; top: 8px; z-index: 5; display: flex; gap: 12px; align-items: center; justify-content: center; margin: 12px auto; width: max-content; background: #2b2140; color: #fff; border-radius: 99px; padding: 8px 18px; font-family: 'Fredoka', 'PhIcon'; font-size: 22px; font-weight: 600; }
.st-timer.low { background: #e04848; animation: gpulse 1s infinite; }
.st-timer .chip { font-size: 13px; }
.st-exres { display: grid; gap: 18px; margin: 20px 0 60px; }
.st-score { display: flex; gap: 20px; align-items: center; }
.st-ring { --p: 50; width: 120px; height: 120px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--t2) calc(var(--p) * 1%), #ece6f5 0); }
.st-ring b { width: 92px; height: 92px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-family: 'Fredoka', 'PhIcon'; font-size: 26px; }
.st-sw { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.st-sw > div { background: #faf8fd; border-radius: 16px; padding: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-content: start; }
.st-sw h3 { width: 100%; margin: 0 0 4px; }
.st-sw ul { margin: 0; padding-left: 18px; width: 100%; }
@media (max-width: 700px) { .st-sw { grid-template-columns: 1fr; } }
.st-bars { display: grid; gap: 8px; }
.st-bar { display: grid; grid-template-columns: minmax(120px, 1.4fr) 2fr 60px; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; }
.st-bar i { height: 14px; background: #f0ebf7; border-radius: 99px; overflow: hidden; } .st-bar em { display: block; height: 100%; border-radius: 99px; }
.st-hist { display: grid; gap: 8px; margin-bottom: 60px; }
.st-hrow { display: grid; grid-template-columns: 1fr 1fr 80px 70px; align-items: center; padding: 12px 16px; }
.st-form { display: grid; gap: 16px; margin-bottom: 20px; }
.st-form label { display: grid; gap: 8px; font-weight: 800; }
.st-form h3 { margin: 0; }
.st-err { color: #c43b3b; font-weight: 700; }
.st-plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-bottom: 60px; }
.st-day { display: grid; gap: 6px; align-content: start; }
.st-day.today { outline: 3px solid var(--t2); } .st-day.past { opacity: .6; }
.st-dh { display: flex; justify-content: space-between; align-items: center; }
.st-task { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 700; padding: 6px 0; }
.st-task span:last-child { cursor: pointer; } .st-task.done span:last-child { text-decoration: line-through; opacity: .55; }
.st-ck { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid #d9cfea; background: #fff; display: grid; place-items: center; font-weight: 800; color: #fff; cursor: pointer; font-size: 13px; }
.st-task.done .st-ck { background: #43c463; border-color: #43c463; }
.st-album { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 60px; }
.st-card { border: 0; border-radius: 22px; padding: 18px 12px; display: grid; justify-items: center; gap: 4px; text-align: center; background: linear-gradient(160deg, #fff, #f3eefc); box-shadow: 0 6px 0 #e3daf0; cursor: pointer; position: relative; min-height: 190px; align-content: center; }
.st-card b { font-family: 'Fredoka', 'PhIcon'; font-size: 17px; } .st-card small { font-size: 12px; font-weight: 700; color: var(--g-ink2); }
.st-cic { font-size: 52px; line-height: 1.1; }
.st-card.locked { background: #f1eef5; box-shadow: 0 6px 0 #e0dbe7; cursor: default; filter: grayscale(1); opacity: .7; }
.st-card.shiny { background: linear-gradient(135deg, #fff6d6, #ffe0f0, #e0f0ff); box-shadow: 0 6px 0 #f0c96a; }
.st-card.rare { background: linear-gradient(135deg, #e7dcff, #c9e9ff); box-shadow: 0 6px 0 #9f86e8; }
.st-rare { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 11px; font-weight: 800; }
.st-card.big { width: min(360px, 90vw); min-height: 380px; cursor: default; padding: 28px; }
.st-card.big .st-cic { font-size: 90px; } .st-card.big b { font-size: 26px; } .st-card.big p { font-weight: 600; }
.st-card.reveal { max-width: 360px; margin: 18px auto; cursor: default; animation: stflip .8s ease-out; }
.st-card.reveal .st-rare { position: static; margin-top: 6px; color: var(--t2); }
@keyframes stflip { from { transform: rotateY(90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.st-paper { background: #fff; border-radius: 18px; padding: 32px; box-shadow: var(--g-sh); margin-bottom: 60px; display: grid; gap: 18px; color: #1d1830; font-family: 'Nunito', sans-serif, 'PhIcon'; }
.st-rh { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 3px solid #1d1830; padding-bottom: 14px; }
.st-rh small { font-weight: 800; letter-spacing: .08em; color: #776f8a; } .st-rh h1 { margin: 4px 0; font-size: 34px; }
.st-rk { display: flex; gap: 16px; } .st-rk div { display: grid; text-align: center; } .st-rk b { font-family: 'Fredoka', 'PhIcon'; font-size: 24px; } .st-rk small { font-size: 11px; }
.st-rt { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.st-rt th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #776f8a; padding: 8px; border-bottom: 2px solid #ece6f5; }
.st-rt td { padding: 9px 8px; border-bottom: 1px solid #f0ebf6; }
.st-mini { display: inline-block; width: 80px; height: 9px; border-radius: 99px; background: #eee8f5; vertical-align: middle; overflow: hidden; } .st-mini i { display: block; height: 100%; background: #43c463; }
.st-r2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .st-r2 ul { padding-left: 18px; margin: 6px 0; }
.st-week { display: flex; gap: 10px; align-items: flex-end; height: 140px; }
.st-week > div { flex: 1; display: grid; justify-items: center; gap: 3px; align-content: end; height: 100%; }
.st-week i { width: 70%; max-width: 40px; background: linear-gradient(180deg, var(--t1), var(--t2)); border-radius: 8px 8px 3px 3px; }
.st-week small { font-size: 11px; font-weight: 700; } .st-week b { font-size: 11px; }
.st-sign { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; color: #776f8a; }
@media print { .g-topbar, .st-noprint, .ask-btn, .a11y-fab, .g-layer { display: none !important; } body.game { background: #fff !important; } .st-paper { box-shadow: none; padding: 0; } .st-plan { grid-template-columns: repeat(3, 1fr); } }
.st-class { display: grid; gap: 10px; }
.st-goal { margin: 0; font-weight: 700; font-size: 16px; }
.st-cbar { position: relative; height: 28px; border-radius: 99px; background: #f0ebf7; overflow: hidden; }
.st-cbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #ffc75f, #ff6f91); border-radius: 99px; transition: width .5s; }
.st-cbar span { position: relative; display: grid; place-items: center; height: 100%; font-weight: 800; font-size: 14px; }
.st-contrib { display: flex; flex-wrap: wrap; gap: 6px; }
.st-contrib span { display: inline-flex; align-items: center; gap: 5px; background: #faf8fd; border-radius: 99px; padding: 3px 10px 3px 3px; font-size: 13px; font-weight: 700; }
.st-contrib span.me { background: var(--acc-t, #ffe6ef); outline: 2px solid var(--t2); }
.st-hw { margin: 22px 0 6px; display: grid; gap: 8px; border: 3px solid #ffc75f; }
.st-note { background: #fffbe9; border-radius: 12px; padding: 10px 14px; font-weight: 600; margin: 0; }
.st-hwi { display: grid; grid-template-columns: 30px 1fr auto 24px; gap: 10px; align-items: center; border: 0; background: #faf8fd; border-radius: 14px; padding: 10px 14px; text-align: left; cursor: pointer; font-size: 15px; }
.st-hwi small { font-weight: 800; color: var(--g-ink2); } .st-hwi i { font-style: normal; font-weight: 800; }
.st-hwi.done { background: #e6f9ec; } .st-hwi.done i { color: #23803c; }
.st-hwpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.st-hwc { display: flex; gap: 10px; align-items: center; border: 2px solid #ece6f5; background: #fff; border-radius: 12px; padding: 9px 12px; text-align: left; font-weight: 700; font-size: 14px; cursor: pointer; }
.st-hwc .b { width: 22px; height: 22px; flex: none; border-radius: 6px; border: 2px solid #d9cfea; display: grid; place-items: center; color: #fff; font-size: 12px; }
.st-hwc.on { border-color: var(--t2); background: #fff3f7; } .st-hwc.on .b { background: var(--t2); border-color: var(--t2); }
.st-sw-row { display: flex !important; justify-content: space-between; align-items: center; gap: 16px; }
.st-sw-row > span { display: grid; } .st-sw-row small { font-weight: 600; color: var(--g-ink2); }
.st-toggle { width: 56px; height: 32px; border-radius: 99px; border: 0; background: #ddd4ea; position: relative; flex: none; cursor: pointer; }
.st-toggle i { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 2px 4px rgba(0,0,0,.15); }
.st-toggle.on { background: #43c463; } .st-toggle.on i { left: 28px; }
.st-preview { background: #faf8fd; border-radius: 14px; padding: 14px; font-size: 18px; margin: 0; }
/* step hints */
.gq-hints { display: grid; gap: 8px; }
.gq-hint { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; border-radius: 14px; padding: 10px 14px; font-size: 15px; animation: gfade .3s; }
.gq-hint.h1 { background: #fffbe0; } .gq-hint.h2 { background: #eaf4ff; } .gq-hint.h3 { background: #f1ecff; }
.gq-hl { font-weight: 800; white-space: nowrap; }
/* accessibility */
.a11y-fab { position: fixed; left: 16px; bottom: 16px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #2b2140; color: #fff; font-family: Georgia, serif, 'PhIcon'; font-weight: 700; font-size: 18px; box-shadow: 0 4px 12px rgba(0,0,0,.2); cursor: pointer; }
body.a11y-lexend, body.a11y-lexend * { font-family: 'Lexend', sans-serif, 'PhIcon' !important; letter-spacing: .01em; }
body.a11y-atkinson, body.a11y-atkinson * { font-family: 'Atkinson Hyperlegible', sans-serif, 'PhIcon' !important; letter-spacing: .02em; word-spacing: .08em; }
body.a11y-lexend p, body.a11y-atkinson p { line-height: 1.75; }
body.a11y-motion *, body.a11y-motion *::before, body.a11y-motion *::after { animation: none !important; transition: none !important; }
body.a11y-motion .g-confetti, body.a11y-motion canvas.g-confetti { display: none !important; }
body.a11y-contrast { --g-ink2: #2b2140; }
body.a11y-contrast .g-card, body.a11y-contrast .gq-opt, body.a11y-contrast .chip, body.a11y-contrast .g-wcard { border: 2px solid #1d1830 !important; }
body.a11y-contrast .g-sub, body.a11y-contrast small { color: #1d1830 !important; }
body.a11y-read { cursor: help; }
.a11y-reading { outline: 3px solid #ffc75f !important; outline-offset: 2px; border-radius: 6px; background: #fff8d6 !important; }
/* maths steps */
.ms-work { display: grid; gap: 10px; margin-bottom: 60px; }
.ms-line { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 14px; background: #faf8fd; }
.ms-line b { font-family: 'Fredoka', 'PhIcon'; font-size: 22px; }
.ms-line .inp { font-family: 'Fredoka', 'PhIcon'; font-size: 20px; }
.ms-n { font-size: 12px; font-weight: 800; color: var(--g-ink2); text-transform: uppercase; }
.ms-line.ok { background: #e6f9ec; } .ms-line.bad { background: #ffeaea; }
.ms-fb { grid-column: 2; font-weight: 700; font-size: 14px; }
.ms-line.start { background: #fff3d9; }
/* practicals */
.pr-head { display: flex; gap: 14px; align-items: center; } .pr-head h2 { margin: 4px 0 0; font-size: 24px; }
.pr-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 14px 0; }
.pr-step { border: 0; border-radius: 14px; padding: 10px 6px; background: #f3eff9; font-weight: 800; font-size: 13px; display: grid; justify-items: center; gap: 4px; color: var(--g-ink2); }
.pr-step b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; }
.pr-step.on { background: var(--t2); color: #fff; } .pr-step.on b { color: var(--t2); } .pr-step.done { background: #dcf8e5; color: #23803c; }
.pr-body { display: grid; gap: 14px; margin-bottom: 60px; } .pr-body h3 { margin: 0; }
.pr-vars { display: grid; gap: 8px; }
.pr-var { display: grid; grid-template-columns: 210px 1fr; gap: 10px; align-items: center; background: #faf8fd; border-radius: 14px; padding: 10px 12px; }
.pr-var.bad { background: #ffeaea; }
@media (max-width: 700px) { .pr-var { grid-template-columns: 1fr; } .pr-steps { grid-template-columns: repeat(5, 1fr); font-size: 11px; } }
.pr-table td, .pr-table th { text-align: center; }
.pr-graph { background: #fff; border-radius: 14px; border: 2px solid #ece6f5; max-width: 620px; }
.pr-concl { background: #f2fbf4; border-radius: 16px; padding: 14px 18px; } .pr-concl p { margin: 6px 0; }
/* writing lab */
.wl-task { background: #fff3d9; border-radius: 14px; padding: 12px 16px; font-size: 17px; }
.wl-ta { font-family: 'Nunito', sans-serif, 'PhIcon'; font-size: 17px; line-height: 1.6; resize: vertical; min-height: 200px; }
.wl-live { display: flex; flex-wrap: wrap; gap: 8px; } .wl-live span { background: #f6f1fd; border-radius: 99px; padding: 4px 12px; font-size: 13px; font-weight: 800; } .wl-live span.bad { background: #ffe3e3; color: #c43b3b; }
.wl-fb { display: grid; gap: 16px; margin-bottom: 20px; } .wl-fb h3 { margin: 0 0 6px; }
.wl-scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; } .wl-scores > div { background: #faf8fd; border-radius: 14px; padding: 10px; display: grid; gap: 6px; font-weight: 800; font-size: 14px; }
.wl-dots { display: flex; gap: 4px; } .wl-dots i { width: 16px; height: 16px; border-radius: 50%; background: #e5ddef; } .wl-dots i.on { background: var(--t2); }
@media (max-width: 700px) { .wl-scores { grid-template-columns: 1fr 1fr; } }
.wl-preview { background: #fffdf5; border-radius: 14px; padding: 12px 16px; line-height: 1.7; white-space: pre-wrap; }
mark.wl-conn { background: #dcf8e5; border-radius: 4px; padding: 0 2px; font-weight: 700; }
/* conversation */
.cv-box { display: grid; gap: 12px; margin-bottom: 60px; }
.cv-head { display: flex; gap: 12px; align-items: center; } .cv-head > div { flex: 1; display: grid; } .cv-head small { font-weight: 700; color: var(--g-ink2); }
.cv-chat { min-height: 300px; max-height: 440px; }
.cv-corr { display: block; margin-top: 6px; background: rgba(255,255,255,.92); color: #b04a1c; border-radius: 10px; padding: 5px 9px; font-size: 13px; }
.cv-corr em { font-style: normal; color: #6a5f80; } .cv-ok { display: block; margin-top: 4px; font-size: 12px; opacity: .9; }
.cv-ideas { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.cv-input { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .cv-input .inp { flex: 1; min-width: 200px; }
.cv-rec { background: #e04848 !important; animation: gpulse 1s infinite; }
.cv-typing { display: inline-flex; gap: 4px; } .cv-typing i { width: 8px; height: 8px; border-radius: 50%; background: #b9add0; animation: gtype 1s infinite; } .cv-typing i:nth-child(2) { animation-delay: .2s; } .cv-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes gtype { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
/* python */
.py-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; margin-bottom: 16px; }
@media (max-width: 860px) { .py-wrap { grid-template-columns: 1fr; } }
.py-ed, .py-out { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.py-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #2b2140; color: #fff; font-family: ui-monospace, Menlo, monospace, 'PhIcon'; font-size: 13px; }
.py-code { display: flex; background: #1e1b2e; min-height: 360px; flex: 1; }
.py-ln { margin: 0; padding: 14px 8px; color: #6d6488; text-align: right; font: 15px/1.6 ui-monospace, Menlo, monospace; user-select: none; background: #18152a; }
.py-code textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; color: #f0eaff; padding: 14px; font: 15px/1.6 ui-monospace, Menlo, monospace; white-space: pre; tab-size: 4; }
.py-term { margin: 0; flex: 1; min-height: 300px; max-height: 420px; overflow: auto; background: #0f0d1a; color: #c8f7d0; padding: 14px; font: 14.5px/1.6 ui-monospace, Menlo, monospace; white-space: pre-wrap; }
.py-term .u { color: #ffd479; } .py-term .p { color: #9fb3ff; } .py-term .e { color: #ff9b9b; }
.py-in { display: flex; gap: 8px; padding: 10px; background: #1e1b2e; } .py-in .inp { flex: 1; font-family: ui-monospace, Menlo, monospace, 'PhIcon'; }
.py-ch { display: grid; gap: 4px; }
.py-ch + * { margin-bottom: 60px; }

/* keep floating buttons clear of content */
body.game #root { padding-bottom: 90px; }
@media (max-width: 760px) {
  .a11y-fab { width: 40px; height: 40px; font-size: 15px; left: 10px; bottom: 10px; }
  .ask-btn.fab { right: 10px; bottom: 10px; padding: 8px 12px; font-size: 13px; }
}

/* French flashcard: keep text inside the card */
.fr-card { height: 250px; }
.fr-face { padding: 18px 22px; overflow: hidden; text-align: center; box-sizing: border-box; width: 100%; }
.fr-face > * { max-width: 100%; overflow-wrap: anywhere; }
.fr-face b { font-size: clamp(22px, 3.2vw, 34px) !important; line-height: 1.15; }
.fr-face .fr-emo { font-size: 72px; }
.fr-face .fr-emo.sm { font-size: 40px; }
