/* Adapted from the supplied Science Department design; all assets are local. */
:root {
  --navy: #001744;
  --ink: #17243a;
  --slate: #566375;
  --gold: #a29061;
  --gold-light: #d2c7a7;
  --border: #d8dde5;
}
* { box-sizing: border-box; }
html { background: #f3f4f6; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: #f4f5f7;
  color: var(--ink);
  font: 16px/1.6 Aptos, "Segoe UI", Arial, sans-serif;
}
a { color: inherit; text-underline-offset: 4px; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible {
  outline: 3px solid #ad8b3d;
  outline-offset: 4px;
}
button { font: inherit; }
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.18;
  color: var(--navy);
}
h1, h2 { margin: 0 0 .75rem; font-size: clamp(1.75rem, 3.2vw, 2.35rem); }
h3 { margin: 0 0 .45rem; font-size: 1.25rem; }
p { margin: 0; }
svg { width: 1.3rem; height: 1.3rem; flex-shrink: 0; }
.skip-link {
  position: fixed;
  top: .6rem;
  left: .6rem;
  z-index: 100;
  transform: translateY(-200%);
  background: white;
  color: var(--navy);
  padding: .65rem 1rem;
}
.skip-link:focus { transform: translateY(0); }
.department-shell { min-height: 100vh; display: grid; grid-template-columns: 320px minmax(0, 1fr); }
.department-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.6rem 1.15rem 1.2rem;
  overflow-y: auto;
  background: #00143b;
  color: #fff;
  box-shadow: 8px 0 30px rgb(9 29 55 / 12%);
  z-index: 30;
}
.sidebar-brand { width: 104px; min-height: 112px; display: grid; place-items: center; margin: 0 auto .85rem; text-decoration: none; }
.school-logo { width: 92px; height: auto; max-height: 108px; object-fit: contain; }
.department-sidebar .school-logo { filter: brightness(0) invert(1); }
.sidebar-department-name {
  padding: 0 .35rem 1.25rem;
  text-align: center;
  font: 1.48rem/1.25 Georgia, "Times New Roman", serif;
  border-bottom: 1px solid rgb(255 255 255 / 14%);
}
.sidebar-department-name small {
  display: block;
  margin-top: .4rem;
  color: #c9d2df;
  font: 600 .78rem/1.3 Aptos, "Segoe UI", sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.sidebar-label { max-width: 13rem; margin: 1.5rem 1rem 1rem; color: #b0c2df; font-size: 1.05rem; font-weight: 400; line-height: 1.2; letter-spacing: .12em; }
.sidebar-nav { display: grid; flex-shrink: 0; gap: .4rem; }
.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
  padding: .85rem 1rem;
  border-radius: 8px;
  color: #d7e3f5;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}
.sidebar-nav-link > span:not([data-icon]) { min-width: 0; overflow-wrap: anywhere; }
.sidebar-nav-link [data-icon] { display: inline-flex; flex: 0 0 auto; }
.sidebar-nav-link svg { width: 1.4rem; height: 1.4rem; color: #adc1de; }
.sidebar-nav-link:hover { background: #1c334d; color: #fff; }
.sidebar-nav-link[data-active="true"], .sidebar-nav-link[aria-current="page"] {
  background: #22364e;
  color: #ffdb8d;
  box-shadow: inset 4px 0 0 #b6a262;
}
.sidebar-nav-link[data-active="true"] svg, .sidebar-nav-link[aria-current="page"] svg { color: #f1bd53; }
.portal-link { display: inline-flex; align-items: center; gap: .6rem; margin: 1.25rem .8rem; color: #dbe2eb; font-size: .88rem; }
.sidebar-security { display: flex; gap: .7rem; align-items: center; margin-top: auto; padding: 1rem .7rem 0; border-top: 1px solid rgb(255 255 255 / 14%); color: #dbe2eb; font-size: .8rem; font-weight: 700; }
.sidebar-security svg { width: 1rem; color: #b9a672; }
.sidebar-security small { display: block; color: #b7c2d0; font-weight: 600; }
.department-workspace { min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.workspace-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1.25rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 94%);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
}
.workspace-breadcrumb { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; color: #566a83; font-size: 1.125rem; font-weight: 400; line-height: 1.4; text-decoration: none; }
.workspace-breadcrumb:hover { text-decoration: underline; }
.workspace-actions { display: flex; align-items: center; gap: .7rem; }
.year-chip { padding: .35rem .65rem; border: 1px solid #d5dae2; border-radius: 4px; color: #536174; font-size: .8rem; font-weight: 800; white-space: nowrap; }
.language-button { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--gold); border-radius: 4px; background: #fff; color: #091d37; padding: .52rem .75rem; font-weight: 800; cursor: pointer; }
.language-button svg { width: 1rem; }
.site-main { flex: 1; width: min(1220px, calc(100% - clamp(2rem, 8vw, 7rem))); margin-inline: auto; padding-block: 2.25rem 3.5rem; }
.workspace-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: 1.15rem clamp(1.25rem, 4vw, 3.5rem); border-top: 1px solid var(--border); color: #657286; font-size: .82rem; }
.department-owner { flex-basis: 100%; }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .75fr); align-items: center; gap: 2rem; margin-bottom: 2.5rem; }
.section-kicker { margin: 0 0 .5rem; color: #79673c; font-size: .875rem; font-weight: 800; letter-spacing: .12em; }
.lead-copy { max-width: 800px; color: #4f5d70; font-size: 1.12rem; }
.status-card { display: flex; gap: .9rem; align-items: flex-start; border-left: 5px solid var(--gold); background: #fff; padding: 1.15rem 1.2rem; box-shadow: 0 8px 25px rgb(0 23 68 / 7%); }
.status-card svg { width: 1.4rem; height: 1.4rem; color: var(--gold); }
.status-card strong, .status-card span { display: block; }
.status-card strong { margin-bottom: .2rem; color: var(--navy); }
.status-card span { color: var(--slate); font-size: .9rem; line-height: 1.45; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.compact-heading { margin-top: 2.5rem; }
.section-heading h2, .curriculum-heading-block h2 { margin-bottom: 0; }
.status-pill { display: inline-flex; min-height: 29px; align-items: center; gap: .35rem; border-radius: 3px; background: #f3eee2; padding: .25rem .55rem; color: #6d5b31; font-size: .78rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.muted-pill { background: #edf0f4; color: #596678; }
.story-panel { display: grid; grid-template-columns: 82px 1fr; gap: 1.5rem; margin-top: 1.5rem; border-top: 4px solid var(--gold); background: #fff; padding: 1.7rem; box-shadow: 0 8px 25px rgb(0 23 68 / 6%); }
.story-panel > div:last-child > p:not(.section-kicker) { max-width: 850px; color: var(--slate); }
.story-mark { display: grid; width: 68px; height: 68px; place-items: center; border-radius: 50%; background: var(--navy); color: var(--gold-light); }
.story-mark svg { width: 2rem; height: 2rem; }
.placeholder-note { margin-top: 1rem !important; border-left: 3px solid var(--gold); background: #f7f4eb; padding: .75rem .9rem; color: #6d5b31 !important; font-size: .9rem; font-weight: 700; }
.subject-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.subject-card { display: flex; min-height: 128px; align-items: flex-start; gap: 1rem; border-left: 4px solid var(--gold); background: #fff; padding: 1.3rem; box-shadow: 0 5px 18px rgb(0 23 68 / 5%); }
.subject-card > svg { width: 1.55rem; height: 1.55rem; color: var(--navy); }
.subject-card p, .curriculum-heading-block p, .guide-card p { color: var(--slate); }
.subject-link { text-decoration: none; border: 1px solid transparent; border-left: 4px solid var(--gold); border-radius: 5px; }
.subject-link:hover { border-color: #a8bcd4; border-left-color: var(--gold); box-shadow: 0 8px 24px rgb(0 23 68 / 10%); }
.subject-course-link { display: inline-block; margin-top: .8rem; color: var(--navy); font-size: .9rem; font-weight: 700; }
.curriculum-stack, .resource-stack { display: grid; gap: 1.25rem; }
.curriculum-section { display: grid; grid-template-columns: minmax(230px, .42fr) minmax(0, 1fr); gap: 1.5rem; border-top: 4px solid var(--gold); background: #fff; padding: 1.5rem; box-shadow: 0 8px 25px rgb(0 23 68 / 6%); }
.curriculum-heading-block { display: flex; align-items: flex-start; gap: 1rem; }
.curriculum-heading-block > div:last-child > span { color: #79673c; font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.phase-icon, .document-icon { display: grid; flex: 0 0 auto; place-items: center; background: var(--navy); color: var(--gold-light); }
.phase-icon { width: 50px; height: 50px; }
.phase-icon svg, .document-icon svg { width: 1.35rem; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.guide-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: .75rem; min-height: 94px; border: 1px solid var(--border); background: #f8f9fb; padding: .9rem; }
.guide-card h3 { font-family: Aptos, "Segoe UI", Arial, sans-serif; font-size: 1rem; font-weight: 750; }
.guide-card p { font-size: .84rem; }
.guide-card .status-pill { grid-column: 2; justify-self: start; }
.document-icon { width: 40px; height: 48px; background: #e8ecf1; color: var(--navy); }
.resource-section { border-top: 4px solid var(--gold); background: #fff; padding: 1.5rem; box-shadow: 0 8px 25px rgb(0 23 68 / 6%); scroll-margin-top: 90px; }
.resource-section p { color: var(--slate); }
.resource-section p + p, .resource-section p + ul, .resource-section p + .resource-links { margin-top: 1rem; }
.resource-links { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; margin-block: 1rem; }
.resource-links a { color: var(--navy); font-weight: 700; }
.calendar-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.calendar-list li { display: grid; grid-template-columns: minmax(100px, auto) 1fr; gap: .8rem; padding: .8rem 0; border-bottom: 1px solid var(--border); }
.calendar-list li:last-child { border-bottom: 0; }
.calendar-date { color: #79673c; font-weight: 700; font-size: .9rem; }
.calendar-empty { padding: 1rem 0; color: var(--slate); }
.overview-people { margin-top: 1.5rem; }
[data-page="calendar"] .site-main { max-width: none; padding-inline: 0; }
.calendar-overall-link { margin: .8rem 0 1.2rem; }

/* Course cards follow the department course-library layout. */
.course-section { margin-top: 2.5rem; }
.course-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 1.4rem; }
.course-heading h2 { margin: 0; font: 700 1.65rem/1.3 Aptos, "Segoe UI", Arial, sans-serif; }
.course-count { color: #607087; font-size: .95rem; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 1.4rem; }
.course-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 320px;
  padding: 1.5rem;
  border: 1px solid #d8e2ef;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.course-card:hover { border-color: #8ca9ca; box-shadow: 0 8px 22px rgb(0 23 68 / 7%); }
.course-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-color: #8ca9ca; }
.course-card-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.course-icon { display: grid; width: 58px; height: 58px; flex: 0 0 auto; place-items: center; border-radius: 13px; background: #f5efe3; color: #a67825; }
.course-icon svg { width: 1.7rem; height: 1.7rem; }
.course-card[data-phase="lower-secondary"] .course-icon { background: #eaf1fc; color: #225fa1; }
.course-level { display: inline-block; border-radius: 4px; padding: .2rem .55rem; background: #f0f4f9; color: #5a718f; font-size: .86rem; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.course-card h3 { margin: 1.35rem 0 .9rem; font: 700 1.4rem/1.25 Aptos, "Segoe UI", Arial, sans-serif; overflow-wrap: anywhere; }
.course-description { margin-bottom: 1.5rem; color: #607087; font-size: 1.02rem; line-height: 1.6; }
.course-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: auto; padding-top: 1rem; border-top: 1px solid #e3eaf3; color: #6a809d; font-size: .85rem; }
.course-card-footer > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.course-arrow { flex: 0 0 auto; font-size: 1.3rem; line-height: 1; }
.course-back-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin-bottom: 1.25rem; color: var(--navy); font-weight: 700; }
.course-detail-intro { margin-bottom: 1.75rem; }
.course-detail-intro > .course-level { margin-bottom: .8rem; }
.course-detail-intro .lead-copy { max-width: 850px; }
.course-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr)); gap: 1.25rem; }
.course-detail-panel { min-width: 0; padding: 1.5rem; border: 1px solid #d8e2ef; border-radius: 10px; background: #fff; }
.course-detail-panel h2 { margin-bottom: 1rem; font: 700 1.15rem/1.35 Aptos, "Segoe UI", Arial, sans-serif; }
.course-detail-panel p { color: var(--slate); }
.course-detail-panel p + p, .course-detail-panel p + a { margin-top: 1rem; }
.course-detail-panel a { display: inline-flex; min-height: 44px; align-items: center; color: var(--navy); font-weight: 700; overflow-wrap: anywhere; }
.course-facts { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr); gap: .75rem 1rem; margin: 0; }
.course-facts dt { color: #607087; }
.course-facts dd { min-width: 0; margin: 0; color: var(--ink); overflow-wrap: anywhere; }
@media (max-width: 1150px) {
  .intro-grid, .curriculum-section { grid-template-columns: 1fr; }
  .subject-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .department-shell { display: block; }
  .department-sidebar { position: relative; width: 100%; height: auto; padding: 1rem; }
  .sidebar-brand { min-height: auto; margin-bottom: .35rem; }
  .department-sidebar .school-logo { width: 68px; max-height: 80px; }
  .sidebar-department-name { padding-bottom: .8rem; }
  .sidebar-label, .sidebar-security { display: none; }
  .sidebar-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .8rem; }
  .sidebar-nav-link { min-height: 58px; padding: .65rem .6rem; font-size: .9rem; gap: .6rem; }
  .sidebar-nav-link svg { width: 1.15rem; height: 1.15rem; }
  .portal-link { margin: .8rem auto 0; }
  .workspace-topbar { position: relative; min-height: 60px; flex-wrap: wrap; gap: .5rem 1rem; }
  .workspace-breadcrumb { flex: 1 1 100%; }
  .workspace-actions { width: 100%; justify-content: space-between; }
  .site-main { width: min(calc(100% - 30px), 1220px); }
  .resource-section { scroll-margin-top: 1rem; }
}
@media (max-width: 720px) {
  .site-main { padding-block: 1.75rem 2.5rem; }
  .intro-grid { gap: 1.2rem; margin-bottom: 2rem; }
  .story-panel { grid-template-columns: 1fr; gap: 1rem; padding: 1.3rem; }
  .guide-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .curriculum-section, .resource-section { padding: 1.15rem; }
  .calendar-list li { grid-template-columns: 1fr; gap: .2rem; }
}
@media (max-width: 400px) {
  .sidebar-nav-link { gap: .45rem; padding-inline: .5rem; }
  .curriculum-heading-block { gap: .65rem; }
  .phase-icon { width: 40px; height: 40px; }
  .workspace-footer { padding-inline: 1rem; }
  .course-card { padding: 1.25rem; }
  .course-detail-panel { padding: 1.15rem; }
  .course-facts { grid-template-columns: 1fr; gap: .25rem; }
  .course-facts dd + dt { margin-top: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  body { background: white; font-size: 11pt; }
  .department-shell { display: block; }
  .department-sidebar, .workspace-topbar, .skip-link { display: none; }
  .site-main { width: 100%; padding: 0; }
  .resource-section, .curriculum-section, .story-panel, .subject-card { box-shadow: none; break-inside: avoid; border: 1px solid #ccc; }
  .course-card, .course-detail-panel { min-height: 0; box-shadow: none; break-inside: avoid; border-color: #ccc; }
  .course-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-footer { margin-top: 1rem; padding-inline: 0; }
}
