/* Reference-led visual system: motivating route graphics, clear hierarchy, real-data dashboards. */
:root{
 --ref-blue:#1570f8;--ref-indigo:#4b46ed;--ref-cyan:#20aaf4;--ref-mint:#21b781;
 --ref-coral:#ff7167;--ref-amber:#f4a62a;--ref-violet:#7f6cf0;
 --ref-navy:#0d214f;--ref-pale:#f3f7ff;--ref-line:#e5ebf5;
}
body.reference-ui.rota-dashboard{
 --flow-bg:#f5f8fd;--flow-navy:var(--ref-navy);--flow-line:var(--ref-line);--flow-muted:#6d7890;
 background:radial-gradient(circle at 86% 0,rgba(174,196,255,.24),transparent 30rem),#f5f8fd;
}
body.reference-ui .main{padding-top:22px}
.reference-utility{display:flex;align-items:center;justify-content:flex-end;gap:18px;min-height:50px;margin:0 96px 24px 0}
.reference-search{display:flex;align-items:center;gap:10px;width:min(420px,45vw);min-height:42px;padding:0 13px;border:1px solid var(--ref-line);border-radius:12px;background:rgba(255,255,255,.78);box-shadow:0 6px 20px rgba(24,56,112,.035);color:#8490a6;text-align:left}
.reference-search span:nth-child(2){overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}
.reference-search kbd{padding:3px 6px;border:1px solid var(--ref-line);border-radius:6px;background:#f8faff;color:#99a3b5;font:10px inherit}
.reference-utility-actions{display:flex;align-items:center;gap:12px}
.reference-utility-actions>button{width:38px;min-height:38px;padding:0;border:0;background:transparent;color:var(--ref-navy);font-size:20px}
.reference-avatar{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;background:#e3edff;color:var(--ref-blue);font-size:12px;font-weight:800}

body.reference-ui .today-heading{align-items:flex-end;margin:4px 0 22px!important}
body.reference-ui .today-heading h1{font-size:clamp(32px,4vw,48px)!important;letter-spacing:-1.8px!important}
body.reference-ui .today-heading p{font-size:15px!important}
body.reference-ui .today-heading>.primary{background:linear-gradient(135deg,var(--ref-blue),#1260e8);box-shadow:0 10px 24px rgba(21,112,248,.22)}

.reference-overview{display:grid;gap:16px;margin:0 0 18px}
.reference-kpi-grid{display:grid;grid-template-columns:1.15fr 1fr 1fr;gap:14px}
.reference-kpi{min-height:212px;padding:21px;border:1px solid var(--ref-line);border-radius:18px;background:#fff;box-shadow:0 9px 28px rgba(15,45,96,.055)}
.reference-kpi>div:first-child{display:flex;align-items:center;gap:9px;color:var(--ref-navy);font-size:13px}
.reference-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;font-size:17px;font-weight:800}
.reference-icon.is-blue{background:#e8f2ff;color:var(--ref-blue)}
.reference-icon.is-violet{background:#eeecff;color:var(--ref-violet)}
.reference-icon.is-mint{background:#e7f8f1;color:var(--ref-mint)}
.reference-progress-card{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto 1fr;column-gap:18px}
.reference-progress-card>div:first-child{grid-column:1/-1}
.reference-ring{--value:0;display:grid;place-items:center;align-self:center;width:112px;height:112px;border-radius:50%;background:conic-gradient(var(--ref-blue) calc(var(--value)*1%),#e8eef8 0);position:relative}
.reference-ring:after{content:"";position:absolute;inset:13px;border-radius:50%;background:#fff}
.reference-ring b{position:relative;z-index:1;color:var(--ref-navy);font-size:23px}
.reference-legend{display:flex;flex-direction:column;justify-content:center;gap:9px;color:#5f6b82;font-size:11px}
.reference-legend span{display:flex;align-items:center;gap:7px}.reference-legend i{width:8px;height:8px;border-radius:50%}.reference-legend .is-green{background:var(--ref-mint)}.reference-legend .is-blue{background:var(--ref-blue)}
.reference-legend small{margin-top:5px;color:#8b96a9}
.reference-goal-card{background:linear-gradient(145deg,#fff,#f7f6ff)}
.reference-exam-card{background:linear-gradient(145deg,#fff,#f2fbf7)}
.reference-number{display:block;margin:24px 0 2px;color:var(--ref-navy);font-size:28px}.reference-sub{color:#8792a6;font-size:11px}
.reference-progress{height:9px;margin:22px 0 11px;overflow:hidden;border-radius:999px;background:#e9eef8}.reference-progress i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--ref-indigo),var(--ref-blue))}
.reference-goal-card>small{color:#7d899e;font-size:11px}.reference-exam-name{display:block;margin:24px 0 4px;color:var(--ref-navy);font-size:16px}.reference-exam-score{display:flex;align-items:baseline;gap:6px;margin-top:18px}.reference-exam-score b{font-size:32px;color:var(--ref-navy)}.reference-exam-score small{color:var(--ref-mint);font-weight:700}

.reference-route-card{position:relative;min-height:245px;overflow:hidden;padding:26px 28px;border:1px solid #dce6fb;border-radius:20px;background:linear-gradient(145deg,#fbfdff,#f2f6ff);box-shadow:0 10px 32px rgba(29,72,144,.07)}
.reference-route-copy{position:relative;z-index:3;max-width:430px}.reference-eyebrow{color:var(--ref-blue);font-size:10px;font-weight:850;letter-spacing:.12em}.reference-route-copy h2{margin:6px 0!important;color:var(--ref-navy)!important;font-size:24px!important}.reference-route-copy p{margin:0!important;font-size:12px!important}
.reference-mountains{position:absolute;z-index:0;right:0;bottom:0;width:72%;height:88%;filter:saturate(.94)}
.reference-route{position:absolute;z-index:2;left:36%;right:5%;bottom:32px;display:grid;grid-template-columns:repeat(7,1fr);align-items:end;margin:0;padding:0;list-style:none}
.reference-route:before{content:"";position:absolute;left:4%;right:4%;top:15px;height:3px;border-radius:99px;background:linear-gradient(90deg,var(--ref-blue),rgba(255,255,255,.95));transform:rotate(-4deg);transform-origin:left}
.reference-route li{display:grid;justify-items:center;gap:2px;position:relative;color:#53617c;font-size:10px;transform:translateY(var(--lift,0))}.reference-route li:nth-child(2){--lift:-12px}.reference-route li:nth-child(3){--lift:-24px}.reference-route li:nth-child(4){--lift:-16px}.reference-route li:nth-child(5){--lift:-28px}.reference-route li:nth-child(6){--lift:-42px}.reference-route li:nth-child(7){--lift:-57px}
.reference-route-node{display:grid;place-items:center;width:25px;height:25px;margin-bottom:3px;border:3px solid white;border-radius:50%;background:#d9e3f6;box-shadow:0 2px 8px rgba(18,51,103,.18);color:#fff;font-size:11px;font-weight:800}.reference-route li.is-active .reference-route-node,.reference-route li.is-complete .reference-route-node{background:var(--ref-blue)}.reference-route small{font-size:9px}.reference-route b{font-size:10px}.reference-flag{position:absolute;z-index:2;right:5.5%;bottom:125px;color:var(--ref-indigo);font-size:30px}
.reference-role-route{margin:0 0 18px}.reference-role-route .reference-mountains{width:68%}.reference-role-path{position:absolute;z-index:2;left:43%;right:8%;bottom:60px;display:flex;justify-content:space-between;align-items:center}.reference-role-path:before{content:"";position:absolute;left:0;right:0;height:3px;background:linear-gradient(90deg,var(--ref-blue),#fff);transform:rotate(-5deg)}.reference-role-path i{position:relative;width:24px;height:24px;border:4px solid #fff;border-radius:50%;background:var(--ref-blue);box-shadow:0 3px 10px rgba(34,70,140,.22)}.reference-role-path i:nth-child(2){transform:translateY(-12px)}.reference-role-path i:nth-child(3){transform:translateY(-21px)}.reference-role-path i:nth-child(4){transform:translateY(-35px)}.reference-role-path i:nth-child(5){transform:translateY(-50px);background:var(--ref-indigo)}

body.reference-ui .sidebar{width:218px;padding:25px 15px;background:rgba(255,255,255,.94);box-shadow:8px 0 34px rgba(19,49,102,.035)}
body.reference-ui .main{margin-left:218px;max-width:1500px;padding-left:34px;padding-right:34px}
body.reference-ui .sidebar .brand i{background:linear-gradient(135deg,var(--ref-navy),#172f67)}
body.reference-ui .sidebar .brand{padding:2px 10px 24px;font-size:20px}
body.reference-ui .sidebar .nav[data-organized],body.reference-ui .sidebar .nav{gap:5px;margin-top:10px}
body.reference-ui .sidebar .rota-role-label{margin:12px 12px 8px;color:#9aa4b5!important}
body.reference-ui .sidebar .nav a,body.reference-ui .sidebar .workspace-nav-section>summary{min-height:44px;padding:11px 13px!important;border:0!important;border-radius:11px!important;background:transparent!important;box-shadow:none!important;color:#55627a;font-size:12px;font-weight:620}
body.reference-ui .sidebar .nav a .rota-nav-icon{margin-right:2px;color:#60708a}
body.reference-ui .sidebar .nav a:hover{background:#f2f6fc!important;color:var(--ref-navy);transform:none}
body.reference-ui .sidebar .nav a.active,body.reference-ui .sidebar .workspace-nav-section.has-active>summary{background:#e9f2ff;color:var(--ref-blue);border-color:#d9e8ff}
body.reference-ui .sidebar .nav a.active{background:#e7f1ff!important;color:var(--ref-blue)!important}
body.reference-ui .sidebar .nav a.active .rota-nav-icon{color:var(--ref-blue)}
body.reference-ui .sidebottom{display:none}
body.reference-ui .flow-command{overflow:hidden;border-color:#dce6f6;background:linear-gradient(120deg,#fff,#f3f7ff)}
body.reference-ui .flow-command:after{content:"";position:absolute;right:-15px;bottom:-16px;width:210px;height:70px;background:linear-gradient(145deg,transparent 30%,rgba(139,165,245,.18) 31% 55%,rgba(92,132,231,.17) 56%);clip-path:polygon(0 100%,21% 35%,38% 70%,57% 10%,73% 62%,100% 18%,100% 100%)}
body.reference-ui .flow-command{position:relative}.flow-command>*{position:relative;z-index:1}

body.reference-ui :is(.card,.study-card).reference-surface{border-color:var(--ref-line);background:#fff;box-shadow:0 8px 28px rgba(15,45,96,.05)}
body.reference-ui .reference-surface[data-reference-tone="0"]{--surface-accent:var(--ref-blue)}
body.reference-ui .reference-surface[data-reference-tone="1"]{--surface-accent:var(--ref-violet)}
body.reference-ui .reference-surface[data-reference-tone="2"]{--surface-accent:var(--ref-mint)}
body.reference-ui .reference-surface[data-reference-tone="3"]{--surface-accent:var(--ref-amber)}
body.reference-ui .reference-surface>.cardhead h2:before,body.reference-ui .reference-surface>h2:first-child:before{content:"";display:inline-block;width:7px;height:18px;margin-right:9px;border-radius:5px;background:var(--surface-accent,var(--ref-blue));vertical-align:-3px}
body.reference-ui .rota-summary-grid article,body.reference-ui .role-panel-summary article{position:relative;overflow:hidden;background:linear-gradient(145deg,#fff,#f5f8ff)!important}
body.reference-ui .rota-summary-grid article:nth-child(4n+2),body.reference-ui .role-panel-summary article:nth-child(4n+2){background:linear-gradient(145deg,#fff,#f3f1ff)!important}
body.reference-ui .rota-summary-grid article:nth-child(4n+3),body.reference-ui .role-panel-summary article:nth-child(4n+3){background:linear-gradient(145deg,#fff,#ecfaf4)!important}
body.reference-ui .rota-summary-grid article:nth-child(4n),body.reference-ui .role-panel-summary article:nth-child(4n){background:linear-gradient(145deg,#fff,#fff7e9)!important}
body.reference-ui .primary,body.reference-ui .flow-quick-button{background:linear-gradient(135deg,var(--ref-blue),#1760e8)!important;color:#fff!important}
body.reference-ui .progress>div{background:linear-gradient(90deg,var(--ref-cyan),var(--ref-blue))!important}
body.reference-ui .task:has(input:checked) input{background:var(--ref-mint)!important}
body.reference-ui .reference-chart-surface{background-image:linear-gradient(to top,rgba(229,237,255,.5),transparent 45%)}
body.reference-ui .reference-chart-surface svg{filter:drop-shadow(0 4px 8px rgba(66,87,190,.08))}

.reference-home-content{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(290px,.8fr);gap:16px;margin:16px 0}
.reference-home-primary,.reference-home-aside{display:grid;align-content:start;gap:14px}
.reference-home-content #plan{margin:0!important;min-height:100%;padding:23px!important}
.reference-home-content #plan .task{min-height:67px;margin:0;padding:12px 4px;border:0;border-bottom:1px solid #edf1f7;border-radius:0}
.reference-home-content #plan .task:hover{background:#f7faff}
.reference-home-content #plan .task input{width:23px;height:23px;border-radius:50%}
.reference-home-content #plan .task:has(input:checked){background:linear-gradient(90deg,#f0fbf7,transparent)}
.reference-home-content #plan .task:has(input:checked) strong{color:#516074;text-decoration:none}
.reference-home-content #plan .remove{opacity:.45}
.reference-start-button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:52px;margin-top:19px;border:0;border-radius:13px;background:linear-gradient(135deg,var(--ref-blue),#1460ea);box-shadow:0 10px 24px rgba(21,112,248,.2);color:#fff;font-size:14px;font-weight:760}
.reference-home-aside>.card,.reference-home-aside>details{margin:0!important;padding:20px!important;border:1px solid var(--ref-line)!important;border-radius:17px!important;box-shadow:0 8px 26px rgba(15,45,96,.05)!important}
.reference-home-aside .dashboard-trend-fold{background:linear-gradient(145deg,#fff,#f3f6ff)!important}
.reference-home-aside .dashboard-trend-fold>summary{display:none}
.reference-home-aside #studentActivityTrend{display:block!important;padding:0!important}
.reference-home-aside #studentActivityTrend svg{width:100%;max-height:150px}
.reference-home-aside #todayTopicOverview{background:linear-gradient(145deg,#fff,#effaf6)!important}
.reference-home-aside .next-review{background:linear-gradient(145deg,#effbf7,#e5f8f0)!important}
.reference-home-aside .next-review>.tiny{color:var(--ref-mint)}
.reference-home-aside .cardhead{margin-bottom:10px}
.reference-home-aside .cardhead h2,.reference-home-aside h2{font-size:16px!important}
.reference-home-aside p{font-size:11px!important}
body.reference-ui .today-main>#dailyQuestions{margin-top:16px!important}

/* Every workspace uses the same roomy card grammar, including inner pages. */
body.reference-ui.rota-inner-page #studyContent>:is(.study-card,form.study-card,section.study-card,details.study-card),
body.reference-ui.rota-inner-page main>:is(.card,.study-card,details.study-card),
body.reference-ui.rota-inner-page main>:is(div,section)[id]>:is(.card,.study-card,details.study-card){
 margin:0 0 16px;padding:24px;border:1px solid var(--ref-line);border-radius:18px;background:#fff;box-shadow:0 8px 28px rgba(15,45,96,.05)
}
body.reference-ui.rota-inner-page #studyContent>:is(.study-card,form.study-card,section.study-card,details.study-card):nth-child(4n+1){background:linear-gradient(145deg,#fff,#f5f8ff)}
body.reference-ui.rota-inner-page #studyContent>:is(.study-card,form.study-card,section.study-card,details.study-card):nth-child(4n+2){background:linear-gradient(145deg,#fff,#f5f3ff)}
body.reference-ui.rota-inner-page #studyContent>:is(.study-card,form.study-card,section.study-card,details.study-card):nth-child(4n+3){background:linear-gradient(145deg,#fff,#effaf6)}
body.reference-ui.rota-inner-page #studyContent>:is(.study-card,form.study-card,section.study-card,details.study-card):nth-child(4n){background:linear-gradient(145deg,#fff,#fff8eb)}
body.reference-ui.rota-inner-page :is(.rota-table-wrap,.school-table-wrap){overflow:auto;border:1px solid var(--ref-line);border-radius:16px;background:#fff;box-shadow:0 8px 26px rgba(15,45,96,.045)}
body.reference-ui.rota-inner-page :is(.rota-table-wrap,.school-table-wrap) th{background:#f2f6fd;color:var(--ref-navy)}
body.reference-ui.rota-inner-page :is(.rota-table-wrap,.school-table-wrap) tr:nth-child(even) td{background:#fbfcff}
body.reference-ui.rota-inner-page .section-heading{padding-left:15px;border-left:4px solid var(--ref-blue)}
body.reference-ui.rota-inner-page :is(input,select,textarea){border-color:#dce5f2;background:#fff}
body.reference-ui.rota-inner-page .study-tabs{padding:6px;border:1px solid var(--ref-line);border-radius:14px;background:#edf3fc}
body.reference-ui.rota-inner-page .study-tabs button{padding:10px 14px;border:0!important;border-radius:10px!important}
body.reference-ui.rota-inner-page .study-tabs button:is(.active,[aria-selected=true]){background:#fff!important;color:var(--ref-blue)!important;box-shadow:0 5px 16px rgba(34,71,136,.08)!important}

@media(max-width:1100px){.reference-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.reference-exam-card{grid-column:1/-1}.reference-route-copy{max-width:330px}.reference-route{left:30%}}
@media(max-width:820px){
 body.reference-ui .main{margin-left:0;padding-top:16px!important}.reference-utility{justify-content:space-between;margin:0 58px 20px 0}.reference-search{width:min(100%,300px)}.reference-search kbd{display:none}.reference-utility-actions>button{display:none}.reference-avatar{width:34px;height:34px}
 body.reference-ui .today-heading{align-items:center!important}.reference-kpi-grid{grid-template-columns:1fr 1fr;gap:10px}.reference-progress-card{grid-column:1/-1;min-height:190px}.reference-kpi{min-height:165px;padding:16px}.reference-exam-card{grid-column:auto}.reference-goal-card .reference-number{font-size:22px}.reference-exam-score b{font-size:26px}
 .reference-route-card{min-height:280px;padding:20px}.reference-route-copy{max-width:100%}.reference-route-copy h2{font-size:20px!important}.reference-mountains{width:125%;height:67%;right:-16%}.reference-route{left:5%;right:5%;bottom:23px}.reference-flag{right:4%;bottom:102px}
 .reference-role-route .reference-mountains{width:120%}.reference-role-path{left:8%;right:8%;bottom:45px}
 .reference-home-content{grid-template-columns:1fr}.reference-home-aside{grid-template-columns:1fr 1fr}.reference-home-aside .dashboard-trend-fold{grid-column:1/-1}
 body.reference-ui .mobile-bottom{border-color:#dce6f6!important}.reference-utility+ .flow-command{margin-top:0}
}
@media(max-width:520px){
 .reference-utility{margin-right:45px}.reference-search span:nth-child(2){font-size:11px}.reference-kpi-grid{grid-template-columns:1fr 1fr}.reference-progress-card{grid-column:1/-1}.reference-progress-card{grid-template-columns:105px 1fr}.reference-ring{width:96px;height:96px}.reference-goal-card,.reference-exam-card{min-height:180px}.reference-kpi>div:first-child strong{font-size:11px}.reference-number{margin-top:18px}.reference-route-copy p{max-width:28ch}
 body.reference-ui .today-heading>.primary{font-size:0;width:44px;height:44px;padding:0;border-radius:14px}body.reference-ui .today-heading>.primary:first-letter{font-size:18px}
 .reference-home-aside{grid-template-columns:1fr}.reference-home-aside .dashboard-trend-fold{grid-column:auto}.reference-home-content #plan{padding:18px!important}
}
html[data-theme=dark] body.reference-ui{--flow-bg:#0d1525;--flow-navy:#eef4ff;--flow-line:#27344a;--flow-muted:#a9b4c7;background:#0d1525}
html[data-theme=dark] body.reference-ui :is(.reference-kpi,.reference-route-card,.reference-utility .reference-search){background:#151f31;border-color:#27344a;color:#eef4ff}
html[data-theme=dark] body.reference-ui.rota-inner-page #studyContent>:is(.study-card,form.study-card,section.study-card,details.study-card),html[data-theme=dark] body.reference-ui.rota-inner-page main>:is(.card,.study-card,details.study-card){background:#151f31;border-color:#27344a}
html[data-theme=dark] body.reference-ui :is(.reference-kpi,.reference-route-card) :is(strong,b,h2){color:#eef4ff!important}
html[data-theme=dark] body.reference-ui .reference-ring:after{background:#151f31}
html[data-theme=dark] body.reference-ui .reference-mountains{opacity:.42}
@media(prefers-reduced-motion:reduce){.reference-ui *{animation:none!important;transition:none!important}}
