/* Reference geometry with the approved CHILLS palette. Scoped to the learning surface. */
:root{--chalk:#fffefa;--matte:#191919;--mustard:#c69b26;--quiet:#64625b;--rule:#deddd7;--wash:#f4f3ed;--pale:#f5eccf}
body{background:var(--sp-bg, #fffefa)}.study-mode>.header,.study-mode>.footer{display:none}.study-mode #main{width:100%;max-width:394px;padding:0;margin:0 auto;background:var(--sp-bg, #fffefa);min-height:100dvh}.study-mode{background:#e8e7e1}.study-mode h1,.study-mode h2,.study-mode h3{letter-spacing:0;font-weight:500}.sp-frame{min-height:100dvh;position:relative;display:flex;flex-direction:column}.sp-head{position:sticky;top:0;z-index:5;background:var(--sp-fg, #191919);color:var(--sp-bg, #fffefa);box-shadow:0 2px 3px #0001}.sp-toolbar{min-height:76px;display:flex;gap:4px;align-items:center;padding:8px 12px}.sp-title{flex:1;min-width:0;padding:0 4px}.sp-title h1{font-size:21px;line-height:1.15}.sp-title p{font-size:15px;color:#d2cec2;line-height:1.35;margin-top:4px}.sp-icon{width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;background:none;border:0;color:inherit;padding:9px;text-decoration:none;flex:none}.sp-icon svg{width:24px;height:24px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}.sp-tabs{display:flex;height:48px}.sp-tabs a{display:flex;flex:1;align-items:center;justify-content:center;color:var(--sp-bg, #fffefa);border-bottom:3px solid transparent}.sp-tabs a[aria-current=page]{border-color:var(--mustard);color:var(--mustard)}.sp-tabs svg{height:24px;width:24px;stroke:currentColor;fill:none;stroke-width:1.8}.sp-list{margin:0;padding:0;list-style:none}.sp-row{display:flex;align-items:center;gap:16px;width:100%;min-height:73px;padding:13px 16px;border:0;border-bottom:1px solid var(--rule);color:var(--sp-fg, #191919);background:var(--sp-bg, #fffefa);text-decoration:none;text-align:left}.sp-row .sp-copy{flex:1;min-width:0}.sp-row h2,.sp-row strong{font-size:20px;font-weight:450;display:block;line-height:1.25}.sp-row p,.sp-row small{font-size:14px;color:var(--quiet);margin:4px 0 0;line-height:1.35;display:block}.sp-circle{width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;flex:none;border-radius:50%;background:#e8e7e1;font-size:17px;color:var(--sp-fg, #191919)}.sp-circle.started{background:var(--mustard)}.sp-circle svg{width:19px;height:19px;stroke:currentColor;stroke-width:1.6;fill:none}.sp-row>.sp-icon{color:#785c12;padding:5px}.sp-percent{font-size:23px;color:var(--quiet);white-space:nowrap}.sp-section{background:var(--mustard);padding:10px 16px;font-size:15px;color:var(--sp-fg, #191919)}.sp-section.dark{background:var(--sp-fg, #191919);color:var(--sp-bg, #fffefa)}.sp-like{display:flex;align-items:center;gap:16px;background:var(--mustard);padding:13px 16px;border:0;width:100%;text-align:left;color:var(--sp-fg, #191919);min-height:76px}.sp-like strong{font-size:21px;font-weight:450;display:block}.sp-like small{display:block;font-size:13px;color:var(--sp-fg, #191919)}.sp-like svg{width:32px;height:32px;stroke:currentColor;fill:none;stroke-width:1.7}.sp-sticky-like{position:sticky;bottom:0;margin-top:auto}.sp-module-label{font-size:22px!important;text-align:center;color:var(--quiet);padding:26px 18px 22px;line-height:1.3!important}.sp-note{font-size:13px;color:var(--quiet);padding:18px 16px;line-height:1.5}.sp-note a{text-decoration:underline}.sp-menu .sp-row{min-height:73px}.sp-menu{flex:1}.sp-caption{display:block;font-size:14px;color:var(--quiet);padding:12px 16px}.sp-bottom{border-top:5px solid var(--mustard);height:calc(8px + env(safe-area-inset-bottom));background:var(--sp-fg, #191919);margin-top:auto}.sp-work{height:100dvh;min-height:620px;display:flex;flex-direction:column}.sp-work .sp-toolbar{min-height:64px;padding:7px 5px;gap:0}.sp-work .sp-title h1{font-size:17px}.sp-work .sp-title p{font-size:12px}.sp-work .sp-icon{width:39px;padding:8px}.sp-counts{display:flex;gap:6px;font-size:13px;white-space:nowrap;align-items:center;color:var(--sp-bg, #fffefa)}.sp-counts b{color:var(--mustard);font-weight:500}.sp-question{padding:10px 10px;font-size:19px;line-height:1.4;min-height:47px;background:var(--sp-bg, #fffefa);margin:0}.sp-answer-strip{background:var(--pale);min-height:49px;display:flex;align-items:center;gap:6px;padding:6px 10px;color:var(--sp-fg, #191919)}.sp-answer-text{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.4;font-size:19px}.sp-answer-text.empty{color:var(--quiet);border:0;padding:0;border-radius:0}.sp-answer-strip .sp-icon{width:40px;color:var(--sp-fg, #191919)}.sp-options{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:1fr;flex:1;min-height:270px;padding:16px 10px;gap:0 10px}.sp-options button{border:0;background:transparent;min-height:52px;padding:12px 5px;font-size:21px;font-weight:400;color:var(--sp-fg, #191919);overflow-wrap:anywhere}.sp-options button:disabled{opacity:.22}.sp-options button:hover:not(:disabled){background:var(--wash)}.sp-controls{display:flex;align-items:center;justify-content:center;gap:10px;padding:5px 12px 10px;flex-wrap:wrap}.sp-action{min-height:44px;padding:9px 18px;border:1px solid var(--sp-fg, #191919);background:var(--sp-fg, #191919);color:var(--sp-bg, #fffefa);border-radius:24px;font-size:15px;text-decoration:none;text-align:center;cursor:pointer}.sp-action.light{background:var(--sp-bg, #fffefa);color:var(--sp-fg, #191919);border-color:var(--rule)}.sp-action.gold{background:var(--mustard);color:var(--sp-fg, #191919);border-color:var(--mustard)}.sp-matrix{display:grid;grid-template-columns:repeat(20,1fr);grid-template-rows:repeat(5,2px);grid-auto-flow:column;gap:1px 2px;margin:6px 8px 8px}.sp-matrix span{background:#cecdc6}.sp-matrix .good{background:var(--mustard)}.sp-matrix .bad{background:var(--sp-fg, #191919)}.sp-matrix .current{outline:1px solid #625e55}.sp-result-band{padding:11px 10px;font-size:20px;line-height:1.4;overflow-wrap:anywhere}.sp-result-band.bad{background:var(--sp-fg, #191919);color:var(--sp-bg, #fffefa)}.sp-result-band.good{background:var(--pale);color:var(--sp-fg, #191919)}.sp-result-band small{display:block;color:inherit;font-size:12px;margin-bottom:5px}.sp-result-band mark{background:var(--mustard);color:var(--sp-fg, #191919);padding:0 2px}.sp-next{flex:1;background:none;border:0;color:var(--quiet);font-size:15px;padding:26px 18px;min-height:160px}.sp-explain{font-size:14px;color:var(--quiet);padding:16px}.sp-word-prompt{font-size:29px;text-align:center;padding:32px 16px 14px}.sp-context{padding:9px 10px;background:var(--wash);font-size:17px;color:var(--quiet)}.sp-context strong{color:var(--sp-fg, #191919);font-weight:500}.sp-percent-bar{text-align:center;font-size:23px;color:var(--quiet);padding:8px 8px 12px}.sp-percent-bar progress{display:block;width:100%;height:4px;margin:12px 0 0;accent-color:var(--mustard)}.sp-free{background:var(--mustard);padding:10px;text-align:center;font-size:15px}.sp-theory{padding:15px 10px 28px;background:var(--wash);flex:1}.sp-theory h2{font-size:26px;font-weight:600;margin:0 0 24px}.sp-theory h3{font-size:20px;font-weight:600;margin:24px 0 14px}.sp-theory p{font-size:18px;line-height:1.55;margin:18px 0}.sp-theory table{width:100%;border-collapse:collapse;font-size:13px;line-height:1.5;background:var(--sp-bg, #fffefa)}.sp-theory th,.sp-theory td{border:1px solid #bfbdb5;padding:9px 5px;overflow-wrap:anywhere;vertical-align:top}.sp-theory th{font-weight:550}.sp-theory td:nth-child(3){background:var(--pale)}.sp-theory .sp-tense{background:var(--sp-fg, #191919);color:var(--sp-bg, #fffefa);font-weight:500}.sp-theory mark{background:var(--mustard);padding:0 2px}.sp-dialog{color:var(--sp-fg, #191919);background:var(--sp-bg, #fffefa);border:0;border-radius:3px;box-shadow:0 12px 40px #0004;padding:24px;width:calc(100% - 40px);max-width:370px;max-height:85dvh;overflow:auto}.sp-dialog::backdrop{background:#0009}.sp-dialog h2{font-size:23px;display:flex;align-items:center;gap:12px}.sp-dialog h2 svg{width:28px;height:28px;stroke:#785c12;fill:none;stroke-width:1.8}.sp-dialog p{margin:18px 0;line-height:1.6}.sp-dialog .sp-close{display:block;margin:18px 0 0 auto;border:0;background:none;color:#785c12;padding:12px;font-size:16px;min-height:44px}.sp-dialog textarea{width:100%;font:inherit;min-height:120px;padding:10px;border:1px solid #888}.sp-dialog .sp-dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.sp-search{padding:10px 16px;border-bottom:1px solid var(--rule)}.sp-search label{display:block;font-size:13px;margin-bottom:6px}.sp-search input{width:100%;border:1px solid #aaa;background:var(--sp-bg, #fffefa);min-height:44px;padding:9px 12px;font:inherit}.sp-word-row{min-height:58px;padding:8px 10px;gap:12px}.sp-word-row .sp-circle{width:29px;height:29px;border:2px dashed #c7c5b9;background:none}.sp-word-row .sp-circle.started{border-style:solid;background:var(--mustard)}.sp-word-row strong{font-size:21px}.sp-word-row p{font-size:14px;margin-top:1px}.sp-word-row input{width:22px;height:22px;accent-color:var(--mustard);margin:11px}.sp-category-hero{padding:26px 20px;background:var(--sp-fg, #191919);color:var(--sp-bg, #fffefa);display:flex;align-items:center;gap:18px;min-height:108px}.sp-category-hero h2{font-size:25px}.sp-category-hero svg{width:38px;height:38px;stroke:var(--mustard);fill:none;stroke-width:1.5}.sp-offers{padding:18px 16px;display:flex;flex-direction:column;gap:16px;flex:1}.sp-offer{background:var(--sp-bg, #fffefa);border:2px solid #e5dbc0;border-radius:30px;padding:17px 15px;text-align:left;min-height:106px;position:relative;color:#685019;cursor:pointer}.sp-offer[aria-checked=true]{border-color:var(--mustard);background:#fffdf5}.sp-offer strong{display:block;font-size:21px;font-weight:500;padding-right:28px}.sp-offer small{display:block;font-size:14px;color:#685019;margin-top:3px}.sp-offer .sp-price{font-size:20px;display:block;margin-top:5px}.sp-offer .sp-tick{position:absolute;right:15px;top:calc(50% - 13px);font-size:19px;background:var(--mustard);color:var(--sp-fg, #191919);width:27px;height:27px;text-align:center;border-radius:50%}.sp-offer-note{text-align:center;font-size:14px;padding:0 22px 20px;color:var(--quiet)}.sp-summary{padding:28px 18px;flex:1}.sp-summary .sp-large{font-size:55px;font-weight:350;margin:24px 0}.sp-summary h2{font-size:26px}.sp-summary p{margin:18px 0}.sp-progress-row{padding:14px 16px;border-bottom:1px solid var(--rule)}.sp-progress-row progress{accent-color:var(--mustard);height:6px;width:100%}.sp-record{padding:12px;background:var(--wash)}.sp-record audio{width:100%;margin-top:10px}.sp-empty{padding:28px 18px;font-size:16px;line-height:1.6}.sp-empty a{display:block;margin-top:15px}.sp-frame button:focus-visible,.sp-frame a:focus-visible,.sp-frame input:focus-visible{outline:3px solid #80621c;outline-offset:-3px}.sp-head a:focus-visible,.sp-head button:focus-visible{outline-color:var(--mustard)}.sp-catalog-brand{font-weight:800!important;letter-spacing:-.06em!important;font-size:24px!important}.sp-count-line{display:flex;justify-content:space-between;gap:10px}.sp-inline-error{color:var(--sp-fg, #191919);background:var(--pale);padding:12px 16px;border-left:4px solid var(--mustard)}.sp-input-answer{display:flex;padding:14px;gap:10px}.sp-input-answer input{width:100%;min-width:0;font:inherit;border:1px solid #aaa;padding:10px}.sp-legal{padding:16px;font-size:12px;color:var(--quiet);text-align:center}.sp-legal a{margin-inline:7px}.sp-secondary{margin:12px 0}.sp-frame a:hover{filter:brightness(.98)}
@media(min-width:700px){.study-mode #main{box-shadow:0 0 0 1px #d8d6cb}.study-mode{padding:24px 0}.sp-frame{min-height:calc(100dvh - 48px)}.sp-work{height:calc(100dvh - 48px)}}
@media(max-width:359px){.sp-title h1{font-size:18px}.sp-counts{gap:3px;font-size:11px}.sp-work .sp-icon{width:34px}.sp-options button{font-size:19px}.sp-toolbar{padding-inline:6px}.sp-row{gap:12px}.sp-work .sp-title h1{font-size:15px}}
@media(prefers-reduced-motion:reduce){.sp-frame *{scroll-behavior:auto}}

body:not(.study-mode){--paper:#fffefa;--surface:#fffefa;--line:#deddd7}.study-mode .skip{z-index:30}

.sp-work .sp-icon{width:44px;min-width:44px}.sp-theory td:nth-child(3){background:var(--sp-bg, #fffefa)}.sp-theory td:nth-child(2){background:var(--pale)}.sp-theory th.sp-tense{writing-mode:vertical-rl;text-orientation:upright;padding:10px 4px;font-size:12px}.sp-dialog table{font-size:12px;width:100%;border-collapse:collapse}.sp-dialog td,.sp-dialog th{border:1px solid #bbb;padding:5px}.sp-dialog mark{background:var(--mustard)}

body:not(.study-mode) .form-status{color:var(--sp-fg, #191919)}
/* Feedback edition: sentence first, condition below; CHILLS teaching guides. */
.study-mode .sp-sentence{display:block;font-weight:750;line-height:1.4}
.study-mode .sp-instruction{display:block;margin-top:8px;font-size:15px;font-weight:400;line-height:1.5;color:#57544b}
.study-mode .sp-context-note{padding-left:10px;border-left:3px solid var(--mustard)}
.study-mode .sp-rich-guide{padding:20px 16px 28px;overflow-wrap:anywhere}
.study-mode .sp-rich-guide h2{font-size:26px;line-height:1.2;margin:4px 0 18px}
.study-mode .sp-eyebrow{font-size:13px;font-weight:700;color:#765b12;margin:0;text-transform:uppercase;letter-spacing:.06em}
.sp-rich-guide .sp-guide-intro{background:#f5eccf;border-left:4px solid #c69b26;padding:12px 14px;margin:0 0 18px}
.sp-rich-guide .sp-guide-intro p{margin:0;font-size:17px;line-height:1.55}
.sp-guide-nav{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0 26px}
.sp-guide-jump{border:1px solid #c69b26;border-radius:6px;background:#fffefa;color:#191919;min-height:44px;padding:9px 13px;font:inherit;font-size:15px;font-weight:600;cursor:pointer}
.sp-guide-section{scroll-margin-top:94px;margin:26px 0}
.sp-rich-guide .sp-guide-section>h3{font-size:21px;border-bottom:3px solid #c69b26;padding-bottom:9px;margin-bottom:16px}
.sp-rich-guide h4{font-size:17px;line-height:1.4;margin:0 0 8px}
.sp-rich-guide p{font-size:16px;line-height:1.65}
.sp-rule{padding:14px 0;border-bottom:1px solid #deddd7}
.sp-rule p{margin:0}
.sp-table-wrap{overflow-x:auto;margin:18px 0;border:1px solid #deddd7;border-radius:6px;background:#fffefa}
.sp-rich-guide .sp-guide-table{border-collapse:collapse;width:100%;table-layout:fixed;margin:0;font-size:14px;line-height:1.5}
.sp-guide-table caption{text-align:left;padding:12px;background:#f5eccf;color:#191919;font-weight:700;font-size:16px}
.sp-rich-guide .sp-guide-table th,.sp-rich-guide .sp-guide-table td{padding:10px 8px;border:1px solid #deddd7;vertical-align:top;overflow-wrap:anywhere;background:#fffefa;text-align:left}
.sp-rich-guide .sp-guide-table thead th{background:#191919;color:#fffefa;font-weight:600}
.sp-rich-guide .sp-guide-table tbody th{background:#f4f3ed;font-weight:600}
.sp-guide-callout{background:#f5eccf;padding:16px;border-left:4px solid #c69b26}
.sp-guide-callout p{margin:0}
.sp-guide-example{padding:14px;background:#fffefa;border-left:3px solid #c69b26;margin:12px 0;font-size:17px;line-height:1.55}
.sp-guide-example p{margin:6px 0 0;color:#57544b}
.sp-self-check{background:#fffefa;border:1px solid #c69b26;border-radius:6px;padding:14px}
.sp-self-check summary{cursor:pointer;font-weight:650;min-height:30px;line-height:1.5}
.sp-self-check[open] summary{margin-bottom:14px}
.sp-guide-footer{display:flex;flex-wrap:wrap;gap:10px;padding-top:12px}
.sp-review-badge{background:#191919;color:#e5c56a;margin:0;padding:12px 16px;font-size:14px;line-height:1.5}
.sp-review-link{display:block;padding:14px 16px;background:#f5eccf;color:#191919;font-weight:650;text-decoration:underline}
.sp-review-filter{display:block;font-weight:650;margin:20px 0 10px}
.sp-review-filter input{display:block;width:100%;box-sizing:border-box;margin-top:8px;padding:12px;border:1px solid #64625b;background:#fffefa;color:#191919;font:inherit}
.sp-review-item{padding:14px 0;border-bottom:1px solid #deddd7}
.sp-review-item summary{font-weight:650;cursor:pointer;line-height:1.5}
.sp-review-item audio{width:100%;margin-top:10px}
.sp-review-item .sp-question{padding:12px 0}
.sp-dialog .sp-rich-guide{max-height:65vh;overflow-y:auto;padding-right:8px}
@media(max-width:359px){.study-mode .sp-rich-guide{padding:16px 10px}.sp-rich-guide .sp-guide-table{font-size:13px}.sp-rich-guide .sp-guide-table td,.sp-rich-guide .sp-guide-table th{padding:8px 5px}}
.sp-conjugation{border:1px solid #c69b26;border-radius:6px;background:#fffefa;margin:14px 0 24px}
.sp-conjugation>summary{padding:14px;min-height:44px;cursor:pointer;font-weight:650;line-height:1.5;background:#f5eccf;color:#191919}
.sp-conjugation .sp-table-wrap{margin:0;border:0;border-radius:0}
.sp-rich-guide .sp-formation-table th:first-child{width:27%}
.sp-rich-guide .sp-formation-table td{font-size:15px;line-height:1.65}
.sp-rich-guide .sp-formation-table br{display:block;content:"";margin-top:8px}

/* Study preferences and compact mobile exercise controls. Brand colours stay fixed. */
:root{--sp-bg:#fffefa;--sp-fg:#191919}
.study-mode{color:var(--sp-fg)}
.sp-head,.sp-section.dark,.sp-category-hero,.sp-result-band.bad,.sp-work-tools,.sp-bottom{background:#191919;color:#fffefa}
.sp-tabs a,.sp-counts{color:#fffefa}
.sp-action:not(.light),.sp-action.gold,.sp-circle.started,.sp-section:not(.dark),.sp-like,.sp-free,.sp-result-band mark,.sp-theory mark,.sp-dialog mark{color:#191919}
.sp-action:not(.light):not(.gold){background:var(--sp-fg);color:var(--sp-bg)}
.sp-guide-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;flex-wrap:nowrap}
.sp-guide-jump{padding:9px 5px;white-space:nowrap}
.sp-work{height:auto;min-height:100dvh}
.sp-work .sp-options{min-height:260px}
.sp-work-tools{display:flex;align-items:stretch;position:sticky;bottom:0;z-index:4;padding:6px 4px calc(6px + env(safe-area-inset-bottom));gap:4px;border-top:3px solid #c69b26;margin-top:auto}
.sp-tool{display:flex;flex:1;min-width:0;min-height:54px;align-items:center;justify-content:center;flex-direction:column;gap:4px;border:0;background:none;color:#fffefa;font:inherit;font-size:12px;padding:4px 2px;cursor:pointer}
.sp-tool svg{height:23px;width:23px;stroke:currentColor;fill:none;stroke-width:1.8}
.sp-work-tools+.sp-bottom{display:none}
.sp-setting{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 16px;border-bottom:1px solid var(--rule)}
.sp-setting strong{display:block;font-size:18px;font-weight:650;line-height:1.4}
.sp-setting small{display:block;font-size:14px;color:var(--quiet);line-height:1.5;margin-top:6px}
.sp-setting input[role=switch]{appearance:none;flex:none;width:48px;height:28px;border:2px solid var(--quiet);border-radius:20px;background:var(--wash);cursor:pointer;position:relative}
.sp-setting input[role=switch]::after{content:'';position:absolute;left:3px;top:3px;width:18px;height:18px;background:var(--quiet);border-radius:50%}
.sp-setting input[role=switch]:checked{background:#c69b26;border-color:#c69b26}
.sp-setting input[role=switch]:checked::after{left:23px;background:#191919}
.sp-setting:has(select){flex-wrap:wrap}
.sp-setting select{min-height:44px;max-width:100%;font:inherit;padding:8px;border:1px solid var(--quiet);border-radius:4px;background:var(--sp-bg);color:var(--sp-fg)}
.sp-frame select:focus-visible,.sp-dialog :is(button,textarea):focus-visible{outline:3px solid #c69b26;outline-offset:2px}
.sp-dialog .sp-dialog-actions{flex-wrap:wrap}
.sp-dialog textarea,.sp-input-answer input{background:var(--sp-bg);color:var(--sp-fg)}
.sp-work .sp-title h1{font-weight:650}
.sp-work .sp-head .sp-icon{width:44px;min-width:44px}
.sp-work .sp-options button{min-height:60px}
@media(min-height:760px){.sp-work .sp-options{min-height:370px}}
@media(min-width:700px){.sp-work{min-height:calc(100dvh - 48px)}}
@media(max-height:550px){.sp-work .sp-head{position:static}.sp-work-tools{position:static}.sp-work .sp-options{min-height:220px}}
:root[data-study-theme=dark]{--sp-bg:#191919;--sp-fg:#fffefa;--quiet:#c5c2b8;--rule:#49473f;--wash:#252525;--pale:#38311f}
[data-study-theme=dark] .study-mode{background:#111}
[data-study-theme=dark] .study-mode #main{box-shadow:0 0 0 1px #49473f}
[data-study-theme=dark] :is(.sp-instruction,.sp-guide-example p){color:#c5c2b8}
[data-study-theme=dark] :is(.sp-eyebrow,.sp-row>.sp-icon,.sp-dialog .sp-close,.sp-dialog h2 svg){color:#e5c56a}
[data-study-theme=dark] :is(.sp-guide-jump,.sp-table-wrap,.sp-guide-example,.sp-conjugation,.sp-rich-guide .sp-guide-table td,.sp-rich-guide .sp-guide-table th,.sp-review-filter input){background:#252525;color:#fffefa;border-color:#49473f}
[data-study-theme=dark] :is(.sp-guide-intro,.sp-guide-callout,.sp-guide-table caption,.sp-conjugation>summary,.sp-review-link){background:#38311f;color:#fffefa}
[data-study-theme=dark] .sp-rich-guide .sp-guide-table thead th{background:#191919;color:#fffefa}
[data-study-theme=dark] .sp-rich-guide .sp-guide-table tbody th{background:#30302b}
[data-study-theme=dark] :is(.sp-rule,.sp-review-item){border-color:#49473f}
[data-study-theme=dark] .sp-circle:not(.started){background:#49473f;color:#fffefa}
[data-study-theme=dark] .sp-matrix span{background:#49473f}
[data-study-theme=dark] .sp-matrix .good{background:#c69b26}
[data-study-theme=dark] .sp-matrix .bad{background:#fffefa}
[data-study-theme=dark] .sp-matrix .current{outline-color:#e5c56a}
[data-study-theme=dark] .sp-offer{color:#e5c56a;background:#252525;border-color:#786b46}
[data-study-theme=dark] .sp-offer small{color:#e5c56a}
[data-study-theme=dark] .sp-offer[aria-checked=true]{background:#38311f;border-color:#c69b26}

/* Responsive Study workspace: desktop navigation and readable exercise column. */
.sp-desktop-nav{display:none}.sp-tabs a{gap:8px;text-decoration:none}.sp-tabs a span{font-size:14px}
.study-mode .sp-row{cursor:pointer}.study-mode a.sp-row:hover,.study-mode button.sp-row:hover{background:var(--sp-wash,#f5eccf)}
.study-mode .sp-row:disabled{cursor:default}.study-mode .sp-controls{flex-wrap:wrap}
.study-mode .sp-dialog{max-width:min(720px,calc(100vw - 24px));max-height:85dvh;overflow:auto}
@media(min-width:768px){
 .study-mode{padding:0;background:var(--sp-bg,#fffefa)}
 .study-mode #main{max-width:1360px;min-height:100dvh;box-shadow:none;padding:24px;display:block}
 .sp-frame{min-height:calc(100dvh - 48px);border:1px solid var(--rule);border-radius:12px;overflow:clip}
 .sp-head{position:relative;box-shadow:none}.sp-toolbar{padding:16px 24px}.sp-title h1{font-size:26px}
 .sp-frame .sp-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:24px;align-content:start}
 .sp-list>.sp-row{border:1px solid var(--rule);border-radius:8px;min-height:100px;padding:20px;align-items:center}
 .sp-list>.sp-row h2,.sp-list>.sp-row strong{font-size:19px;font-weight:600}
 .sp-frame .sp-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:24px;flex:0}
 .sp-menu>.sp-row{border:1px solid var(--rule);border-radius:8px;min-height:96px}
 .sp-menu>.sp-row:first-child{grid-column:1/-1;background:var(--pale)}
 .sp-module-label{text-align:left!important;padding:24px!important;margin:0!important}
 .sp-frame>.sp-controls{margin-top:0!important;padding:16px 24px;justify-content:flex-start}
 .sp-note{padding:16px 24px;max-width:80ch}.sp-review-badge{padding:12px 24px}.sp-review-link{margin:0 24px;padding:12px;border:1px solid var(--rule);border-radius:6px;width:fit-content}
 .sp-rich-guide{max-width:900px;width:100%;margin:auto;padding:28px!important}.sp-summary{max-width:850px;width:100%;margin:auto}
 .sp-work{height:auto;min-height:calc(100dvh - 48px);max-width:860px;margin:auto;overflow:visible}
 .sp-work>.sp-question,.sp-work>.sp-context,.sp-work>.sp-word-prompt{font-size:24px;padding:28px 32px;line-height:1.5}
 .sp-work>.sp-options{padding:20px 32px;gap:12px}.sp-options button{min-height:48px;font-size:19px}
 .sp-work>.sp-answer-strip{margin:0 32px;padding:16px}.sp-work>.sp-controls{padding:16px 32px}
 .sp-work>.sp-matrix{max-width:600px;width:calc(100% - 64px);margin:24px auto}.sp-work-tools{margin-top:24px}
 .sp-work>.sp-result-band,.sp-work>.sp-explain{padding:22px 32px}.sp-next{min-height:52px}
 .sp-work .sp-bottom{margin-top:auto}.sp-offers{max-width:760px;width:100%;margin:auto;flex:0}
 .sp-frame>.sp-search{padding:24px}.sp-frame #sp-word-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .sp-frame .sp-word-row{min-width:0}.sp-word-row strong{overflow-wrap:anywhere}
 .sp-progress-row{padding:18px 28px}.sp-settings{max-width:800px;width:100%;margin:auto}
}
@media(min-width:1100px){
 .study-mode #main{padding:28px 28px 28px 268px;position:relative}
 .sp-desktop-nav{display:flex;flex-direction:column;width:216px;position:fixed;top:28px;bottom:28px;margin-left:-240px;border-right:1px solid var(--rule);padding-right:20px;overflow:auto}
 .sp-brand{font-size:34px;font-weight:850;letter-spacing:-2px;color:var(--sp-fg,#191919);text-decoration:none;padding:8px 12px 24px}.sp-brand small{display:block;letter-spacing:0;font-size:16px;font-weight:500}
 .sp-desktop-nav nav{display:grid;gap:5px}.sp-desktop-nav nav a,.sp-nav-bottom a{display:flex;align-items:center;gap:10px;min-height:46px;border-radius:7px;padding:10px 12px;color:var(--sp-fg,#191919);text-decoration:none;font-size:14px;line-height:1.3}
 .sp-desktop-nav a.selected{background:var(--mustard);color:#191919;font-weight:650}.sp-desktop-nav a:hover{background:var(--pale);color:#191919}
 .sp-desktop-nav svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6}
 .sp-nav-bottom{margin-top:auto;padding-top:32px}.sp-nav-bottom a:last-child{font-size:12px}
 .sp-desktop-nav a:focus-visible{outline:3px solid #80621c;outline-offset:1px}
}
.study-mode .sp-work .sp-options{flex:0;min-height:0;grid-auto-rows:minmax(60px,auto);gap:12px;margin:12px 0}
.study-mode .sp-work .sp-options button{border:1px solid var(--rule);border-radius:8px;background:var(--sp-bg,#fffefa);padding:16px;text-align:center;cursor:pointer}
.study-mode .sp-work .sp-options button:hover:not(:disabled){border-color:#80621c;background:var(--pale);color:#191919}
.study-mode .sp-work .sp-options button:disabled{cursor:default}
.study-mode .sp-work .sp-matrix{grid-template-rows:repeat(5,4px);margin-block:24px}
.study-mode .sp-work .sp-work-tools{margin-top:auto}

/* Listening: recognisable, bounded icon and a compact labelled control. */
.sp-action.sp-listen-button{display:inline-flex;align-items:center;justify-content:center;gap:12px;border-radius:12px;min-height:52px;padding:12px 20px;font-size:17px;line-height:1.3;max-width:100%}
.sp-listen-button svg{display:block;flex:0 0 26px;width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sp-listen-button span{min-width:0;text-align:left}
.sp-listen-button:hover{filter:brightness(.96)}

/* Answer choices fill mobile width; sentences keep a readable line on desktop. */
.study-mode .sp-work .sp-options{flex:0 0 auto;grid-template-columns:repeat(2,minmax(0,1fr))}
.study-mode .sp-work .sp-options button{width:100%;min-width:0;line-height:1.45}
.study-mode .sp-work .sp-options-sentences{grid-template-columns:minmax(0,1fr)}
.study-mode .sp-work .sp-options-sentences button{text-align:left}
@media(max-width:767px){
 .study-mode #main{max-width:none}
 .study-mode .sp-work .sp-options{grid-template-columns:minmax(0,1fr);padding:12px 10px;gap:10px;margin:8px 0;grid-auto-rows:minmax(56px,auto)}
 .study-mode .sp-work .sp-options button{padding:14px 16px;min-height:56px;font-size:18px}
 .sp-input-answer{flex-direction:column;padding:12px 10px}
 .sp-input-answer input,.sp-input-answer button{width:100%;min-height:48px}
}

/* Polyglot: stable shuffled two-column answers, full-width mastery. */
.study-mode .sp-work .sp-options,.study-mode .sp-work .sp-options.sp-options-sentences{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px 16px;margin:8px 0;grid-auto-rows:minmax(52px,auto);align-content:start}
.study-mode .sp-work .sp-options button{min-height:52px;width:100%;font-size:18px;line-height:1.35;padding:12px 10px;text-align:center;overflow-wrap:anywhere}
.sp-mastery{width:calc(100% - 32px);margin:20px 16px 16px;flex:0 0 auto}.sp-mastery>div{display:flex;justify-content:space-between;gap:12px;font-size:14px;margin-bottom:8px}.sp-mastery progress{display:block;width:100%;height:12px;accent-color:#c69b26}.sp-unlock{margin:16px;padding:20px;border:1px solid #d1c8b8;border-radius:12px;background:var(--sp-paper,#fffefa)}.sp-unlock p{font-size:16px;line-height:1.5}.sp-unlock input{box-sizing:border-box;width:100%;padding:12px;margin:10px 0;border:1px solid #aaa;border-radius:8px}.sp-purchase-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}.sp-unlock .sp-controls{flex-wrap:wrap;padding:12px 0}.sp-unlock .sp-action{min-height:44px}
@media(max-width:380px){.study-mode .sp-work .sp-options button{font-size:16px}.sp-mastery>div{flex-wrap:wrap}}
/* CHILLS English: vocabulary preparation and independent mastery */
.sp-vocabulary{padding:24px}.sp-vocab-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:24px 0}.sp-vocab-grid article{border:1px solid var(--sp-line,#dedbd2);border-radius:8px;padding:20px}.sp-vocab-grid h2{font-size:23px;margin:0 0 8px}.sp-vocab-grid p{margin:0 0 12px}.sp-vocab-grid strong,.sp-vocab-grid small{display:block;line-height:1.6}.sp-support{padding:12px 18px;margin-top:18px;border:1px solid #d8d2c5;border-radius:7px;background:#f4f2ec}.sp-support-button{border:0;background:transparent;color:inherit;text-decoration:underline;text-underline-offset:4px;padding:8px 0;cursor:pointer;font:inherit}.sp-records{display:grid;gap:10px;margin:20px 0;padding:16px;border:1px solid #d8d2c5;border-radius:8px}.sp-mastered{color:#2e624b}.sp-support small{display:block;color:#625f57}@media(max-width:700px){.sp-vocab-grid{grid-template-columns:1fr}.sp-vocabulary{padding:18px}}[data-study-theme=dark] .sp-support{background:#242421;color:#fffefa}[data-study-theme=dark] .sp-support small{color:#c6c1b8}
.study-mode .sp-mastery{box-sizing:border-box;width:100%;padding:10px 6px;margin:12px 0 6px;flex:0 0 auto}
.study-mode .sp-mastery>.sp-matrix{display:grid;width:100%;grid-template-columns:repeat(20,minmax(0,1fr));grid-template-rows:none;grid-auto-flow:row;grid-auto-rows:7px;gap:2px;margin:0;font-size:0}
.study-mode .sp-matrix span{display:block;min-width:0;border-radius:1px;background:#cecdc6}
.study-mode .sp-matrix .good{background:var(--mustard)}
.study-mode .sp-matrix .bad{background:#191919;box-shadow:inset 0 -2px #625e55}
.study-mode .sp-matrix .current{outline:1px solid #80621c;outline-offset:1px}
@media(min-width:900px){.study-mode .sp-mastery>.sp-matrix{grid-auto-rows:9px}}
