:root{--ink:#1d3033;--muted:#55666a;--line:#dce7e7;--blue:#255d68;--pale:#eef5f4;--error:#ae3343}*{box-sizing:border-box}body{margin:0;background:#f8fbfa;color:var(--ink);font:16px/1.6 Arial,sans-serif}header,footer{max-width:1512px;margin:auto;display:flex;justify-content:space-between;gap:20px;padding:24px 32px;align-items:center}h1{margin:0;font-size:30px;letter-spacing:-.03em}h2{margin:0;font-size:21px}.eyebrow{font-size:11px;letter-spacing:.12em;color:var(--muted)}main{padding:0 32px 30px;display:grid;grid-template-columns:minmax(280px, .95fr) minmax(320px,1.2fr) minmax(250px,.8fr);gap:20px;max-width:1512px;margin:auto;align-items:start}.panel{background:white;border:1px solid var(--line);border-radius:20px;padding:24px;min-width:0}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.section-head select{max-width:100%}button,.button,input,select,textarea{font:inherit;border-radius:9px;border:1px solid var(--line);background:white;color:var(--ink);padding:9px 12px;min-height:44px;max-width:100%}button,.button{cursor:pointer}button:hover,.button:hover{background:var(--pale)}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,.button:focus-within{outline:3px solid #95c8ce;outline-offset:2px}.primary,button[aria-pressed=true]{background:var(--blue);color:white;border-color:var(--blue)}.actions,.tools{display:flex;gap:8px;flex-wrap:wrap}.target{background:var(--pale);padding:14px 16px;border-radius:12px;font-weight:bold;margin:16px 0}.fine,footer{color:var(--muted);font-size:13px}p{margin:12px 0}.tools button{font-size:13px}.table-head{display:grid;grid-template-columns:1.3fr 1fr .6fr;gap:10px;border-block:1px solid var(--line);padding:10px 0;font-size:13px;font-weight:bold}.proof-row{padding:16px 0;border-bottom:1px solid var(--line)}.row-fields{display:grid;grid-template-columns:1.3fr 1fr .6fr;gap:10px}.row-fields label{min-width:0}.row-fields .field-label{display:none}textarea{resize:vertical;min-height:86px;width:100%}.row-fields select,.row-fields input{width:100%}.row-meta{display:flex;justify-content:space-between;gap:8px;margin-top:8px;font-size:13px}.remove{font-size:13px;min-height:36px}.proof .actions{margin-top:18px}.bank label{display:block;font-size:13px;margin-top:12px}.bank input,.bank select{width:100%;margin-top:5px}.bank #clearFilter{margin-top:12px;font-size:13px}#bank{margin-top:20px}.theorem{border-top:1px solid var(--line);padding:14px 0}.theorem h3{font-size:15px;margin:0}.theorem p{font-size:13px;margin:6px 0}.theorem button{font-size:13px}#diagram{background:#f7fbfb;border:1px solid var(--line);border-radius:14px;margin-bottom:12px}#diagram svg{display:block;width:100%;height:auto;max-height:330px}#diagram circle{cursor:pointer}#feedback{padding:12px;border-radius:9px;background:var(--pale);min-height:48px}.invalid{color:var(--error)}footer{border-top:1px solid var(--line);padding-top:16px}#rows:empty:after{content:'התחילו מהנתונים והוסיפו את השלב הראשון.';display:block;padding:24px 0;color:var(--muted)}@media(max-width:1100px){main{grid-template-columns:1fr 1fr}.bank{grid-column:1/-1}.problem{position:static}}@media(max-width:700px){header,footer{padding:20px 16px}header{align-items:flex-start}h1{font-size:25px}main{display:flex;flex-direction:column;padding:0 12px 24px;gap:14px}.panel{width:100%;padding:18px;border-radius:16px}.bank{order:3}.row-fields{grid-template-columns:1fr}.row-fields .field-label{display:block;font-size:13px;margin-bottom:4px}.table-head{display:none}.row-fields textarea{min-height:64px}.row-fields label:last-child{display:flex;align-items:center;gap:10px}.row-fields label:last-child input{width:90px}.tools button{flex:1 1 42%}footer{flex-direction:column;align-items:flex-start}.section-head select{width:100%}.proof-row{padding:18px 0}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important}}

.proof-table{width:100%;border-collapse:collapse;table-layout:fixed}.proof-table th{text-align:start;font-size:13px;border-bottom:1px solid var(--line);padding:10px 4px}.proof-table td{padding:14px 4px;vertical-align:top}.proof-table th:nth-child(1){width:33%}.proof-table th:nth-child(2){width:32%}.proof-table th:nth-child(3){width:15%}.proof-table th:nth-child(4){width:20%}.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}.proof-row .field-label{display:none}.proof-row select,.proof-row input{width:100%}.proof-row input{direction:ltr}.row-meta{display:table-cell}@media(max-width:700px){.proof-table,.proof-table tbody,.proof-table tr,.proof-table td{display:block;width:100%}.proof-table thead{display:none}.proof-table td{padding:6px 0}.proof-row .field-label{display:block;font-size:13px}.proof-table tr{border-bottom:1px solid var(--line);padding:12px 0}.proof-row .row-meta{display:flex}.proof-table .row-meta button{min-height:44px}}

.primary:hover,button[aria-pressed=true]:hover{background:#1b4953;color:#fff}.row-meta{margin:0;display:table-cell}.proof-table th:nth-child(3){width:18%}.proof-table th:nth-child(4){width:17%}@media(min-width:1101px) and (max-width:1399px){main{grid-template-columns:minmax(0,1fr) minmax(0,1.25fr)}.bank{grid-column:1/-1}}

.tools[hidden]{display:none}.geometry-toolbar{padding:10px}.geometry-status,.geometry-note{padding-inline:12px}.geometry-canvas{height:300px}#diagram{overflow:hidden}.geometry-toolbar button[aria-pressed=true]{background:var(--blue);color:white}#diagram text{direction:ltr;unicode-bidi:isolate}

.math{direction:ltr;unicode-bidi:isolate;display:inline-block;white-space:normal}.bank{max-height:calc(100vh - 180px);overflow:auto}@media(max-width:700px){.bank{max-height:none;overflow:visible}}

.skip{position:absolute;top:-100px;background:white;color:var(--ink);padding:10px;z-index:10}.skip:focus{top:10px}.notation{margin-bottom:18px;border-block:1px solid var(--line);padding:12px 0}.notation summary{cursor:pointer;min-height:44px;padding:10px 0}.notation p{font-size:14px}.notation button{min-width:44px}.bank:focus-within{outline:none}

.bank-caveat{background:#fff6df;color:#594b28;font-size:13px;padding:12px;border-radius:9px}.remove{min-height:44px}

.row-result{font-size:13px;line-height:1.45;width:100%;min-width:0;margin:8px 0}.row-result.valid{color:#225748}.row-result.invalid{color:var(--error)}.row-result.unsupported{color:#776326}.proof-table .row-meta{overflow-wrap:anywhere}@media(min-width:701px){.proof-table .row-meta .row-result{font-size:12px}}

@media(max-width:700px){.proof-table .row-meta{display:grid;grid-template-columns:1fr auto;align-items:start;gap:8px}.row-meta>span{white-space:nowrap}.row-meta .remove{grid-column:2;grid-row:1}.row-meta .row-result{grid-column:1/-1;margin:0}.proof-table .row-meta>span{grid-column:1;grid-row:1}}

#bankCount{direction:ltr;unicode-bidi:isolate}#bank a{display:block;color:#255d68;text-underline-offset:3px;margin:8px 0}.storage-panel{margin:24px auto;max-width:1440px}#annotationItems{line-height:1.8}

.row-result.incomplete{color:#8a5700;background:#fff4d9;border-radius:6px;padding:6px}

.feedback-row td{padding:0 0 12px}.feedback-row .row-result{margin:0;white-space:normal}@media(max-width:650px){.feedback-row,.feedback-row td{display:block;width:100%}}
/* Original compact workspace proposal. Source/math/backup code unchanged. */
@media(min-width:1000px){main{grid-template-columns:minmax(310px,.78fr) minmax(540px,1.4fr);gap:22px}.problem{grid-column:1;grid-row:1;position:sticky;top:18px}.proof{grid-column:2;grid-row:1}.bank{grid-column:1/-1;grid-row:2}.panel{padding:20px}.proof-table{table-layout:fixed}.proof-table th:nth-child(1){width:34%}.proof-table th:nth-child(2){width:32%}.proof-table th:nth-child(3){width:22%}.proof-table th:nth-child(4){width:12%}.proof-table textarea{min-height:46px;height:46px;padding:9px 10px;resize:vertical}.proof-table td{padding:9px 4px}.proof-table select,.proof-table input{min-height:42px;padding:7px 9px}.proof-row{border-bottom:0}.proof-table .row-meta{font-size:12px}.proof-table .row-meta button{font-size:11px;padding:5px;min-height:30px}.feedback-row td{padding:0 4px 8px}.feedback-row .row-result.valid{font-size:12px;color:#255d68;margin:0}.proof .notation{margin:10px 0}.proof>p{font-size:14px}#bank{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 24px}.theorem{min-width:0}.bank>label{display:inline-block;width:calc(33% - 10px);margin-inline-end:10px}.bank #clearFilter{display:block}}

.selected-reason{display:block;font-size:13px;line-height:1.45;color:var(--muted);margin-top:5px;overflow-wrap:anywhere}.selected-reason:empty{display:none}.bank-reach{text-decoration:none;display:inline-flex;align-items:center;font-size:14px}#bankPanel{scroll-margin-top:18px}

.optional-refs{display:none!important}body.show-refs .optional-refs{display:table-cell!important}.refs-toggle{display:flex;align-items:center;gap:8px;font-size:14px}.refs-toggle input{width:20px;min-height:44px}.bank{max-height:none;overflow:visible}.proof-table th:nth-child(1){width:44%}.proof-table th:nth-child(2){width:44%}.proof-table th:nth-child(4){width:12%}body.show-refs .proof-table th:nth-child(1){width:34%}body.show-refs .proof-table th:nth-child(2){width:32%}body.show-refs .proof-table th:nth-child(3){width:22%}body.show-refs .proof-table th:nth-child(4){width:12%}.proof-table .remove{min-height:44px}header{flex-wrap:wrap}.storage-panel{width:calc(100% - 24px)}@media(max-width:700px){body.show-refs .optional-refs{display:block!important}}
/* Keep the independent pencil beside, never on top of, the figure. */
.geometry-workspace{display:grid;grid-template-columns:minmax(0,1fr) 52px;align-items:start;direction:ltr}.geometry-workspace .geometry-toolbar{position:static;grid-column:2;grid-row:1;inset:auto;width:52px;padding:4px;direction:rtl}.geometry-workspace .geometry-canvas{grid-column:1;grid-row:1;width:100%;min-width:0}.geometry-workspace .geometry-palette,.geometry-workspace .geometry-status,.geometry-workspace .geometry-note{grid-column:1/-1;direction:rtl}.geometry-workspace .geometry-toolbar button{min-height:44px;width:44px}.geometry-workspace .geometry-canvas{height:280px}
/* At short desktop heights the entire figure/palette must remain scrollable. */
@media(min-width:1000px) and (max-height:900px){.problem{position:static}}
/* Simpler working layout: same house style, two visible fields, details on demand. */
.simple-workspace header{padding:12px 20px;gap:10px;max-width:1200px;flex-wrap:nowrap}
.simple-workspace h1{font-size:22px;white-space:nowrap}.simple-workspace header>div:first-child{margin-inline-end:auto}
.simple-workspace main{max-width:1200px;padding:0 20px 20px;gap:18px;grid-template-columns:minmax(300px,.85fr) minmax(440px,1.2fr)}
.simple-workspace .panel{padding:18px;border-radius:12px}.simple-workspace .problem{position:static}.simple-workspace .problem .section-head{flex-wrap:nowrap;gap:10px}.simple-workspace .problem h2{font-size:14px;color:var(--muted)}
.simple-workspace #exercise{flex:1;min-width:0;width:auto;font-size:14px;padding:8px}.simple-workspace #givens h3{display:none}.simple-workspace #givens ul{margin:8px 0;padding-inline-start:22px;font-size:14px;line-height:1.5}
.simple-workspace .target{margin:10px 0;padding:8px 12px;font-size:14px}.simple-workspace #diagram{margin:0;border-radius:8px}.simple-workspace .geometry-canvas{margin:0;height:235px}.simple-workspace .geometry-status{min-height:0;margin:5px 0;font-size:12px;line-height:1.4}.simple-workspace .geometry-note{margin:4px 0 8px;line-height:1.4}.simple-workspace .geometry-note:empty{display:none}
.simple-workspace summary{cursor:pointer;min-height:44px;padding:10px 0;font-size:13px;color:var(--muted)}.simple-workspace #annotationList{margin:0}.simple-workspace #annotationItems{font-size:13px}
.simple-workspace .bank-reach{font-size:13px;padding:8px}.simple-workspace .proof h2{font-size:19px}.simple-workspace #addRow{font-size:13px;padding:8px}.simple-workspace .proof-options{margin:0}.simple-workspace .notation{border:0;margin:0;padding:0}.simple-workspace .proof-table textarea{min-height:68px;height:68px;font-size:15px;padding:8px}.simple-workspace .proof-table select{font-size:14px;padding:8px;min-height:44px}
.simple-workspace .selected-reason{font-size:12px}.simple-workspace .proof-table .remove{font-size:22px;width:44px;min-height:44px;padding:0;line-height:1}.simple-workspace .proof-table th:nth-child(1),.simple-workspace .proof-table th:nth-child(2){width:43%}.simple-workspace .proof-table th:nth-child(4){width:14%}.simple-workspace .proof .actions{margin-top:12px}.simple-workspace #feedback:empty{display:none}.simple-workspace #feedback{font-size:14px;margin-bottom:0}.simple-workspace .bank-disclosure{grid-column:1/-1}.simple-workspace .bank-disclosure>summary{border-bottom:1px solid var(--line);font-size:15px;color:var(--ink)}.simple-workspace .bank{max-height:none}.simple-workspace .storage-disclosure{max-width:1160px;margin:0 auto 12px;padding:0 20px}.simple-workspace .storage-panel{width:100%;margin:0}.simple-workspace footer{max-width:1200px;padding:12px 20px;font-size:12px;gap:10px}
@media(max-width:800px){.simple-workspace main{display:flex;flex-direction:column;padding:0 10px 16px;gap:12px}.simple-workspace header{padding:10px;gap:7px}.simple-workspace h1{font-size:18px}.simple-workspace .panel{padding:12px;width:100%}.simple-workspace .geometry-canvas{height:190px}.simple-workspace .geometry-toolbar{padding:2px}.simple-workspace .target{margin:7px 0}.simple-workspace #givens ul{margin:7px 0}.simple-workspace .proof-table,.simple-workspace .proof-table tbody{display:block;width:100%}.simple-workspace .proof-table thead{display:none}.simple-workspace .proof-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:8px 0}.simple-workspace .proof-table td{width:auto;min-width:0;padding:0}.simple-workspace .proof-row .field-label{display:block;font-size:12px;margin:0 0 4px}.simple-workspace .proof-table .row-meta{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;font-size:12px;min-height:44px}.simple-workspace .proof-table .row-meta>span{white-space:normal}.simple-workspace .proof-table .optional-refs{grid-column:1/-1}.simple-workspace .feedback-row{display:block}.simple-workspace .feedback-row td{display:block;width:100%}.simple-workspace .proof-options>summary{padding:8px 0}.simple-workspace .bank-disclosure{width:100%}.simple-workspace .bank>label{display:block;width:100%;margin-inline-end:0}.simple-workspace #bank{display:block}.simple-workspace footer{padding:12px;gap:4px}.simple-workspace .storage-disclosure{padding:0 12px}.simple-workspace .section-head{gap:8px}}
.reason-sheet{border:1px solid var(--line);border-radius:16px;width:min(700px,calc(100% - 24px));max-height:90dvh;padding:14px;color:var(--ink);background:white;overscroll-behavior:contain}.reason-sheet::backdrop{background:#1d303355}.reason-sheet .bank{border:0;padding:4px}.reason-sheet .sheet-close{position:sticky;top:0;z-index:2;background:white;margin-bottom:10px}.reason-sheet #bank{display:block;margin-top:12px}.reason-sheet .theorem{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:10px 0}.reason-sheet .theorem h3{align-self:center;font-size:15px}.reason-sheet .theorem>details{grid-column:1/-1}.reason-sheet .theorem summary{padding:6px 0;min-height:44px;font-size:12px}.reason-sheet .theorem>button{grid-column:2;grid-row:1;min-height:44px}.reason-native{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;opacity:0;pointer-events:none;clip-path:inset(50%)}.reason-choice{width:100%;text-align:start;font-size:14px;min-height:68px;padding:8px;line-height:1.4}.reason-sheet .bank>label{display:block;width:100%;margin-inline-end:0}.reason-sheet .bank>label:has(#sourceFilter),.reason-sheet .bank>label:has(#category){display:inline-block;width:calc(50% - 6px)}
@media(max-width:800px){.reason-sheet{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:100%;max-height:86dvh;border-radius:16px 16px 0 0;padding:12px}.reason-sheet .bank>label{margin-top:8px}.reason-sheet .bank h2{font-size:18px}}
.reason-sheet .support-marker{grid-column:1;grid-row:2;font-size:12px;color:#776326}.reason-sheet .theorem>details{grid-row:3}.simple-workspace .problem:has(.geometry-note:last-child) .geometry-note:last-child{font-size:12px}.simple-workspace .proof-table .reason-choice:focus-visible{outline:3px solid #95c8ce;outline-offset:2px}
.reason-sheet .picker-filters{margin:2px 0 8px}.reason-sheet .picker-filters>summary{padding:6px 0}.reason-sheet .picker-filters label{display:block}.reason-sheet .picker-filters select{width:100%}.reason-sheet .bank>.fine{font-size:12px;margin:4px 0}.reason-sheet .theorem{position:relative;padding:8px 0;gap:2px 8px;grid-template-columns:minmax(0,1fr) 60px}.reason-sheet .theorem h3{font-size:14px;line-height:1.35}.reason-sheet .theorem>details>summary{padding:0;min-height:44px;display:flex;align-items:center}.simple-workspace .refs-toggle{min-height:44px;cursor:pointer}.simple-workspace .refs-toggle input{width:24px;height:24px;min-height:24px;flex-shrink:0}
.simple-workspace{background:white;color:#292929}.simple-workspace .panel{border-color:#e7e7e5;border-radius:6px}.simple-workspace .target{background:#f5f4f1;border-radius:4px;font-weight:normal}.simple-workspace #givens ul{list-style:none;padding:0}.simple-workspace #givens li{background:#f7f6f3;padding:5px 9px;margin:4px 0;border-radius:4px}.simple-workspace #diagram{border:0;border-radius:0;background:white}.simple-workspace .geometry-canvas{background:white;border-color:#eee}.simple-workspace .proof-row{border-bottom:1px solid #e7e7e5}.simple-workspace .reason-choice{background:#fafaf8;border-color:#e4e4e1}.reason-category{border-bottom:1px solid var(--line)}.reason-category>summary{font-size:15px;color:var(--ink);font-weight:600;min-height:44px;padding:10px 0}.reason-sheet .theorem{border-color:#eee}.brief-result>summary{font-size:13px;min-height:44px;padding:8px 0}.brief-result.valid>summary{color:#225748}.brief-result.invalid>summary{color:#ae3343}.brief-result.unsupported>summary{color:#776326}.brief-result .row-result{padding:6px 0}.simple-workspace footer{border-color:#eee}
/* Keep plain textarea editing while drawing only the token colors underneath. */
.claim-edit{position:relative;min-width:0}.claim-colors{position:absolute;inset:0;z-index:1;pointer-events:none;border:1px solid transparent;border-radius:9px;padding:8px;font:15px/1.6 Arial,sans-serif;white-space:pre-wrap;overflow:hidden;overflow-wrap:break-word;color:var(--ink);direction:plaintext}.simple-workspace .proof-table .claim-edit textarea{position:relative;z-index:2;background:transparent;color:transparent;caret-color:#292929;font:15px/1.6 Arial,sans-serif;padding:8px;resize:vertical}.claim-edit textarea::selection{background:#b8d8ee;color:transparent}.claim-edit textarea::placeholder{color:var(--muted)}
.claim-colors{unicode-bidi:plaintext;direction:inherit}.claim-colors span{unicode-bidi:isolate;direction:ltr}
/* While editing, use the native text and caret. The read view isolates math runs. */
.claim-edit:focus-within .claim-colors{visibility:hidden}.simple-workspace .proof-table .claim-edit textarea:focus{color:#292929}.claim-edit textarea:focus::selection{color:#292929}
.student-label-controls{flex-basis:100%;border-top:1px solid #e7e7e5;margin-top:8px;padding-top:8px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.student-label-controls label{font-size:13px}.student-label-controls select,.student-label-controls input{width:100%;min-height:44px}.student-label-controls p{grid-column:1/-1;margin:0;font-size:12px}.geometry-palette:has(.student-label-controls){max-height:65dvh;overflow:auto}
.geometry-palette[aria-label^="בחירת זווית"] button{min-width:64px;min-height:44px}.geometry-palette[aria-label^="בחירת זווית"]{max-height:55dvh;overflow:auto}
/* Exercise gallery entry, preserving the plain workspace. */
#exerciseHome{max-width:1040px;margin:0 auto;padding:18px 14px 36px}#exerciseHome h2{font-size:24px;margin:0 0 8px}#exerciseHome>p{color:#58585d;margin:0 0 24px;line-height:1.6}.exercise-grid{display:grid;gap:18px;grid-template-columns:repeat(3,minmax(0,1fr))}.exercise-card{display:flex;flex-direction:column;text-align:right;align-items:stretch;padding:16px;background:#fff;border:1px solid #ddd;border-radius:5px;color:#292929;min-width:0}.exercise-card:hover,.exercise-card:focus-visible{border-color:#256373;outline:2px solid #256373;outline-offset:2px}.exercise-card svg{display:block;width:100%;height:170px;margin:8px 0 12px}.exercise-number{font-size:13px;color:#646469}.exercise-card strong{font-size:17px;font-weight:600;line-height:1.5}.exercise-enter{font-size:14px;color:#256373;margin-top:14px}.on-home main,.on-home .storage-disclosure,.on-home a.skip{display:none!important}#exerciseHome[hidden]{display:none!important}#backHome{margin-bottom:14px;min-height:44px}@media(max-width:600px){.exercise-grid{grid-template-columns:1fr;gap:16px}#exerciseHome{padding:18px 12px 30px}.exercise-card svg{height:155px}.exercise-card strong{font-size:17px}}
.given-color-key{padding:8px 0 12px}.given-color-key:empty{display:none}.given-color-key small{color:#58585d;font-size:12px}.given-color-key p{display:flex;align-items:center;gap:8px;margin:6px 0;font-size:14px}.given-color-dot{width:20px;height:4px;flex:none;display:inline-block;border-radius:2px}
.section-nav{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.section-nav button{min-height:44px}.section-nav button[aria-pressed=true]{border-color:#256373;background:#eef4f5}.section-nav button:disabled{color:#6a6a6a;background:#f4f4f4;cursor:not-allowed}.earlier-claims{margin:16px 0}.earlier-claims ul{padding-inline-start:22px;line-height:1.8}
.section-nav button[aria-pressed=true]{color:#256373;font-weight:600}
/* Plain, independent statement-to-diagram pointers. */
.statement-element{font:inherit;color:inherit;background:none;border:0;border-radius:4px;padding:5px 3px;min-height:36px;min-width:28px;margin:0 1px;text-decoration:underline;text-decoration-color:#9aafb3;text-underline-offset:3px;cursor:pointer;touch-action:manipulation;vertical-align:baseline;display:inline-block}
.statement-element:hover,.statement-element[aria-pressed="true"]{background:#e6f2f4;color:#086779}
.statement-element:focus-visible{outline:2px solid #087c92;outline-offset:1px}
.statement-flash{animation:statement-pulse 1s ease-in-out 2}
@keyframes statement-pulse{0%,100%{opacity:.9}50%{opacity:.3}}
@media(prefers-reduced-motion:reduce){.statement-flash{animation:none}}

.exercise-topics{display:grid;gap:32px}.exercise-topic{min-width:0}.topic-heading{display:flex;align-items:baseline;gap:12px;border-bottom:1px solid #dce5e7;margin-bottom:14px;padding-bottom:10px}.topic-heading h3{font-size:21px;margin:0;color:#245c68}.topic-heading small{color:#64777e}.exercise-topic .exercise-grid{margin:0}.exercise-topic .exercise-card{min-width:0}

/* Topic chips filter in place, never jump or change proof state. */
.topic-filters{display:flex;flex-wrap:wrap;gap:7px;margin:18px 0 24px}.topic-filters button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 12px;border:1px solid #dce5e7;border-radius:7px;color:#245c68;background:white;font-size:14px}.topic-filters button:hover{background:#edf5f6}.topic-filters button:focus-visible{outline:2px solid #245c68;outline-offset:2px}.topic-filters button[aria-pressed="true"]{color:white;background:#245c68;border-color:#245c68;font-weight:600;box-shadow:inset 0 0 0 1px #245c68}.exercise-topic[hidden]{display:none!important}

/* Topic lesson: the original video stays uncropped. */
.topic-lesson{border:1px solid #eae9ea;border-radius:8px;padding:16px;margin:12px 0 24px;background:#fff}
.topic-lesson h4{font-size:20px;margin:0 0 8px}.topic-lesson .fine{margin:8px 0 14px}
.lesson-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:start}
.topic-lesson video{display:block;width:100%;max-width:400px;aspect-ratio:720/900;height:auto;background:#161616;border-radius:4px;justify-self:center;object-fit:contain}
.lesson-chapters{display:grid;gap:8px;min-width:0}.lesson-chapters button{text-align:right;white-space:normal;min-height:44px;width:100%;font-size:14px}
.lesson-chapters button.active{background:#137565;color:#fff;border-color:#137565}
.lesson-connection{display:block;margin-top:10px;color:#585254;line-height:1.7}.topic-lesson a{color:#137565;text-underline-offset:3px}
@media(min-width:650px){.lesson-layout{grid-template-columns:minmax(0,400px) minmax(0,1fr)}}

#explanationHome{max-width:1040px;margin:0 auto;padding:18px 14px 36px}#explanationHome[hidden],#triangleExplanations[hidden],.explanation-categories[hidden]{display:none!important}
#explanationHome h2{font-size:24px;margin:18px 0}#explanationHome h3{font-size:21px;color:#245c68}#triangleExplanations>h4{font-size:20px;margin:24px 0 12px}
.explanations-entry{min-height:44px;padding:10px 24px;color:#245c68;border:1px solid #245c68;background:#fff;font-weight:600}
.explanation-categories{display:grid;gap:12px;max-width:460px}.explanation-categories button{min-height:64px;text-align:right;font-size:20px;color:#245c68}
#explanationHome>button,#explanationsBackCategories{min-height:44px}
@media(max-width:600px){#explanationHome{padding:18px 12px 30px}.topic-lesson{padding:12px}.topic-lesson h4{font-size:18px}}

#explainerViewer[hidden]{display:none!important}.video-entry{display:flex;align-items:flex-start;flex-direction:column;gap:12px;text-align:right;width:100%;max-width:540px;min-height:150px;padding:22px;background:#fff;border:1px solid #dce5e7;border-radius:8px}.video-entry strong{font-size:20px}.video-entry>span:last-child{font-size:14px;color:#585254}.video-entry-play{display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:#245c68;color:#fff;font-size:20px}.video-entry:hover,.video-entry:focus-visible{outline:2px solid #245c68;outline-offset:2px}#explainerBack{min-height:44px;margin-top:18px}

.explanation-entries>h4{font-size:20px;margin:26px 0 12px}.lesson-chapters button{overflow-wrap:anywhere}.lesson-layout video{scroll-margin-top:12px}

.topic-lesson>a{display:inline-flex;align-items:center;min-height:44px;padding:10px 12px;box-sizing:border-box;max-width:100%;overflow-wrap:anywhere}

#symbols{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}#symbols button{min-height:44px;max-width:100%;overflow-wrap:anywhere}.geometry-aux-delete{color:#ad493f!important;border-style:dashed!important}#backHome{min-height:44px}

.exercise-reading-column{min-width:0}.exercise-drawing-column{min-width:0}
@media(min-width:1000px){.simple-workspace main{display:grid;grid-template-columns:minmax(350px,.95fr) minmax(540px,1.45fr);align-items:start;gap:22px}.exercise-reading-column{grid-column:2;grid-row:1}.exercise-drawing-column{grid-column:1;grid-row:1;min-height:650px;position:sticky;top:12px}.simple-workspace .problem{position:static;display:block;margin-bottom:14px}.simple-workspace .proof{width:100%}.simple-workspace .geometry-canvas{height:460px}.exercise-drawing-column #diagram{display:block}.exercise-drawing-column .geometry-toolbar{position:static;display:flex;flex-direction:row;width:auto;padding:2px 0 12px;direction:rtl}.exercise-drawing-column .geometry-canvas{width:100%;margin-top:0}.exercise-reading-column #givens ul{margin:8px 0}.exercise-reading-column .problem .section-head{margin-bottom:12px}}
@media(max-width:999px){.simple-workspace main{display:flex;flex-direction:column}.exercise-reading-column{display:contents}.exercise-drawing-column{order:2;width:100%}.simple-workspace .problem{order:1}.simple-workspace .proof{order:3}}

.proof-goal{margin-bottom:14px}.simple-workspace .proof-goal #target{margin:0}.proof-view-switcher{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0 12px}.proof-view-switcher button{min-height:44px;font-size:13px}.proof-view-switcher button[aria-pressed=true]{background:var(--blue);color:white}.show-refs .proof-table th:nth-child(3){width:16%}.show-refs .proof-table th:nth-child(1),.show-refs .proof-table th:nth-child(2){width:36%}@media(max-width:999px){.proof-goal{order:2;width:100%}.exercise-drawing-column{order:3}.simple-workspace .proof{order:4}}

.clear-proof{color:#ad493f;border-color:#ad493f}.proof-table .optional-refs input{max-width:100%;min-width:0}.simple-workspace #sectionNav{margin-top:10px}

#sectionNav[hidden]{display:none}.proof-table .row-number{width:36px!important;white-space:nowrap;font-size:13px;vertical-align:top;padding-top:18px}.proof-table th:nth-child(2),.proof-table th:nth-child(3){width:42%!important}.proof-table th:nth-child(4){width:auto!important}.proof-table th:nth-child(5){width:48px!important}.show-refs .proof-table th:nth-child(2),.show-refs .proof-table th:nth-child(3){width:34%!important}.show-refs .proof-table th:nth-child(4){width:18%!important}@media(max-width:800px){.simple-workspace .proof-row{grid-template-columns:26px minmax(0,1fr) minmax(0,1fr)}.simple-workspace .proof-row .row-number{grid-column:1;grid-row:1;padding-top:22px;width:auto!important}.simple-workspace .proof-row .row-meta{grid-column:1/-1;justify-content:flex-end}.simple-workspace .proof-row .optional-refs{grid-column:2/-1}}

.proof-goal{display:flex;align-items:center;gap:8px}.proof-goal #target{flex:1;min-width:0}.goal-plus{border-radius:50%;width:44px;min-width:44px;min-height:44px;padding:0;font-size:23px;line-height:1}
/* Desktop editing keyboard; phone retains v21 controls and native keyboard. */
.claim-entry-choices,.math-keyboard{display:none}.math-keyboard[hidden]{display:none!important}
@media(min-width:1000px){.simple-workspace #symbols{display:none}.claim-entry-choices{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:5px}.claim-entry-choices button{min-height:36px;font-size:12px;padding:5px 8px}.claim-entry-choices button[aria-pressed=true]{background:var(--blue);color:white}.math-keyboard{display:block;background:#f8faf9;border:1px solid var(--line);border-radius:12px;padding:12px;margin:10px 0;max-width:100%;min-width:0}.math-keyboard-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:10px}.math-tabs,.math-utilities{display:flex;gap:5px;flex-wrap:wrap}.math-keyboard button{min-height:44px;font-size:13px;padding:6px 8px}.math-tabs button[aria-pressed=true]{background:var(--blue);color:white}.math-keyboard-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 76px;direction:ltr;gap:12px}.math-key-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;min-width:0}.math-key-grid button{padding:4px;font-size:17px;direction:ltr}.math-editing{display:grid;grid-template-columns:1fr 1fr;gap:5px}.math-editing button:first-child,.math-editing button:last-child{grid-column:1/-1}.math-keyboard .fine{font-size:12px;margin:10px 0 0}.math-figure-options,.math-latin{grid-column:1/3;min-width:0;direction:rtl}.math-figure-options section{margin-bottom:10px}.math-figure-options h4{font-size:13px;margin:4px 0 7px;font-weight:400}.math-options{display:flex;gap:5px;flex-wrap:wrap;max-height:170px;overflow:auto}.math-options button{direction:ltr}.math-relations{grid-template-columns:repeat(8,minmax(0,1fr))}.math-letter-row{display:flex;gap:4px;justify-content:center;direction:ltr;margin-bottom:5px}.math-letter-row button{flex:1;min-width:0;padding:4px;font-size:14px}.math-latin .math-letter-row:last-child button{flex:initial}.math-letter-row:last-child button:nth-child(2){flex:1}}

.row-drag-grip{cursor:grab!important;touch-action:none;font-size:22px!important}.row-drag-grip:active{cursor:grabbing}.row-move-controls{display:flex;gap:2px}.row-move-controls button{min-width:30px;padding:3px!important}.row-meta{display:flex;gap:3px;align-items:center;flex-wrap:wrap}.proof-row.dragging{opacity:.5}.proof-row.drag-over{outline:2px solid var(--blue);outline-offset:2px}.proof-table th:nth-child(5){width:90px!important}

.reason-choice{background:white!important;border-color:#b5c9cd!important;color:var(--ink)!important}.used-reasons h4{font-size:13px;margin:8px 0}.used-reasons button{min-height:44px;margin:0 4px 5px 0;font-size:13px}#givens .point-run{white-space:nowrap}.storage-disclosure[hidden]{display:none}.goal-plus:hover{border-color:var(--blue);background:#edf5f2}

.staged-hints{margin-top:12px;border:1px solid #dce7e7;padding:12px;border-radius:8px}.staged-hints[hidden]{display:none}.staged-hints button{margin:3px}.desktop-compact{display:none}@media(min-width:1000px){.desktop-compact{display:inline-block}.compact-proof .proof-row{padding-block:5px}.compact-proof textarea{min-height:40px!important;height:40px}.row-menu{position:relative}.row-menu summary{cursor:pointer;min-width:36px;min-height:36px;text-align:center;font-size:24px;list-style:none}.row-menu>div{position:absolute;z-index:30;left:0;width:170px;background:white;border:1px solid #dce7e7;padding:6px;box-shadow:0 4px 16px #0002}.row-menu button{display:block;width:100%;font-size:12px}.claim-sentence-builder{display:flex;flex-wrap:wrap;gap:5px;margin-block:10px}.claim-sentence-builder select{flex:1;min-width:100px}.reason-subcategory{margin-inline-start:16px}.reason-subcategory>summary{padding:10px;cursor:pointer}.reason-path{font-size:12px;color:#55666a}}

.row-menu-popup{position:fixed;z-index:2147483000;width:180px;background:white;border:1px solid #cbd5d6;padding:6px;box-shadow:0 4px 18px #0003;border-radius:8px}.row-menu-popup[hidden]{display:none}.row-menu-popup button{display:block;width:100%;margin:2px 0;text-align:right;font-size:13px}.row-menu-trigger{font-size:24px!important;min-width:38px;min-height:40px!important}@media(min-width:1000px){.simple-workspace.compact-proof .proof-table td{padding-block:3px!important}.simple-workspace.compact-proof .proof-table .claim-edit textarea{min-height:44px!important;height:44px!important;padding:3px 6px!important;line-height:1.35!important;font-size:13px!important;resize:none}.compact-proof .claim-colors{padding:3px 6px!important;line-height:1.35!important;font-size:13px!important}.compact-proof .claim-entry-choices{display:none!important}.simple-workspace.compact-proof .proof-table .reason-choice{min-height:32px!important;padding:3px 6px!important;font-size:12px!important}.compact-proof .row-drag-handle{min-height:32px!important}.simple-workspace.compact-proof .proof-row .row-number{padding-top:4px!important}.compact-proof .row-menu-trigger{min-height:32px!important}}
