:root{
  --black:#030303;--panel:#090909;--panel2:#111;--red:#d71920;--red-dark:#9e1116;
  --yellow:#f5c400;--yellow-soft:#ffd93d;--white:#f4f4f4;--muted:#aaa;--green:#8dde8d;--border:#292929;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;min-height:100vh;background:var(--black);color:var(--white);font-family:Arial,Helvetica,sans-serif}
a{color:inherit}
.topbar{min-height:82px;border-bottom:1px solid #181818;display:flex;align-items:center;justify-content:center;padding:14px 170px;position:relative}
.logo{color:var(--red);text-decoration:none;font-weight:900;font-size:clamp(2rem,5vw,4rem);letter-spacing:-.05em;line-height:1}
.tm-mark{font-size:.38em;vertical-align:super;margin-left:.08em;line-height:0}
.corner{position:absolute;width:118px;height:145px;object-fit:cover;object-position:50% 20%;border-radius:10px;top:10px;left:18px}
.profile{position:absolute;right:18px;top:8px;width:126px;z-index:40;text-align:center}
.profile img{width:118px;height:145px;object-fit:cover;object-position:50% 20%;border-radius:10px;display:block;margin-left:auto}
.menu-toggle{margin-top:5px;width:118px;min-height:32px;border:1px solid var(--yellow);background:#050505;color:var(--yellow);border-radius:7px;font-weight:900;cursor:pointer}
.dropdown{display:none;position:absolute;top:184px;right:0;width:220px;padding:8px;background:#050505;border:1px solid var(--yellow);border-radius:10px;text-align:left;box-shadow:0 15px 45px rgba(0,0,0,.5)}
.dropdown.open{display:block}.dropdown a{display:block;text-decoration:none;color:var(--yellow);padding:10px 11px;border-radius:7px;font-weight:800}.dropdown a:hover{background:#191300}
.main{width:min(980px,calc(100% - 30px));margin:0 auto;padding:40px 0 35px}.back{display:inline-block;margin-bottom:18px;color:var(--yellow);text-decoration:none;font-weight:800;font-size:.9rem}
.page-title{color:var(--yellow);text-align:center;font-size:clamp(1.9rem,5vw,3rem);margin:0 0 10px}.intro{max-width:820px;margin:0 auto 24px;text-align:center;color:#d4d4d4;line-height:1.55}
.hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:850px;margin:0 auto}.hub-card{min-height:116px;text-decoration:none;border:1px solid var(--red);border-radius:12px;background:#060606;padding:17px;display:flex;flex-direction:column;justify-content:center}.hub-card:hover{background:#120707;transform:translateY(-1px)}.hub-card h2{color:var(--yellow);font-size:1.08rem;margin:0 0 7px}.hub-card p{margin:0;color:#c6c6c6;font-size:.86rem;line-height:1.4}
.practice-shell{max-width:860px;margin:0 auto;border:1px solid var(--border);border-radius:14px;background:var(--panel);padding:16px}.controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:14px}.controls.two{grid-template-columns:repeat(2,minmax(0,1fr))}.controls.one{grid-template-columns:1fr}.control label{display:block;color:var(--yellow);font-weight:800;font-size:.88rem;margin-bottom:6px}.control select,.control input{width:100%;background:#050505;color:#fff;border:1px solid var(--red);border-radius:8px;padding:10px;font-size:.95rem;font-weight:700}
.stats{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#aaa;font-size:.83rem;margin:4px 2px 12px}.question-box{min-height:138px;border:1px solid #2d2d2d;border-radius:12px;background:#020202;padding:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;margin-bottom:12px}.prompt{font-size:.85rem;color:#bbb;font-weight:700;margin-bottom:10px}.math-question{font-size:clamp(1.35rem,4.6vw,2.35rem);font-weight:800;line-height:1.42;overflow-wrap:anywhere}.subprompt{font-size:.95rem;color:#ddd;margin-top:8px;line-height:1.4}
.answer-block{margin-top:10px}.answer-label{color:var(--yellow);font-weight:800;font-size:.85rem;margin:0 0 5px}.answer-input{width:100%;min-height:50px;border:1px solid var(--yellow);border-radius:9px;background:#050505;color:#fff;padding:10px 12px;font-size:1.15rem;font-weight:700}.answer-input:focus{outline:2px solid rgba(245,196,0,.22);outline-offset:1px}.answer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.answer-grid .field label{display:block;color:var(--yellow);font-size:.82rem;font-weight:800;margin-bottom:4px}
.choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:10px}.choice{min-height:54px;border:1px solid #4a4a4a;border-radius:9px;background:#111;color:#fff;padding:9px 11px;font-size:1rem;font-weight:700;cursor:pointer;text-align:center}.choice:hover{border-color:var(--yellow);background:#17130a}.choice.selected{border:2px solid var(--yellow);background:#211a05}.choice.correct-answer{border-color:#4aa84a;background:#0a210a}.choice.wrong-answer{border-color:#d9534f;background:#260909}
.action-row{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:12px}.btn{border:1px solid var(--yellow);border-radius:8px;background:#151515;color:var(--yellow);font-weight:900;padding:9px 18px;cursor:pointer}.btn:hover{background:#211b08}.btn.primary{border-color:var(--red);color:var(--yellow)}.btn:disabled{opacity:.4;cursor:default}.next{display:none}
.feedback{margin-top:13px;line-height:1.45;min-height:24px}.feedback .status{font-weight:900;margin-bottom:5px}.feedback.correct .status{color:var(--green)}.feedback.wrong .status{color:#ff8f8f}.correct-answer-text{color:var(--yellow);font-weight:800;margin-bottom:6px}.method{color:#ddd}.note{font-size:.77rem;color:#888;text-align:center;margin-top:12px;line-height:1.4}
.math-frac{display:inline-grid;grid-template-rows:auto 1.5px auto;align-items:center;justify-items:center;vertical-align:middle;line-height:1.05;min-width:1.4em;margin:0 .08em}.math-frac .bar{height:1.5px;background:currentColor;width:100%}.math-frac .num,.math-frac .den{padding:0 .15em}
.exact-editor{min-height:58px;border:1px solid var(--yellow);border-radius:9px;background:#050505;padding:8px 12px;font-size:1.3rem;display:flex;align-items:center;justify-content:flex-start;overflow-x:auto;white-space:nowrap}.exact-editor.empty:before{content:'Use the keypad or your keyboard';color:#666;font-size:.9rem}.answer-frac{display:inline-grid;grid-template-rows:auto 2px auto;align-items:center;justify-items:center;min-width:48px;vertical-align:middle;line-height:1.05}.answer-frac .num,.answer-frac .den{padding:2px 8px;min-width:32px;text-align:center}.answer-frac .bar{height:2px;background:currentColor;width:100%;min-width:44px}.answer-frac .active-part{background:#17120a;border-radius:4px}.placeholder{color:#666}
.keypad{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;margin-top:10px}.key{min-height:42px;border:1px solid #383838;border-radius:8px;background:#141414;color:#fff;font-size:1rem;font-weight:800;cursor:pointer;padding:6px}.key:hover{background:#211515;border-color:var(--red)}.key.math{color:var(--yellow);border-color:#6b5700}.key.check{color:var(--yellow);border-color:var(--red);grid-column:span 2}.key.small{font-size:.75rem}
.canvas-wrap{width:100%;max-width:720px;margin:0 auto 12px;border:1px solid #333;border-radius:10px;background:#fff;padding:4px}.graph-canvas{display:block;width:100%;height:auto;aspect-ratio:4/3;background:#fff;border-radius:7px}.feature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:10px}.feature-box{border:1px solid #353535;border-radius:9px;padding:10px;background:#080808}.feature-box label{display:block;color:var(--yellow);font-size:.82rem;font-weight:800;margin-bottom:5px}.feature-box select{width:100%;background:#050505;color:#fff;border:1px solid #555;border-radius:7px;padding:8px}
.footer{width:min(900px,calc(100% - 36px));margin:48px auto 0;padding:16px 0 22px;border-top:1px solid var(--red-dark);text-align:center;color:var(--yellow);font-size:.78rem}
@media(max-width:760px){
 .topbar{padding:13px 100px;min-height:74px}.corner{width:72px;height:88px;left:8px}.profile{width:78px;right:8px}.profile img{width:72px;height:88px}.menu-toggle{width:72px;font-size:.65rem}.dropdown{top:122px;width:190px}
 .main{padding-top:28px}.hub-grid{grid-template-columns:1fr;max-width:430px}.controls,.controls.two{grid-template-columns:1fr;gap:8px}.practice-shell{padding:10px}.question-box{min-height:112px;padding:12px}.choice-grid,.answer-grid,.feature-grid{grid-template-columns:1fr}.keypad{grid-template-columns:repeat(5,1fr);gap:6px}.key{min-height:46px}.key.check{grid-column:span 2}.stats{font-size:.76rem}
}

/* v8.32 interaction and compact-layout refinements */
.unit-circle-shell{padding:12px 14px}
.unit-circle-shell .controls{gap:8px;margin-bottom:8px}
.unit-circle-shell .control label{margin-bottom:4px}
.unit-circle-shell .control select{padding:8px}
.unit-circle-shell .stats{margin:2px 2px 7px}
.unit-circle-shell .question-box{min-height:92px;padding:10px 14px;margin-bottom:7px}
.unit-circle-shell .prompt{margin-bottom:6px}
.unit-circle-shell .math-question{font-size:clamp(1.25rem,3.7vw,2rem)}
.unit-circle-shell .answer-label{margin-bottom:3px}
.unit-circle-shell .exact-editor{min-height:46px;padding:6px 10px;font-size:1.18rem}
.unit-circle-shell .feedback{min-height:0;margin:6px 0 3px;font-size:.88rem;line-height:1.32}
.unit-circle-shell .feedback .status{margin-bottom:3px}
.unit-circle-shell .correct-answer-text{margin-bottom:3px}
.unit-circle-shell .keypad{gap:5px;margin-top:6px}
.unit-circle-shell .key{min-height:34px;padding:4px 5px;font-size:.92rem}
.unit-circle-shell .action-row{margin-top:7px}

.rrt-tools{display:flex;gap:7px;margin-top:7px}
.mini-key{min-width:48px;min-height:36px;border:1px solid var(--yellow);border-radius:7px;background:#111;color:var(--yellow);font-size:1.05rem;font-weight:900;cursor:pointer}
.mini-key:hover{background:#211b08}

.graph-shell .question-box{min-height:82px;padding:10px 14px;margin-bottom:8px}
.graph-shell .prompt{font-size:.78rem;margin-bottom:5px}
.graph-shell .math-question{font-size:clamp(1.05rem,2.6vw,1.35rem);line-height:1.28}
.graph-shell .canvas-wrap{max-width:500px;margin-bottom:8px}
.graph-shell .choice-grid{margin-top:7px}

.feature-box.field-correct{border-color:#3da85a;background:#07140a}
.feature-box.field-correct select{border-color:#3da85a}
.feature-box.field-wrong{border-color:#d9534f;background:#210808}
.feature-box.field-wrong select{border-color:#d9534f}
.partial-explanation{margin-top:8px;padding-top:7px;border-top:1px solid #292929;color:#ddd}
.correct-answer-text.inline{display:inline;color:var(--yellow);margin:0}

.math-frac.display-frac{font-size:1.08em;min-width:3.4em}
.math-frac.complex-frac{font-size:1.03em;min-width:7em;grid-template-rows:auto 2px auto}
.math-frac.nested-frac{font-size:.82em;min-width:1.7em;margin:0 .12em}

@media(max-width:760px){
 .unit-circle-shell{padding:8px}.unit-circle-shell .controls{gap:5px}.unit-circle-shell .question-box{min-height:76px;padding:8px}.unit-circle-shell .key{min-height:38px}.unit-circle-shell .feedback{font-size:.83rem}
 .graph-shell .canvas-wrap{max-width:430px}.graph-shell .math-question{font-size:1.05rem}
}

/* v8.33 mathematical display refinements */
.math-root{display:inline-flex;align-items:flex-start;vertical-align:middle;white-space:nowrap;position:relative;line-height:1.08;margin:0 .04em}
.math-root .root-symbol{font-size:1.16em;line-height:1;transform:translateY(.04em)}
.math-root .root-body{display:inline-block;border-top:1.7px solid currentColor;padding:.02em .10em 0 .08em;margin-left:-.03em;min-width:.45em}
.math-root .root-index{font-size:.46em;line-height:1;align-self:flex-start;margin-right:-.18em;transform:translate(.08em,-.06em)}
.math-frac .math-root{margin-left:.02em;margin-right:.02em}
.graph-shell .canvas-wrap{max-width:440px}
@media(max-width:760px){.graph-shell .canvas-wrap{max-width:380px}}

/* Consistent mathematical infinity glyph across Calc Prep displays.
   Cambria Math is present on typical Windows systems; the fallbacks are
   math-oriented fonts with a balanced infinity glyph. */
.math-infinity{font-family:"Cambria Math","STIX Two Math","DejaVu Math TeX Gyre","Times New Roman",serif;font-weight:400;font-style:normal;display:inline-block;line-height:1;transform:translateY(.02em)}

/* MathJax inside interactive controls is visual only.  Let the button/choice
   receive the pointer event so MathJax's explorer/context UI cannot intercept
   a student's answer selection. */
button mjx-container,
button mjx-container *,
.choice mjx-container,
.choice mjx-container *,
.choice-grid mjx-container,
.choice-grid mjx-container *{
  pointer-events:none !important;
  user-select:none !important;
  -webkit-user-select:none !important;
  -webkit-touch-callout:none !important;
}

/* v10.3.3 exact-answer editor caret/navigation refinements */
.bm-exact-caret{display:inline-block;width:2px;height:1.08em;margin:0 1px;background:var(--yellow);vertical-align:-.14em;animation:bm-exact-caret 1s steps(1) infinite}
@keyframes bm-exact-caret{0%,48%{opacity:1}49%,100%{opacity:0}}
.bm-exact-token{display:inline-block;cursor:text}
.exact-editor:focus{outline:2px solid rgba(245,196,0,.35);outline-offset:1px}
.answer-frac .num,.answer-frac .den{cursor:text}
@media(prefers-reduced-motion:reduce){.bm-exact-caret{animation:none}}
