/* v47: shared proportions and accessible controls for the student and admin workspaces. */
:root{--ui-gap:20px;--ui-radius:16px;--ui-shadow:0 8px 24px #00000012}
:root:not([data-theme="light"]){--bg:#071525;--s1:#0c2137;--s2:#122d47;--card:#0c2137;--ink:#edf4ff;--mute:#a7bbd2;--line:#25415d;--line2:#3b5877;--surface-tint:#102b46}
:root[data-theme="light"]{--bg:#f3f6fb;--s1:#fff;--s2:#edf3fc;--card:#fff;--ink:#142a47;--mute:#526983;--line:#d8e3f0;--line2:#b9cce3;--surface-tint:#edf4ff;--ui-shadow:0 6px 22px #274e8010}
:root body{font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:15px;line-height:1.55;letter-spacing:0}
:root h1,:root h2,:root h3,:root h4,:root .in h3,:root .in h4{font-family:Inter,system-ui,sans-serif;letter-spacing:-.025em;text-transform:none;font-weight:700;line-height:1.25}
:root h2{font-size:26px}:root .in h3{font-size:19px}:root .in h4{font-size:16px}
:root button{font-family:inherit;font-size:14px;line-height:1.35;font-weight:600;min-height:42px;padding:10px 16px;border-radius:10px;letter-spacing:0;touch-action:manipulation}
:root input,:root select,:root textarea{font-size:15px;line-height:1.5;padding:11px 13px;border-radius:10px;min-height:44px}
:root input[type="checkbox"],:root input[type="radio"]{width:18px;height:18px;min-height:18px;flex:none;accent-color:var(--brand)}
:root label{font-size:14px;line-height:1.5}:root small{line-height:1.5}
:root button:focus-visible,:root a:focus-visible{outline:3px solid var(--brand2);outline-offset:3px}
:root .card,:root .dashboard-panel,:root .in #quests,:root .in #coinTasks{border-radius:var(--ui-radius);padding:20px;border-color:var(--line);box-shadow:var(--ui-shadow)}
:root .card p{line-height:1.65}:root .card>h2,:root .card>h3{margin-bottom:12px}
:root .in main{max-width:1680px;padding:0 24px 36px 0;margin-inline:auto}
:root .in section#app{grid-template-columns:204px minmax(0,1fr) 288px;gap:24px;padding:0;align-items:start}
:root .in #center,:root .in #right{padding-top:18px;min-width:0}
:root .in #view{min-width:0}:root .in #right{gap:16px}
:root .in>header{height:64px;min-height:64px;margin-left:204px;padding:12px 24px;gap:10px}
:root .in>header button{min-width:40px;min-height:40px;font-size:13px}:root .in>header .chip2{font-size:13px}
:root .in #side{margin-top:-64px;padding-inline:14px;min-height:100vh;position:sticky;top:0}
:root .in #side .sidebar-brand{height:146px}:root .brand-orbit{width:108px;height:108px}:root .brand-orbit img{width:98px}
:root .in .tabs button{font:600 14px/1.3 Inter,system-ui,sans-serif!important;min-height:46px;padding:12px 14px;gap:12px;border-radius:10px}
:root .in #side .tabs{gap:7px}:root .sidebar-signoff{padding-top:22px;min-height:205px}:root .sidebar-signoff>b{font-size:19px}
:root .clash-dashboard{gap:20px;align-items:stretch}
:root .welcome-banner{padding:24px;min-height:166px;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);border-radius:18px}
:root .welcome-copy h2{font-size:clamp(25px,2.1vw,32px);line-height:1.15;letter-spacing:-.035em;margin:7px 0 10px}
:root .welcome-copy .eyebrow{font-size:10px;letter-spacing:.1em}:root .welcome-copy p{font-size:13px;max-width:29ch;line-height:1.6}
:root .welcome-stats b{font-size:25px;line-height:1.3}:root .welcome-stats small{font-size:12px;white-space:normal}:root .welcome-stats>div{gap:5px;padding-inline:8px}
:root .welcome-banner>.mountain-art{opacity:.3}
:root .meath-access-banner{margin:0;padding:16px 20px;border-radius:14px;background:var(--surface-tint);gap:18px;align-items:center}
:root .meath-access-banner b{font-size:15px;font-weight:650}:root .meath-access-banner p{font-size:13px;margin:4px 0;line-height:1.6}:root .meath-access-banner small{font-size:12px}
:root .meath-ratings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:0;margin:0}
:root .meath-ratings .rating-card{padding:18px;min-width:0;border-radius:14px;position:relative;background:var(--s1);border:1px solid var(--line);box-shadow:0 4px 14px #00000008}
:root .rating-card-heading{display:flex;align-items:center;gap:9px;min-width:0}
:root .meath-ratings small{font-size:13px;font-weight:600;color:var(--ink);overflow-wrap:anywhere}
.subject-symbol{display:inline-grid;place-items:center;flex:none;width:30px;height:30px;border-radius:9px;color:var(--ind);background:var(--mint-soft)}
.subject-symbol svg{display:block;width:20px;height:20px}
:root .rating-card[data-subject="physics"] .subject-symbol{color:#37b9ef;background:#1c9ac61c}
:root .rating-card[data-subject="chemistry"] .subject-symbol{color:#b59aff;background:#9776ec1c}
:root .rating-card[data-subject="biology"] .subject-symbol{color:#49d1a6;background:#22ad861c}
:root .rating-card[data-subject="mathematics"] .subject-symbol{color:#ffbe70;background:#e99b3c1c}
:root[data-theme="light"] .rating-card[data-subject="physics"] .subject-symbol{color:#087cae}
:root[data-theme="light"] .rating-card[data-subject="chemistry"] .subject-symbol{color:#7551c8}
:root[data-theme="light"] .rating-card[data-subject="biology"] .subject-symbol{color:#087f5c}
:root[data-theme="light"] .rating-card[data-subject="mathematics"] .subject-symbol{color:#a15b0b}
:root .rating-card-value{display:flex;align-items:baseline;gap:7px;margin-top:12px}
:root .meath-ratings .rating-card-value b{font-size:30px;line-height:1.1;letter-spacing:-.035em;font-weight:700;font-variant-numeric:tabular-nums;margin:0}
:root .meath-ratings .rating-card-value span{font-size:12px;color:var(--mute);font-weight:500}
:root .meath-ratings .rating-card-caption{font-size:12px;line-height:1.5;margin-top:8px;display:block;color:var(--mute)}
:root .meath-summary-actions{margin:0;gap:10px;align-items:center}
:root .meath-summary-actions button{min-height:40px;font-size:13px;padding:9px 13px}
:root .meath-summary-actions details{flex-basis:100%;font-size:13px;border-top:1px solid var(--line);padding-top:4px}
:root .meath-summary-actions summary{padding:7px 0;min-height:36px}:root .meath-summary-actions details p{max-width:80ch;line-height:1.7}
:root .arena-toolbar{min-height:44px;gap:16px;align-items:center;margin-top:2px}
:root .arena-heading h2{font-size:26px;font-style:normal;letter-spacing:-.035em}:root .arena-heading>span:last-child{font-size:12px}
:root .subject-tiles{gap:7px;max-width:100%}
:root .subject-tiles .tile{min-height:40px;font-size:13px;padding:8px 13px;gap:7px;align-items:center;border-radius:10px;box-shadow:none}
:root .subject-tiles .subject-symbol{width:19px;height:19px;background:none;color:inherit;border-radius:0}:root .subject-tiles .subject-symbol svg{width:18px;height:18px}
:root .clash-modes{gap:14px;margin:0}
:root .clash-dashboard .clash-mode-card{display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto auto;align-items:start;gap:14px 13px;min-height:0!important;padding:20px!important;border-radius:16px;transform:none}
:root .clash-dashboard .clash-mode-card .ic{grid-column:1;grid-row:1;width:48px!important;height:48px!important;display:grid!important;min-width:0;border-radius:12px;flex-basis:48px}
:root .clash-dashboard .clash-mode-card .ic .ico{width:28px!important;height:28px!important}
:root .mode-copy{grid-column:2;grid-row:1;min-width:0;flex:none}
:root .mode-copy>b{font-size:21px;line-height:1.25;letter-spacing:-.025em;white-space:normal;font-weight:700}
:root .mode-copy p{font-size:13px;line-height:1.55;margin:5px 0 9px}
:root .mode-detail{font-size:11px;line-height:1.5;padding:3px 7px;border-radius:5px}
:root .clash-mode-card>button.pri,:root .mode-actions>.pri{min-height:42px;border-radius:10px;font-size:14px;padding:10px 16px;margin:0!important;justify-self:start;align-self:center}
:root .clash-mode-card>button.pri{grid-column:1/3;grid-row:2}
:root .clash-mode-card>.mode-practice{grid-column:2;grid-row:2;justify-self:end;align-self:center;margin:0;min-height:42px;font-size:12px;padding:8px 0}
:root .clash-mode-card>.mode-actions{grid-column:1/3;grid-row:2;margin:0;flex-direction:row;justify-content:space-between;align-items:center;width:100%;gap:12px}
:root .mode-actions .text-action{min-height:42px;font-size:12px;padding:8px 0}
:root .text-action{font-size:13px;min-height:36px;line-height:1.4}
:root .panel-heading{gap:12px;margin-bottom:14px}:root .in .panel-heading h3{font-size:16px;letter-spacing:-.02em;line-height:1.4}
:root .panel-heading .text-action{font-size:12px}:root .panel-footnote{font-size:12px;line-height:1.6}
:root .profile-summary{padding:20px}:root .profile-top b{font-size:16px}:root .profile-top small{font-size:12px}:root .profile-top .av{width:40px;height:40px}
:root .profile-mini-stats b{font-size:17px}:root .profile-mini-stats small,:root .profile-xp small,:root .profile-league{font-size:11px}
:root #quests .quest b,:root .quest-title,:root #coinTasks b{font-size:13px;line-height:1.5}
:root #quests .quest small,:root #coinTasks small{font-size:12px;line-height:1.6}
:root #quests button,:root #coinTasks button{font-size:12px;min-height:36px;padding:7px 11px}
:root .planner-empty b{font-size:14px}:root .planner-empty p{font-size:13px;line-height:1.6}:root .planner-empty .pri{font-size:13px;min-height:40px}
:root .online-player-list{gap:12px}:root .online-player{padding:14px}:root .online-player b{font-size:14px}:root .online-player small{font-size:12px}:root .online-player button{min-height:38px;font-size:12px}
:root .redeem-shortcut{padding:16px;min-height:80px}:root .redeem-shortcut b{font-size:15px}:root .redeem-shortcut small{font-size:12px;line-height:1.5}
:root .tests{gap:16px}:root .tcard{padding:20px;border-radius:16px}:root .tcard h3{font-size:19px}:root .tcard small{font-size:13px;line-height:1.6}
:root .mx-metrics span{font-size:13px}:root .mx-metrics b{font-size:26px}:root .mx-toolbar label{font-size:14px}:root .mx-toolbar{flex-wrap:wrap}
:root .mx-post{padding:20px 0}:root .mx-post p,:root .mx-message{font-size:15px;line-height:1.7}
:root .profile-fields,:root .planner-fields{gap:16px}:root .profile-section{padding:20px 0}:root .profile-section h3{font-size:18px}
:root .meath-plan-grid article{padding:20px;border-radius:14px;background:var(--s1)}:root .meath-plan-grid h3{font-size:19px}:root .meath-plan-grid p{font-size:14px}
:root dialog{width:min(680px,calc(100vw - 32px));max-height:88dvh;overflow:auto;padding:28px;border-radius:18px;background:var(--s1);color:var(--ink);border:1px solid var(--line)}
:root dialog::backdrop{background:#020d1bc9;backdrop-filter:blur(5px)}:root dialog h3{font-size:22px}:root dialog p{font-size:14px;line-height:1.7}
:root table{font-size:14px;line-height:1.5}:root th,:root td{padding:12px 14px}:root .table-wrap{max-width:100%;overflow-x:auto}
:root .in footer{margin-left:228px;font-size:12px;line-height:1.6}
@media(min-width:1680px){:root .in>header{max-width:1452px;margin-left:max(204px,calc((100vw - 1680px)/2 + 204px))}}
@media(max-width:1250px) and (min-width:781px){:root .in section#app{grid-template-columns:180px minmax(0,1fr);gap:22px}:root .in>header{margin-left:180px}:root .in #side{grid-row:1/3}:root .in #center{grid-column:2}:root .in #right{grid-column:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding-top:0}:root .in #side .sidebar-brand{height:136px}:root .in #side .tabs button{font-size:13px!important;padding:11px}:root .arena-toolbar{align-items:start;flex-direction:column}:root .welcome-stats small{font-size:11px}:root .meath-ratings .rating-card{padding:14px}:root .rating-card-heading{flex-direction:column;align-items:start;gap:8px}:root .in footer{margin-left:202px}}
@media(max-width:780px){:root .in main{padding:0 16px 108px}:root .in section#app{display:flex;gap:20px}:root .in #side{margin:0;padding:0;min-height:0;background:none!important}:root .in #center,:root .in #right{width:100%;padding-top:8px}:root .in #right{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}:root .in>header{margin-left:0;height:62px;min-height:62px;padding:10px 16px}:root .in>header .chip2{font-size:12px}:root .in #side .tabs{padding:8px 8px calc(8px + env(safe-area-inset-bottom));gap:5px}:root .in #side .tabs button{font-size:11px!important;min-width:74px;min-height:56px;padding:8px 9px;gap:5px}:root .in #side .tabs button .ico{width:21px;height:21px}:root .clash-dashboard{gap:18px}:root .welcome-banner{padding:20px;grid-template-columns:1fr;gap:22px;min-height:0}:root .welcome-copy h2{font-size:29px}:root .welcome-copy p{font-size:13px;max-width:100%}:root .welcome-copy .eyebrow{font-size:10px}:root .welcome-stats{grid-template-columns:repeat(4,minmax(0,1fr));gap:0}:root .welcome-stats>div:first-child{border-left:0}:root .welcome-stats b{font-size:22px}:root .welcome-stats small{font-size:11px}:root .welcome-stats .ico{width:21px;height:21px}:root .meath-ratings{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}:root .meath-ratings .rating-card{padding:16px}:root .rating-card-heading{flex-direction:row;gap:8px}:root .arena-toolbar{flex-direction:column;align-items:start;gap:12px}:root .arena-heading h2{font-size:25px}:root .arena-heading>span:last-child{font-size:12px}:root .subject-tiles{gap:6px}:root .subject-tiles .tile{font-size:12px;min-height:40px;padding:8px 10px}:root .clash-modes{grid-template-columns:1fr}:root .mode-copy>b{font-size:21px}:root .mode-copy p{font-size:13px}:root .mode-detail{font-size:12px}:root .meath-access-banner{padding:16px;align-items:start}:root .in footer{margin-left:0}:root .all-players{grid-template-columns:1fr!important}}
@media(max-width:480px){:root .in #right{grid-template-columns:1fr}:root .welcome-banner{padding:18px}:root .welcome-stats small{font-size:10px}:root .welcome-stats>div{padding-inline:5px}:root .subject-tiles .tile{font-size:12px;padding:8px 9px}:root .subject-tiles .subject-symbol{display:none}:root .meath-ratings small{font-size:13px}:root .meath-ratings .rating-card-value b{font-size:28px}:root .meath-ratings .rating-card-caption{font-size:11px}:root dialog{padding:20px}:root .mx-image-controls,:root .planner-fields,:root .profile-fields{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){:root *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
:root .plan-price{font-size:27px;font-weight:700;display:block;margin:12px 0 20px;letter-spacing:-.035em;color:var(--ink)}
:root .plan-benefits{padding:0;list-style:none;display:grid;gap:0;margin:0}
:root .plan-benefits li{font-size:14px;line-height:1.6;padding:12px 0;border-top:1px solid var(--line)}
:root .meath-plan-grid .plan-current{border:2px solid var(--brand);background:var(--surface-tint)}
:root .plan-card>small{font-size:12px;color:var(--ind);font-weight:650}
:root .flashcard-allowance{padding:12px 15px;border:1px solid var(--line);background:var(--surface-tint);border-radius:10px;font-size:14px}
:root #mxStudyCard{padding:24px 0 8px}:root #mxStudyCard>small{font-size:13px;line-height:1.6;color:var(--mute)}
:root #mxStudyCard h3{font-size:22px;line-height:1.6;margin:20px 0;white-space:normal;overflow-wrap:anywhere}
:root #mxStudyCard details{padding:16px;background:var(--surface-tint);border:1px solid var(--line);border-radius:12px;margin:0 0 20px}
:root #mxStudyCard summary{cursor:pointer;font-weight:600}:root #mxStudyCard>button{margin:4px 8px 4px 0}
@media(max-width:480px){:root .clash-mode-card>.mode-practice{grid-column:1/3;grid-row:3;justify-self:start;min-height:36px}:root .clash-dashboard .clash-mode-card{row-gap:12px}}
:root .rating-card .subject-symbol{display:inline-grid;place-items:center;width:30px;height:30px;flex:none}
:root .meath-ratings .rating-card-value>span{display:inline}
