:root{--green:#214e3f;--green-dark:#173e31;--ink:#233b33;--muted:#617268;--paper:#f8f9f5;--line:#dfe5dc;--accent:#d7e8a7;--white:#fff;--radius:15px;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--ink);font-size:16px;background:var(--paper)}*{box-sizing:border-box}body{margin:0}button,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}button:focus-visible,textarea:focus-visible{outline:3px solid #79a785;outline-offset:3px}button{transition:background .15s,color .15s;border:0}button:hover:not(:disabled){filter:brightness(.95)}[hidden]{display:none!important}.shell{display:flex;min-height:100dvh}aside{width:268px;position:fixed;inset:0 auto 0 0;background:var(--green);color:#f3f7ed;display:flex;flex-direction:column;padding:32px 22px;z-index:5}.brand{display:flex;align-items:center;gap:12px;font-size:19px;letter-spacing:-.4px;margin-bottom:36px}.brand-mark{width:46px;height:46px;background:var(--accent);color:var(--green);border-radius:13px;display:grid;place-items:center;font-family:Georgia,serif;font-size:36px;font-weight:bold;padding-bottom:5px}.brand small{display:block;font-size:12px;letter-spacing:1.8px;margin-top:3px;color:#ceded4}.primary,.secondary{padding:12px 18px;border-radius:11px;background:var(--green);color:white;font-size:14px;font-weight:650}.secondary{background:#eef2e8;color:var(--green);border:1px solid var(--line)}.new-chat{background:#f1f6e9;color:var(--green);text-align:left;width:100%;font-size:15px}.sidebar-label{font-size:13px;color:#c9dacc;margin:32px 8px 13px}nav{display:grid;gap:5px}nav button{color:#ecf1e8;background:transparent;text-align:left;padding:11px 9px;display:flex;gap:12px;border-radius:9px;font-size:14px}nav button:hover:not(:disabled){background:#335e4e}nav .topic-icon{width:20px;text-align:center;color:#d9e8ac}.tutor-note{margin-top:auto;padding:23px 10px 5px}.tutor-note span{font-size:30px;color:var(--accent)}.tutor-note h3{font-size:15px;font-weight:550;margin:12px 0 8px}.tutor-note p{font-size:14px;color:#c9dacc;line-height:1.65;margin:0}.plain{background:none;color:inherit}.help-side{text-align:left;font-size:13px;color:#d1dfd5;margin-top:26px;padding:10px}main{margin-left:268px;width:calc(100% - 268px);height:100dvh;display:flex;flex-direction:column}header{height:88px;min-height:88px;padding:0 38px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px}.header-title{display:flex;gap:14px;align-items:center}.header-title b{font-size:16px;font-weight:600}.header-title small{display:block;color:var(--muted);font-size:12px;margin-top:4px}.header-actions{display:flex;align-items:center;gap:14px}.status{border:1px solid #d2e0c6;border-radius:30px;color:#48653c;font-size:12px;background:#edf3e6;padding:7px 12px}.icon{border:1px solid var(--line);background:transparent;color:var(--green);width:36px;height:36px;display:grid;place-items:center;border-radius:50%;font-size:18px}.mobile{display:none}.chat-scroll{flex:1;overflow:auto;scroll-behavior:auto;overflow-anchor:none;padding:0 32px}.chat-scroll>section,.chat-scroll>#messages{width:min(100%,var(--content-width));margin:0 auto}#welcome{padding:58px 0 32px}.eyebrow{font-size:12px;letter-spacing:2px;display:flex;gap:12px;align-items:center;color:#597459}.eyebrow span{font-size:24px;color:var(--green)}h1{font-family:Georgia,serif;font-size:clamp(42px,4.5vw,58px);font-weight:normal;line-height:1.08;letter-spacing:-1.5px;margin:23px 0 18px}h1 em{font-weight:normal;color:#5f7654}.intro{line-height:1.75;color:var(--muted);margin-bottom:28px}.starters{display:grid;grid-template-columns:1fr 1fr;gap:11px}.starter{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);padding:19px 20px;text-align:left;min-height:94px;color:var(--ink)}.starter b{display:block;font-size:15px;font-weight:600;line-height:1.45}.starter small{display:block;font-size:13px;color:var(--muted);margin-top:7px}.welcome-note{font-size:12px;color:var(--muted);line-height:1.6;margin-top:20px}.composer-wrap{padding:16px 32px 15px;background:var(--paper);border-top:1px solid transparent}.composer-inner{max-width:var(--content-width);margin:auto}.learning-modes{display:flex;align-items:center;gap:5px;margin-bottom:12px}.mode{padding:7px 13px;background:transparent;color:var(--muted);border-radius:8px;font-size:13px}.mode.active{background:#e5ecd9;color:var(--green);font-weight:650}.composer{border:1px solid #c7d4c2;border-radius:17px;background:white;padding:12px 15px;box-shadow:0 5px 18px #213e3010}.composer:focus-within{border-color:#74916a}.composer textarea{display:block;width:100%;border:0;background:none;resize:none;padding:4px 2px;line-height:1.6;max-height:160px;min-height:56px;color:var(--ink)}.composer textarea:focus{outline:0}.composer textarea::placeholder{color:#8b998b}.composer-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px}.composer-bottom>div{display:flex;align-items:center;gap:8px}.composer-bottom small{font-size:12px;color:#8a9689}.send{padding:9px 16px;border-radius:9px;background:var(--green);color:white;font-size:14px}.stop{font-size:13px;background:#eef1e8;color:var(--green);padding:9px;border-radius:9px}.error{background:#fcece5;color:#8a3e22;padding:11px 14px;border-radius:10px;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;font-size:14px}.error button{background:transparent;color:inherit;font-size:24px}#messages{padding:28px 0 15px}.message{margin-bottom:26px;display:flex;gap:13px;align-items:flex-start}.avatar{min-width:32px;width:32px;height:32px;background:var(--green);color:#e5efc9;border-radius:10px;display:grid;place-items:center;font-family:Georgia,serif;font-size:22px}.message-content{max-width:calc(100% - 45px);flex:1}.message.user{justify-content:flex-end;margin-bottom:27px}.message.user .message-content{flex:0 1 auto;background:#e7eedb;border-radius:17px 17px 4px 17px;padding:12px 17px;white-space:pre-wrap;overflow-wrap:anywhere}.message-meta{font-size:12px;color:var(--muted);margin:4px 0 11px;display:flex;gap:10px;align-items:center}.answer-text{font-size:16px;line-height:1.8;overflow-wrap:anywhere}.answer-text p{margin:0 0 15px;white-space:pre-wrap}.answer-text strong{font-weight:650}.answer-text p:last-child{margin-bottom:0}.sources{display:flex;flex-wrap:wrap;gap:6px;margin-top:16px}.source-chip{background:white;border:1px solid var(--line);border-radius:8px;font-size:12px;color:var(--green);padding:7px 10px;text-align:left}.message-actions{display:flex;gap:8px;margin-top:12px}.copy{padding:5px 8px;font-size:12px;background:transparent;color:var(--muted);border-radius:6px}.followups{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.followup{border:1px solid #d4deca;border-radius:9px;padding:8px 12px;background:#f0f4e9;color:var(--green);font-size:13px;text-align:left;line-height:1.4}.loading{color:var(--muted);font-size:14px;padding:8px 0;animation:pulse 1.5s infinite}@keyframes pulse{50%{opacity:.55}}.notice{margin:14px 0 0;color:#755830;background:#fbf3df;padding:9px 12px;border-radius:8px;font-size:13px;line-height:1.5}.quiz{background:white;border:1px solid var(--line);border-radius:14px;padding:19px;margin-top:17px}.quiz-question{font-weight:550;line-height:1.6;margin:0 0 15px}.quiz-options{display:grid;gap:8px}.quiz-option{text-align:left;padding:11px 13px;border-radius:9px;border:1px solid var(--line);background:#f9faf5;color:var(--ink);font-size:14px;line-height:1.5}.quiz-option.correct{background:#e4f1dc;border-color:#87b97c;opacity:1}.quiz-option.wrong{background:#fbe9e3;border-color:#d89a84;opacity:1}.quiz-result{font-size:14px;line-height:1.7;margin:15px 0 0}.quiz-result.good{color:#365d2a}.quiz-result.bad{color:#7d412f}dialog{border:1px solid var(--line);border-radius:20px;background:var(--paper);color:var(--ink);padding:28px;max-width:600px;width:calc(100% - 32px);max-height:85dvh;overflow:auto;box-shadow:0 20px 90px #16352b35}dialog::backdrop{background:#14291f66;backdrop-filter:blur(3px)}.dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}h2{font-family:Georgia,serif;font-size:28px;font-weight:normal;margin:0;line-height:1.25}dialog h3{font-size:16px;margin:25px 0 7px}dialog p{font-size:15px;line-height:1.75}dialog .primary{margin-top:20px}.dialog-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}.dialog-actions .primary{margin:0}.source-label{font-size:13px;color:var(--muted)}.caveat{padding:11px 14px;background:#edf1e2;border-radius:10px;font-size:13px!important}.scrim{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(min-height:880px){#welcome{padding-top:85px}}@media(max-width:1100px){aside{width:230px;padding:28px 17px}main{margin-left:230px;width:calc(100% - 230px)}header{padding:0 26px}.chat-scroll,.composer-wrap{padding-left:26px;padding-right:26px}}@media(max-width:760px){aside{transform:translateX(-100%);width:268px;transition:transform .2s}body.menu-open aside{transform:translateX(0)}main{margin:0;width:100%}.mobile{display:grid}header{min-height:75px;height:75px;padding:0 18px;gap:12px}.header-title small{display:none}.header-actions{gap:8px}.status{padding:6px 9px;font-size:12px}.header-title b{font-size:14px}.scrim{display:block;position:fixed;inset:0;background:#183a2666;z-index:4}#welcome{padding-top:36px}.chat-scroll{padding:0 20px}.composer-wrap{padding:12px 17px 12px}h1{font-size:46px}.intro br{display:none}.starters{gap:9px}.starter{padding:15px;min-height:105px}.starter b{font-size:14px}.composer-bottom small{font-size:12px;max-width:65%}.tutor-note{padding-top:20px}.message{gap:10px}.answer-text{font-size:16px}.message-content{max-width:calc(100% - 42px)}dialog{padding:22px}.header-actions .icon{width:32px;height:32px}#download{width:auto;padding:0 7px;font-size:12px;border-radius:8px}.welcome-note{margin-bottom:0}}@media(max-width:390px){header{padding:0 12px}.status{display:none}.chat-scroll{padding:0 16px}.starter{padding:12px}.composer-bottom small{max-width:54%}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
aside{overflow-y:auto}.brand{flex-shrink:0;margin-bottom:25px}.brand small{font-size:12px;letter-spacing:.5px}.brand-mark{padding:0;flex-shrink:0}.brand-mark::before,.avatar::before{content:'';display:block;width:42px;height:42px;background:var(--green);mask:url('/logo-k.png') center/contain no-repeat;-webkit-mask:url('/logo-k.png') center/contain no-repeat}.avatar::before{width:30px;height:30px;background:var(--accent)}.new-chat{flex-shrink:0}.course-switch{display:flex;gap:4px;padding:4px;background:#173d31;border-radius:11px;margin-top:20px;flex-shrink:0}.course-switch button{flex:1;background:transparent;color:#d5e5d9;padding:9px;border-radius:8px;font-size:14px}.course-switch button.selected{background:var(--accent);color:var(--green);font-weight:650}.sidebar-label{margin-top:22px}nav{flex-shrink:0}.catalog-button{background:#315e4d;color:#edf4e8;font-size:13px;text-align:left;padding:11px;border-radius:9px;margin:12px 0 0;flex-shrink:0}.tutor-note{padding-top:20px}.tutoring-link{color:#dce9d5;font-size:14px;text-decoration:none;margin:24px 9px 0;line-height:1.6}.tutoring-link:hover{text-decoration:underline}.help-side{margin-top:5px;flex-shrink:0}h1{font-size:clamp(38px,4.4vw,54px)}h1 small{display:block;font-family:system-ui,sans-serif;letter-spacing:.3px;font-size:18px;color:#64765a;margin-top:13px;font-weight:400}#download{width:36px;height:36px;border-radius:10px;padding:7px}#download svg{width:20px;height:20px}#download:hover{background:#e6eedc}.difficulty-wrap{display:flex;align-items:center;gap:8px;margin-left:auto;color:var(--muted);font-size:13px}.difficulty-wrap select{font:inherit;color:var(--green);background:white;border:1px solid #cbd6c1;border-radius:8px;padding:7px}.difficulty-wrap select:focus-visible{outline:3px solid #79a785}.quiz-badge{font-size:12px;color:#657459;margin-bottom:12px;line-height:1.5}.quiz-result{white-space:pre-wrap}.contact-action{display:inline-block;margin:14px 0 3px;background:var(--green);color:white;padding:11px 16px;border-radius:10px;text-decoration:none;font-size:14px;font-weight:550}.contact-action:hover{background:var(--green-dark)}.catalog-courses{display:flex;gap:8px}.catalog-courses .selected{background:var(--green);color:white}.catalog-item{display:block;width:100%;text-align:left;border:1px solid var(--line);background:white;color:var(--ink);padding:12px 14px;border-radius:9px;margin:7px 0;font-size:14px;line-height:1.5}dialog a{color:var(--green)}@media(max-width:760px){.header-title small{display:block;font-size:12px}.brand{margin-bottom:20px}#download{width:32px;height:32px;padding:6px}.learning-modes{flex-wrap:wrap;row-gap:8px}.difficulty-wrap{font-size:12px;gap:5px}.difficulty-wrap select{max-width:112px;padding:6px}h1{font-size:39px}.tutor-note{padding-top:15px}.sidebar-label{margin-top:18px}nav button{padding:9px}.catalog-button{margin-top:8px}.tutoring-link{margin-top:18px}}@media(max-height:800px){.tutor-note{display:none}.brand{margin-bottom:20px}aside{padding-top:24px;padding-bottom:16px}}
.study-table{max-width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:10px;margin:15px 0 20px;background:white}.study-table table{border-collapse:collapse;min-width:420px;width:100%;font-size:14px;line-height:1.6}.study-table th,.study-table td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;white-space:normal}.study-table th{background:#edf2e6;font-weight:600}.study-table tr:last-child td{border-bottom:0}
.catalog-search{display:block;font-size:14px;margin:20px 0 8px}.catalog-search input{display:block;width:100%;font:inherit;padding:11px 13px;color:var(--ink);border:1px solid var(--line);border-radius:9px;background:white;margin-top:7px}.catalog-search input:focus-visible{outline:3px solid #79a785;outline-offset:2px}.related-topics{display:flex;flex-wrap:wrap;gap:7px;margin-top:15px}
.practice-panel{border:1px solid #d4deca;background:#eef3e7;border-radius:12px;padding:12px 14px;margin-bottom:12px}.practice-select-row{display:flex;align-items:flex-end;gap:12px}.practice-select-row label{flex:1;min-width:0;font-size:12px;color:var(--muted)}.practice-select-row select{display:block;width:100%;max-width:100%;margin-top:5px;padding:9px 30px 9px 10px;border:1px solid #c7d4c2;border-radius:8px;background:white;color:var(--ink);font:inherit;font-size:14px;text-overflow:ellipsis}.practice-select-row .primary{white-space:nowrap;padding:10px 14px}.practice-panel p{font-size:12px;color:var(--muted);margin:9px 0 0;line-height:1.5}.quiz-progress{font-size:12px;color:var(--muted);margin:4px 0 12px}.topic-practice-action{margin-top:14px;background:#e5ecd9;color:var(--green);border:1px solid #cbd9be;border-radius:9px;padding:10px 13px;font-size:13px;font-weight:600;text-align:left}.catalog-item small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:4px}.learning-modes{flex-wrap:wrap}select:focus-visible{outline:3px solid #79a785;outline-offset:3px}@media(max-width:760px){.practice-select-row{align-items:stretch;flex-direction:column;gap:8px}.practice-select-row .primary{align-self:flex-start;padding:8px 12px}.practice-panel{padding:10px 12px}.learning-modes{row-gap:7px}}
aside{overflow-y:auto}

/* Source-based study sheets and test progression. */
.practice-select-row .assessment-label{flex:0 1 190px}.practice-select-row select{max-width:100%;width:100%}.practice-select-row .primary{flex-shrink:0}.cheatsheet{margin:22px 0;padding:18px;border:1px solid #d3decf;border-radius:14px;background:#fff;line-height:1.6;min-width:0}.cheatsheet h3{font-size:19px;margin:0 0 15px;line-height:1.35;color:var(--green)}.sheet-table{max-width:100%;overflow-x:auto;border:1px solid #cbd7c7;border-radius:9px;margin:14px 0}.sheet-table:focus-visible{outline:3px solid #79a785;outline-offset:2px}.sheet-table table{border-collapse:collapse;width:100%;min-width:440px;font-size:14px;line-height:1.5}.sheet-table caption{text-align:left;font-weight:650;background:#f3f6ed;padding:12px}.sheet-table thead th{background:var(--green);color:white;vertical-align:top}.sheet-table th,.sheet-table td{padding:11px 12px;text-align:left;border-bottom:1px solid #ffffff88;vertical-align:top}.sheet-table tbody th{font-weight:600}.tone-blue{background:#dcecf7;color:#193f59}.tone-amber,.tone-orange{background:#f9e2b7;color:#644418}.tone-green{background:#d9ebc9;color:#2a4a24}.tone-total{background:#214e3f;color:#fff;font-weight:650}.tone-white{background:#f8faf6}.sheet-steps{padding-left:22px;font-size:14px;margin:17px 0}.sheet-steps li{padding:3px 0}.sheet-example{background:#f0f5e7;padding:12px;border-left:3px solid #70934f;border-radius:6px;font-size:14px;white-space:pre-wrap}.sheet-note{color:#5d6a5c;font-size:13px}.sheet-source{font-size:12px;color:#6b7868;margin:12px 0 0}.quiz-sheet{margin-top:15px}.quiz-sheet summary{font-size:14px;color:var(--green);cursor:pointer;font-weight:600}.quiz-sheet .cheatsheet{margin-top:12px}select:focus-visible{outline:3px solid #79a785;outline-offset:2px}
@media(max-width:950px){.practice-select-row{flex-wrap:wrap;gap:8px}.practice-select-row .assessment-label{flex:0 1 170px}.practice-select-row label:not(.assessment-label){flex:1 1 220px}.practice-select-row .primary{padding:8px 12px;font-size:13px}}
@media(max-width:760px){.practice-panel{padding:9px 10px;margin-bottom:8px}.practice-select-row{display:grid;grid-template-columns:1fr 1fr;gap:7px;align-items:end}.practice-select-row label{font-size:12px;min-width:0}.practice-select-row label:not(.assessment-label){grid-column:1 / -1}.practice-select-row .assessment-label{grid-column:1}.practice-select-row .primary{grid-column:2;grid-row:1;padding:9px 7px}.practice-select-row select{padding:7px 5px;font-size:12px;margin-top:3px}.practice-panel p{margin:7px 0 0;font-size:12px;line-height:1.35}.composer textarea{min-height:36px;height:36px}.composer{padding:9px 11px}.composer-wrap{padding-top:8px}.learning-modes{margin-bottom:7px}.cheatsheet{padding:12px}.sheet-table table{font-size:13px;min-width:390px}.sheet-table th,.sheet-table td{padding:9px}.quiz{padding:14px}.sheet-example{font-size:13px}.sheet-steps{font-size:13px}}

.sheet-scroll-hint{display:none;font-size:12px;color:var(--muted);margin:8px 0 -5px}@media(max-width:760px){.sheet-table table:not(.sheet-wide){min-width:0;table-layout:auto}.sheet-scroll-hint{display:block}.sheet-table td{overflow-wrap:anywhere}}

/* Welcome: compact brand, purpose and four direct actions. */
#welcome h1{margin-bottom:0}#welcome h1 small{margin-top:4px;line-height:1.15}#welcome .intro{margin:24px 0 26px;padding-top:18px;border-top:1px solid var(--line);max-width:680px;font-size:17px;line-height:1.65}.starter{position:relative;display:block;color:var(--ink);text-decoration:none;min-height:135px;padding:21px 20px;line-height:1.5}.starter b{padding-right:26px}.starter small{line-height:1.6}.starter-icon{position:absolute;right:18px;top:22px;width:22px;height:22px;color:#66816b}.starter:hover{background:#f2f6eb;border-color:#aac09e;filter:none}.starter:focus-visible{outline:3px solid #79a785;outline-offset:3px}.starter .practice-totals{font-size:12px;margin-top:13px;color:#65775d}.practice-totals strong{font-weight:650}.practice-panel .panel-totals{font-size:12px;margin-top:9px;color:#526d49}
@media(max-width:760px){#welcome .intro{font-size:16px;margin-top:22px;padding-top:16px}.starter{padding:16px 14px;min-height:148px}.starter-icon{width:18px;height:18px;right:12px;top:17px}.starter b{padding-right:19px}.starter small{font-size:12px;line-height:1.55}.starter .practice-totals{margin-top:9px;font-size:11px}}@media(max-width:360px){.starters{grid-template-columns:1fr}.starter{min-height:110px}}

/* One theory card for each practice topic. */
.theory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 26px}
.theory-card{display:flex;flex-direction:column;align-items:flex-start;text-align:left;width:100%;padding:20px;border-radius:18px;background:#fff;gap:10px;min-width:0}
.theory-card strong{font-size:17px;font-weight:600;line-height:1.35}
.theory-preview{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:var(--muted);font-size:14px;line-height:1.6}
.theory-card small{margin-top:auto;font-size:12px;color:var(--muted)}
@media(max-width:650px){.theory-grid{grid-template-columns:1fr}.theory-card{padding:16px}}

/* Main subject overviews; keep contact reachable while long lists scroll. */
#topics{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#6b8978 transparent;gap:4px}
#topics button{flex-shrink:0;align-items:center;line-height:1.45;padding:9px;min-height:38px}
.tutoring-link{display:flex;align-items:center;gap:10px;flex-shrink:0;margin:18px 0 0;padding:10px;border:1px solid #577560;border-radius:10px;font-weight:550}
.tutoring-link svg{width:20px;height:20px;flex-shrink:0;color:var(--accent)}
.tutoring-link:hover{background:#315e4d;text-decoration:none}
.topic-parts{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
.topic-parts>p{margin:0;font-size:13px;color:var(--muted)}
.topic-parts .related-topics{margin-top:9px}

/* Keep questions readable on small screens and in landscape. */
.practice-panel>summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--green);line-height:1.5}.practice-panel[open]>summary{margin-bottom:10px}.chat-scroll{min-height:0}.composer-wrap{flex-shrink:0}
@media(max-height:680px){.composer-wrap{max-height:55dvh;overflow-y:auto}}
@media(max-height:480px){header{height:62px;min-height:62px}.composer-wrap{padding-top:8px;padding-bottom:8px}.composer-bottom small{display:none}.composer textarea{min-height:36px;height:36px;font-size:14px}.learning-modes{margin-bottom:8px}.practice-panel{margin-bottom:8px}}
/* Theme switch, compact footer and matching contact actions. */
:root{color-scheme:light}
.theme-toggle svg{width:20px;height:20px}.theme-sun{display:none}.theme-toggle:hover{background:#e6eedc}
[data-theme="dark"] .theme-moon{display:none}[data-theme="dark"] .theme-sun{display:block}

.courses-link{margin-top:8px}.contact-action{display:inline-flex;align-items:center;gap:9px}.contact-action .starter-icon{position:static;width:19px;height:19px;color:inherit;flex-shrink:0}
a:focus-visible,summary:focus-visible{outline:3px solid #79a785;outline-offset:3px}
[data-theme="dark"]{color-scheme:dark;--green:#a8d9b9;--green-dark:#94c9a6;--ink:#e6eee8;--muted:#b3c2b7;--paper:#101b17;--line:#40554a;--white:#192820;--accent:#d7e8a7}
[data-theme="dark"] aside{background:#173c30}
[data-theme="dark"] .brand-mark{color:#173c30}[data-theme="dark"] .brand-mark::before{background:#173c30}
[data-theme="dark"] .primary,[data-theme="dark"] .send,[data-theme="dark"] .contact-action,[data-theme="dark"] .catalog-courses .selected{background:#a8d9b9;color:#122c21}
[data-theme="dark"] .contact-action:hover{background:#94c9a6}
[data-theme="dark"] .new-chat{background:#d7e8a7;color:#173c30}
[data-theme="dark"] .secondary,[data-theme="dark"] .stop,[data-theme="dark"] .followup,[data-theme="dark"] .mode.active,[data-theme="dark"] .topic-practice-action{background:#294333;color:#d3e9d6;border-color:#55715d}
[data-theme="dark"] .course-switch button.selected{color:#173c30}
[data-theme="dark"] .status{background:#294333;color:#d3e9d6;border-color:#55715d}
[data-theme="dark"] .eyebrow,[data-theme="dark"] h1 small,[data-theme="dark"] .starter-icon{color:#b3c2b7}
[data-theme="dark"] .composer,[data-theme="dark"] .quiz,[data-theme="dark"] .cheatsheet,[data-theme="dark"] .study-table,[data-theme="dark"] .catalog-item,[data-theme="dark"] .theory-card,[data-theme="dark"] .catalog-search input,[data-theme="dark"] .practice-select-row select,[data-theme="dark"] .difficulty-wrap select{background:#192820;color:#e6eee8;border-color:#40554a}
[data-theme="dark"] .composer:focus-within{border-color:#a8d9b9}
[data-theme="dark"] .composer textarea::placeholder,[data-theme="dark"] .composer-bottom small{color:#b3c2b7}
[data-theme="dark"] .message.user .message-content,[data-theme="dark"] .practice-panel,[data-theme="dark"] .sheet-example,[data-theme="dark"] .caveat{background:#23392c;color:#e6eee8;border-color:#55715d}
[data-theme="dark"] .avatar{background:#214e3f}
[data-theme="dark"] .quiz-option{background:#203328;border-color:#55715d;color:#e6eee8}
[data-theme="dark"] .quiz-option.correct{background:#284d30;border-color:#8ebc82;color:#e0f2d9}
[data-theme="dark"] .quiz-option.wrong{background:#552b25;border-color:#d49c85;color:#ffe5db}
[data-theme="dark"] .quiz-result.good{color:#b5dfa6}[data-theme="dark"] .quiz-result.bad{color:#ffc2ac}
[data-theme="dark"] .quiz-badge,[data-theme="dark"] .sheet-note,[data-theme="dark"] .starter .practice-totals,[data-theme="dark"] .practice-panel .panel-totals{color:#b3c2b7}
[data-theme="dark"] .sheet-table{border-color:#55715d}
[data-theme="dark"] .study-table th,[data-theme="dark"] .sheet-table caption{background:#294333;color:#e6eee8}
[data-theme="dark"] .sheet-table thead th,[data-theme="dark"] .tone-total{background:#214e3f;color:#f1f7f0}
[data-theme="dark"] .sheet-table th,[data-theme="dark"] .sheet-table td{border-bottom-color:#577567}
[data-theme="dark"] .tone-blue{background:#203e51;color:#d8ecfa}
[data-theme="dark"] .tone-amber,[data-theme="dark"] .tone-orange{background:#4c3a1c;color:#ffe4b5}
[data-theme="dark"] .tone-green{background:#2e4825;color:#e0f2d0}
[data-theme="dark"] .tone-white{background:#203328;color:#e6eee8}
[data-theme="dark"] .starter:hover,[data-theme="dark"] .theme-toggle:hover,[data-theme="dark"] #download:hover{background:#294333;border-color:#7c9a84}
[data-theme="dark"] .error{background:#552b25;color:#ffe5db}[data-theme="dark"] .notice{background:#4c3a1c;color:#ffe4b5}
[data-theme="dark"] dialog::backdrop{background:#0009}
@media(max-width:760px){.header-actions{gap:6px}}
@media(max-width:440px){.status{display:none}}

[data-theme="dark"] .quiz-option:disabled{opacity:1}
/* Compact footer spacing; retain the original question field dimensions. */
.composer-wrap{padding-top:8px;padding-bottom:8px}
.learning-modes{margin-bottom:6px}


@media(max-width:760px){.composer-wrap{padding-top:6px;padding-bottom:6px}.learning-modes{margin-bottom:5px}}
@media(max-height:480px){.composer-wrap{padding-top:6px;padding-bottom:6px}}
/* Wider study content and matching composer on large displays. */
:root{--content-width:clamp(780px,60vw,1080px)}
/* Author profile uses the same modal behavior as the existing help. */
.sidebar-info{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;margin-top:10px;flex-shrink:0}
.sidebar-info .help-side{margin:0;padding:9px 4px;font-size:13px;border-radius:7px}
.sidebar-info .help-side:hover{background:#315e4d;text-decoration:underline}
.about-dialog{max-width:760px}
.about-profile{display:grid;grid-template-columns:190px minmax(0,1fr);gap:26px;align-items:start}
.about-photo{display:block;width:100%;height:auto;aspect-ratio:3/4;object-fit:cover;object-position:center 25%;border-radius:15px;background:var(--line)}
.about-copy{min-width:0}.about-copy h3{margin:0;font-size:23px;line-height:1.3;font-weight:600}
.about-copy .about-role{margin:6px 0 19px;color:var(--muted);font-size:13px;line-height:1.5}
.about-copy p{font-size:16px;line-height:1.7;margin:0 0 15px}.about-copy p:last-child{margin-bottom:0}
.about-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.about-actions a{display:inline-flex;align-items:center;justify-content:center;gap:9px;margin:0;text-decoration:none;line-height:1.5}
.about-actions svg{width:19px;height:19px;flex-shrink:0}
.about-actions .primary{color:#fff}.about-actions .secondary{color:var(--green)}
[data-theme="dark"] .about-actions .primary{color:#173c30}
[data-theme="dark"] .about-actions .secondary{color:#e6eee8}
@media(max-width:600px){.about-dialog .dialog-head{position:sticky;top:-22px;z-index:1;margin:-22px -22px 20px;padding:22px 22px 14px;background:var(--paper)}.about-profile{grid-template-columns:1fr;gap:20px}.about-photo{width:150px;justify-self:center}.about-copy h3,.about-copy .about-role{text-align:center}.about-copy .about-role{margin-bottom:16px}.about-actions{margin-top:20px}.about-actions a{flex:1 1 190px}}
@media(max-height:480px) and (min-width:601px){.about-photo{width:140px}.about-profile{grid-template-columns:140px minmax(0,1fr);gap:20px}}

/* Compact text link for the author; retain the original tutor note. */
.sidebar-info #about{display:inline-flex;align-items:center;justify-content:flex-start;gap:6px;padding:6px 4px;background:transparent;color:#dce9d5;font-size:14px;font-weight:550;white-space:nowrap}
.sidebar-info #about svg{width:16px;height:16px;flex-shrink:0}
.sidebar-info #about:hover{background:transparent;text-decoration:underline}
.sidebar-info #helpSide{font-size:12px;line-height:1.35;padding:5px 0;text-align:left;color:#c9dacc}

/* One compact footer line that wraps naturally on small screens. */
.site-footer{margin-top:5px;text-align:center;color:var(--muted);font-size:10.5px;line-height:1.35}
.footer-separator{display:inline-block;margin:0 4px}
.footer-copyright{font-size:9px;white-space:nowrap}
