:root{
  --terracotta:#b95f47;--terracotta-deep:#9e4e3b;--terracotta-pale:#f5e5df;--mn-blue:#4f7189;--mn-blue-pale:#eaf1f5;--mn-green:#5f7d68;--mn-green-pale:#edf3ee;--mn-yellow:#b8873e;--mn-yellow-pale:#fbf3df;--mn-purple:#7a6684;--mn-purple-pale:#f1edf3;--mn-red:#b14d57;--mn-red-pale:#f8e8ea;--ink:#292725;--muted:#77716c;
  --line:#e8e3de;--canvas:#f7f6f4;--surface:#fff;--surface-soft:#fbfaf8;--success:#2f7357;--success-bg:#edf6f1;
  --danger:#a2473c;--danger-bg:#fbefec;--shadow:0 10px 30px rgba(52,42,36,.055);--sidebar:154px
}
*{box-sizing:border-box}html,body{margin:0;min-height:100%}body{background:var(--canvas);color:var(--ink);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}button,input{font:inherit}button{color:inherit}svg{display:block}.hidden{display:none!important}
.app-shell{min-height:100vh;display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr)}.sidebar{position:sticky;top:0;height:100vh;background:#f2f0ed;border-right:1px solid var(--line);padding:24px 16px 28px;display:flex;flex-direction:column;align-items:center}.brand-mark,.session-start-mark{position:relative;overflow:hidden;background:transparent}.brand-mark{width:62px;height:48px;margin-bottom:34px;align-self:flex-start}.brand-mark::before,.session-start-mark::before{content:"";position:absolute;width:78px;height:78px;left:-24px;top:-26px;border-radius:50%;background:var(--terracotta);box-shadow:inset 0 0 0 10px var(--terracotta-pale), inset 0 0 0 12px var(--terracotta)}.sidebar-nav{width:100%;display:grid;gap:8px}.nav-link{border:0;background:transparent;border-radius:10px;padding:12px 10px;display:flex;align-items:center;gap:10px;cursor:pointer;color:#6f6965;font-weight:650;text-align:left}.nav-link svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.nav-link.active,.nav-link:hover{background:var(--terracotta-pale);color:var(--terracotta-deep)}
.workspace{min-width:0;padding:0 42px 56px}.app-header{padding:27px 0 0}.header-row{min-height:66px;display:flex;align-items:flex-start;justify-content:space-between}.eyebrow,.kicker,.panel-kicker{margin:0 0 7px;text-transform:uppercase;letter-spacing:.11em;font-size:11px;font-weight:800;color:var(--terracotta)}.app-header h1{font-size:28px;margin:0;font-weight:720;letter-spacing:-.02em}.exercise-toolbar{margin-top:15px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:13px;min-height:64px;padding:10px 14px;display:grid;grid-template-columns:minmax(240px,1fr) 220px;align-items:center;gap:18px}.category-tabs{display:flex;gap:8px}.category-tab{padding:9px 13px;border-radius:9px;background:#f5f3f0;font-size:13px;font-weight:700;color:#6e6863;white-space:nowrap}.category-tab.active{background:var(--terracotta);color:white}.category-tab.muted{opacity:.48}.series-pill{font-size:14px;font-weight:700;padding-left:4px}.toolbar-progress{justify-self:end;width:210px;font-size:12px;color:var(--muted);font-weight:700}.progress-line{height:5px;background:#ece7e2;border-radius:99px;margin-top:7px;overflow:hidden}.progress-line span{display:block;height:100%;background:var(--terracotta);border-radius:99px;width:10%;transition:width .25s ease}
.view{display:none}.view.active{display:block}.library-head{padding:54px 0 24px;display:flex;justify-content:space-between}.library-head h2{font-size:34px;line-height:1.05;margin:0 0 10px;letter-spacing:-.03em}.library-head p:not(.kicker){margin:0;max-width:620px;color:var(--muted);line-height:1.6}.series-section{margin-top:20px}.section-title-row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:18px;margin-bottom:18px}.section-title-row>div{display:flex;align-items:baseline;gap:12px}.section-number{font-family:Georgia,serif;font-size:23px;color:var(--terracotta)}.section-title-row h3{margin:0;font-size:20px}.section-line{height:3px;width:44px;background:var(--terracotta);border-radius:99px}.series-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.series-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:20px;min-height:245px;box-shadow:0 6px 20px rgba(52,42,36,.035);display:flex;flex-direction:column}.series-card.featured{border-color:#dcc7be}.series-card.upcoming{background:#f8f6f3;color:#817b76}.series-card-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.series-index{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.series-status{font-size:11px;padding:5px 8px;border-radius:99px;background:var(--terracotta-pale);color:var(--terracotta-deep);font-weight:800}.upcoming .series-status{background:#ece8e4;color:#8d8782}.series-visual{height:70px;border-radius:10px;background:var(--terracotta-pale);display:flex;align-items:center;justify-content:center;gap:22px;margin-bottom:18px;font-family:Georgia,serif;font-size:21px}.mini-triangle{width:0;height:0;border-left:0 solid transparent;border-right:34px solid transparent;border-bottom:48px solid var(--terracotta);position:relative}.mini-triangle:after{content:"";position:absolute;left:3px;top:6px;width:0;height:0;border-right:28px solid transparent;border-bottom:40px solid var(--terracotta-pale)}.series-card h4{font-size:19px;margin:0 0 8px}.series-card p{font-size:14px;line-height:1.55;color:var(--muted);margin:0 0 18px}.series-meta{display:flex;gap:16px;color:#7a746f;font-size:12px;font-weight:700;margin-top:auto;margin-bottom:16px}.wide-placeholder{grid-column:1/3;min-height:150px}.muted-section{padding-top:18px}.btn{border:0;border-radius:9px;padding:12px 16px;font-weight:760;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px} .btn-primary{background:var(--terracotta);color:#fff}.btn-primary:hover{background:var(--terracotta-deep)}
.btn-blue{background:var(--mn-blue);color:#fff}.btn-blue:hover{background:#405f75}
.btn-green{background:var(--mn-green);color:#fff}.btn-green:hover{background:#4e6b57}
.btn-light{background:#f0ece8;color:#514c48}.btn-light:hover{background:#e8e2dc}
.btn:disabled{cursor:not-allowed;opacity:.52}.full{width:100%}
.exercise-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(330px,.72fr);gap:20px;margin-top:22px}.panel{background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.problem-panel{min-height:620px;display:flex;flex-direction:column}.panel-title-row{padding:26px 28px 0;display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.panel h2{font-size:23px;margin:0;letter-spacing:-.02em}.student-chip{font-size:12px;background:#f3f0ed;color:#746e69;padding:8px 10px;border-radius:99px}.triangle-wrap{min-height:420px;padding:15px 30px 0;display:grid;place-items:center}.triangle-wrap svg{width:100%;max-width:720px;height:390px}.edge{fill:none;stroke:#31302e;stroke-width:2}.edge.unknown-edge{stroke:var(--mn-red);stroke-width:2.6}.right-angle{fill:none;stroke:var(--mn-purple);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}.angle-sector{fill:var(--mn-blue-pale);opacity:.8}.angle-sector.unknown{fill:var(--mn-red-pale);opacity:.9}.angle-arc{fill:none;stroke:var(--mn-blue);stroke-width:2;stroke-linecap:round}.angle-arc.unknown{stroke:var(--mn-red)}.vertex{font-family:Georgia,"Times New Roman",serif;font-size:20px;font-style:italic;fill:#292725}.side-label{font-family:Georgia,"Times New Roman",serif;font-size:18px;fill:#57514d}.side-label.unknown{font-weight:800;fill:var(--mn-red)}.problem-text{margin:0;padding:4px 30px 32px;font-family:Georgia,"Times New Roman",serif;font-size:19px;line-height:1.5}.answer-panel{padding:26px;min-height:500px}.answer-form{margin-top:42px}.answer-expression{display:grid;grid-template-columns:auto minmax(90px,1fr) auto;align-items:center;gap:10px}.math-label{font-family:Georgia,"Times New Roman",serif;font-size:21px;font-style:italic;white-space:nowrap}.answer-expression input{min-width:0;width:100%;border:1.5px solid var(--terracotta);border-radius:9px;padding:13px 12px;background:#fff;font-size:18px;outline:none}.answer-expression input:focus{box-shadow:0 0 0 3px rgba(185,95,71,.12)}.unit{font-family:Georgia,serif}.attempt-text{font-size:12px;color:var(--muted);margin:9px 0 18px}.feedback{margin-top:14px;border-radius:9px;padding:12px 13px;font-size:13px;line-height:1.45}.feedback.success{background:var(--success-bg);color:var(--success)}.feedback.error{background:var(--danger-bg);color:var(--danger)}#nextButton{margin-top:10px}.answer-note{margin-top:24px;border-top:1px solid var(--line);padding-top:18px;display:flex;gap:10px;color:var(--muted);font-size:12px;line-height:1.5}.answer-note p{margin:0}.note-icon{width:21px;height:21px;border-radius:50%;display:grid;place-items:center;background:#eee9e5;color:#756e69;font-weight:800;flex:0 0 auto}
.empty-state{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:52px 28px;text-align:center;max-width:620px;margin-top:20px}.empty-icon{width:48px;height:48px;border-radius:50%;background:var(--terracotta-pale);color:var(--terracotta);display:grid;place-items:center;margin:0 auto 16px;font-weight:900;font-size:21px}.empty-state h3{margin:0 0 8px}.empty-state p{margin:0 auto 18px;color:var(--muted)}.results-list{display:grid;gap:12px;margin-top:20px}.result-row{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:17px 18px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:18px;align-items:center}.result-row h3{margin:0 0 4px;font-size:17px}.result-row p{margin:0;color:var(--muted);font-size:12px}.result-score{font-family:Georgia,serif;font-size:25px;font-weight:700;color:var(--terracotta-deep)}.result-actions{display:flex;gap:8px}.result-actions .btn{padding:9px 11px;font-size:12px}
.report-card{margin:38px auto 0;max-width:980px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:34px;box-shadow:var(--shadow)}.report-top{display:flex;justify-content:space-between;align-items:center;border-bottom:3px solid var(--terracotta);padding-bottom:18px}.report-top h2{font-size:27px;margin:0}.report-meta{display:grid;grid-template-columns:2fr 1fr 1fr;gap:14px;margin:22px 0}.report-meta div{padding:12px 14px;background:var(--surface-soft);border-radius:9px}.report-meta span,.score-card span{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.07em;font-weight:750;margin-bottom:4px}.score-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.score-card{border:1px solid var(--line);border-radius:10px;padding:14px}.score-card strong{font-family:Georgia,serif;font-size:24px}.primary-score{background:var(--terracotta);color:#fff;border-color:var(--terracotta)}.primary-score span{color:#f7eae5}.report-table-wrap{margin-top:24px;overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px}th,td{text-align:left;padding:11px 9px;border-bottom:1px solid var(--line);vertical-align:top}th{color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.07em}.status-ok{color:var(--success);font-weight:800}.status-no{color:var(--danger);font-weight:800}.report-actions{display:flex;justify-content:center;gap:10px;margin:20px auto 0;max-width:980px}
.modal-backdrop{position:fixed;inset:0;background:rgba(35,31,29,.38);display:grid;place-items:center;padding:20px;z-index:20}.student-modal{width:min(460px,100%);background:#fff;border-radius:15px;padding:28px;box-shadow:0 24px 70px rgba(30,25,22,.22);position:relative}.student-modal h2{margin:0 0 8px;font-size:28px}.student-modal>p:not(.kicker){color:var(--muted);font-size:14px;line-height:1.55;margin:0 0 22px}.modal-close{position:absolute;right:16px;top:12px;border:0;background:transparent;font-size:27px;color:#8a837d;cursor:pointer}.field{display:grid;gap:7px;margin-bottom:15px}.field span{font-size:12px;font-weight:780}.field input{border:1px solid #dcd5cf;border-radius:9px;padding:12px 13px;outline:none}.field input:focus{border-color:var(--terracotta);box-shadow:0 0 0 3px rgba(185,95,71,.1)}
@media(max-width:1050px){.workspace{padding-left:28px;padding-right:28px}.exercise-grid{grid-template-columns:1fr}.series-grid{grid-template-columns:1fr 1fr}.exercise-toolbar{grid-template-columns:1fr 1fr}.toolbar-progress{grid-column:1/-1;width:100%}.category-tabs{display:none}}
@media print{body{background:#fff}.no-print,.sidebar,.app-header,.report-actions{display:none!important}.app-shell{display:block}.workspace{padding:0}.view{display:none!important}#reportView{display:block!important}.report-card{margin:0;box-shadow:none;border:0;padding:0;max-width:none}.report-table-wrap{overflow:visible}}


/* Desktop composition: keep the app elegant and contained in one viewport. */
@media (min-width:1051px){
  html,body{height:100%;overflow:hidden}
  .app-shell{height:100vh;min-height:0}
  .sidebar{height:100vh;padding-top:22px;padding-bottom:22px}
  .brand-mark{width:48px;height:48px;margin-bottom:28px}
  .workspace{height:100vh;min-height:0;padding:0 36px 24px;overflow:hidden}
  .app-header{padding-top:18px}
  .header-row{min-height:52px}
  .app-header h1{font-size:25px}
  .eyebrow{margin-bottom:4px}
  .exercise-toolbar{margin-top:10px;min-height:58px;padding:8px 12px}

  .view.active{height:calc(100vh - 88px);overflow:hidden}
  #exerciseView.view.active{height:calc(100vh - 158px)}

  .library-head{padding:28px 0 14px}
  .library-head h2{font-size:30px;margin-bottom:7px}
  .library-head p:not(.kicker){line-height:1.45}
  .series-section{margin-top:10px}
  .section-title-row{margin-bottom:12px}
  .series-grid{gap:14px}
  .series-card{padding:16px;min-height:205px}
  .series-card-top{margin-bottom:12px}
  .series-visual{height:54px;margin-bottom:12px;font-size:18px}
  .mini-triangle{border-right-width:28px;border-bottom-width:39px}
  .mini-triangle:after{border-right-width:23px;border-bottom-width:32px}
  .series-card h4{font-size:17px;margin-bottom:6px}
  .series-card p{font-size:13px;line-height:1.42;margin-bottom:10px}
  .series-meta{margin-bottom:11px}
  .wide-placeholder{min-height:105px}
  .muted-section{padding-top:8px}

  .exercise-grid{height:100%;margin-top:14px;gap:18px;align-items:stretch}
  .panel{min-height:0}
  .problem-panel{min-height:0;height:100%}
  .panel-title-row{padding:20px 24px 0}
  .panel h2{font-size:21px}
  .triangle-wrap{min-height:0;flex:1;padding:4px 24px 0}
  .triangle-wrap svg{width:100%;max-width:690px;height:min(36vh,330px)}
  .problem-text{padding:2px 26px 22px;font-size:17px}
  .answer-panel{padding:22px;height:100%;min-height:0;display:flex;flex-direction:column}
  .answer-form{margin-top:28px}
  .answer-note{margin-top:auto;padding-top:14px}

  #resultsView.view.active{overflow:auto;padding-bottom:20px}
  .results-list{margin-top:14px;gap:9px}
  .result-row{padding:13px 15px}

  #reportView.view.active{display:flex;flex-direction:column;overflow:hidden}
  .report-card{margin:18px auto 0;padding:24px;max-width:980px;min-height:0;width:100%;display:flex;flex-direction:column;overflow:hidden}
  .report-top{padding-bottom:12px}
  .report-top h2{font-size:23px}
  .report-meta{margin:14px 0;gap:10px}
  .report-meta div{padding:9px 11px}
  .score-card{padding:10px}
  .score-card strong{font-size:21px}
  .report-table-wrap{margin-top:14px;overflow:auto;min-height:0;flex:1}
  th,td{padding:8px 7px}
  .report-actions{margin-top:12px}
}

.progress-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.exercise-timer{font-variant-numeric:tabular-nums;color:var(--muted);font-size:12px;font-weight:750}.report-meta{grid-template-columns:2fr 1fr 1fr 1fr}
@media(max-width:1050px){.report-meta{grid-template-columns:1fr 1fr}}
.angle-label{font-family:Georgia,"Times New Roman",serif;font-size:18px;fill:#57514d}.angle-label.unknown{font-weight:800;fill:var(--mn-red)}.trig-visual{gap:16px}

/* Session start: identify the student once, then use the same data for every series. */
.session-start .app-shell{grid-template-columns:1fr}
.session-start .sidebar{display:none}
.session-start .workspace{max-width:100%;padding-left:36px;padding-right:36px}
.session-start-wrap{height:calc(100vh - 88px);display:grid;place-items:center;padding-bottom:7vh}
.session-start-card{width:min(430px,100%);background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:30px;box-shadow:var(--shadow)}
.session-start-card h2{font-size:30px;letter-spacing:-.03em;margin:0 0 8px}
.session-start-card>p:not(.kicker){margin:0 0 23px;color:var(--muted);font-size:14px;line-height:1.55}
.session-start-mark{width:64px;height:48px;margin:0 auto 18px}
@media (min-width:1051px){
  #startView.view.active{height:calc(100vh - 88px)}
}
\n\n/* v9 — compact series library: keep the complete overview visible on a desktop. */
@media (min-width:1051px){
  #seriesView.view.active{
    height:calc(100vh - 72px);
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  #seriesView .library-head{padding:14px 0 8px;flex:0 0 auto}
  #seriesView .library-head h2{font-size:27px;margin-bottom:4px}
  #seriesView .library-head p:not(.kicker){font-size:13px;line-height:1.35}
  #seriesView .series-section{margin-top:6px;flex:0 0 auto}
  #seriesView .section-title-row{margin-bottom:8px;gap:12px}
  #seriesView .section-number{font-size:20px}
  #seriesView .section-title-row h3{font-size:18px}
  #seriesView .series-grid{gap:12px}
  #seriesView .series-card{padding:13px 14px;min-height:0;height:188px;border-radius:12px}
  #seriesView .series-card-top{margin-bottom:7px;min-height:14px}
  #seriesView .series-visual{height:42px;margin-bottom:8px;font-size:16px;border-radius:8px}
  #seriesView .mini-triangle{border-right-width:24px;border-bottom-width:33px}
  #seriesView .mini-triangle:after{left:3px;top:5px;border-right-width:19px;border-bottom-width:27px}
  #seriesView .series-card h4{font-size:16px;margin-bottom:4px}
  #seriesView .series-card p{font-size:12.5px;line-height:1.3;margin-bottom:6px}
  #seriesView .series-meta{font-size:11px;margin-bottom:7px;gap:12px}
  #seriesView .btn{padding:9px 13px;font-size:12.5px}
  #seriesView .muted-section{padding-top:2px;margin-top:8px}
  #seriesView .muted-section .section-title-row{margin-bottom:7px}
  #seriesView .wide-placeholder{height:auto;min-height:68px;max-height:76px;padding:12px 14px;justify-content:center}
  #seriesView .wide-placeholder h4{margin-bottom:3px}
  #seriesView .wide-placeholder p{margin:0}
}
\n\n/* v13 — restore the active category chip and tighten desktop composition. */
.toolbar-series{display:flex;align-items:center;gap:10px;min-width:0}.toolbar-series .series-pill{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.empty-state{max-width:none;width:100%}
@media (min-width:1051px){
  .header-row{min-height:46px}
  .app-header{padding-top:14px}
  .exercise-toolbar{margin-top:8px;min-height:52px;padding:7px 11px;grid-template-columns:minmax(0,1fr) 210px}
  .category-tab{padding:7px 11px;font-size:12px}
  .series-pill{font-size:13px}
  #exerciseView.view.active{height:calc(100vh - 136px)}
  .exercise-grid{margin-top:10px;gap:16px;height:calc(100% - 2px)}
  .problem-panel,.answer-panel{height:100%;max-height:100%;overflow:hidden}
  .panel-title-row{padding:16px 21px 0}
  .panel-kicker{margin-bottom:4px}
  .panel h2{font-size:19px}
  .student-chip{padding:6px 9px;font-size:11px}
  .triangle-wrap{padding:0 20px;min-height:0;overflow:hidden}
  .triangle-wrap svg{height:min(34vh,285px);max-width:630px}
  .problem-text{padding:0 22px 16px;font-size:16px;line-height:1.35}
  .answer-panel{padding:17px 19px}
  .answer-form{margin-top:20px}
  .answer-expression input{padding:10px 11px;font-size:17px}
  .math-label{font-size:19px}
  .attempt-text{margin:7px 0 12px}
  .btn{padding:10px 14px}
  .feedback{margin-top:10px;padding:10px 11px}
  #nextButton{margin-top:8px}
  .answer-note{margin-top:auto;padding-top:10px;font-size:11.5px;line-height:1.35}
  #resultsView .empty-state{margin-top:12px;padding:38px 28px}
}


/* v15 — persistent student identity in the page header. */
.session-student{display:flex;align-items:center;gap:9px;margin-top:2px;padding:7px 9px 7px 12px;border:1px solid var(--line);background:var(--surface);border-radius:999px;box-shadow:0 4px 14px rgba(52,42,36,.035);white-space:nowrap}
.session-student-name{font-size:12px;font-weight:760;color:var(--ink)}
.session-student-class{display:inline-grid;place-items:center;min-width:31px;height:25px;padding:0 8px;border-radius:999px;background:var(--terracotta-pale);color:var(--terracotta-deep);font-size:11px;font-weight:850}
@media (min-width:1051px){
  .session-student{margin-top:0;padding:6px 8px 6px 11px}
  .session-student-class{height:23px}
}

/* Hints */
.hint-button{margin-top:9px;border:1px solid #ead9ad;background:var(--mn-yellow-pale);color:#775a24}
.hint-button:hover:not(:disabled){background:#eee8e3}
.hint-button:disabled{opacity:.5;cursor:not-allowed}
.hint-box{margin-top:10px;border-radius:9px;padding:10px 12px;background:var(--terracotta-pale);color:#6d493f;font-size:12.5px;line-height:1.45;border:1px solid #ead4cb}
@media (min-width:1051px) and (max-height:850px){.hint-button{margin-top:7px}.hint-box{margin-top:7px;padding:8px 10px;font-size:11.5px}}


/* v19 — broader MathNotes palette, with terracotta remaining the primary accent. */

#seriesView .series-card:nth-child(2) .series-visual{background:var(--mn-blue-pale);color:var(--mn-blue)}
#seriesView .series-card:nth-child(3) .series-visual{background:var(--mn-green-pale);color:var(--mn-green)}
#seriesView .series-section:nth-of-type(2) .series-card:nth-child(1) .series-visual{background:var(--mn-purple-pale);color:var(--mn-purple)}
#seriesView .series-section:nth-of-type(2) .series-card:nth-child(2) .series-visual{background:var(--mn-blue-pale);color:var(--mn-blue)}
#seriesView .series-section:nth-of-type(2) .series-card:nth-child(3) .series-visual{background:var(--mn-green-pale);color:var(--mn-green)}
.result-score{color:var(--mn-green)}
.empty-icon{background:var(--mn-blue-pale);color:var(--mn-blue)}
.answer-note .note-icon{background:var(--mn-blue-pale);color:var(--mn-blue)}
.hint-button{background:var(--mn-yellow-pale);border-color:#ead9ad;color:#775a24}
.hint-button:hover:not(:disabled){background:#f6e9c7}
.hint-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hint-box{background:var(--mn-yellow-pale);color:#685126;border-color:#ead9ad}
.feedback.success{background:var(--mn-green-pale);color:var(--mn-green)}

/* v20 — recolor Pythagoras card to match the broader MathNotes palette. */
#seriesView .series-section:nth-of-type(1) .series-card:nth-child(1) .series-visual{background:var(--mn-purple-pale);color:var(--mn-purple)}
#seriesView .series-section:nth-of-type(1) .series-card:nth-child(1) .mini-triangle{border-bottom-color:var(--mn-purple)}
#seriesView .series-section:nth-of-type(1) .series-card:nth-child(1) .mini-triangle:after{border-bottom-color:var(--mn-purple-pale)}
#seriesView .series-section:nth-of-type(1) .series-card:nth-child(2) .mini-triangle{border-bottom-color:var(--mn-blue)}
#seriesView .series-section:nth-of-type(1) .series-card:nth-child(2) .mini-triangle:after{border-bottom-color:var(--mn-blue-pale)}
#seriesView .series-section:nth-of-type(1) .series-card:nth-child(3) .mini-triangle{border-bottom-color:var(--mn-green)}
#seriesView .series-section:nth-of-type(1) .series-card:nth-child(3) .mini-triangle:after{border-bottom-color:var(--mn-green-pale)}
.series-separator{font-weight:700;opacity:.8}

/* v21 — robust desktop viewport layout.
   Do not guess the remaining height with calc(...). The workspace is a flex
   column: the header takes what it needs and the active view gets exactly the
   remaining viewport height. This keeps every card border visible. */
@media (min-width:1051px){
  html,body{height:100%;overflow:hidden}
  .app-shell{height:100vh;min-height:0}
  .workspace{
    height:100vh;
    min-height:0;
    padding:0 36px 14px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
  }
  .app-header{flex:0 0 auto;padding-top:14px}
  .header-row{min-height:44px;flex:0 0 auto}

  /* A normal page gets exactly the room that remains below the header. */
  .view.active{
    flex:1 1 auto;
    height:auto!important;
    min-height:0;
    overflow:hidden;
  }

  /* SERIES LIBRARY — two equal rows that resize with the screen height. */
  #seriesView.view.active{
    display:grid;
    grid-template-rows:auto minmax(0,1fr) minmax(0,1fr);
    gap:8px;
    height:auto!important;
    min-height:0;
    overflow:hidden;
    padding-bottom:0;
  }
  #seriesView .library-head{
    padding:8px 0 4px;
    min-height:0;
  }
  #seriesView .library-head h2{font-size:26px;margin-bottom:3px}
  #seriesView .library-head p:not(.kicker){font-size:12.5px;line-height:1.3}
  #seriesView .series-section{
    margin:0;
    padding:0;
    min-height:0;
    display:flex;
    flex-direction:column;
  }
  #seriesView .muted-section{margin:0;padding:0}
  #seriesView .section-title-row{
    flex:0 0 auto;
    margin:0 0 6px;
    min-height:22px;
  }
  #seriesView .section-number{font-size:18px}
  #seriesView .section-title-row h3{font-size:16px}
  #seriesView .series-grid{
    flex:1 1 auto;
    min-height:0;
    gap:11px;
  }
  #seriesView .series-card{
    height:auto;
    min-height:0;
    padding:10px 13px;
    border-radius:11px;
    overflow:hidden;
  }
  #seriesView .series-card-top{margin-bottom:5px;min-height:12px}
  #seriesView .series-index{font-size:10.5px}
  #seriesView .series-visual{height:38px;min-height:38px;margin-bottom:7px;font-size:15px}
  #seriesView .series-card h4{font-size:15px;margin-bottom:3px}
  #seriesView .series-card p{font-size:11.5px;line-height:1.25;margin-bottom:5px}
  #seriesView .series-meta{font-size:10.5px;margin-bottom:6px;gap:11px}
  #seriesView .btn{padding:8px 12px;font-size:12px;min-height:34px}

  /* EXERCISE — toolbar + grid share the available space without overflow. */
  #exerciseView.view.active{
    display:flex;
    flex-direction:column;
    height:auto!important;
    min-height:0;
    overflow:hidden;
  }
  .exercise-toolbar{margin-top:7px;min-height:50px;padding:6px 10px}
  #exerciseView .exercise-grid{
    flex:1 1 auto;
    height:auto;
    min-height:0;
    margin-top:8px;
    margin-bottom:0;
    gap:14px;
    align-items:stretch;
  }
  #exerciseView .panel{height:100%;min-height:0;max-height:none}
  #exerciseView .problem-panel{display:flex;flex-direction:column;overflow:hidden}
  #exerciseView .panel-title-row{padding:13px 19px 0}
  #exerciseView .panel h2{font-size:18px}
  #exerciseView .triangle-wrap{
    flex:1 1 auto;
    min-height:0;
    padding:0 18px;
    overflow:hidden;
  }
  #exerciseView .triangle-wrap svg{
    width:100%;
    max-width:820px;
    height:100%;
    min-height:0;
    max-height:390px;
  }
  #exerciseView .problem-text{
    flex:0 0 auto;
    padding:2px 20px 14px;
    font-size:15.5px;
    line-height:1.32;
  }
  #exerciseView .answer-panel{
    height:100%;
    min-height:0;
    padding:14px 17px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  #exerciseView .answer-form{margin-top:14px}
  #exerciseView .answer-expression input{padding:9px 10px;font-size:16px}
  #exerciseView .math-label{font-size:18px}
  #exerciseView .attempt-text{margin:6px 0 9px}
  #exerciseView .btn{padding:9px 12px}
  #exerciseView .hint-button{margin-top:7px}
  #exerciseView .hint-box{margin-top:7px;padding:8px 10px;font-size:11.5px;line-height:1.35}
  #exerciseView .feedback{margin-top:8px;padding:8px 10px}
  #exerciseView #nextButton{margin-top:7px}
  #exerciseView .answer-note{margin-top:auto;padding-top:9px;font-size:11px;line-height:1.3}

  /* RESULTS / REPORT also use the remaining viewport cleanly. */
  #resultsView.view.active{height:auto!important;min-height:0;overflow:auto;padding-bottom:0}
  #reportView.view.active{height:auto!important;min-height:0;overflow:hidden}
}

/* Slightly tighter composition on shorter laptop screens. */
@media (min-width:1051px) and (max-height:780px){
  .workspace{padding-bottom:10px}
  #seriesView .library-head{padding-top:5px}
  #seriesView .library-head h2{font-size:24px}
  #seriesView .library-head p:not(.kicker){font-size:12px}
  #seriesView .section-title-row{margin-bottom:4px;min-height:19px}
  #seriesView .series-visual{height:34px;min-height:34px;margin-bottom:5px;font-size:14px}
  #seriesView .series-card{padding:8px 11px}
  #seriesView .series-card h4{font-size:14px}
  #seriesView .series-card p{font-size:11px;line-height:1.2;margin-bottom:4px}
  #seriesView .series-meta{margin-bottom:4px}
  #seriesView .btn{padding:7px 10px;min-height:31px}

  .exercise-toolbar{min-height:46px}
  #exerciseView .exercise-grid{margin-top:6px}
  #exerciseView .panel-title-row{padding-top:10px}
  #exerciseView .triangle-wrap svg{max-height:310px}
  #exerciseView .problem-text{font-size:15px;padding-bottom:11px}
  #exerciseView .answer-panel{padding:12px 15px}
  #exerciseView .answer-form{margin-top:10px}
}


/* v26 — chapter-style corner circle on the session card. */
.session-start-card{position:relative;overflow:hidden}
.session-start-card > *{position:relative;z-index:1}
.session-start-mark{
  position:absolute;
  z-index:0;
  width:190px;
  height:190px;
  left:-108px;
  top:-108px;
  margin:0;
  border-radius:50%;
  background:var(--terracotta);
  overflow:visible;
  pointer-events:none;
}
.session-start-mark::before{display:none}

/* v29 — keep the start-page kicker clear of the chapter circle. */
.session-start-card > .kicker{
  margin-left:112px;
}

/* v30 — use the same cropped chapter circle in the sidebar as on the start card. */
.sidebar{
  position:sticky;
  overflow:hidden;
}
.brand-mark{
  position:absolute;
  z-index:0;
  width:190px !important;
  height:190px !important;
  left:-108px;
  top:-108px;
  margin:0 !important;
  border-radius:50%;
  background:var(--terracotta);
  box-shadow:none;
  pointer-events:none;
}
.brand-mark::before{display:none !important}
.sidebar-nav{
  position:relative;
  z-index:1;
  margin-top:170px;
}


/* v31 — proper mathematical angle hat above the vertex letter.
   Avoid Unicode combining circumflex in the exercise UI because browser fonts
   position it inconsistently. */
.angle-symbol{
  position:relative;
  display:inline-block;
  min-width:.72em;
  padding-top:.28em;
  text-align:center;
  line-height:1;
  font-family:Georgia,"Times New Roman",serif;
  font-style:italic;
}
.angle-symbol::before,.angle-symbol::after{
  content:"";
  position:absolute;
  top:.08em;
  width:.38em;
  border-top:1.5px solid currentColor;
}
.angle-symbol::before{
  left:50%;
  transform-origin:right center;
  transform:translateX(-100%) rotate(-28deg);
}
.angle-symbol::after{
  left:50%;
  transform-origin:left center;
  transform:rotate(28deg);
}
.math-label .angle-symbol{font-size:1em;vertical-align:.02em}
.problem-text .angle-symbol{vertical-align:.02em}


/* v33 — compact, content-led series cards. */
@media (min-width:1051px){
  #seriesView.view.active{
    grid-template-rows:auto auto auto;
    align-content:start;
    gap:13px;
  }
  #seriesView .series-section{
    flex:0 0 auto;
    min-height:0;
  }
  #seriesView .series-grid{
    flex:0 0 auto;
    align-items:start;
    gap:16px;
  }
  #seriesView .series-card{
    height:auto;
    min-height:0;
    padding:15px 16px 14px;
    border-radius:14px;
    overflow:visible;
  }
  #seriesView .series-card-top{
    margin:0 0 10px;
    min-height:auto;
  }
  #seriesView .series-index{
    font-size:11px;
    letter-spacing:.095em;
  }
  #seriesView .series-visual{
    height:54px;
    min-height:54px;
    margin:0 0 14px;
    padding:0 18px;
    border-radius:11px;
    font-size:17px;
    gap:20px;
  }
  #seriesView .series-card h4{
    margin:0 0 5px;
    font-size:17px;
    line-height:1.18;
  }
  #seriesView .series-card p{
    min-height:34px;
    margin:0 0 10px;
    font-size:12.5px;
    line-height:1.35;
  }
  #seriesView .series-meta{
    margin:0 0 11px;
    display:flex;
    flex-wrap:wrap;
    gap:7px 14px;
    font-size:11px;
  }
  #seriesView .series-meta span{
    position:relative;
    background:none !important;
    border:none !important;
    box-shadow:none !important;
    outline:none !important;
    padding:0 !important;
    border-radius:0 !important;
  }
  #seriesView .series-meta span + span::before{
    content:"·";
    position:absolute;
    left:-9px;
    color:#b3aca6;
  }
  #seriesView .btn{
    min-height:36px;
    padding:9px 12px;
    font-size:12.5px;
  }
  #seriesView .section-title-row{
    margin-bottom:8px;
  }
}

@media (min-width:1051px) and (max-height:780px){
  #seriesView.view.active{gap:9px}
  #seriesView .series-grid{gap:12px}
  #seriesView .series-card{padding:11px 13px 10px}
  #seriesView .series-card-top{margin-bottom:7px}
  #seriesView .series-visual{height:42px;min-height:42px;margin-bottom:9px;font-size:15px}
  #seriesView .series-card h4{font-size:15px;margin-bottom:3px}
  #seriesView .series-card p{min-height:27px;font-size:11.5px;line-height:1.25;margin-bottom:7px}
  #seriesView .series-meta{font-size:10.5px;margin-bottom:7px}
  #seriesView .btn{min-height:32px;padding:7px 10px;font-size:11.5px}
}

/* v34 — concise series intro */
#seriesView .series-intro{padding-bottom:8px;align-items:center}
#seriesView .series-intro .kicker{margin:0;font-size:13px;letter-spacing:.11em}
@media (min-width:1051px){#seriesView .series-intro{padding:8px 0 6px}}

/* v41 — sidebar hover stays terracotta. */
.nav-link:hover{background:var(--terracotta-pale);color:var(--terracotta-deep)}


/* v45 — softer primary action on series cards */
#seriesView .series-card .btn-primary,
#seriesView .series-card .btn-green{
  background:#c87861;
  color:#fff;
  padding:10px 14px;
  font-weight:700;
  box-shadow:none;
  border:1px solid rgba(158,78,59,.08);
}
#seriesView .series-card .btn-primary:hover,
#seriesView .series-card .btn-green:hover{
  background:#bd6a54;
  filter:none;
}


/* v46 — softer green treatment for the check button */
#checkButton.btn-green,
button#checkButton.btn-green{
  background:#73907c;
  color:#fff;
  padding:10px 14px;
  font-weight:700;
  box-shadow:none;
  border:1px solid rgba(95,125,104,.08);
}
#checkButton.btn-green:hover,
button#checkButton.btn-green:hover{
  background:#688472;
  filter:none;
}

/* v48 — multiple choice */
.mc-options{display:grid;gap:9px;margin-bottom:14px}
.mc-option{border:1px solid #ded8d2;background:#fff;border-radius:9px;padding:11px 13px;font-weight:700;cursor:pointer}
.mc-option:hover{border-color:var(--terracotta);background:var(--terracotta-pale)}
.mc-option.selected{border-color:var(--terracotta);background:var(--terracotta-pale);color:var(--terracotta-deep);box-shadow:0 0 0 2px rgba(185,95,71,.08)}
.mc-option:disabled{cursor:default;opacity:.78}


/* v64 — direct PDF capture of the real web report */
.pdf-capture-host{
  position:fixed;
  left:-12000px;
  top:0;
  width:1040px;
  background:#fff;
  z-index:-1;
}
.pdf-capture-report{
  width:980px!important;
  max-width:980px!important;
  margin:0!important;
  box-shadow:none!important;
  overflow:visible!important;
  min-height:0!important;
}
.pdf-capture-report .report-table-wrap{
  overflow:visible!important;
  max-height:none!important;
}
.pdf-capture-report table{
  page-break-inside:auto;
}


/* Exercise-specific hints */
.hint-box .hint-formula{
  display:inline-flex;
  align-items:center;
  gap:.18rem;
  font-size:1.02rem;
  font-weight:650;
  letter-spacing:.01em;
}
.hint-box .hint-formula-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:.3rem;
  margin-top:.35rem;
}
.hint-frac{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  line-height:1.05;
  vertical-align:middle;
  margin-left:.15rem;
}
.hint-frac > span:first-child{
  border-bottom:1.4px solid currentColor;
  padding:0 .2rem .12rem;
}
.hint-frac > span:last-child{
  padding:.12rem .2rem 0;
}


/* v77 — polished MathNotes-style hints with real mathematical typesetting. */
.hint-box{
  position:relative;
  margin-top:10px;
  padding:13px 15px 13px 17px;
  border:1px solid #ead9ad;
  border-left:3px solid var(--mn-yellow);
  border-radius:8px;
  background:#fffaf0;
  color:var(--ink);
  font-size:13px;
  line-height:1.5;
  box-shadow:0 3px 10px rgba(80,64,35,.025);
}
.hint-box::before{
  content:"TIP";
  display:block;
  margin-bottom:6px;
  color:var(--mn-yellow);
  font-size:9.5px;
  line-height:1;
  letter-spacing:.12em;
  font-weight:850;
}
.hint-copy{
  color:#5f574d;
  font-size:13px;
}
.hint-math{
  font-size:16px;
  color:#302d2a;
  overflow:visible;
}
.hint-math mjx-container[display="true"]{
  margin:.2em 0 .05em!important;
  text-align:left!important;
}
.hint-memory{
  font-family:Georgia,"Times New Roman",serif;
  font-size:16px;
  font-weight:700;
  letter-spacing:.035em;
  color:#4e4943;
}
.hint-memory span{
  padding:0 .28rem;
  color:var(--mn-yellow);
  font-weight:400;
}
@media (min-width:1051px) and (max-height:850px){
  .hint-box{padding:10px 12px 10px 14px;font-size:12px}
  .hint-box::before{margin-bottom:4px}
  .hint-math{font-size:14px}
}


/* v83 — cleaner first-row visuals with fraction notation */
.series-visual--figure{
  height:102px;
  min-height:102px;
  padding:10px 16px;
}
.series-visual-layout{
  display:grid;
  grid-template-columns:144px 1fr;
  align-items:center;
  gap:16px;
  width:100%;
}
.series-visual-layout--mixed{
  grid-template-columns:132px 1fr;
}
.series-visual-layout--trig{
  grid-template-columns:126px 1fr;
}
.series-figure-svg{
  width:140px;
  height:74px;
  overflow:visible;
  display:block;
}
.series-figure-label{
  fill:currentColor;
  font-family:Georgia,serif;
  font-style:italic;
  font-size:17px;
}
.series-figure-angle{font-size:15px}
.series-formula,
.series-formula-stack{
  font-family:Georgia,serif;
}
.series-formula{
  font-size:24px;
  line-height:1.05;
  white-space:nowrap;
}
.series-formula-stack{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.series-formula-stack .series-formula{
  font-size:20px;
}

.series-formula--fractioned{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.frac{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  line-height:1;
  vertical-align:middle;
  min-width:24px;
}
.frac .num,
.frac .den{
  display:block;
  padding:0 4px;
}
.frac .num{
  border-bottom:1.5px solid currentColor;
  padding-bottom:2px;
}
.frac .den{
  padding-top:2px;
}
.series-formula-stack--trig{
  gap:2px;
}
.series-formula-stack--trig .series-formula{
  font-size:20px;
}
.series-formula-stack--mixedformulas .series-formula{
  font-size:19px;
}

@media (min-width:1051px) and (max-height:900px){
  #seriesView .series-visual--figure{
    height:88px;
    min-height:88px;
    padding:8px 14px;
  }
  #seriesView .series-visual-layout{
    grid-template-columns:114px 1fr;
    gap:10px;
  }
  #seriesView .series-visual-layout--mixed{
    grid-template-columns:108px 1fr;
  }
  #seriesView .series-visual-layout--trig{
    grid-template-columns:104px 1fr;
  }
  #seriesView .series-figure-svg{
    width:108px;
    height:56px;
  }
  #seriesView .series-formula{font-size:20px}
  #seriesView .series-formula-stack .series-formula{font-size:17px}
  #seriesView .series-formula-stack--trig .series-formula{font-size:16px}
}

@media (min-width:1051px) and (max-height:780px){
  #seriesView .series-visual--figure{
    height:80px;
    min-height:80px;
    padding:7px 12px;
  }
  #seriesView .series-visual-layout{
    grid-template-columns:92px 1fr;
    gap:9px;
  }
  #seriesView .series-visual-layout--mixed{
    grid-template-columns:88px 1fr;
  }
  #seriesView .series-visual-layout--trig{
    grid-template-columns:86px 1fr;
  }
  #seriesView .series-figure-svg{
    width:88px;
    height:46px;
  }
  #seriesView .series-formula{font-size:17px}
  #seriesView .series-formula-stack .series-formula{font-size:14px}
  #seriesView .series-formula-stack--trig .series-formula{font-size:13px}
}

@media (max-width:1050px){
  .series-visual--figure{
    height:auto;
    min-height:0;
    padding:12px 14px;
  }
  .series-visual-layout,
  .series-visual-layout--mixed{
    grid-template-columns:1fr;
    justify-items:center;
    gap:8px;
  }
  .series-figure-svg{
    width:132px;
    height:64px;
  }
  .series-formula{font-size:20px;text-align:center}
  .series-formula-stack .series-formula{font-size:17px}
  .series-formula--fractioned{justify-content:center}
}


/* v84 — simpler first-row cards: no right-angle marker, one trig ratio. */
#seriesView .series-section:nth-of-type(1) .series-card:nth-child(2) .series-formula--fractioned{
  font-size:24px;
}
@media (min-width:1051px) and (max-height:900px){
  #seriesView .series-section:nth-of-type(1) .series-card:nth-child(2) .series-formula--fractioned{font-size:20px}
}
@media (min-width:1051px) and (max-height:780px){
  #seriesView .series-section:nth-of-type(1) .series-card:nth-child(2) .series-formula--fractioned{font-size:17px}
}


/* v85 — twee reeksen voor willekeurige driehoeken. De stijl van reeks 1–3 blijft onaangeroerd. */
:root{
  --mn-ochre:#a87322;
  --mn-ochre-pale:#f7eed8;
  --mn-coral:#a95c55;
  --mn-coral-pale:#f7e7e4;
}
#seriesView .arbitrary-series-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  max-width:none;
}
#seriesView .arbitrary-basic-card .series-visual{
  background:var(--mn-ochre-pale);
  color:var(--mn-ochre);
}
#seriesView .arbitrary-advanced-card .series-visual{
  background:var(--mn-coral-pale);
  color:var(--mn-coral);
}
#seriesView .arbitrary-card-visual{
  height:88px;
  min-height:88px;
}
#seriesView .arbitrary-card-layout{
  grid-template-columns:135px 1fr;
}
#seriesView .arbitrary-card-triangle{
  width:132px;
  height:68px;
}
#seriesView .arbitrary-card-copy .series-formula{
  font-size:18px;
}
#seriesView .arbitrary-cosine-formula{
  line-height:1.15;
}
#seriesView .series-card-subformula{
  font-family:inherit;
  font-size:12px;
  font-weight:750;
  letter-spacing:.04em;
  opacity:.78;
}
#seriesView .arbitrary-sine-formula{
  justify-content:center;
  font-size:20px;
}
#seriesView .arbitrary-sine-formula .frac{min-width:42px}
#seriesView .arbitrary-series-section .series-card{border-color:#e0d1c6}

.arbitrary-data-panel{
  width:min(430px,88%);
  margin:28px auto;
  padding:22px 26px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fbfaf8;
  box-shadow:0 5px 18px rgba(52,42,36,.035);
}
.arbitrary-data-kicker{
  margin-bottom:12px;
  color:var(--muted);
  font-size:10px;
  font-weight:850;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.arbitrary-data-values{
  display:grid;
  gap:9px;
  font-family:Georgia,"Times New Roman",serif;
  font-size:20px;
  color:var(--ink);
}
.ambiguity-note{
  display:inline-block;
  margin-top:8px;
  padding:7px 10px;
  border-radius:7px;
  background:var(--mn-yellow-pale);
  color:#695125;
  font-size:.9em;
  line-height:1.4;
}

@media (min-width:1051px) and (max-height:900px){
  #seriesView .arbitrary-card-visual{height:72px;min-height:72px}
  #seriesView .arbitrary-card-layout{grid-template-columns:112px 1fr}
  #seriesView .arbitrary-card-triangle{width:108px;height:56px}
  #seriesView .arbitrary-card-copy .series-formula{font-size:16px}
  #seriesView .arbitrary-sine-formula{font-size:17px}
}
@media (min-width:1051px) and (max-height:780px){
  #seriesView .arbitrary-card-visual{height:60px;min-height:60px}
  #seriesView .arbitrary-card-layout{grid-template-columns:90px 1fr}
  #seriesView .arbitrary-card-triangle{width:86px;height:44px}
  #seriesView .arbitrary-card-copy .series-formula{font-size:13px}
  #seriesView .series-card-subformula{font-size:10px}
  #seriesView .arbitrary-sine-formula{font-size:14px}
}
@media(max-width:1050px){
  #seriesView .arbitrary-series-grid{grid-template-columns:1fr 1fr;max-width:none}
}


.arbitrary-data-figure{
  width:100%;
  display:grid;
  place-items:center;
  margin:0 0 14px;
}
.arbitrary-data-figure svg{
  width:200px;
  height:92px;
  overflow:visible;
}
.arbitrary-data-figure .edge{stroke:#4a4641;stroke-width:2.2}
.arbitrary-data-figure .vertex{font-size:18px}
.arbitrary-data-note{
  margin-top:14px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
}


/* v88 — only the formula/visual frames get distinct colors. */
:root{
  --mn-amber:#9b6a18;
  --mn-amber-pale:#f6ecda;
  --mn-brick:#9d5a46;
  --mn-brick-pale:#f7e8e1;
}
#seriesView .arbitrary-basic-card .series-visual{
  background:var(--mn-ochre-pale);
  color:var(--mn-ochre);
}
#seriesView .arbitrary-advanced-card .series-visual{
  background:var(--mn-coral-pale);
  color:var(--mn-coral);
}


/* v89 — conceptuele willekeurige-driehoekopgaven volgen dezelfde figuuropmaak als de rekenopgaven */
#exerciseView .triangle-wrap > svg[aria-label="Illustratieve driehoek ABC"]{
  width:100%;
  max-width:720px;
  height:390px;
}
#exerciseView .arbitrary-data-svg-values .side-label{
  font-size:18px;
  fill:#57514d;
}
.illustration-note{
  display:inline-block;
  margin-top:5px;
  color:var(--muted);
  font-family:inherit;
  font-size:.86em;
  font-style:normal;
}


/* v90 — compactere concept-MC's en consistente hoeknotatie */
.data-angle-hat{fill:none;stroke:#57514d;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#exerciseView.compact-concept-mc .triangle-wrap{min-height:300px;padding-top:4px}
#exerciseView.compact-concept-mc .triangle-wrap svg{height:300px;max-width:650px}
#exerciseView.compact-concept-mc .problem-panel{min-height:540px}
#exerciseView.compact-concept-mc .problem-text{padding-top:0;padding-bottom:18px}
#exerciseView.compact-concept-mc .mc-options{gap:8px}
#exerciseView.compact-concept-mc .mc-option{padding:10px 11px;font-size:13px;line-height:1.25}
@media (min-width:1051px) and (max-height:850px){
  #exerciseView.compact-concept-mc .triangle-wrap{min-height:250px}
  #exerciseView.compact-concept-mc .triangle-wrap svg{height:245px}
  #exerciseView.compact-concept-mc .problem-panel{min-height:470px}
  #exerciseView.compact-concept-mc .panel-title-row{padding-top:18px}
  #exerciseView.compact-concept-mc .answer-panel{padding-top:20px;min-height:470px}
  #exerciseView.compact-concept-mc .answer-form{margin-top:24px}
  #exerciseView.compact-concept-mc .mc-option{padding:9px 10px;font-size:12px}
}

/* v94 — definitive colors for the two arbitrary-triangle formula frames only. */
#seriesView .arbitrary-basic-card .series-visual{
  background:var(--mn-yellow-pale) !important;
  color:var(--mn-yellow) !important;
}
#seriesView .arbitrary-advanced-card .series-visual{
  background:var(--mn-red-pale) !important;
  color:var(--mn-red) !important;
}

/* Keep every other part of those cards neutral, exactly like the other series cards. */
#seriesView .arbitrary-basic-card h4,
#seriesView .arbitrary-advanced-card h4,
#seriesView .arbitrary-basic-card .series-meta,
#seriesView .arbitrary-advanced-card .series-meta{
  color:inherit !important;
}
#seriesView .arbitrary-basic-card,
#seriesView .arbitrary-advanced-card{
  border-color:#dcc7be !important;
  box-shadow:0 6px 20px rgba(52,42,36,.035) !important;
}
#seriesView .series-meta span{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  outline:0 !important;
  padding:0 !important;
  border-radius:0 !important;
}


/* v95 — angle hats in the series-card formula frames */
#seriesView .series-angle-symbol{
  min-width:.66em;
  padding-top:.22em;
  vertical-align:-.02em;
}
#seriesView .frac .series-angle-symbol{
  font-size:.92em;
  padding-top:.22em;
}


/* v96 — meta-informatie reeks 4–5 identiek aan reeks 1–3 */
#seriesView .arbitrary-series-section .series-meta{
  color:#7a746f !important;
  font-size:12px;
  font-weight:700;
}
#seriesView .arbitrary-series-section .series-meta span{
  color:inherit !important;
  background:none !important;
  border:none !important;
  box-shadow:none !important;
  outline:none !important;
  padding:0 !important;
  border-radius:0 !important;
}
#seriesView .arbitrary-series-section .series-meta span + span::before{
  color:#b3aca6 !important;
}


/* v97 — willekeurige driehoeken: laat de volledige SVG buiten haar eigen box zichtbaar blijven.
   Alleen reeks 4 en 5 krijgen dit; reeksen 1–3 blijven onaangeroerd. */
#exerciseView.arbitrary-exercise .triangle-wrap{
  overflow:visible !important;
  padding-left:26px;
  padding-right:26px;
}
#exerciseView.arbitrary-exercise .triangle-wrap > svg{
  overflow:visible !important;
  max-width:760px;
}


/* v98 — grotere visual op de kaart van reeks 4 */
#seriesView .arbitrary-basic-card .arbitrary-card-layout{
  grid-template-columns:165px 1fr !important;
  gap:18px !important;
}
#seriesView .arbitrary-basic-card .arbitrary-card-triangle{
  width:160px !important;
  height:78px !important;
}
#seriesView .arbitrary-basic-card .arbitrary-cosine-formula{
  font-size:22px !important;
  line-height:1.12 !important;
}
@media (min-width:1051px) and (max-height:900px){
  #seriesView .arbitrary-basic-card .arbitrary-card-layout{grid-template-columns:138px 1fr !important}
  #seriesView .arbitrary-basic-card .arbitrary-card-triangle{width:134px !important;height:64px !important}
  #seriesView .arbitrary-basic-card .arbitrary-cosine-formula{font-size:19px !important}
}
@media (min-width:1051px) and (max-height:780px){
  #seriesView .arbitrary-basic-card .arbitrary-card-layout{grid-template-columns:116px 1fr !important}
  #seriesView .arbitrary-basic-card .arbitrary-card-triangle{width:112px !important;height:54px !important}
  #seriesView .arbitrary-basic-card .arbitrary-cosine-formula{font-size:16px !important}
}


/* v100 — reeks 4 formulekader: voorkom overflow buiten de kaart/frame */
#seriesView .arbitrary-card-layout{
  grid-template-columns:minmax(120px,160px) minmax(0,1fr) !important;
  align-items:center;
}
#seriesView .arbitrary-card-copy,
#seriesView .arbitrary-sine-formula{
  min-width:0;
  max-width:100%;
}
#seriesView .arbitrary-basic-card .arbitrary-cosine-formula{
  font-size:clamp(16px,1.75vw,22px) !important;
  line-height:1.1 !important;
  white-space:nowrap;
  max-width:100%;
}
#seriesView .arbitrary-basic-card .series-visual,
#seriesView .arbitrary-advanced-card .series-visual{
  overflow:hidden;
}
@media (min-width:1051px) and (max-height:900px){
  #seriesView .arbitrary-card-layout{grid-template-columns:minmax(104px,136px) minmax(0,1fr) !important}
  #seriesView .arbitrary-basic-card .arbitrary-cosine-formula{font-size:clamp(15px,1.55vw,19px) !important}
}
@media (min-width:1051px) and (max-height:780px){
  #seriesView .arbitrary-card-layout{grid-template-columns:minmax(88px,112px) minmax(0,1fr) !important}
  #seriesView .arbitrary-basic-card .arbitrary-cosine-formula{font-size:clamp(13px,1.35vw,16px) !important}
}
@media (max-width:1050px){
  #seriesView .arbitrary-series-grid{grid-template-columns:1fr !important}
  #seriesView .arbitrary-card-layout{grid-template-columns:1fr !important}
  #seriesView .arbitrary-basic-card .arbitrary-cosine-formula,
  #seriesView .arbitrary-sine-formula{
    text-align:center;
    justify-content:center;
  }
}


/* v101 — conceptuele opgaven bij willekeurige driehoeken groter en consequenter zoals de andere figuren */
#exerciseView .triangle-wrap > svg[aria-label="Illustratieve driehoek ABC"]{
  width:100%;
  max-width:820px;
  height:420px;
}
#exerciseView .arbitrary-data-svg-values .side-label{
  font-size:20px;
  fill:#57514d;
}
#exerciseView .arbitrary-data-angle-line .side-label{
  font-size:20px;
}
#exerciseView .triangle-wrap > svg[aria-label="Illustratieve driehoek ABC"] .vertex{
  font-size:22px;
}
#exerciseView .triangle-wrap > svg[aria-label="Illustratieve driehoek ABC"] .edge{
  stroke-width:2.2;
}
#exerciseView.compact-concept-mc .triangle-wrap{
  min-height:350px;
  padding-top:2px;
}
#exerciseView.compact-concept-mc .triangle-wrap svg[aria-label="Illustratieve driehoek ABC"]{
  height:350px;
  max-width:800px;
}
@media (min-width:1051px) and (max-height:850px){
  #exerciseView.compact-concept-mc .triangle-wrap{min-height:300px}
  #exerciseView.compact-concept-mc .triangle-wrap svg[aria-label="Illustratieve driehoek ABC"]{height:315px;max-width:760px}
}


/* v102 — willekeurige driehoeken: formulekaders op startpagina binnen de kaart houden
   en conceptuele opgaven visueel beter laten aansluiten bij de andere figuren. */
#seriesView .arbitrary-card-visual{
  height:80px !important;
  min-height:80px !important;
  padding:0 14px !important;
}
#seriesView .arbitrary-card-layout{
  grid-template-columns:110px minmax(0,1fr) !important;
  gap:14px !important;
  align-items:center !important;
}
#seriesView .arbitrary-card-triangle,
#seriesView .arbitrary-basic-card .arbitrary-card-triangle{
  width:108px !important;
  height:54px !important;
}
#seriesView .arbitrary-card-copy,
#seriesView .arbitrary-sine-formula{
  min-width:0;
  max-width:100%;
  overflow:hidden;
}
#seriesView .arbitrary-basic-card .arbitrary-cosine-formula{
  font-size:clamp(14px,1.3vw,19px) !important;
  line-height:1.03 !important;
  letter-spacing:-0.01em;
  white-space:nowrap;
}
#seriesView .arbitrary-sine-formula{
  font-size:clamp(15px,1.35vw,18px) !important;
  gap:10px !important;
  white-space:nowrap;
}
#seriesView .arbitrary-sine-formula .frac{min-width:34px}
@media (min-width:1051px) and (max-height:900px){
  #seriesView .arbitrary-card-visual{height:72px !important;min-height:72px !important}
  #seriesView .arbitrary-card-layout{grid-template-columns:96px minmax(0,1fr) !important;gap:12px !important}
  #seriesView .arbitrary-card-triangle,
  #seriesView .arbitrary-basic-card .arbitrary-card-triangle{width:94px !important;height:47px !important}
  #seriesView .arbitrary-basic-card .arbitrary-cosine-formula{font-size:clamp(13px,1.2vw,17px) !important}
  #seriesView .arbitrary-sine-formula{font-size:clamp(14px,1.2vw,16px) !important}
}
@media (min-width:1051px) and (max-height:780px){
  #seriesView .arbitrary-card-visual{height:64px !important;min-height:64px !important}
  #seriesView .arbitrary-card-layout{grid-template-columns:84px minmax(0,1fr) !important;gap:10px !important}
  #seriesView .arbitrary-card-triangle,
  #seriesView .arbitrary-basic-card .arbitrary-card-triangle{width:82px !important;height:41px !important}
  #seriesView .arbitrary-basic-card .arbitrary-cosine-formula{font-size:clamp(12px,1.05vw,15px) !important}
  #seriesView .arbitrary-sine-formula{font-size:clamp(12px,1.05vw,14px) !important;gap:8px !important}
}
#exerciseView.arbitrary-exercise.compact-concept-mc .triangle-wrap{
  min-height:320px;
  padding-top:0;
}
#exerciseView.arbitrary-exercise.compact-concept-mc .triangle-wrap > svg[aria-label="Illustratieve driehoek ABC"]{
  width:100%;
  max-width:760px;
  height:320px;
}
#exerciseView.arbitrary-exercise .triangle-wrap > svg[aria-label="Illustratieve driehoek ABC"] .vertex{
  font-size:24px;
}
#exerciseView.arbitrary-exercise .triangle-wrap > svg[aria-label="Illustratieve driehoek ABC"] .edge{
  stroke-width:2.4;
}
#exerciseView.arbitrary-exercise .arbitrary-data-svg-values .side-label,
#exerciseView.arbitrary-exercise .arbitrary-data-angle-line .side-label{
  font-size:19px;
}
@media (min-width:1051px) and (max-height:850px){
  #exerciseView.arbitrary-exercise.compact-concept-mc .triangle-wrap{min-height:285px}
  #exerciseView.arbitrary-exercise.compact-concept-mc .triangle-wrap > svg[aria-label="Illustratieve driehoek ABC"]{height:285px;max-width:720px}
}


/* v103 — hoekhoedjes in illustratieve gegevensweergave dichter bij de letter */
#exerciseView .data-angle-hat{
  stroke-width:1.65px;
  stroke-linecap:round;
  stroke-linejoin:round;
}


/* v106 — hoekantwoorden in graden, minuten en seconden */
.angle-answer-expression{
  display:grid;
  grid-template-columns:auto repeat(3,minmax(0,1fr));
  align-items:center;
  gap:8px;
}
.angle-answer-expression.hidden{display:none}
.dms-field{
  display:grid;
  grid-template-columns:minmax(48px,1fr) auto;
  align-items:center;
  gap:5px;
  min-width:0;
  font-family:Georgia,"Times New Roman",serif;
  font-size:20px;
}
.dms-field input{
  width:100%;
  min-width:0;
  border:1.5px solid var(--terracotta);
  border-radius:9px;
  padding:13px 9px;
  background:#fff;
  font-size:18px;
  text-align:center;
  outline:none;
}
.dms-field input:focus{box-shadow:0 0 0 3px rgba(185,95,71,.12)}
@media (min-width:1051px) and (max-height:900px){
  .angle-answer-expression{gap:6px}
  .dms-field{font-size:18px;gap:4px}
  .dms-field input{padding:9px 7px;font-size:16px}
}
