:root {
  color-scheme: light;
  --ink: #203036;
  --muted: #647176;
  --line: #dde3e3;
  --accent: #b94e0c;
  --physics: #315e77;
  --biology: #386653;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: #f7f8f6;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
a:focus-visible { outline: 3px solid #cf6a20; outline-offset: 5px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.2; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header__inner { max-width: 1168px; margin: auto; min-height: 112px; padding: 10px 32px; display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.school-logo { width: 88px; height: 88px; object-fit: contain; }
.brand strong { display: block; font-size: 25px; font-weight: 750; letter-spacing: -.04em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; letter-spacing: .015em; }
.header-nav { display: flex; align-items: center; gap: 8px; }
.header-nav a { padding: 10px 14px; font-size: 14px; color: #56646a; font-weight: 600; text-decoration: none; border-radius: 6px; }
.header-nav a:hover { background: #f5f6f4; color: var(--ink); }
.header-nav a[aria-current="page"] { background: #f5eee7; color: #98400a; }
.app { max-width: 1168px; margin: auto; padding: 0 32px 72px; }
.app:focus { outline: none; }
.home-intro { padding: 66px 0 56px; max-width: 960px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--accent); font-size: 11px; text-transform: uppercase; font-weight: 700; letter-spacing: .13em; }
.eyebrow::before { content: ""; flex: 0 0 23px; height: 2px; background: currentColor; }
.home-intro h1 { margin-top: 22px; font-size: clamp(34px, 4.5vw, 53px); line-height: 1.16; letter-spacing: -.045em; font-weight: 700; }
.home-intro h1 span { color: #667576; font-weight: 400; }
.intro-description { margin-top: 23px; max-width: 655px; color: var(--muted); font-size: 17px; line-height: 1.75; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.section-heading h2 { font-size: 20px; letter-spacing: -.025em; font-weight: 650; }
.section-heading>span { font-size: 12px; color: var(--muted); }
.subject-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.subject-card { display: flex; flex-direction: column; padding: 28px 30px 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; transition: border-color .18s, box-shadow .18s; }
.subject-card:hover { border-color: #9dafb3; box-shadow: 0 6px 20px #23383a08; }
.subject-card__top { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.subject-icon { display: inline-flex; justify-content: center; align-items: center; width: 46px; height: 46px; background: #edf3f6; color: var(--physics); border-radius: 10px; flex-shrink: 0; }
.subject-icon svg { width: 27px; height: 27px; stroke-width: 1.55; }
.subject-card--biology .subject-icon, .subject-icon--biology { background: #eef4ee; color: var(--biology); }
.subject-status { font-size: 11px; color: var(--physics); border: 1px solid #d8e5ec; border-radius: 20px; padding: 3px 10px; }
.subject-status--muted { color: #6d7772; border-color: #e1e6e1; }
.subject-card h3 { font-size: 26px; font-weight: 650; letter-spacing: -.035em; margin: 22px 0 12px; }
.subject-card>p { max-width: 395px; color: var(--muted); font-size: 14px; line-height: 1.75; margin-bottom: 26px; }
.subject-card__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 0; margin-top: auto; border-top: 1px solid #e8eded; color: var(--physics); font-size: 13px; font-weight: 650; }
.subject-card--biology .subject-card__bottom { color: var(--biology); }
.subject-card__bottom svg { width: 20px; height: 20px; }
.latest-lessons { margin-top: 48px; }
.lesson-list { border-top: 1px solid #d4dcdb; }
.lesson-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) 40px; gap: 20px; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.lesson-number { align-self: start; padding-top: 3px; font-size: 12px; color: #89938f; font-variant-numeric: tabular-nums; }
.lesson-format { color: var(--muted); font-size: 11px; font-weight: 600; }
.lesson-row h3 { font-size: 19px; letter-spacing: -.025em; font-weight: 650; margin-top: 4px; }
.lesson-row p { color: var(--muted); font-size: 13px; margin-top: 7px; max-width: 670px; }
.lesson-row__arrow { border: 1px solid #d6dfdc; border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; color: #526864; transition: background .18s, color .18s; }
.lesson-row__arrow svg { width: 18px; height: 18px; }
.lesson-row:hover h3 { color: var(--accent); }
.lesson-row:hover .lesson-row__arrow { background: #203d3d; border-color: #203d3d; color: #fff; }
.site-footer { max-width: 1104px; margin: auto; padding: 27px 0 36px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 24px; color: var(--muted); font-size: 11px; }
.site-footer>div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; }
.site-footer strong { color: #46575a; font-size: 13px; font-weight: 650; }
.breadcrumbs { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; padding-top: 32px; }
.breadcrumbs a { text-underline-offset: 4px; }
.overview-hero { padding: 43px 0 36px; }
.overview-hero h1 { font-size: clamp(34px, 4vw, 45px); letter-spacing: -.04em; margin-top: 18px; }
.overview-hero .intro-description { margin-top: 18px; }
.chapter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.chapter-card { display: flex; flex-direction: column; gap: 18px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.chapter-card:hover { border-color: #9dafb3; }
.chapter-card__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.chapter-label { font-size: 10px; color: #8e470c; border-radius: 4px; background: #faf1e7; padding: 3px 7px; }
.chapter-card h2 { font-size: 24px; letter-spacing: -.03em; }
.chapter-card>p { font-size: 14px; color: var(--muted); line-height: 1.75; }
.chapter-equation { display: grid; place-items: center; padding: 28px 12px; background: #f2f6f6; color: #466e7b; border-radius: 6px; font-family: Georgia, serif; font-size: 25px; margin-top: auto; }
.text-link { display: inline-flex; gap: 10px; align-items: center; color: var(--physics); font-weight: 650; font-size: 13px; text-decoration: none; }
.text-link svg { width: 20px; height: 20px; }
.chapter-card .text-link { padding-top: 3px; }
.empty-state { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 34px; max-width: 760px; }
.empty-state h1 { font-size: 30px; letter-spacing: -.03em; margin-top: 15px; }
.empty-state h2 { font-size: 24px; letter-spacing: -.025em; margin-top: 20px; }
.empty-state p { color: var(--muted); margin-top: 12px; }
.empty-state .text-link { margin-top: 22px; }
@media (max-width: 1168px) {
  .site-footer { margin-inline: 32px; }
}
@media (max-width: 720px) {
  .site-header__inner { padding: 10px 22px 0; gap: 6px; flex-wrap: wrap; }
  .brand { gap: 8px; }
  .school-logo { width: 70px; height: 70px; }
  .brand strong { font-size: 23px; }
  .brand small { font-size: 11px; }
  .header-nav { width: 100%; border-top: 1px solid #edf0ed; padding: 7px 0; gap: 8px; }
  .header-nav a { font-size: 13px; padding: 7px 13px; }
  .app { padding: 0 22px 48px; }
  .home-intro { padding: 40px 0 36px; }
  .eyebrow { font-size: 9px; gap: 9px; letter-spacing: .08em; }
  .eyebrow::before { flex-basis: 17px; }
  .home-intro h1 { font-size: clamp(30px, 5.8vw, 39px); margin-top: 19px; line-height: 1.2; }
  .intro-description { font-size: 15px; margin-top: 19px; }
  .section-heading { margin-bottom: 16px; }
  .section-heading h2 { font-size: 19px; }
  .section-heading>span { font-size: 11px; }
  .subject-grid, .chapter-grid { grid-template-columns: 1fr; gap: 16px; }
  .subject-card { padding: 24px 24px 0; }
  .subject-card h3 { margin-top: 18px; font-size: 25px; }
  .subject-card>p { max-width: 440px; margin-bottom: 21px; }
  .latest-lessons { margin-top: 36px; }
  .lesson-row { grid-template-columns: 22px minmax(0, 1fr) 28px; gap: 12px; padding: 21px 0; }
  .lesson-row h3 { font-size: 17px; }
  .lesson-row p { font-size: 12px; }
  .lesson-row__arrow { width: 28px; height: 28px; }
  .site-footer { margin-inline: 22px; align-items: flex-start; flex-direction: column; gap: 13px; padding-block: 23px 28px; }
  .site-footer>div { display: grid; gap: 4px; }
  .overview-hero { padding-top: 30px; }
  .chapter-card { padding: 24px; }
  .empty-state { padding: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .header-nav { display: none; }
  body { background: #fff; }
  .subject-card, .chapter-card, .lesson-row { break-inside: avoid; }
  .app { padding-bottom: 30px; }
  .home-intro { padding-top: 30px; }
}
