/* Subject-specific visual language, shared by public rendering and studio preview. */
.subject-icon{display:inline-block;width:24px;height:24px;flex:none;vertical-align:middle}
.nav-subject .subject-icon{width:20px;height:20px}
.nav-subject:has(.subject-icon)::before{display:none}
.course-cover>.subject-icon{width:42px;height:42px;margin-bottom:10px}
.subject-surface .topic-icon .subject-icon{width:26px;height:26px}
.subject-surface .subject-panel-intro{position:relative;isolation:isolate;overflow:hidden;padding-right:clamp(24px,25%,300px);display:flex;align-items:flex-start;flex-direction:column;gap:10px;min-height:260px}
.subject-surface .subject-panel-intro>.eyebrow,.subject-surface .subject-panel-intro>h3,.subject-surface .subject-panel-intro>p{position:relative;z-index:1;max-width:62ch}
.subject-surface .subject-intro-action{position:relative;z-index:1;align-self:flex-start;margin-top:10px;white-space:normal}
.subject-identity-caption{display:flex;align-items:center;gap:10px;order:-1;color:var(--subject-ink);font-size:.82rem;font-weight:600;max-width:65ch}
.subject-identity-symbol{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:color-mix(in srgb,var(--subject-border) 40%,white);flex:none}
.subject-interest-tags{display:flex;flex-wrap:wrap;gap:7px;margin-top:2px;position:relative;z-index:1}
.subject-interest-tags>span{padding:5px 10px;border:1px solid var(--subject-border);border-radius:99px;color:var(--subject-ink);font-size:.72rem;background:var(--subject-bg)}
.subject-art{position:absolute;right:20px;top:50%;transform:translateY(-50%);width:clamp(150px,25%,260px);height:180px;color:var(--subject-ink);pointer-events:none;z-index:0}
.subject-art>svg{display:block;width:100%;height:100%;opacity:.22}
.subject-art-seal{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:70px;height:70px;border:1px solid var(--subject-border);background:var(--subject-bg);border-radius:20px;box-shadow:0 12px 30px #173b6b0a}
.subject-art-seal .subject-icon{width:38px;height:38px}
.subject-surface.identity-literature .subject-panel-intro{background:linear-gradient(110deg,#fff4eb,#fff 92%);border-left:5px solid var(--subject-border)}
.subject-surface.identity-literature .topic-card{border-top:3px solid var(--subject-border)}
.subject-surface.identity-history .subject-panel-intro{background:linear-gradient(110deg,#f3effb,#fff);border-radius:18px 18px 4px 18px}
.subject-surface.identity-history .announcement-grid{border-left:2px solid var(--subject-border);padding-left:18px}
.subject-surface.identity-history .announcement-card{background:#fff;border-radius:4px 16px 16px 16px}
.subject-surface.identity-geography .subject-panel-intro{background:radial-gradient(ellipse at right,#dcefe5,transparent 65%),#f1faf5}
.subject-surface.identity-geography .topic-icon{border-radius:50%;outline:1px solid var(--subject-border);outline-offset:3px}
.subject-surface.identity-civics .subject-panel-intro{background:linear-gradient(110deg,#edf5ff,#fff);border-bottom:4px solid var(--subject-border)}
.subject-surface.identity-civics .topic-card{border-radius:8px}
.subject-surface.identity-movement .subject-panel-intro{background:linear-gradient(120deg,#fff9df,#fff 85%);border-right:6px solid var(--subject-border)}
.subject-surface.identity-movement .topic-icon{border-radius:8px 18px 8px 18px}
.subject-surface.identity-movement .topic-card{border-bottom:3px solid var(--subject-border)}
.subject-surface .announcement-card:only-child::after{display:none}
.subject-surface .announcement-card:only-child{padding-right:24px}
.subject-surface[class*="design-layout-"] .subject-panel-intro{background:linear-gradient(110deg,var(--subject-bg),var(--design-bg));border-color:var(--subject-border)}
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:44px;padding:10px;border:1px solid #d6e2ee;border-radius:12px;background:#fff;color:#24486f;font:inherit;font-size:.75rem;font-weight:700;flex:none;cursor:pointer}
.theme-toggle svg{width:20px;height:20px;flex:none}
.theme-toggle:focus-visible{outline:3px solid #b94b00;outline-offset:3px}
.theme-toggle:hover{background:#edf3fc}
/* The tool hub is a flat canvas. Only its hero, search field and tool cards
   are surfaces; each of those owns padding on all four edges. */
.dashboard-page[data-section="portal"] .admin-workspace,
.staff-portal,.staff-portal-tools,.staff-portal-group{background:transparent!important;border:0!important;box-shadow:none!important}
.staff-portal-search input{background:transparent!important;box-shadow:none!important;min-height:44px;padding:10px 0}
.dash-top>div{min-width:0}.dash-top .theme-toggle{margin-left:auto}
@media(max-width:1100px){.dash-top{display:grid;grid-template-columns:44px minmax(0,1fr) 44px 44px;gap:10px}.dash-top .theme-toggle{margin-left:0;width:44px;padding:10px}}
@media(max-width:620px){.dash-top{grid-template-columns:40px minmax(0,1fr) 40px 40px;gap:8px}.dash-top .theme-toggle{width:40px;min-width:40px;padding:8px}}
@media(max-width:1100px){.theme-toggle>span{display:none}.subject-surface .subject-panel-intro{padding-right:24px;min-height:0}.subject-art{width:150px;height:130px;right:10px;top:20px;transform:none;opacity:.35}.subject-art-seal{display:none}.subject-surface .subject-panel-intro>h3,.subject-surface .subject-panel-intro>p{max-width:90%}.subject-identity-caption{padding-right:50px}}
@media(max-width:620px){.subject-surface .subject-panel-intro{padding:22px 18px;gap:8px}.subject-art{width:110px;top:12px;opacity:.25}.subject-identity-caption{font-size:.75rem;gap:8px}.subject-identity-symbol{width:32px;height:32px}.subject-interest-tags>span{font-size:.68rem;padding:5px 8px}.subject-surface .subject-panel-intro>h3,.subject-surface .subject-panel-intro>p{max-width:100%}.nav-row{gap:10px}.nav-actions{gap:6px}.nav-actions .theme-toggle{width:40px;padding:8px}.theme-toggle{border-radius:10px}.subject-surface.identity-history .announcement-grid{padding-left:10px}}
@media(prefers-reduced-motion:no-preference){.subject-art-seal{transition:transform .35s cubic-bezier(.22,1,.36,1)}.subject-panel-intro:hover .subject-art-seal{transform:translate(-50%,-50%) rotate(-6deg)}.theme-toggle{transition:background .18s,color .18s}}
