/* Scoped to the self-test surface inside the existing fullscreen host. */
.self-test-shell{--st-green:#245d50;--st-gold:#a58a50;--st-paper:var(--paper,#f7f1e3);--st-line:var(--line,#d8cbb2);color:var(--ink,#66523b);background:var(--st-paper);font-family:UI,system-ui,sans-serif;text-align:start;min-height:100%;width:100%;max-width:100%;display:flex;flex-direction:column}
.self-test-shell *{box-sizing:border-box}
.self-test-shell [hidden]{display:none!important}
.self-test-shell :is(button,input,select){font:inherit;min-height:44px;color:inherit;max-width:100%}
.self-test-shell button{border:1px solid var(--st-line);border-radius:12px;background:transparent;padding:10px 16px;cursor:pointer;touch-action:manipulation;line-height:1.5;overflow-wrap:anywhere}
.self-test-shell button:disabled{opacity:.45;cursor:default}
.self-test-shell :is(button,input,select,summary,a):focus-visible{outline:3px solid var(--st-green);outline-offset:3px}
.self-test-shell button.st-primary{background:var(--st-green);color:#fffaf0;border-color:var(--st-green)}
.self-test-shell .st-top{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;padding:20px 24px 8px;flex:none;max-width:900px;width:100%;margin:0 auto}
.self-test-shell .st-back{grid-row:1;grid-column:1;justify-self:left;min-width:44px;min-height:44px;max-width:100%;border-color:var(--st-gold)}
.self-test-shell .st-top h2{grid-row:2;margin:0;font-family:Title,UI,serif;font-size:calc(29px * var(--ui-text-scale,1));font-weight:400;line-height:1.5;overflow-wrap:anywhere}
.self-test-shell[lang=en]{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.self-test-shell[lang=en] .st-top h2{font-family:inherit}
.self-test-shell .st-content{padding:8px 24px max(28px,env(safe-area-inset-bottom));width:100%;max-width:900px;margin:0 auto;min-width:0;flex:1;overflow-wrap:anywhere}
.self-test-shell p{line-height:1.8;margin:8px 0 14px}
.self-test-shell h3{font-size:calc(23px * var(--ui-text-scale,1));font-weight:500;line-height:1.6;margin:0 0 12px}
.self-test-shell h4{font-size:calc(17px * var(--ui-text-scale,1));font-weight:500;line-height:1.6;margin:0 0 10px}
.self-test-shell .st-note{font-size:calc(13px * var(--ui-text-scale,1));opacity:.9}
.self-test-shell .st-status{font-size:calc(13px * var(--ui-text-scale,1));padding:0 24px;max-width:900px;width:100%;margin:4px auto;min-height:1.5em}
.self-test-shell .st-status:empty{display:none}
.self-test-shell .st-banner{border-block:1px solid var(--st-line);background:var(--soft,#eee5d3);padding:14px 24px;font-size:calc(13px * var(--ui-text-scale,1));margin:10px 0;overflow-wrap:anywhere}
.self-test-shell .st-card{border:1px solid var(--st-line);border-radius:18px;padding:20px;margin:16px 0;min-width:0}
.self-test-shell .st-field{display:flex;flex-direction:column;gap:8px;margin:0 0 14px;min-width:0;font-size:calc(14px * var(--ui-text-scale,1))}
.self-test-shell .st-field :is(input,select){width:100%;border:1px solid var(--st-line);background:var(--st-paper);border-radius:10px;padding:10px 12px;font-size:calc(16px * var(--ui-text-scale,1));min-width:0}
.self-test-shell .st-range{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.self-test-shell .st-progress progress{display:block;width:100%;height:10px;accent-color:var(--st-green);margin:12px 0 22px}
.self-test-shell .st-eyebrow{font-size:calc(13px * var(--ui-text-scale,1));color:var(--st-green);margin:0 0 6px}
.self-test-shell .st-help-state{display:inline-block;border:1px solid var(--st-line);border-radius:8px;padding:5px 10px;font-size:calc(13px * var(--ui-text-scale,1))}
.self-test-shell .st-help-state[data-assisted=true]{border-style:dashed;border-color:var(--st-gold)}
.self-test-shell .st-hidden{display:flex;align-items:center;justify-content:center;text-align:center;min-height:180px;padding:28px 20px;margin:8px 0 16px;background:var(--soft,#eee5d3);border:1px dashed var(--st-line);border-radius:14px;line-height:1.8}
.self-test-shell .st-original{height:min(60dvh,630px);overflow:auto;overscroll-behavior:contain;direction:ltr;background:#f7f1e3;border:1px solid var(--st-line);border-radius:14px;margin:8px 0 16px}
.self-test-shell .st-original img{display:block;width:100%;height:auto;max-width:none;mix-blend-mode:darken}
.self-test-shell .st-assessment{border:0;padding:0;margin:26px 0 18px;min-width:0}
.self-test-shell .st-assessment legend{padding:0;font-size:calc(19px * var(--ui-text-scale,1));font-weight:500;line-height:1.6}
.self-test-shell .st-ratings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.self-test-shell .st-ratings button{min-height:56px;padding:10px 8px}
.self-test-shell .st-ratings [data-rating=mastered]{border-color:var(--st-green);color:var(--st-green)}
.self-test-shell .st-record-button{width:100%;border-color:var(--st-gold)}
.self-test-shell .st-links{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}
.self-test-shell .st-counts{list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:0;margin:12px 0}
.self-test-shell .st-counts li{border:1px solid var(--st-line);padding:10px;border-radius:10px;line-height:1.7;font-size:calc(14px * var(--ui-text-scale,1))}
.self-test-shell .st-answers{list-style:none;padding:0;margin:14px 0}
.self-test-shell .st-answers li{display:flex;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--st-line);font-size:calc(13px * var(--ui-text-scale,1));line-height:1.7}
.self-test-shell .st-answers li>span:last-child{text-align:end}
.self-test-shell .st-answers li:last-child{border-bottom:0}
.self-test-shell summary{cursor:pointer;min-height:44px;line-height:1.8;padding:8px 0}
.self-test-shell .st-import-preview{margin-top:20px;border:1px solid var(--st-gold);border-radius:14px;padding:16px;background:var(--soft,#eee5d3)}
.self-test-shell .st-import-preview>button,.self-test-shell .st-recovery button{margin:4px}
.self-test-shell .st-footer{border-top:1px solid var(--st-line);margin-top:26px;padding-top:12px}
.self-test-shell .st-recording-pane{min-width:0}
.self-test-shell .st-comparison-list{list-style:none;padding:0;margin:14px 0;min-width:0}
.self-test-shell .st-comparison-list>li{border-top:1px solid var(--st-line);padding:18px 0;min-width:0}
.self-test-shell .st-comparison-list h3{font-size:calc(18px * var(--ui-text-scale,1));margin-bottom:4px}
.self-test-shell .st-comparison-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.self-test-shell .st-comparison-report{min-width:0;border:1px solid var(--st-line);border-radius:12px;padding:12px;overflow-wrap:anywhere}
.self-test-shell .st-comparison-report time{display:block;font-size:calc(13px * var(--ui-text-scale,1));line-height:1.8}
.self-test-shell .st-comparison-rating{font-weight:600;margin:4px 0 8px}
@media(max-width:600px){.self-test-shell .st-comparison-pair{grid-template-columns:minmax(0,1fr)}}
.self-test-shell .st-recording-pane .mushafi-recording{padding:0}
body[data-theme=night] .self-test-shell{--st-green:#9dc8b9;--st-gold:#b8a477}
body[data-theme=night] .self-test-shell .st-primary{color:#15241f}
body[data-theme=night] .self-test-shell .st-original{background:#181a1d}
body[data-theme=night] .self-test-shell .st-original img{filter:grayscale(1) invert(1);mix-blend-mode:screen}
@media(max-width:600px){.self-test-shell .st-top{padding:max(12px,env(safe-area-inset-top)) 14px 8px;gap:10px}.self-test-shell .st-top h2{font-size:calc(25px * var(--ui-text-scale,1))}.self-test-shell .st-content{padding:6px 14px max(24px,env(safe-area-inset-bottom))}.self-test-shell .st-status{padding:0 14px}.self-test-shell .st-banner{padding:12px 14px}.self-test-shell .st-card{padding:14px}.self-test-shell .st-ratings{grid-template-columns:1fr}.self-test-shell .st-ratings button{min-height:48px}.self-test-shell .st-range{gap:10px}.self-test-shell .st-links>button{flex:1;min-width:125px}.self-test-shell .st-hidden{min-height:155px}.self-test-shell .st-answers li{flex-direction:column;gap:4px}.self-test-shell .st-answers li>span:last-child{text-align:start}.self-test-shell .st-counts{grid-template-columns:1fr}.self-test-shell .st-original{height:52dvh}}
@media(prefers-reduced-motion:reduce){.self-test-shell *{scroll-behavior:auto!important}}
