/* Compact tutor: the equation is the main subject; canonical voice controls below. */
.mobile-visual-note{display:none}
body>header .sfi-share-action-icon{width:17px;height:17px;flex:none}
body>header .sfi-share-action{display:inline-flex;align-items:center;gap:7px}
#equation-content[data-solution-pending=true] #equation-loading{display:grid}
#equation-content[data-solution-pending=true][data-has-given=true]:not(:has(#equation-status[data-phase=preparing]:not(:empty))) #equation-loading{inset:auto 0 0;background:transparent}
#equation-content[data-solution-pending=true][data-has-given=true] .preparation-focus{gap:12px;padding:18px}
.tutor-preparation .preparation-focus{min-width:0}
#equation-loading .sfi-parallax-loader-track{flex:none;min-width:120px}
@media(max-width:700px){
 :root{--tutor-inset:9px;--tutor-gap:8px}
 body>header.sfi-world-global-controls{height:58px;min-height:58px;padding:6px 10px;gap:6px;flex-wrap:nowrap}
 body>header .prototype-global-brand{flex:1 1 auto;min-width:0;font-size:10px;letter-spacing:.08em}
 body>header .prototype-global-brand small{font-size:10px;margin-top:2px}
 body>header #pdf-notes,body>header #link,body>header #account-controls button{width:36px;min-width:36px;height:36px;min-height:36px;padding:8px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center}
 body>header .sfi-share-action-label{display:none}
 #tools #notes,#tools #new,#tools #sessions{display:none}
 #account-controls{flex:none}#account-controls [data-sfi-control-label]{display:none}
 #homework-app{padding-bottom:env(safe-area-inset-bottom)}
 #conversation{gap:0;position:relative}
 .question-rail{order:0;padding:3px var(--tutor-inset) 0}
 #question-blocks{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:calc((100% - 28px)/4.5);height:88px;max-height:88px;gap:7px;padding:3px 0 4px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-snap-type:x proximity;overscroll-behavior-x:contain;touch-action:pan-x}
 #question-blocks::-webkit-scrollbar{display:none}
 #question-blocks .question-card{width:auto;min-width:0;min-height:0;height:78px;aspect-ratio:auto;padding:6px 5px;gap:3px;border-radius:9px;scroll-snap-align:start}
 #question-blocks .question-number{font-size:9px;white-space:nowrap}
 #question-blocks .question-task{height:22px;min-height:22px;font-size:8px;line-height:11px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 #question-blocks .question-math{height:24px;min-height:24px;overflow:hidden;display:flex;align-items:center}
 #question-blocks .question-math svg{max-height:24px;max-width:100%;font-size:20px}
 #question-blocks .question-status,#question-blocks .question-difficulty{display:none!important}
 .question-rail .shelf-control{display:none!important}
 .mobile-visual-note{display:none}
 .worksheet-progress{order:0;padding:0 10px;font-size:9px;max-height:26px;overflow:hidden}
 .explanation-context{order:0;font-size:11px;padding:4px 10px}
 .workspace,.workspace[data-layout=single],.workspace[data-layout=conversation]{order:1;display:flex;flex-direction:column;flex:1;min-height:0!important;overflow:hidden;padding:3px var(--tutor-inset) 0;gap:8px}
 .workspace #visual-display{order:2;flex:1;min-height:0;height:auto;width:100%;grid-column:auto;grid-row:auto;overflow:hidden}
 .workspace #visual-display[hidden]{display:none!important}
 .workspace #visual-content{flex:1;height:auto;min-height:0}
 .workspace #visual-display>.pane-heading{height:34px;min-height:34px;padding:4px 8px}
 .workspace #visual-display .pane-heading h2{font-size:11px}
 .workspace #visual-display #toggle-visual{font-size:10px;min-height:28px;padding:4px 8px}
 .workspace #visual-display #graph-description{display:none}
 .workspace #equations-pane{order:1}
 .workspace #adam-ai{order:3}
 .workspace #equations-pane{height:auto;min-height:0;flex:1;width:100%;overflow:hidden;grid-column:auto;grid-row:auto}
 #equations-pane>.pane-heading{height:43px;min-height:43px;padding:4px 8px;flex-wrap:nowrap;gap:5px}
 #equations-pane>.pane-heading h2{font-size:11px}
 #edit,#animate-equations{display:none!important}
 .pane-heading #equation-view{margin-left:auto;flex-wrap:nowrap;gap:2px}
 #equation-view button{font-size:10px;min-height:34px;padding:5px 8px}
 #equation-treatment{padding:4px 7px;gap:4px;flex-wrap:nowrap;min-height:39px}
 #equation-treatment button{min-height:30px;padding:5px 8px;font-size:10px;white-space:nowrap}
 #equation-size{display:none}
 #show-previous-equation{font-size:0!important;display:inline-flex;align-items:center;gap:5px}
 #show-previous-equation::before{content:'Previous';font-size:10px}
 #show-previous-equation::after{content:'';width:21px;height:12px;border-radius:10px;border:1px solid currentColor;background:radial-gradient(circle at 6px 50%,currentColor 3px,transparent 4px)}
 #show-previous-equation[aria-pressed=true]::after{background:radial-gradient(circle at 15px 50%,currentColor 3px,transparent 4px)}
 #equation-content,#equation-art{min-height:0;height:auto}
 #equation-content{flex:1}
 #equation-navigation{bottom:8px;right:8px;height:40px}
 #equation-navigation button{height:32px;min-width:46px}
 #position{padding:0 8px}
 .previous-equation-card{top:8px;right:8px;width:62%;max-width:260px;min-height:64px;height:21%;max-height:88px}
 .workspace #adam-ai{height:auto;max-height:55dvh;flex:0 0 auto;width:100%;overflow:hidden;grid-column:auto;grid-row:auto;border:0;padding:0;background:transparent}
 #status{position:absolute;left:12px;right:12px;bottom:0;margin:0;font-size:10px;background:#080d15;z-index:12}
 #status:empty{display:none}
 #question-entry{margin:5vh auto 0;padding:20px;overflow-y:auto}#question-entry h1{font-size:28px}
 .entry-actions{gap:10px}.entry-actions .attach{flex:1;justify-content:center}
 #session-share,#sessions-dialog{max-width:calc(100vw - 20px);padding:16px}
}
/* Give the preparation trail a stable track and reserve the step controls once. */
#equation-loading{grid-template-columns:minmax(0,1fr);align-content:center}
#equations-pane:has(#equation-navigation:not([hidden])) #equation-content[data-solution-pending=true][data-has-given=true]:not(:has(#equation-status[data-phase=preparing]:not(:empty))) #equation-loading{bottom:84px}
/* Briefly retain the canonical loader at completion. */
#equation-loading[data-complete=true]{display:grid}
.previous-processing[data-complete=true]{display:flex}

/* Name the actions; arrow direction alone does not explain PDF versus sharing. */
.tutor-action-label{display:none}
@media(max-width:700px){
 body>header #pdf-notes,body>header #link{width:auto;min-width:64px;height:40px;min-height:40px;padding:8px;gap:5px;border-radius:10px}
 body>header .tutor-action-label{display:inline;font-size:11px;letter-spacing:0}
 body>header .sfi-share-action-icon{width:14px;height:14px}
}

body>header #tutor-home{display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:38px;padding:8px 10px;border:1px solid #334452;border-radius:5px;background:#101b26;color:#e7f2f8;font:11px system-ui;letter-spacing:0;text-decoration:none}
body>header #tutor-home:hover{border-color:#bfe8fb99;background:#bfe8fb15}
@media(max-width:700px){body>header #tutor-home{min-height:40px;padding:8px;border-radius:10px}}
@media(max-width:360px){body>header.sfi-world-global-controls{gap:4px}body>header #pdf-notes{min-width:56px}}
/* Use the shared Share panel unchanged; only adapt its placement to the dialog. */
#session-share-content.sfi-app-shell{height:auto;min-height:0;overflow:visible}
#session-share-content,#session-share-content *{box-sizing:border-box}
#session-share-content .sfi-share{position:relative;inset:auto;width:100%;box-sizing:border-box}

body>header #tutor-home{width:40px;height:40px;min-width:40px;padding:9px;border-radius:50%}
body>header #tutor-home svg{display:block;flex:none}

/* Direction cues reuse the shelf's existing scroll-boundary controls. */
.question-rail::before,.question-rail::after{content:'';position:absolute;top:0;bottom:var(--tutor-inset);width:48px;pointer-events:none;z-index:2;opacity:0}
.question-rail::before{left:var(--tutor-inset);background:linear-gradient(to right,#080d15,transparent)}
.question-rail::after{right:var(--tutor-inset);background:linear-gradient(to left,#080d15,transparent)}
.question-rail:has(#questions-back:not([hidden]))::before,.question-rail:has(#questions-forward:not([hidden]))::after{opacity:1}
@media(max-width:700px){.question-rail::before,.question-rail::after{top:3px;bottom:4px;width:30px}}

@media(max-width:700px){
 #equations-pane>.pane-heading{height:38px;min-height:38px;padding:3px 5px;gap:3px}
 #equations-pane>.pane-heading h2{display:none}
 #equations-pane>.pane-heading #equation-treatment{border:0;background:none;padding:0;min-height:0;margin:0;gap:2px;flex:none}
 #equation-treatment button,#equation-view button{min-height:30px;padding:4px 5px;font-size:9px;border-radius:6px}
 #equation-view{gap:2px!important}
 #equation-treatment [data-treatment="8"],#equation-treatment [data-treatment="7"],#step-by-step{font-size:0}
 #equation-treatment [data-treatment="8"]::before{content:'White';font-size:9px}
 #equation-treatment [data-treatment="7"]::before{content:'Black';font-size:9px}
 #step-by-step::before{content:'Steps';font-size:9px}
 #show-previous-equation{gap:3px}
 #show-previous-equation::before{content:'Prev';font-size:9px}
 #show-previous-equation::after{width:18px}
 #restore-visual{font-size:0;padding:4px;min-height:30px}
 #restore-visual::before{content:'Visual';font-size:9px}
}
@media(max-width:700px){
 #equations-pane .pane-heading #equation-view button{font-size:9px;min-height:30px;padding:4px 5px}
 #equations-pane .pane-heading #equation-view #step-by-step{font-size:0}
}
@media(max-width:700px){
 #equations-pane>.pane-heading #equation-treatment button{min-height:30px;padding:4px;font-size:9px}
 #equations-pane>.pane-heading #equation-treatment [data-treatment="8"],#equations-pane>.pane-heading #equation-treatment [data-treatment="7"]{font-size:0}
 #equations-pane>.pane-heading #equation-view{flex:none}
 #equations-pane>.pane-heading #equation-view button{white-space:nowrap}
}
@media(max-width:700px){
 #equations-pane .pane-heading #equation-view #show-all{font-size:0}
 #show-all::before{content:'Solution';font-size:9px}
}

#original-dialog{width:min(900px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:16px;border:1px solid #526e80;border-radius:14px;background:#080d15;color:#e7f2f8}
#original-dialog::backdrop{background:#010306bb}
#original-content{max-height:calc(100dvh - 155px);overflow:auto}
#original-content img{display:block;max-width:100%;height:auto;margin:auto}
#original-content iframe{display:block;width:100%;height:70dvh;border:0}
#original-status{font-size:12px;overflow-wrap:anywhere}
.original-homework-card{justify-content:center}
@media(max-width:700px){#equations-pane>.pane-heading{gap:2px;padding-inline:4px}}
/* Match the controls to the equation card's rounded silhouette. */
#equation-treatment button,#equation-view button,#equations-pane>.pane-heading>button{border-radius:11px}
@media(max-width:700px){
 #equations-pane>.pane-heading{padding:4px 8px;gap:2px}
 #equations-pane>.pane-heading #equation-treatment button{min-height:28px;padding-inline:3px;border-radius:10px}
 #equations-pane .pane-heading #equation-view button{min-height:28px;padding-inline:4px;border-radius:10px}
 #equations-pane>.pane-heading>#restore-visual{min-height:28px;border-radius:10px}
}

/* Opening composition: two primary actions, one compact account module. */
#question-entry{width:min(820px,100%);max-width:820px;margin:clamp(24px,6vh,72px) auto 0;padding:24px 28px 32px;overflow-y:auto;max-height:calc(100dvh - 90px)}
.entry-eyebrow{font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#a8bfce}
#question-entry h1{font-size:clamp(34px,5vw,56px);line-height:1.08;margin:16px 0;letter-spacing:-.045em}
.entry-description{color:#a8bfce;line-height:1.5;margin-bottom:24px}
#question-entry .entry-actions{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:stretch;margin:0}
#question-entry .entry-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:10px;min-height:176px;padding:24px;text-align:left;border:1px solid #334452;border-radius:19px;background:#101b26;cursor:pointer}
#question-entry .entry-card:hover{background:#132737;border-color:#a4d7ee}
.entry-card svg{width:30px;height:30px;fill:none;stroke:#bfe8fb;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;margin-bottom:8px}
.entry-card strong{font-size:20px;font-weight:500}.entry-card span{color:#a8bfce;font-size:13px}
#sample-homework{margin:14px 0 24px;padding:8px 0;background:none;border:0;color:#a8bfce;font-size:12px}
.entry-account{display:grid;grid-template-columns:1fr 1fr;gap:18px;padding:22px;border:1px solid #253847;border-radius:19px;background:#080e16}
.entry-account-heading{grid-column:1/-1;display:flex;flex-direction:column;gap:5px}.entry-account-heading strong{font-size:14px;font-weight:500}.entry-account-heading span,.entry-account p{font-size:12px;color:#a8bfce}
.entry-allowance{display:flex;flex-direction:column;gap:5px;border-left:1px solid #334452;padding-left:14px}.entry-allowance strong{font-size:28px;font-weight:500;color:#eef3f7}.entry-allowance small{font-size:13px;color:#a8bfce;font-weight:400}.entry-allowance span{font-size:11px;color:#a8bfce}
#entry-signin{border-radius:12px;grid-column:1/-1}.entry-account p{grid-column:1/-1;margin:0;text-align:center}
#homework-camera{width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:18px;border:1px solid #526e80;border-radius:19px;background:#080d15;color:#eef3f7}
#homework-camera::backdrop{background:#010306bb}#homework-camera video{display:block;width:100%;max-height:60dvh;object-fit:contain;border-radius:12px;background:#080e16}#homework-camera [data-capture]{width:100%;border-radius:12px;background:#c2e4f3;color:#080d15}#homework-camera p{font-size:13px;color:#a8bfce}
@media(max-width:700px){#question-entry{margin:12px auto 0;padding:18px 16px 24px;max-height:calc(100dvh - 76px)}#question-entry h1{font-size:36px}.entry-description{font-size:14px;margin-bottom:20px}#question-entry .entry-actions{gap:10px}#question-entry .entry-card{min-height:150px;padding:17px 13px;border-radius:16px;align-items:flex-start}.entry-card strong{font-size:16px}.entry-card span{font-size:11px;line-height:1.4}.entry-account{padding:18px;gap:14px}}

.screenshot-hint{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin-top:14px;font-size:12px;color:#a8bfce}.screenshot-hint kbd{font:11px Inter,system-ui,sans-serif;padding:6px 9px;border:1px solid #334452;border-radius:8px;color:#eef3f7;background:#101b26}.screenshot-hint>span:last-child{font-size:11px}
#question-entry .entry-card.is-drop-target{border-color:#bfe8fb;background:#132737;box-shadow:inset 0 0 0 1px #bfe8fb}
@media(pointer:coarse){.screenshot-hint{display:none}}

/* Homepage artwork and canonical account actions; only tutor placement here. */
#question-entry{position:relative;isolation:isolate;max-width:none;width:100%;padding:36px 36px 28px;margin-top:clamp(18px,4vh,42px);border-radius:24px}
#question-entry>.account-entry-art{border-radius:inherit}#question-entry>*:not(.account-entry-art){position:relative;z-index:1}
#question-entry h1{font:400 clamp(38px,5vw,64px)/1.12 Georgia,serif;letter-spacing:-.04em;margin:0 0 16px;color:#e5f2fb}
#question-entry .entry-description{font-size:16px;margin:0 0 30px}
#question-entry .entry-card{background:linear-gradient(135deg,#193345,#0c1c28);border-color:#4a687b;min-height:156px;box-shadow:inset 0 1px 0 #ffffff12}
#question-entry .entry-card strong{color:#e5f2fb}.entry-card svg{stroke:#bfe8fb}
#sample-homework.worked-example-card{display:grid;grid-template-columns:1fr auto;gap:8px 16px;width:100%;padding:20px 22px;margin:22px 0;border:1px solid #415469;border-radius:19px;background:radial-gradient(ellipse at 50% 0,#73499a25,transparent 75%),#09151f;text-align:left;color:#e5f2fb}
.worked-example-card .example-label{grid-column:1;font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#c9b7ff}.worked-example-card strong{grid-column:1;font:400 25px/1.2 Georgia,serif}.worked-example-card>span:not(.example-label){grid-column:1;color:#a8bfce;font-size:12px}.worked-example-card small{grid-column:2;grid-row:1/4;align-self:center;color:#c9b7ff}.worked-example-card small span{font-size:22px;margin-left:12px}
.entry-account{background:linear-gradient(155deg,#09141e,#03080e);grid-template-columns:1.5fr 1fr 1fr;align-items:center;gap:20px}.entry-account-heading{grid-column:1;gap:8px}.entry-account-heading strong{font-size:17px;color:#dcecf7}.entry-account-heading span{line-height:1.5}.entry-allowance strong{color:#e5f2fb}
#entry-signup{grid-column:1/-1;width:100%}.entry-account .entry-returning{grid-column:1/-1;margin-top:-4px}#entry-signin{display:inline;padding:0 0 0 6px;border:0;background:none;border-radius:0;color:#bfe8fb;text-decoration:underline;font-size:12px}
#example-signup{min-height:38px;padding:8px 13px;font-size:12px;white-space:nowrap}.screenshot-hint kbd{font-size:10px}.screenshot-hint{gap:8px 12px}
@media(max-width:700px){#question-entry{margin-top:12px;padding:22px 16px;max-height:calc(100dvh - 76px)}#question-entry h1{font-size:36px}#question-entry .entry-description{font-size:13px;margin-bottom:22px}.entry-account{grid-template-columns:1fr 1fr;gap:16px}.entry-account-heading{grid-column:1/-1}.entry-account-heading strong{font-size:16px}#sample-homework.worked-example-card{padding:16px;margin:18px 0}.worked-example-card strong{font-size:22px}.worked-example-card small{font-size:10px;max-width:75px;line-height:1.5}.worked-example-card small span{display:block;margin-left:0}#example-signup{font-size:10px;min-height:32px;padding:6px 9px}}
@media(max-width:700px){.screenshot-hint{display:none}body>header:has(#example-signup:not([hidden])) #pdf-notes,body>header:has(#example-signup:not([hidden])) #link{display:none}body>header:has(#example-signup:not([hidden])) #tools{display:flex;gap:6px}#question-entry .entry-card{min-height:140px}}

/* Desktop uses the available screen; phone retains its own stacked composition. */
@media(min-width:1000px){
 #question-entry{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(300px,.95fr);column-gap:24px;row-gap:20px;margin:0;max-height:none;min-height:calc(100dvh - 72px);padding:36px 28px 28px;align-content:center;overflow:visible}
 #question-entry h1{grid-column:1/-1;margin:0}
 #question-entry .entry-description{grid-column:1/-1;margin:0 0 12px}
 #question-form{grid-column:1/3;grid-row:3;min-width:0}
 #question-entry .entry-card{min-height:clamp(180px,25vh,280px);padding:28px}
 #question-entry .screenshot-hint{grid-column:1/3;grid-row:4;margin:0}
 #sample-homework.worked-example-card{grid-column:1/3;grid-row:5;margin:0;min-height:126px}
 #question-entry .entry-account{grid-column:3;grid-row:3/6;grid-template-columns:1fr 1fr;align-content:center;padding:28px;gap:26px 18px}
 #question-entry .entry-account-heading{grid-column:1/-1}
 #question-entry .entry-account-heading strong{font:400 27px/1.2 Georgia,serif}
 #question-entry .entry-account-heading span{font-size:13px;line-height:1.6}
 #question-entry .entry-allowance strong{font-size:36px}
 #question-entry #import-status{grid-column:1/-1;margin:0}
 #question-entry #import-status:empty{display:none}
 #question-entry #imported{grid-column:1/-1}
}

.screenshot-hint{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:10px 12px;align-items:stretch}
.screenshot-step{display:flex;align-items:flex-start;gap:12px;padding:13px 15px;border:1px solid #334452;border-radius:12px;background:#0c1c28}
.screenshot-step-number{display:grid;place-items:center;flex:none;width:24px;height:24px;border:1px solid #53788f;border-radius:50%;color:#bfe8fb;font-size:11px}
.screenshot-step>span:last-child{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;min-width:0}
.screenshot-step strong{font-size:12px;font-weight:500;color:#e5f2fb}.screenshot-step kbd{font-size:10px}.screenshot-step small{flex-basis:100%;font-size:11px;line-height:1.4;color:#a8bfce}
.screenshot-between{align-self:center;color:#a8bfce;font-size:17px}.screenshot-ready{grid-column:1/-1;font-size:11px;color:#a8bfce;margin:0}
@media(max-width:700px),(pointer:coarse){.screenshot-hint{display:none}}

body:has(#question-entry:not([hidden]))>header #pdf-notes,body:has(#question-entry:not([hidden]))>header #link,body:has(#question-entry:not([hidden]))>header #notes{display:none}
.worked-examples{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:22px 0}.worked-examples .worked-example-card,#sample-homework.worked-example-card{margin:0}
.worked-examples .worked-example-card{display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-width:0;padding:20px 22px;border:1px solid #415469;border-radius:19px;background:radial-gradient(ellipse at 50% 0,#73499a25,transparent 75%),#09151f;text-align:left;color:#e5f2fb}.worked-examples .worked-example-card small{margin-top:auto;align-self:flex-end;font-size:11px;color:#c9b7ff}.worked-examples .worked-example-card strong{font:400 23px/1.2 Georgia,serif}
#entry-pricing{grid-column:1/-1;width:100%}
@media(min-width:1000px){#question-entry .worked-examples{grid-column:1/3;grid-row:5;margin:0}.worked-examples #sample-homework.worked-example-card{grid-column:auto;grid-row:auto;min-height:155px}#question-entry .entry-account{gap:20px 18px}}
@media(max-width:700px){.worked-examples{gap:10px;margin:18px 0}.worked-examples .worked-example-card,.worked-examples #sample-homework.worked-example-card{padding:14px;gap:9px;min-height:174px}.worked-examples .worked-example-card strong{font-size:20px}.worked-example-card .example-label{font-size:8px}.worked-examples .worked-example-card>span:not(.example-label){font-size:11px;line-height:1.5}.worked-examples .worked-example-card small{align-self:flex-start;max-width:none}.worked-examples .worked-example-card small span{display:inline;margin-left:6px}}

.tutor-perlin-title{position:relative}.tutor-title-words{color:transparent}.tutor-title-ink{position:absolute;inset:0;display:block;background:#b8cafa;pointer-events:none}.tutor-title-ink .account-flow-art{background:transparent}

@media(min-width:701px){
 #question-entry .entry-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
 #question-entry .entry-actions .screenshot-hint{grid-column:auto;grid-row:auto;display:flex;flex-direction:column;gap:12px;min-width:0;padding:22px;border:1px solid #4a687b;border-radius:19px;background:linear-gradient(135deg,#193345,#0c1c28);margin:0}
 .screenshot-card-heading{display:flex;flex-direction:column;gap:5px;margin-bottom:2px}.screenshot-card-heading strong{font-size:20px;font-weight:500;color:#e5f2fb}.screenshot-card-heading>span{font-size:11px;color:#a8bfce}
 .screenshot-step{padding:9px 10px;gap:8px}.screenshot-step>span:last-child{gap:6px}.screenshot-step kbd{font-size:9px;padding:4px 6px}.screenshot-step small{display:none}.screenshot-between{display:none}.screenshot-ready{font-size:10px;line-height:1.5}
}
@media(min-width:1000px){#question-entry .worked-examples{grid-row:4}#question-entry .entry-account{grid-row:3/5}}
@media(max-width:700px){#question-entry .entry-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.entry-actions .screenshot-hint{display:none}}

.tutor-title-words{color:#e5f2fb}
.tutor-entry-account-links{grid-column:1/-1;justify-content:flex-end;padding-top:6px}

.worked-examples-mobile-label{display:none}
@media(max-width:700px){
 #question-entry h1{font-size:clamp(30px,9.2vw,36px)}
 .worked-examples-mobile-label{display:block;grid-column:1/-1;font-size:11px;color:#a8bfce;line-height:1.4}
 .worked-examples{gap:9px 10px}
 .worked-examples .example-label{display:none}
 .worked-examples .worked-example-card,.worked-examples #sample-homework.worked-example-card{min-height:126px;padding:13px;gap:7px;border-radius:14px}
 .worked-examples .worked-example-card strong{font:500 15px/1.25 Inter,system-ui,sans-serif;letter-spacing:0}
 .worked-examples .worked-example-card>span:not(.example-label){font-size:11px;line-height:1.45}
 .worked-examples .worked-example-card small{font-size:10px;line-height:1.2;margin-top:auto;align-self:stretch;display:flex;justify-content:space-between;align-items:center}
 .worked-examples .worked-example-card small span{font-size:15px;margin:0}
}

.screenshot-card-heading svg{width:30px;height:30px;fill:none;stroke:#bfe8fb;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;margin-bottom:8px}

.tutor-entry-account-links{display:grid;grid-template-columns:1fr 1fr;gap:12px 20px;width:100%;justify-items:center}
.tutor-entry-account-links #homepage-signup{grid-column:1/-1;grid-row:1;width:100%;min-height:56px;display:grid;place-items:center;padding:16px 21px;border-radius:11px;font-size:14px;text-align:center}
.tutor-entry-account-links #homepage-pricing{justify-self:end}.tutor-entry-account-links #homepage-login{justify-self:start}
.worked-examples #sample-homework.worked-example-card{display:flex;flex-direction:column;align-items:flex-start}
.entry-account .tutor-entry-account-links{display:grid;grid-template-columns:1fr 1fr;gap:12px 20px;width:100%;justify-items:center}

/* Landing hierarchy: one shared example heading and a full-width account action. */
.tutor-title-prefix{font-size:.65em;color:#e5f2fb}
.worked-examples .worked-examples-mobile-label{display:block;grid-column:1/-1;text-align:center;font-size:12px;line-height:1.4;color:#a8bfce}
.worked-examples .example-label{display:none}
.entry-account .tutor-entry-account-links{grid-template-columns:1fr;gap:12px}
.tutor-entry-account-links #homepage-pricing,.tutor-entry-account-links #homepage-login{justify-self:center;font-size:12px}
.tutor-entry-account-links #homepage-login span{color:#a8bfce;font-weight:400}

@media(min-width:701px){
 .worked-examples .worked-examples-mobile-label{display:none}
 .worked-examples .example-label{display:block}
 .worked-examples .worked-example-card>span:not(.example-label){line-height:1.5;max-width:44ch}
}
@media(max-width:700px){
 .worked-examples .worked-example-card,.worked-examples #sample-homework.worked-example-card{min-height:158px}
}

.homework-upload-review{width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:22px;border:1px solid #415469;border-radius:20px;background:#09141e;color:#e5f2fb;box-sizing:border-box}
.homework-upload-review>p{font:13px/1.5 system-ui;color:#a8bfce}.upload-pages{list-style:none;padding:0;display:grid;gap:10px;max-height:45dvh;overflow:auto}.upload-pages li{display:flex;gap:10px;align-items:center;border:1px solid #334452;border-radius:12px;padding:10px}.upload-pages img,.upload-pdf{width:56px;height:64px;object-fit:contain;flex:none}.upload-pdf{display:grid;place-items:center;background:#132737;border-radius:8px}.upload-pages li>span:not(.upload-pdf){flex:1;min-width:0;overflow-wrap:anywhere;font-size:12px}.upload-pages button{font-size:11px;padding:8px}.upload-review-actions{display:flex;flex-wrap:wrap;gap:8px}.upload-review-actions [data-submit]{width:100%;min-height:44px}.homework-upload-review::backdrop{background:#02070dcc}
@media(max-width:700px){.homework-upload-review{padding:16px}.upload-pages li{flex-wrap:wrap}.upload-pages li>span:not(.upload-pdf){flex-basis:calc(100% - 80px)}.upload-pages button{flex:1}}

/* Expanded examples retain the existing type and card padding. */
.worked-examples .worked-example-card[hidden]{display:none!important}
.example-pagination{grid-column:1/-1;display:flex;align-items:center;justify-content:center;gap:14px;color:#a8bfce;font-size:11px}
.example-pagination[hidden]{display:none}
.example-pagination button{width:32px;height:28px;padding:0;border:1px solid #415469;border-radius:9px;background:#0c1c28;color:#dceefa;font-size:20px;line-height:1}
.example-pagination button:disabled{opacity:.3}
@media(min-width:1000px){#question-entry .worked-examples{grid-column:1/-1;grid-template-columns:repeat(5,minmax(0,1fr));grid-row:4}#question-entry .entry-account{grid-row:3}.worked-examples .worked-example-card{padding:18px;min-height:180px}.worked-examples .worked-example-card strong{font-size:21px}}

/* Keep the phone entry within its screen; detailed allowances remain in Pricing. */
@media(max-width:700px){
 #question-entry{margin:0;max-height:none;min-height:0;padding:16px;flex:1;overflow-y:auto}
 #question-entry .entry-account{padding:12px;gap:10px}
 #question-entry .entry-account-heading span,#question-entry .entry-allowance{display:none}
 #question-entry .entry-account-heading strong{font-size:14px}
 #question-entry .entry-account .tutor-entry-account-links{grid-template-columns:minmax(0,1fr) auto;justify-content:stretch;gap:8px 12px;padding:0}
 #question-entry .tutor-entry-account-links #homepage-signup{grid-column:1/-1}
 #question-entry .tutor-entry-account-links #homepage-pricing{justify-self:start}
 #question-entry .tutor-entry-account-links #homepage-login{justify-self:end;white-space:nowrap}
 #question-entry #import-status:empty{display:none}
}
@media(max-width:700px) and (max-height:740px){
 #question-entry{padding:10px 16px}
 #question-entry h1{margin-bottom:8px}
 #question-entry .entry-description{margin-bottom:10px;font-size:12px}
 #question-entry .entry-card{min-height:110px;padding:12px 13px;gap:6px}
 #question-entry .entry-card svg{width:25px;height:25px;margin-bottom:2px}
 #question-entry .worked-examples{margin:10px 0;gap:6px 10px}
 #question-entry .entry-account{padding:10px;gap:8px}
 #question-entry .entry-account-heading{display:none}
 #question-entry .tutor-entry-account-links #homepage-signup{min-height:48px;padding-block:12px}
}

/* Tutor refinement: keep intermediate controls together and right aligned. */
@media(min-width:701px) and (max-width:1199px){
 body>header.sfi-world-global-controls{flex-wrap:nowrap;height:62px;padding:8px 12px;gap:6px}
 body>header .prototype-global-brand{flex:1 1 auto;min-width:150px;max-width:none}
 body>header #tools{display:flex;flex-wrap:nowrap;justify-content:flex-end;margin-left:auto;gap:5px}
 body>header #tools button,body>header #pdf-notes{font-size:10px;padding:8px;white-space:nowrap}
}
.worked-example-rail{display:contents}
@media(max-width:700px){
 #question-entry{display:flex;flex-direction:column;gap:12px;width:100%;height:100%;margin:0;padding:14px 16px;overflow:auto;max-height:none}
 #question-entry h1{flex:none;margin:0;font-size:34px}
 #question-entry .entry-description{margin:0;font-size:12px;line-height:1.4}
 #question-entry #question-form{flex:none}
 #question-entry .entry-actions>.entry-card{min-height:126px;padding:13px;gap:6px}
 #question-entry .entry-card svg{margin-bottom:3px;width:26px;height:26px}
 #question-entry .entry-card strong{font-size:15px}
 #question-entry .worked-examples{display:flex;flex-direction:column;gap:7px;margin:0;min-width:0;flex:none}
 #question-entry .worked-examples-mobile-label{display:block;font-size:12px}
 #question-entry .worked-example-rail{display:grid;grid-auto-flow:column;grid-auto-columns:calc((100% - 16px)/2.5);gap:8px;overflow-x:auto;overflow-y:hidden;padding:2px 0;scrollbar-width:none;scroll-snap-type:x proximity;overscroll-behavior-x:contain;touch-action:pan-x;mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 20px),transparent)}
 #question-entry .worked-example-rail::-webkit-scrollbar{display:none}
 #question-entry .worked-example-rail[data-before=true]{mask-image:linear-gradient(to right,transparent,#000 20px,#000 calc(100% - 20px),transparent)}
 #question-entry .worked-example-rail[data-before=true][data-after=false]{mask-image:linear-gradient(to right,transparent,#000 20px,#000)}
 #question-entry .worked-example-rail[data-before=false][data-after=false]{mask-image:none}
 #question-entry .worked-example-card,#question-entry #sample-homework.worked-example-card{min-height:144px;height:144px;padding:10px;gap:6px;scroll-snap-align:start;border-radius:13px}
 #question-entry .worked-example-card strong{font:500 13px/1.2 Inter,system-ui,sans-serif}
 #question-entry .worked-example-card>.example-description{font-size:10px;line-height:1.35}
 #question-entry .worked-example-card small{font-size:8px;gap:3px;white-space:nowrap}
 #question-entry .worked-example-card small span{font-size:12px}
 #question-entry .entry-account{flex:1;align-content:center;grid-template-columns:1fr 1fr;min-height:220px;padding:16px;gap:14px 12px;margin:0}
 #question-entry .entry-account-heading{display:flex;grid-column:1/-1;gap:5px}
 #question-entry .entry-account-heading strong{font-size:16px;line-height:1.25}
 #question-entry .entry-account-heading span{display:block;font-size:11px;line-height:1.4}
 #question-entry .entry-allowance{display:flex;gap:3px;padding-left:10px}
 #question-entry .entry-allowance strong{font-size:22px}
 #question-entry .entry-allowance span{font-size:10px}
 #question-entry .entry-account .tutor-entry-account-links{grid-template-columns:minmax(0,1fr) auto;gap:10px 8px}
 #question-entry .tutor-entry-account-links #homepage-signup{min-height:48px;padding:12px;font-size:13px}
 #question-entry .tutor-entry-account-links #homepage-pricing,#question-entry .tutor-entry-account-links #homepage-login{font-size:10px}
}
@media(max-width:700px) and (max-height:740px){
 #question-entry{gap:8px;padding:10px 14px}
 #question-entry h1{font-size:30px}
 #question-entry .entry-actions>.entry-card{min-height:104px;padding:10px;gap:4px}
 #question-entry .worked-example-card,#question-entry #sample-homework.worked-example-card{height:138px;min-height:138px}
 #question-entry .entry-account{padding:12px;gap:9px;min-height:207px}
 #question-entry .entry-account-heading strong{font-size:14px}
}
/* Homework review: explicit page choices with the existing tutor panel treatment. */
.homework-upload-review .upload-pages{max-height:48dvh;gap:12px;overscroll-behavior:contain}
.homework-upload-review .upload-pages li{display:grid;gap:12px;padding:14px;background:var(--panel,#0b1925);border-color:#334e63}
.upload-file-heading{display:flex;align-items:center;gap:12px;min-width:0}
.upload-file-info{display:grid;gap:5px;min-width:0;flex:1}
.upload-file-info strong{font:600 13px/1.4 system-ui;overflow-wrap:anywhere;color:#e5f2fb}
.upload-file-info>span{font:11px/1.4 system-ui;color:#9eb7ca}
.homework-upload-review .upload-file-tools{display:flex;gap:7px;flex-wrap:wrap}
.homework-upload-review .upload-file-tools button,.homework-upload-review .upload-page-actions button{border:1px solid #354d60;background:#132332;color:#c1d4e3;border-radius:9px;padding:7px 10px;min-height:32px;font:11px/1.3 system-ui;cursor:pointer}
.homework-upload-review button:disabled{opacity:.45;cursor:default}
.upload-page-selection{display:grid;gap:9px;border-top:1px solid #304557;padding-top:10px}
.upload-page-actions{display:flex;justify-content:flex-end;gap:7px}
.upload-page-grid{display:flex;flex-wrap:wrap;gap:7px;max-height:180px;overflow:auto;padding:2px}
.upload-page-grid label{display:flex;align-items:center;gap:7px;padding:8px 10px;min-height:34px;box-sizing:border-box;border:1px solid #3a5267;border-radius:9px;background:#112230;font:12px/1.3 system-ui;cursor:pointer}
.upload-page-grid label:has(input:checked){border-color:#7998c1;background:#1e344b;color:#f2f7ff}
.upload-page-grid input{accent-color:#a9c9fa;width:15px;height:15px;margin:0;flex:none}
.upload-page-grid label:focus-within{outline:2px solid #a9c9fa;outline-offset:2px}
.upload-review-progress{display:flex;align-items:center;gap:14px;padding:12px 0 16px;min-height:40px}
.homework-upload-review .upload-review-status{margin:0;flex:1;color:#b9cddd;font:12px/1.5 system-ui}
.upload-elapsed{display:grid;justify-items:center;gap:3px;padding:8px 13px;min-width:58px;border:1px solid #395069;border-radius:10px;background:#142538}
.upload-elapsed>span{font:10px/1.2 system-ui;text-transform:uppercase;letter-spacing:.09em;color:#9eb7ca}
.upload-elapsed time{font:600 16px/1.2 system-ui;font-variant-numeric:tabular-nums;color:#edf5ff}
.upload-elapsed[hidden]{display:none}
.homework-upload-review .upload-review-actions>[data-add],.homework-upload-review .upload-review-actions>[data-camera],.homework-upload-review .upload-review-actions>[data-stop]{flex:1;min-height:40px;border:1px solid #40576e;border-radius:11px;background:#142638;color:#deebf7;font:12px/1.3 system-ui;cursor:pointer}
.homework-upload-review .upload-review-actions>[data-submit]{border-radius:11px;font:600 14px/1.3 system-ui;min-height:46px}
@media(max-width:700px){.homework-upload-review .upload-pages li{padding:11px;gap:10px}.homework-upload-review .upload-file-tools button{flex:1}.upload-page-grid{max-height:150px}.homework-upload-review .upload-pages{max-height:43dvh}.upload-review-progress{gap:10px}.homework-upload-review .upload-file-heading img,.homework-upload-review .upload-pdf{width:44px;height:50px}}

/* One action family: document tools, then session and account navigation. */
body>header #link,body>header #notes,body>header #pdf-notes,body>header #sessions,body>header #new{border-radius:10px;gap:6px}
body>header .sfi-share-action-label{display:none}
body>header .tutor-action-label{display:inline;font-size:11px;letter-spacing:0}
body>header #pdf-notes{margin-right:6px}
@media(max-width:700px){
 body>header #tools #notes,body>header #tools #new{display:none}
 body>header #tools #sessions{display:inline-flex;width:36px;min-width:36px;height:40px;padding:8px;align-items:center;justify-content:center}
 body>header #sessions .tutor-action-label{display:none}
 body>header #pdf-notes{margin-right:0}
 body>header #tutor-home{width:36px;min-width:36px;height:40px;padding:8px}
 #session-list .saved-session{padding:0}
 #session-list .session-open{padding:14px 34px 14px 14px}
 #session-list .session-meta-badge{font-size:10px;padding:4px 7px}
}
@media(max-width:700px){body>header #tutor-return{white-space:nowrap}body>header #tutor-return>span{display:none}}

#question-entry .entry-description strong{display:block;color:#e3dafa;font-weight:500}
#question-entry .entry-description>span{display:block;margin-top:4px;font-size:.85em;color:#a8bfce}

#question-entry .tutor-free-invitation{display:inline-flex;align-items:center;gap:13px;color:#f0eaff;text-decoration:none;border-radius:13px}
#question-entry .tutor-free-minutes{display:inline-flex;align-items:center;gap:8px;padding:9px 12px;border:1px solid rgba(193,160,255,.5);border-radius:13px;background:linear-gradient(120deg,rgba(155,89,230,.3),rgba(76,139,224,.22));box-shadow:inset 0 1px rgba(235,218,255,.15)}
#question-entry .tutor-free-minutes>strong{font:600 32px/1 Inter,system-ui,sans-serif;letter-spacing:-.04em;color:#f4ecff}
#question-entry .tutor-free-minutes>span{font:600 9px/1.35 Inter,system-ui,sans-serif;letter-spacing:.07em;color:#e6d9ff}
#question-entry .tutor-free-invitation-copy{font-size:13px;font-weight:500}
#question-entry .tutor-free-invitation-copy small{display:block;margin-top:3px;font-size:11px;font-weight:400;color:#acbfd2}
#question-entry .tutor-free-invitation:hover .tutor-free-minutes{border-color:#ddc3ff;background:linear-gradient(120deg,rgba(155,89,230,.42),rgba(76,139,224,.32))}
#question-entry .entry-description>.tutor-free-invitation+span{margin-top:8px;font-size:11px}
@media(max-width:700px){#question-entry .tutor-free-minutes{padding:7px 10px}#question-entry .tutor-free-minutes>strong{font-size:28px}#question-entry .tutor-free-invitation{gap:10px}#question-entry .tutor-free-invitation-copy{font-size:12px}}
