/* BoardCraft companion surfaces. Layout and maths overflow rules live in styles.css. */
.course-options{border:0;padding:0;margin:0 0 28px;min-width:0}
.course-options legend{font-weight:600;font-size:1.125rem;margin-bottom:14px;padding:0}
.course-option-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.course-option{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:18px;padding:18px 16px;background:var(--soft);cursor:pointer}
.course-option:has(input:checked){border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 1px var(--accent)}
.course-option input{accent-color:var(--accent);width:19px;height:19px;flex:none}
.course-option strong,.course-option small{display:block}
.course-option small{font-size:.8125rem;color:var(--muted);margin-top:5px;line-height:1.4}
.course-picker{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:24px}
.course-picker label{display:block;font-weight:600;font-size:1.0625rem;margin-bottom:4px}
.course-picker select{font:inherit;color:var(--ink);background:var(--soft);border:1px solid var(--line);border-radius:14px;padding:13px 36px 13px 14px;min-height:48px;max-width:100%}
.course-empty{max-width:720px;padding:32px}
.course-empty .heading-icon{margin-bottom:20px}
.course-empty h2{margin-top:16px}
.install-steps{display:grid;gap:18px;margin:24px 0}
.install-steps h3{margin:0 0 5px}
.install-steps p{margin:0;line-height:1.6}
.nav a{flex:1}
@media(max-width:650px){.course-picker{align-items:stretch;flex-direction:column}.course-picker select{width:100%}.course-option{padding:15px 12px;gap:9px}.course-option-grid{gap:10px}.course-empty{padding:24px}}
@media(max-width:360px){.course-option-grid{grid-template-columns:minmax(0,1fr)}}
body{letter-spacing:-.01em}
h1{font-size:1.875rem;letter-spacing:-.65px;line-height:1.25}
h2{font-size:1.3rem;letter-spacing:-.4px;line-height:1.35}
h3{font-size:1.0625rem;line-height:1.4}
p{line-height:1.65}
button,.btn{font-weight:600}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline-color:var(--accent)}
.eyebrow{font-size:.875rem;text-transform:none;letter-spacing:0;font-weight:500}
.topbar{background:var(--surface);border-color:var(--line)}
.topbar-inner{min-height:72px;max-width:1440px;padding:12px 30px;gap:24px}
.brand{gap:12px;flex-wrap:wrap}
.icon-btn{border-radius:14px;background:var(--soft);border:1px solid transparent;color:var(--ink)}
.icon-btn:hover{background:var(--accent-soft);color:var(--accent)}
.ico{stroke-width:1.6}
.nav{gap:4px}
.nav a{border-radius:999px;font-weight:500;font-size:.875rem;padding:11px 16px;color:var(--muted)}
.nav a.active{background:var(--accent-soft);color:var(--accent)}
.nav a:hover{background:var(--soft);color:var(--ink)}
.nav a.active:hover{background:var(--accent-soft);color:var(--accent)}
.main{max-width:1240px;padding:32px 0 40px;margin-inline:auto}
.footer{max-width:1240px;font-size:.8125rem;line-height:1.6;padding:22px 0 28px}
.footer a:hover{color:var(--accent)}
.page-heading{margin-bottom:26px}
.page-heading h1{margin-bottom:6px}
.page-heading p{font-size:1rem}
.heading-with-icon{display:flex;align-items:center;gap:16px}
.heading-icon{width:56px;height:56px;display:grid;place-items:center;flex:none;border-radius:50%;background:var(--accent-soft);color:var(--accent)}
.heading-icon .ico{width:28px;height:28px}
.card{border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:26px}
.card-title{margin-bottom:18px}
.card-title .text-btn{font-size:.875rem}
.home-grid{grid-template-columns:minmax(0,1.8fr) minmax(300px,1fr)}
.home-main{align-content:start}
.weekly-card{background:var(--accent-soft);color:var(--ink);border:1px solid var(--accent-soft);border-radius:28px;box-shadow:var(--shadow);padding:32px}
.weekly-card:after{display:none}
.weekly-card h2{font-size:1.9rem;line-height:1.25;margin-top:28px;letter-spacing:-.6px;max-width:none}
.weekly-card p{color:var(--muted);max-width:500px}
.week-label{color:var(--accent);text-transform:none;letter-spacing:0;font-weight:600}
.status-tag{color:var(--accent);border:1px solid var(--accent-line);background:var(--surface);border-radius:999px;padding:7px 12px;font-size:.8125rem}
.weekly-bottom{gap:24px;margin-top:30px}
.progress-wrap{max-width:300px}
.progress-label{color:var(--muted);gap:12px}
.progress-track{height:7px;background:var(--accent-line)}
.progress-track>span{background:var(--accent)}
.btn,.btn.yellow{border-radius:14px;background:var(--accent);color:var(--on-accent);min-height:48px;font-weight:600;box-shadow:none}
.btn:hover,.btn.yellow:hover{background:var(--accent-hover)}
.btn.secondary{background:var(--surface);color:var(--ink);border-color:var(--line)}
.btn.secondary:hover{background:var(--soft);border-color:var(--accent-line)}
.btn.ghost{background:transparent;color:var(--ink)}
.btn.danger{background:var(--error-bg);color:var(--error);border-color:var(--error)}
.btn.danger:hover{background:var(--error);color:var(--surface)}
.text-btn{color:var(--accent);font-weight:500}
.backup{background:var(--surface)}
.pill,.schedule-label{border-radius:999px;background:var(--accent-soft);color:var(--accent);padding:7px 12px}
.pill.ready{color:var(--success);background:var(--success-bg)}
.score-item{border:1px solid var(--line);border-radius:17px;background:var(--soft)}
.score-item .score{font-weight:600;letter-spacing:-.7px}
.score-track span{background:var(--accent)}
.check-line{color:var(--success)}
.due-list li{padding-block:16px;font-size:.9375rem}
.topic-symbol{width:48px;height:48px;border-radius:14px;background:var(--accent-soft);color:var(--accent);border:1px solid var(--accent-line);font-size:1.15rem;font-weight:700}
[data-tone="0"] .topic-symbol{color:#426fa6;background:#eaf2fb;border-color:#cbdfee}
[data-tone="1"] .topic-symbol{color:#8851a7;background:#f3eaf8;border-color:#e1cce9}
[data-tone="2"] .topic-symbol{color:#b34352;background:#fcecef;border-color:#edced3}
[data-tone="3"] .topic-symbol{color:#9b5817;background:#fff0e1;border-color:#ecd5bd}
[data-tone="4"] .topic-symbol{color:#377a46;background:#eaf6eb;border-color:#cce5ce}
[data-theme=dark] [data-tone="0"] .topic-symbol{color:#a0c8ef;background:#293c50;border-color:#41556a}
[data-theme=dark] [data-tone="1"] .topic-symbol{color:#d4aae9;background:#3a2e47;border-color:#584165}
[data-theme=dark] [data-tone="2"] .topic-symbol{color:#efa5b0;background:#452e37;border-color:#674550}
[data-theme=dark] [data-tone="3"] .topic-symbol{color:#eec391;background:#433729;border-color:#62503b}
[data-theme=dark] [data-tone="4"] .topic-symbol{color:#a0d1a4;background:#2a3b2e;border-color:#455c49}
.topic-card{padding:0;margin-bottom:14px;border-radius:22px}
.topic-card summary{padding:21px 22px;gap:16px}
.topic-card summary strong{font-size:1rem;font-weight:600;line-height:1.4}
.topic-card summary small{font-size:.875rem;margin-top:5px}
.topic-card summary::after{content:'';width:8px;height:8px;flex:none;border-right:1.5px solid var(--muted);border-bottom:1.5px solid var(--muted);transform:rotate(-45deg);margin-right:4px;font-size:initial}
.topic-card[open] summary::after{content:'';transform:rotate(45deg)}
.topic-card summary::-webkit-details-marker{display:none}
.topic-body{padding:3px 22px 20px;background:var(--soft)}
.checkbox-line{font-size:1rem;padding-top:17px;gap:12px;line-height:1.5}
.checkbox-line input{accent-color:var(--accent)}
.checkbox-line .mini-label{display:inline-block;margin-top:3px}
.setup{max-width:760px}
.setup-topics .card{box-shadow:none}
.setup form.card{padding:28px}
.setup-topics{margin-top:22px}
.field label{font-weight:600}
.input,input[type=text],select,textarea{border-radius:13px;border-color:var(--line);background:var(--soft);font-size:1rem}
input[type=text]:focus,select:focus,textarea:focus{border-color:var(--accent)}
.input-help{line-height:1.5}
.question-shell{max-width:870px}
.question-toolbar{background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:9px 16px;box-shadow:var(--float-shadow);gap:16px}
.question-toolbar .text-btn{text-decoration:none;font-size:.875rem}
.question-dots{gap:7px}
.qdot{width:26px;height:26px;background:var(--soft);font-size:.75rem}
.qdot.current{background:var(--accent);color:var(--on-accent)}
.qdot.correct{background:var(--success-bg);color:var(--success)}
.qdot.wrong{background:var(--error-bg);color:var(--error)}
.question-card{padding:32px;border-radius:28px}
.qmeta{font-size:.875rem;letter-spacing:0;text-transform:none;font-weight:500;gap:10px;margin-bottom:26px}
.qmeta>span:last-child{background:var(--soft);border-radius:999px;padding:7px 12px}
.stem{font-size:1.25rem;line-height:1.85;letter-spacing:0;padding:16px 18px;background:var(--canvas);border-radius:16px;margin-bottom:24px}
.option{border-radius:17px;border-width:1px;background:var(--soft);min-height:76px}
.option:hover:not(:disabled){border-color:var(--accent-line);background:var(--accent-soft)}
.option.selected{border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 1px var(--accent)}
.option-letter{border-radius:10px;background:var(--surface);color:var(--muted);font-weight:600}
.option.selected .option-letter{background:var(--accent);color:var(--on-accent)}
.option.right{background:var(--success-bg);border-color:var(--success);color:var(--ink)}
.option.wrong{background:var(--error-bg);border-color:var(--error);color:var(--ink)}
.option.right .option-letter{background:var(--success-bg);color:var(--success)}
.option.wrong .option-letter{background:var(--error-bg);color:var(--error)}
.confidence legend{font-size:1rem;font-weight:600}
.confidence-btn{border-radius:999px;background:var(--soft);font-size:.9375rem;font-weight:500}
.confidence-btn.selected{background:var(--accent-soft);color:var(--accent);border-color:var(--accent);font-weight:600}
.feedback{border-radius:18px;background:var(--surface)}
.feedback-heading{color:var(--success);background:var(--success-bg);font-weight:600}
.feedback.incorrect .feedback-heading{color:var(--error);background:var(--error-bg)}
.feedback-body .eyebrow{font-size:.875rem;line-height:1.6}
.feedback-body p{line-height:1.7}
.solution{gap:17px}
.solution>div{line-height:1.8}
.schedule-label{line-height:1.6;border-radius:14px}
.keypad{gap:10px}
.keypad button{border-radius:14px;background:var(--soft);min-height:48px}
.keypad button:hover{background:var(--accent-soft);color:var(--accent)}
.typed-entry input.active{background:var(--accent-soft);border-color:var(--accent)}
.level-circle{background:var(--accent-soft);color:var(--accent)}
.box-number{background:var(--accent-soft);color:var(--accent);border-radius:10px}
.teacher-assignment{background:var(--accent-soft);border-color:var(--accent-soft)}
.teacher-assignment .eyebrow{color:var(--accent)}
.teacher-assignment .stamp.big{background:#fff;padding:9px;box-sizing:content-box;border-radius:18px}
.teacher-grid .sidebar-sticky{top:24px}
.scenario{border-radius:17px;min-height:104px;background:var(--soft);gap:13px}
.scenario:hover{border-color:var(--accent-line);background:var(--accent-soft)}
.scenario .ico{width:23px;height:23px}
.scenario strong{font-weight:600}
.week-row{padding-block:20px}
.week-row.current{background:var(--accent-soft);border-radius:16px}
.week-row strong{font-weight:600}
.week-row .btn{border-radius:999px}
.week-info{overflow-wrap:anywhere}
.instruction-box{background:var(--soft);border-radius:16px}
.upload-zone{border:1.5px dashed var(--accent-line);background:var(--accent-soft);border-radius:22px;padding:32px 20px}
.upload-zone:focus-within{outline:3px solid var(--accent);outline-offset:3px}
.upload-zone input{border:0;min-height:0}
.upload-zone .ico{padding:12px;width:54px;height:54px;border-radius:50%;background:var(--surface)}
.qr-box{background:#fff;border-color:var(--line);border-radius:18px}
.callout{border-radius:16px;background:var(--soft)}
.callout.warn{background:var(--warning-bg);color:var(--warning);border-color:var(--warning)}
.callout.good{background:var(--success-bg);color:var(--success)}
.callout.error{background:var(--error-bg);color:var(--error)}
.demo-strip{background:var(--accent-soft);border-color:var(--accent-line);color:var(--muted)}
.demo-strip>div{max-width:1300px;font-size:.8125rem;justify-content:flex-start;gap:12px}
.demo-strip .text-btn{margin-left:auto;font-size:.875rem}
.demo-pill{border-radius:999px;background:var(--surface);color:var(--accent);font-size:.75rem;letter-spacing:0;padding:6px 10px}
.receipt{background:var(--surface);color:var(--ink);border-color:var(--line);border-radius:24px;box-shadow:var(--shadow)}
.receipt-head{background:var(--accent-soft);color:var(--ink);padding:22px 20px;gap:16px}
.receipt-head .eyebrow{color:var(--accent);font-size:.8125rem}
.receipt-head p{color:var(--muted);font-size:.8125rem}
.receipt-meta,.receipt-stats small,.receipt-next,.receipt-caption,.receipt-footer{color:var(--muted)}
.receipt-next strong{color:var(--ink)}
.receipt-stats,.receipt-stats>div+div,.receipt-footer{border-color:var(--line)}
.receipt-body{padding:22px}
.receipt .qr-box{border-radius:16px;margin-block:16px;background:#fff}
.sample-tag{background:var(--accent-soft);color:var(--accent);letter-spacing:0;padding:10px;font-size:.75rem}
.late-tag{background:var(--error-bg);color:var(--error);font-size:.875rem}
.receipt-footer{font-size:.8125rem;text-transform:none}
dialog{border-radius:26px;box-shadow:var(--float-shadow)}
dialog::backdrop{background:#191a2866;backdrop-filter:blur(4px)}
#toast{border:1px solid var(--line);background:var(--ink);color:var(--bg);border-radius:16px;line-height:1.5}
.skip{background:var(--accent);color:var(--on-accent);border-radius:999px}
.loading{font-family:var(--font);color:var(--muted)}
@media(min-width:1440px){.main{padding-top:36px}}
@media(max-width:1300px){.main{margin-inline:30px}.footer{margin-inline:30px}}
@media(max-width:1000px){.topbar-inner{padding-inline:24px}.nav a{padding-inline:12px}.brand .course-badge{display:none}}
@media(max-width:900px){.home-grid,.teacher-grid,.topic-layout{grid-template-columns:minmax(0,1fr)}.sidebar-sticky{position:static}.topbar-inner{gap:6px 18px}.main{margin-inline:24px}.brand{margin-bottom:8px}.topright{margin-bottom:8px}.nav{border-top:1px solid var(--line)}.nav a{padding:12px}.weekly-bottom{flex-direction:row;align-items:center}.progress-wrap{max-width:300px}.brand .course-badge{display:inline-flex}}
@media(max-width:650px){
  html{scroll-padding-bottom:110px}
  .topbar-inner{min-height:70px;padding:calc(12px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left));gap:8px}
  .brand{margin:0;display:grid;gap:5px}
  .brand .wordmark{font-size:1.4rem;letter-spacing:-.65px}
  .brand .course-badge{background:none;padding:0;border-radius:0;font-size:.75rem;color:var(--muted)}
  .topright{gap:6px;margin:0 0 0 auto}
  .icon-btn{width:42px;min-height:44px;height:44px;border-radius:13px}
  .nav{position:fixed;bottom:max(10px,env(safe-area-inset-bottom));left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));width:auto;padding:7px;border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:var(--float-shadow);gap:2px}
  .nav a{padding:7px 2px;min-height:56px;border-radius:17px;font-size:.75rem;gap:5px;line-height:1.3}
  .nav .ico{display:block;width:21px;height:21px}
  .main{margin:0 max(14px,env(safe-area-inset-right)) 0 max(14px,env(safe-area-inset-left));padding:24px 0 30px}
  .footer{margin:0 20px;padding-bottom:calc(110px + env(safe-area-inset-bottom));font-size:.8125rem;gap:12px}
  .page-heading{margin-bottom:22px;gap:10px}
  .page-heading h1{font-size:1.5rem;line-height:1.3;letter-spacing:-.45px}
  .page-heading p{font-size:.9375rem;line-height:1.6}
  .heading-with-icon{gap:12px;align-items:flex-start}
  .heading-icon{width:44px;height:44px}
  .heading-icon .ico{width:23px;height:23px}
  .home-grid{gap:18px}
  .home-main{gap:18px}
  .weekly-card{padding:23px 21px;border-radius:24px}
  .weekly-card h2{font-size:1.65rem;margin-top:24px}
  .weekly-card p{font-size:1rem}
  .weekly-top{gap:10px}
  .week-label{font-size:.875rem}
  .status-tag{font-size:.75rem;padding:6px 9px}
  .weekly-bottom{flex-direction:column;align-items:stretch;gap:22px;margin-top:24px}
  .progress-wrap{max-width:none}
  .card{padding:21px;border-radius:23px}
  .btn{padding:13px 16px}
  .score-list{gap:8px}
  .score-item{padding:12px 10px;border-radius:14px}
  .score-item .score{font-size:1.4rem}
  .check-line{font-size:.75rem}
  .topic-card,.setup .topic-card{padding:0;border-radius:20px}
  .topic-card summary{padding:17px 16px;gap:13px}
  .topic-symbol{width:44px;height:44px;font-size:1.05rem;border-radius:13px}
  .topic-body{padding:2px 16px 18px}
  .topic-card summary strong{font-size:.9375rem}
  .topic-card summary small{font-size:.8125rem}
  .setup form.card{padding:20px 16px}
  .question-toolbar{border-radius:22px;padding:7px 13px;gap:4px;margin-bottom:16px}
  .question-toolbar .text-btn{min-height:38px}
  .question-dots{gap:5px;padding-block:8px}
  .qdot{width:22px;height:22px}
  .question-card{padding:20px 16px}
  .qmeta{margin-bottom:18px;gap:8px;font-size:.8125rem}
  .qmeta>span:last-child{padding:6px 10px}
  .stem{padding:14px 13px;font-size:1.125rem;line-height:1.9;margin-bottom:20px}
  .option-grid{grid-template-columns:minmax(0,1fr);gap:10px}
  .option{min-height:64px;padding:12px;gap:12px;border-radius:15px}
  .option-letter{width:30px;height:32px;font-size:.9375rem}
  .option .katex{font-size:1.12em}
  .confidence-btn{font-size:.875rem;padding:12px 6px}
  .feedback-body{padding:16px 13px}
  .feedback-heading{padding:16px 14px}
  .teacher-grid .card{padding:21px 17px}
  .teacher-assignment h2{font-size:1.2rem}
  .week-row{gap:9px;padding-block:18px}
  .week-row .btn{padding:9px;font-size:.8125rem}
  .week-number{width:20px}
  .scenario{padding:17px 13px}
  .receipt-shell{max-width:480px}
  .receipt-head{padding:20px 14px}
  .receipt-head h1{font-size:1.4rem}
  .receipt-body{padding:20px 16px}
  .receipt-stats small{font-size:.8125rem}
  .receipt-caption{font-size:.875rem}
  .receipt-actions .btn{min-width:0}
  .completion-mode .main{padding-bottom:calc(22px + env(safe-area-inset-bottom))}
  .demo-strip>div{padding:10px 16px;font-size:.8125rem;gap:7px 10px}
  .demo-strip .text-btn{margin-left:0}
  dialog{padding:22px 18px;border-radius:24px}
  #toast{bottom:calc(100px + env(safe-area-inset-bottom))}
}
@media(max-width:360px){.brand .wordmark{font-size:1.25rem}.topbar-inner{padding-inline:12px}.main{margin-inline:12px}.heading-icon{display:none}.weekly-card{padding:20px 17px}.confidence-options{flex-direction:column}.question-toolbar{padding-inline:11px}.question-dots{gap:4px}.qdot{width:21px;height:21px}.score-list{grid-template-columns:minmax(0,1fr)}.receipt-head h1{font-size:1.2rem}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Exact, responsive diagrams for graph retrieval. */
.math-graph{margin:12px auto 4px;width:100%;max-width:440px;line-height:1}.math-graph svg{display:block;width:100%;height:auto;min-width:220px}.graph-bg{fill:var(--surface,#fff)}.graph-grid{stroke:currentColor;opacity:.09;stroke-width:1;fill:none}.graph-axes{stroke:currentColor;stroke-width:1.25;fill:none}.graph-labels,.graph-title{fill:currentColor;font:13px Inter,Arial,sans-serif}.graph-title{font-size:12px}.graph-curve{fill:none;stroke:var(--brand-supporting,#4F7EAA);stroke-width:2.8;stroke-linecap:round;stroke-linejoin:round}.options .math-graph{max-width:360px}.option:has(.math-graph){align-items:flex-start}.option:has(.math-graph)>span:last-child{width:100%;min-width:0}@media(max-width:540px){.math-graph svg{min-width:180px}.option:has(.math-graph){padding:10px}.option:has(.math-graph) .math-graph{margin:0 auto}}
