/* Platform identity: blue shield logo; 小衡 keeps the whale mascot. */
:root {
  --ui-bg:#f4f7fc; --ui-surface:#fff; --ui-ink:#152e52;
  --ui-muted:#60728d; --ui-line:#dbe4f1;
  --ui-primary:#1665d8; --ui-primary-hover:#1053b5;
  --ui-soft:#eaf2ff; --ui-dark:#102d59;
  --blue:var(--ui-primary); --blue2:#4687df;
  --ink:var(--ui-ink); --muted:var(--ui-muted); --line:var(--ui-line);
  --soft:var(--ui-soft); --j-blue:var(--ui-primary); --j-ink:var(--ui-ink);
  --j-line:var(--ui-line); --j-soft:var(--ui-soft);
}
.cm-brand img,.journey-mark img,.platform-brand-logo {
  object-fit:contain;background:#fff;border-radius:10px;
}
.cm-brand img {width:46px;height:46px;padding:3px;box-sizing:border-box}
.platform-brand-logo {width:42px;height:42px;padding:3px}
.journey-mark {background:#fff;border:1px solid var(--ui-line);box-shadow:none}
.journey-mark img {width:44px;height:44px}
body:not(.dark) :is(button,a,input,textarea,select,summary):focus-visible {outline-color:#78aafa}
body.teacher-mode .teacher-sidebar {background:linear-gradient(165deg,#102d59,#143e76);color:#d5e5fb}
body.teacher-mode .teacher-sidebar nav a {color:#d5e5fb}
body.teacher-mode .teacher-sidebar nav a:hover {background:#214f8b;color:#fff}
body.teacher-mode .teacher-sidebar nav a[aria-current=page] {background:#2272df;color:#fff}
body.teacher-mode :is(.teacher-sidebar-footer .text-btn,.workspace-label,.sidebar-class small) {color:#bed4f1}
body.student-mode .atlas-hero {background:linear-gradient(120deg,#eaf2ff,#eff8ff);border-color:#d4e3f7}
body:not(.dark) .rs-cover {background:linear-gradient(120deg,#102d59,#164b92)}
body:not(.dark) .rs-cover :is(small,p),body:not(.dark) .rs-cover>span {color:#d1e2fa}
body:not(.dark) .radar-area {fill:#1665d826;stroke:#1665d8}
body:not(.dark) .radar-point {fill:#1665d8}
body:not(.dark) #whaleDialog>header {background:linear-gradient(120deg,#eaf2ff,#f3f8ff)}
body.dark {--ui-primary:#79b5ff;--ui-primary-hover:#a0ccff;--ui-soft:#142e50;--ui-ink:#e5efff;--ui-muted:#a8bbd6;--ui-line:#304563}
@media(max-width:760px){.cm-brand img{width:39px;height:39px}.platform-brand-logo{width:36px;height:36px}}
/* Keep the resource centre readable in its optional dark theme. */
body.dark :is(.journey-scenarios button,.journey-learn-card,.journey-panel,.journey-task,.journey-resource-card) {background:#1b304e;border-color:#344b6c;color:#e5efff}
body.dark :is(.journey-scenarios small,.journey-learn-card p,.journey-panel p) {color:#adc2df}
body.dark .journey-brand p,body.dark .journey-section a {color:#91bfff}
body.dark .bottom-nav {background:#172a45;border-color:#344b6c;color:#d6e5fa}
/* Compact classroom lists: keep full task text, with a consistent action column. */
body.student-mode .student-class-list {display:flex;flex-direction:column;gap:0;background:#fff;border:1px solid var(--ui-line);border-radius:14px;overflow:hidden}
body.student-mode .student-class-list .drama-class {display:contents}
body.student-mode .student-class-list .student-class-task {display:grid;grid-template-columns:minmax(0,1fr) 240px;grid-template-areas:'meta action' 'title action' 'description action';gap:5px 24px;padding:20px 24px;margin:0;min-height:0;background:#fff;border:0;border-bottom:1px solid var(--ui-line);border-radius:0;box-shadow:none}
body.student-mode .student-class-list .student-class-task:last-child {border-bottom:0}
body.student-mode .student-class-task>span {grid-area:meta;font-size:12px}
body.student-mode .student-class-task>h2 {grid-area:title;font-size:18px;line-height:1.5;margin:0}
body.student-mode .student-class-task>p {grid-area:description;font-size:13px;line-height:1.7;margin:0;max-width:860px}
body.student-mode .student-class-task>button {grid-area:action;align-self:center;justify-self:end;width:auto;max-width:240px;margin:0;padding:11px 16px;min-height:44px;font-size:13px;line-height:1.5}
/* News uses the same row rhythm on teacher and student pages. */
body:not(.dark) .law-news-grid {display:flex;flex-direction:column;gap:0;background:#fff;border:1px solid var(--ui-line);border-radius:14px;overflow:hidden}
body:not(.dark) .law-news-grid .law-news-card {display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:7px 24px;padding:20px 24px;margin:0;min-height:0;border:0;border-bottom:1px solid var(--ui-line);border-radius:0;box-shadow:none;background:#fff}
body:not(.dark) .law-news-grid .law-news-card:last-child {border-bottom:0}
.law-news-grid .law-news-card>:not(footer) {grid-column:1}
.law-news-grid .law-news-card .news-meta {justify-content:flex-start;gap:14px;font-size:12px}
.law-news-grid .law-news-card h3 {font-size:18px;line-height:1.5;margin:0}
.law-news-grid .law-news-card p {font-size:13px;line-height:1.7;margin:0}
.law-news-grid .law-news-card .news-question {margin:2px 0;padding:0;background:none}
.law-news-grid .news-question summary {font-size:12px;color:var(--ui-primary);cursor:pointer;padding:5px 0}
.law-news-grid .news-question b {display:block;padding:10px 14px;background:var(--ui-soft);border-radius:8px;font-size:13px}
.law-news-grid .law-news-card footer {grid-column:2;grid-row:1 / span 7;align-self:center;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;margin:0;padding:0;gap:12px}
.law-news-grid .law-news-card footer button {max-width:220px;min-height:44px;font-size:13px}
/* Align the teaching observation and radar as two equal-height panels. */
body.teacher-mode .insight-overview {align-items:stretch}
body.teacher-mode .insight-observation {display:flex;flex-direction:column;gap:16px;min-width:0}
body.teacher-mode .insight-observation .insight-hero {flex:1;display:flex;flex-direction:column;justify-content:center;margin:0;padding:24px}
body.teacher-mode .insight-observation .insight-summary-strip {margin:0;flex-shrink:0}
body.teacher-mode .insight-observation>button {align-self:flex-start;margin:0;min-height:44px}
body.teacher-mode .insight-overview>.panel {display:flex;flex-direction:column;height:100%;box-sizing:border-box}
body.teacher-mode .insight-overview .ability-radar {flex:1;display:flex;flex-direction:column;justify-content:center}
body.teacher-mode .insight-overview .ability-radar svg {width:100%;max-width:280px;align-self:center}
@media(max-width:1150px){body.teacher-mode .insight-overview>.panel{height:auto}body.teacher-mode .insight-observation .insight-hero{flex:none}}
@media(max-width:760px){
 body.student-mode .student-class-list .student-class-task {grid-template-columns:minmax(0,1fr);grid-template-areas:'meta' 'title' 'description' 'action';padding:17px 16px;gap:6px}
 body.student-mode .student-class-task>button {justify-self:start;max-width:100%;margin-top:6px}
 body.student-mode .student-class-task>h2,.law-news-grid .law-news-card h3 {font-size:17px}
 body:not(.dark) .law-news-grid .law-news-card {grid-template-columns:minmax(0,1fr);padding:17px 16px;gap:7px}
 .law-news-grid .law-news-card footer {grid-column:1;grid-row:auto;flex-direction:row;align-items:center;justify-content:space-between;margin-top:6px}
}
body.teacher-mode .insight-overview .ability-radar {width:100%;max-width:none}
body.student-mode .student-class-list .drama-note {padding:12px 24px;margin:0;border-bottom:1px solid var(--ui-line)}
/* Student navigation belongs to the shared brand header. */
body:not(.student-mode) .cm-header .student-bottom {display:none}
body.student-mode .cm-header {display:flex;position:sticky;top:0;z-index:40;height:68px;gap:28px;padding:0 32px;background:#fff}
body.student-mode .cm-header .cm-brand {flex-shrink:0}
body.student-mode .cm-header .brand-nav {margin-left:auto;order:3}
body.student-mode .cm-header .brand-nav>span {display:none}
body.student-mode .cm-header .student-bottom {position:static;inset:auto;transform:none;width:auto;max-width:none;display:flex;flex-direction:row;gap:6px;padding:0;margin:0;border:0;border-radius:0;box-shadow:none;background:transparent;backdrop-filter:none;order:2}
body.student-mode .cm-header .student-bottom::before {display:none}
body.student-mode .cm-header .student-bottom button {display:flex;align-items:center;justify-content:center;gap:8px;padding:11px 19px;min-height:44px;font-size:14px;border-radius:9px;white-space:nowrap}
body.student-mode .cm-header .student-bottom button svg {width:19px;height:19px}
body.student-mode #view {width:min(calc(100% - 64px),1200px);margin:0 auto;padding:22px 0 32px}
body.student-mode .site-footer {width:min(calc(100% - 64px),1200px);margin:24px auto 0;padding:20px 0}
/* Every assignment gets a divider, including the nested drama assignment. */
body.student-mode .student-class-list .student-class-task,
body.student-mode .student-class-list .student-class-task:last-child {border-bottom:1px solid #cad9ee}
body.student-mode .student-class-list>.student-class-task:last-child {border-bottom:0}
body.student-mode .student-class-list .student-class-task {padding:17px 20px}
body.student-mode .student-class-list .student-class-task:hover {background:#f8faff}
/* Compact home: retain the artwork and mascot without oversized panels. */
body.student-mode .atlas-greeting {margin:0 0 16px}
body.student-mode .atlas-greeting h1 {font-size:22px}
body.student-mode .atlas-hero {min-height:0;height:230px;grid-template-columns:1.2fr 1fr;border-radius:16px}
body.student-mode .atlas-copy {padding:24px 30px}
body.student-mode .atlas-copy h2 {font-size:30px;line-height:1.3;margin:12px 0}
body.student-mode .atlas-copy p,body.student-mode .atlas-label,body.student-mode .atlas-progress p {display:none}
body.student-mode .atlas-copy button {margin-top:8px;padding:10px 16px}
body.student-mode .atlas-ocean>svg,body.student-mode .atlas-ocean>img {max-width:230px;max-height:190px;width:70%;object-fit:contain}
body.student-mode .atlas-ocean .orbit {width:210px}
body.student-mode .atlas-ocean .orbit-two {width:160px}
body.student-mode .orbit-note {display:none}
body.student-mode .atlas-progress {padding:16px 0;gap:16px}
body.student-mode .progress-ring {width:46px;height:46px;padding:4px}
body.student-mode .drama-launch {min-height:0;padding:24px;margin-top:20px;border-radius:14px}
body.student-mode .drama-launch h2 {font-size:25px;margin:9px 0}
body.student-mode .drama-launch p {font-size:13px;margin:8px 0}
body.student-mode .drama-launch small {display:none}
body.student-mode .drama-library {margin:18px 0;padding:0}
body.student-mode .drama-library .panel-head {margin-bottom:12px}
body.student-mode .drama-library .panel-head h2 {font-size:18px}
body.student-mode .library-cards {gap:16px}
body.student-mode .library-cards article {display:grid;grid-template-columns:36% minmax(0,1fr);border-radius:12px}
body.student-mode .library-cards article>img {height:100%;min-height:175px;object-fit:cover}
body.student-mode .library-cards article>div {padding:16px}
body.student-mode .library-cards h3 {font-size:19px;margin:7px 0}
body.student-mode .library-cards p {font-size:12px;margin:8px 0}
body.student-mode .library-cards .drama-note,body.student-mode .drama-library .panel-head>span {display:none}
body.student-mode .library-cards button {padding:9px 13px;min-height:40px;font-size:12px}
body.student-mode .atlas-section-title {margin:20px 0 12px}
body.student-mode .atlas-scenarios>button {padding:16px;border-radius:12px;min-height:0}
body.student-mode .scene-art {height:75px}
body.student-mode .scene-art img {width:72px;height:72px;object-fit:contain}
body.student-mode .atlas-scenarios h3 {font-size:17px;margin:8px 0 12px}
body.student-mode .atlas-resource>span {display:none}
@media(max-width:760px){
 body.student-mode .cm-header {height:60px;padding:0 12px;gap:8px}
 body.student-mode .cm-header .cm-brand {gap:5px}
 body.student-mode .cm-header .cm-brand b {font-size:17px}
 body.student-mode .cm-header .cm-brand img {width:30px;height:30px}
 body.student-mode .cm-header .brand-nav {display:none}
 body.student-mode .cm-header .student-bottom {flex:1;gap:2px;justify-content:flex-end}
 body.student-mode .cm-header .student-bottom button {padding:9px 9px;font-size:12px;gap:0}
 body.student-mode .cm-header .student-bottom button i {display:none}
 body.student-mode #view,body.student-mode .site-footer {width:calc(100% - 28px);margin-left:auto;margin-right:auto}
 body.student-mode .atlas-hero {height:195px;grid-template-columns:1.4fr 1fr}
 body.student-mode .atlas-copy {padding:22px 18px}
 body.student-mode .atlas-copy h2 {font-size:24px}
 body.student-mode .atlas-ocean {position:relative;inset:auto;width:auto;opacity:1}
 body.student-mode .atlas-ocean>svg,body.student-mode .atlas-ocean>img {width:120px;max-height:150px}
 body.student-mode .atlas-ocean .orbit {width:130px}
 body.student-mode .atlas-ocean .orbit-two {width:100px}
 body.student-mode .library-cards {grid-template-columns:1fr;gap:12px}
 body.student-mode .library-cards article>img {min-height:150px}
 body.student-mode .atlas-scenarios {gap:12px}
 body.student-mode .atlas-scenarios>button {min-width:190px}
}
body.student-mode .student-class-list[hidden],body.student-mode .student-class-news[hidden] {display:none!important}
body.student-mode .student-page-head>p,body.student-mode .library-history>p {display:none}

/* Student report: four compact analysis panels, independent of homepage cards. */
body.student-mode .report-studio .rs-main-grid{grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px;align-items:stretch}
body.student-mode .report-studio .rs-main-grid>.rs-card{padding:18px 20px;min-height:0;border-radius:14px}
body.student-mode .report-studio .rs-next{justify-content:flex-start;gap:0}
body.student-mode .report-studio .rs-next h2{font-size:21px;margin:12px 0}
body.student-mode .report-studio .rs-next p{font-size:12px;line-height:1.7;margin:0 0 16px;max-width:none}
body.student-mode .report-studio .rs-next .rs-primary{min-height:36px;padding:8px 12px;font-size:12px}
body.student-mode .report-studio .rs-principle{margin-top:18px;gap:12px}
body.student-mode .report-studio .rs-principle span{padding:5px 9px}
body.student-mode .report-studio .rs-title{margin-bottom:10px}
body.student-mode .report-studio .rs-title h2{font-size:17px}
body.student-mode .report-studio .rs-radar .ability-radar{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(110px,1fr);gap:8px;align-items:center;margin:0}
body.student-mode .report-studio .rs-radar .ability-radar svg{width:100%;height:195px;max-width:250px;margin:0;justify-self:center}
body.student-mode .report-studio .rs-radar .radar-values{display:grid;grid-template-columns:1fr;gap:4px;margin:0}
body.student-mode .report-studio .rs-radar .radar-values>div{display:flex;align-items:center;justify-content:space-between;padding:5px 9px;border-radius:6px;min-height:29px}
body.student-mode .report-studio .rs-radar .radar-values b{font-size:16px;margin:0}
body.student-mode .report-studio .rs-radar .radar-values span{font-size:11px}
body.student-mode .report-studio .rs-radar .ability-radar>p{grid-column:1/-1;margin:0;font-size:10px;line-height:1.4}
body.student-mode .report-studio .rs-dimension{padding:9px 0;min-height:34px}
body.student-mode .report-studio .rs-trend{height:150px;max-height:150px;margin-top:8px}
body.student-mode .report-studio .rs-trend-detail{margin-top:8px;font-size:11px}
body.student-mode .report-studio .rs-note{margin:8px 0 0;font-size:10px;line-height:1.5}
@media(max-width:760px){body.student-mode .report-studio .rs-main-grid{grid-template-columns:1fr}body.student-mode .report-studio .rs-main-grid>.rs-card{padding:16px}body.student-mode .report-studio .rs-radar .ability-radar svg{height:185px}}
/* Original article thumbnails retain the compact news list. */
.law-news-card.has-source-image{grid-template-columns:112px minmax(0,1fr) 190px!important;column-gap:16px!important}
.law-news-card.has-source-image>.news-thumbnail{grid-column:1!important;grid-row:1/7!important;align-self:center}
.news-thumbnail img{display:block;width:112px;height:80px;object-fit:cover;border-radius:8px;background:#eff3f8}
.law-news-card.has-source-image>:not(.news-thumbnail):not(footer){grid-column:2!important}
.law-news-card.has-source-image>footer{grid-column:3!important}
@media(max-width:700px){.law-news-card.has-source-image{grid-template-columns:84px minmax(0,1fr)!important;column-gap:12px!important}.news-thumbnail img{width:84px;height:66px}.law-news-card.has-source-image>footer{grid-column:2!important;grid-row:auto!important}.law-news-card.has-source-image>.news-thumbnail{align-self:start}}
/* One observation panel shares both outer edges with the class radar. */
body.teacher-mode .insight-overview{align-items:stretch}
body.teacher-mode .insight-overview>.insight-observation{background:#fff;border:1px solid #dce6f5;border-radius:16px;padding:20px;gap:14px;box-sizing:border-box;height:100%}
body.teacher-mode .insight-observation .insight-hero{flex:1;justify-content:flex-start;padding:20px;border-radius:11px}
body.teacher-mode .insight-observation .insight-hero-number{margin-top:auto;padding-top:16px}
body.teacher-mode .insight-observation .insight-summary-strip{border:0;border-radius:0;padding:12px 0;background:transparent}
body.teacher-mode .insight-observation>button{align-self:stretch;width:100%;min-height:40px}
body.teacher-mode .insight-overview>.panel{height:auto;padding:20px;border-radius:16px}
body.teacher-mode .insight-overview .ability-radar{justify-content:flex-start}
body.teacher-mode .insight-overview .ability-radar svg{max-width:260px;max-height:260px}
@media(max-width:1150px){body.teacher-mode .insight-overview>.insight-observation{height:auto}body.teacher-mode .insight-observation .insight-hero{flex:auto}}
.law-news-card.has-source-image{grid-template-columns:164px minmax(0,1fr) 190px!important}
.news-thumbnail img{width:164px;height:104px;object-position:top center}
@media(max-width:700px){.law-news-card.has-source-image{grid-template-columns:100px minmax(0,1fr)!important}.news-thumbnail img{width:100px;height:76px}}
/* Separate student destinations without adding a second navigation bar. */
body.student-mode .cm-header .student-bottom button{position:relative}
body.student-mode .cm-header .student-bottom button+button::after{content:"";position:absolute;left:-4px;top:50%;transform:translateY(-50%);width:1px;height:18px;background:#d9e3f2;pointer-events:none}
@media(max-width:640px){body.student-mode .cm-header .student-bottom button+button::after{left:-1px;height:14px}}
