:root {
  color-scheme: light;
  --ink: #101a34;
  --ink-soft: #526078;
  --paper: #f5f7fb;
  --surface: #ffffff;
  --line: #dfe4ed;
  --line-dark: #cbd3e0;
  --navy: #101a34;
  --navy-2: #1b294d;
  --accent: #ffca58;
  --accent-strong: #f3b72e;
  --cyan: #41c4d7;
  --blue-wash: #eaf7fa;
  --shadow: 0 18px 55px rgba(28, 44, 79, 0.1);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  --subject-accent: #b47800;
  --subject-soft: #fff6dd;
  --subject-line: #e3c873;
}

body[data-subject="physics"] { --subject-accent: #087a96; --subject-soft: #e7f7fb; --subject-line: #8fcbd8; }
body[data-subject="chemistry"] { --subject-accent: #14765b; --subject-soft: #eaf8f2; --subject-line: #91cdb9; }

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  background: var(--surface);
  color: var(--navy);
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 72px;
  display: grid;
  grid-template-columns: 280px 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 26, 52, 0.97);
  color: white;
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  width: fit-content;
  color: white;
  font-size: 1.1rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: var(--accent);
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.topbar-context {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 0.9rem;
}

.context-label { color: #9eabc4; }
.official-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #d8dfed;
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
}
.official-link:hover { color: var(--accent); }

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  height: calc(100vh - 72px);
  overflow: auto;
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.side-section + .side-section { margin-top: 2rem; }
.eyebrow {
  margin: 0 0 0.7rem;
  color: #6d7990;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow.accent { color: var(--subject-accent); }

.subject-switcher { display: grid; gap: .45rem; }
.subject-button {
  min-height: 46px; display: grid; grid-template-columns: 34px 1fr; gap: .65rem; align-items: center;
  padding: .4rem .65rem; border: 1px solid var(--line); border-radius: 11px; background: white;
  color: #56637a; font-size: .86rem; font-weight: 780; text-align: left; cursor: pointer;
}
.subject-button:hover { border-color: var(--subject-line); color: var(--navy); }
.subject-button.active { border-color: var(--subject-line); background: var(--subject-soft); color: var(--navy); box-shadow: inset 3px 0 0 var(--subject-accent); }
.subject-symbol { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: #eef2f7; color: #526078; font: 800 .88rem Georgia,serif; }
.subject-button.active .subject-symbol { background: var(--subject-accent); color: white; }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #edf1f7;
}
.track-button {
  min-height: 38px;
  padding: 0.45rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5b687f;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
}
.track-button.active {
  background: var(--surface);
  color: var(--navy);
  box-shadow: 0 2px 8px rgba(16, 26, 52, 0.09);
}

.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #627087;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.text-button:hover { color: var(--navy); }

.chapter-nav { display: grid; gap: 0.35rem; }
.chapter-button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #536077;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}
.chapter-button span:last-child {
  min-width: 24px;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  background: #edf1f6;
  color: #6f7b91;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}
.chapter-button:hover { background: #f0f3f8; color: var(--navy); }
.chapter-button.active {
  border-color: #cbdfe4;
  background: var(--blue-wash);
  color: #163f53;
  font-weight: 750;
}
.chapter-button.active span:last-child { background: white; color: #21647a; }

.syllabus-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid #d8e7ea;
  border-radius: 13px;
  background: #f0f9fa;
  color: #335465;
  font-size: 0.78rem;
}
.note-icon { color: #168aa0; font-weight: 900; }
.syllabus-note strong { color: #173f50; font-size: 0.8rem; }
.syllabus-note p { margin: 0.3rem 0 0.65rem; line-height: 1.45; }
.source-links { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.source-links a { color: #146f82; font-weight: 750; text-decoration: none; }

.main-content {
  width: min(100%, 1460px);
  padding: 2.6rem clamp(1.25rem, 3.5vw, 4rem) 1.6rem;
}

.subject-tabs {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: -.5rem 0 2.2rem;
  border: 1px solid var(--line); border-radius: 13px; background: white; overflow: hidden;
}
.subject-tab {
  min-height: 52px; padding: .65rem 1rem; border: 0; border-right: 1px solid var(--line);
  background: white; color: #647188; font-weight: 790; cursor: pointer;
}
.subject-tab:last-child { border-right: 0; }
.subject-tab span { margin-right: .55rem; color: #9aa5b6; font: 700 .72rem Georgia,serif; }
.subject-tab:hover { color: var(--navy); }
.subject-tab.active { background: var(--subject-soft); color: var(--navy); box-shadow: inset 0 -3px 0 var(--subject-accent); }
.subject-tab.active span { color: var(--subject-accent); }

.library-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
}
.library-intro h1 {
  max-width: 780px;
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 4.1vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 0.98;
}
.intro-copy {
  max-width: 660px;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.library-stats {
  flex: 0 0 auto;
  display: flex;
  gap: 1.6rem;
  margin: 0;
  padding: 0 0 0.25rem;
}
.library-stats div { min-width: 70px; }
.library-stats dt { color: var(--navy); font-size: 1.05rem; font-weight: 850; }
.library-stats dd { margin: 0; color: #7b879b; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }

.focus-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 0.4fr);
  gap: 1.5rem;
  align-items: center;
  margin-top: 2.4rem;
  padding: 1.7rem 1.8rem;
  border-radius: var(--radius);
  background: var(--navy);
  color: white;
  box-shadow: var(--shadow);
}
.focus-card::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -140px;
  top: -160px;
  border: 52px solid rgba(65, 196, 215, 0.11);
  border-radius: 50%;
}
.focus-index {
  align-self: start;
  padding-top: 0.15rem;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 1.5rem;
}
.focus-meta { display: flex; align-items: center; gap: 0.75rem; color: #abb6cc; font-size: 0.78rem; }
.label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.label-accent { background: var(--subject-accent); color: white; }
.focus-copy h2 { margin: 0.65rem 0 0.4rem; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.2; }
.focus-copy p { max-width: 650px; margin: 0; color: #c0c9da; font-size: 0.9rem; }
.primary-button, .secondary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.primary-button {
  margin-top: 1.15rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--navy);
}
.primary-button:hover { background: #ffd675; }
.focus-plan {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.55rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
}
.focus-plan div { display: flex; justify-content: space-between; gap: 1rem; color: #b8c2d5; font-size: 0.82rem; }
.focus-plan strong { color: white; }

.resource-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 0.65fr) 1fr;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 2.7rem 0 2.7rem;
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  outline: 0;
  background: var(--surface);
  color: var(--navy);
  font-size: 0.9rem;
}
.search-box input:focus { border-color: #5eabb9; box-shadow: 0 0 0 3px rgba(65, 196, 215, 0.16); }
.search-icon {
  position: absolute;
  z-index: 1;
  left: 1rem;
  width: 14px;
  height: 14px;
  border: 2px solid #8290a6;
  border-radius: 50%;
}
.search-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  right: -5px;
  bottom: -2px;
  background: #8290a6;
  transform: rotate(45deg);
}
kbd {
  position: absolute;
  right: 0.8rem;
  padding: 0.08rem 0.4rem;
  border: 1px solid #d7dce5;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #f6f8fb;
  color: #7f8a9e;
  font-size: 0.72rem;
}
.type-filters { display: flex; justify-content: flex-end; gap: 0.45rem; flex-wrap: wrap; }
.type-button {
  min-height: 40px;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: #657187;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
}
.type-button:hover { border-color: #aeb8c8; color: var(--navy); }
.type-button.active { border-color: var(--navy); background: var(--navy); color: white; }

.resource-section { margin-top: 2.2rem; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.section-heading h2 { margin: 0; color: var(--navy); font-size: 1.35rem; line-height: 1.25; }
.result-summary { margin: 0; color: #718097; font-size: 0.82rem; }
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.15rem;
}
.resource-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(38, 52, 82, 0.04);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.resource-card:hover {
  transform: translateY(-3px);
  border-color: #bac5d4;
  box-shadow: 0 14px 30px rgba(38, 52, 82, 0.09);
}
.resource-card.featured-resource { border-color: var(--subject-line); box-shadow: inset 0 3px 0 var(--subject-accent), 0 4px 18px rgba(38, 52, 82, 0.04); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.resource-kind { color: var(--subject-accent); font-size: 0.72rem; font-weight: 850; letter-spacing: 0.07em; text-transform: uppercase; }
.track-tag { padding: 0.18rem 0.45rem; border-radius: 999px; background: #f0f3f7; color: #67748a; font-size: 0.68rem; font-weight: 750; }
.depth-line { margin-top: .85rem; color: #78859a; font-size: .68rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.depth-line span { padding: .22rem .45rem; border-radius: 999px; background: var(--subject-soft); color: var(--subject-accent); }
.resource-card h3 { margin: .8rem 0 0.55rem; font-size: 1.12rem; line-height: 1.28; letter-spacing: -0.015em; }
.resource-card p { margin: 0; color: #657187; font-size: 0.875rem; }
.chapter-line { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.8rem; color: #8994a6; font-size: 0.74rem; }
.chapter-line::before { content: ""; width: 14px; height: 1px; background: var(--cyan); }
.card-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.card-metrics span { display: grid; gap: 0.05rem; color: #7d899c; font-size: 0.65rem; line-height: 1.25; }
.card-metrics strong { color: var(--navy); font-size: 0.82rem; }
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.15rem;
  color: #7c889b;
  font-size: 0.76rem;
}
.card-footer button,
.card-footer a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.1rem 0.35rem 0.55rem;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}
.card-footer button:hover,
.card-footer a:hover { color: #0b8198; }

.empty-state {
  margin-top: 1.15rem;
  padding: 3rem 1.5rem;
  border: 1px dashed #c9d1dd;
  border-radius: 15px;
  background: rgba(255,255,255,0.5);
  text-align: center;
}
.empty-state > span { color: #8a96a8; font-size: 2rem; }
.empty-state h3 { margin: 0.5rem 0 0; }
.empty-state p { margin: 0.3rem 0 1rem; color: #6d798e; }
.secondary-button { padding: 0.55rem 0.9rem; border: 1px solid var(--line-dark); background: white; color: var(--navy); }
.secondary-button:hover { border-color: var(--navy); }

.reference-shelf {
  margin-top: 3rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
  box-shadow: 0 6px 24px rgba(38, 52, 82, 0.05);
}
.reference-shelf h2 { margin: 0.2rem 0 0.45rem; color: var(--navy); font: 500 clamp(1.45rem, 3vw, 2rem)/1.15 Georgia, serif; letter-spacing: -0.025em; }
.reference-intro { max-width: 780px; margin: 0; color: #657187; font-size: 0.9rem; }
.reference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.reference-grid article { padding: 0.95rem; border: 1px solid #e1e6ed; border-radius: 12px; background: rgba(255,255,255,0.88); }
.reference-grid span { color: #1c7082; font-size: 0.66rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.reference-grid strong { display: block; margin-top: 0.2rem; color: var(--navy); font-size: 0.93rem; }
.reference-grid p { margin: 0.3rem 0 0; color: #718097; font-size: 0.78rem; line-height: 1.55; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: #7b879a;
  font-size: 0.75rem;
}

.resource-dialog {
  width: min(760px, calc(100vw - 2rem));
  max-height: min(820px, calc(100vh - 2rem));
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  box-shadow: 0 35px 90px rgba(6, 14, 34, 0.28);
}
.resource-dialog::backdrop { background: rgba(8, 15, 31, 0.62); backdrop-filter: blur(5px); }
.noscript-note { position: fixed; z-index: 50; right: 1rem; bottom: 1rem; max-width: 380px; padding: 0.8rem 1rem; border-radius: 10px; background: #fff2cd; color: #5b4200; box-shadow: var(--shadow); }
.dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.5rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.dialog-header h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(1.65rem, 3vw, 2.3rem); font-weight: 500; line-height: 1.08; letter-spacing: -0.03em; }
.icon-button {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f7f9fc;
  color: #536177;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.dialog-body { overflow: auto; max-height: calc(100vh - 235px); padding: 1.5rem; }
.dialog-body h3 { margin: 1.5rem 0 0.5rem; font-size: 1rem; }
.dialog-body h3:first-child { margin-top: 0; }
.dialog-body p, .dialog-body li { color: #4e5b70; font-size: 0.93rem; }
.dialog-body ul, .dialog-body ol { padding-left: 1.3rem; }
.formula-box {
  overflow-x: auto;
  margin: 0.8rem 0;
  padding: 1rem;
  border-left: 4px solid var(--accent-strong);
  border-radius: 0 10px 10px 0;
  background: #f5f7fb;
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: 1.05rem;
}
.problem-box { margin-top: 1rem; padding: 1rem; border: 1px solid #d7e7e9; border-radius: 12px; background: #f1f9fa; }
.problem-box strong { color: #20576a; }
.problem-box details { margin-top: 0.7rem; }
.problem-box summary { color: #1c7082; font-weight: 800; cursor: pointer; }
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--line);
  background: #fbfcfe;
  color: #727f94;
  font-size: 0.78rem;
}

:focus-visible { outline: 3px solid rgba(33, 156, 179, 0.45); outline-offset: 2px; }

@media (max-width: 1120px) {
  .topbar { grid-template-columns: 240px 1fr auto; }
  .shell { grid-template-columns: 240px minmax(0, 1fr); }
  .resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-toolbar { grid-template-columns: 1fr; }
  .type-filters { justify-content: flex-start; }
  .focus-card { grid-template-columns: auto 1fr; }
  .focus-plan { grid-column: 2; grid-template-columns: repeat(3, 1fr); }
  .focus-plan div { display: grid; gap: 0; }
}

@media (max-width: 820px) {
  .topbar { height: 64px; grid-template-columns: 1fr auto; padding: 0 1rem; }
  .topbar-context { display: none; }
  .official-link { font-size: 0.78rem; }
  .shell { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; padding: 1rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .syllabus-note { display: none; }
  .side-section + .side-section { margin-top: 1rem; }
  .subject-section .eyebrow { margin-bottom: .45rem; }
  .subject-switcher { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .subject-button { grid-template-columns: auto 1fr; min-width: 0; padding: .35rem .5rem; }
  .exam-section { display: grid; grid-template-columns: auto minmax(0, 340px); align-items: center; gap: 1rem; }
  .exam-section .eyebrow { margin: 0; }
  .side-heading { display: none; }
  .chapter-nav { display: flex; gap: 0.45rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: thin; }
  .chapter-button { flex: 0 0 auto; width: auto; min-height: 38px; padding: 0.45rem 0.7rem; border-color: var(--line); background: white; white-space: nowrap; }
  .chapter-button span:last-child { display: none; }
  .main-content { padding: 1.8rem 1rem 1.2rem; }
  .subject-tabs { margin-bottom: 1.5rem; }
  .library-intro { display: grid; }
  .library-intro h1 { font-size: clamp(2.3rem, 10vw, 4rem); }
  .library-stats { display: none; }
}

@media (max-width: 620px) {
  .official-link { width: 34px; height: 34px; justify-content: center; }
  .official-text { display: none; }
  .official-link span { font-size: 1rem; }
  .brand { font-size: 1rem; }
  .brand-mark { width: 34px; height: 34px; }
  .subject-button { grid-template-columns: 1fr; justify-items: center; gap: .2rem; font-size: .7rem; text-align: center; }
  .subject-symbol { width: 26px; height: 26px; }
  .subject-tab { min-height: 48px; padding: .5rem .3rem; font-size: .72rem; }
  .subject-tab span { display: none; }
  .focus-card { grid-template-columns: 1fr; padding: 1.25rem; }
  .focus-index { display: none; }
  .focus-plan { grid-column: 1; }
  .resource-grid { grid-template-columns: 1fr; }
  .resource-card { min-height: 230px; }
  .type-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.35rem; }
  .type-button { flex: 0 0 auto; }
  .section-heading { align-items: start; }
  .result-summary { white-space: nowrap; }
  .reference-grid { grid-template-columns: 1fr; }
  .site-footer { display: grid; }
  .dialog-header, .dialog-body, .dialog-actions { padding-left: 1rem; padding-right: 1rem; }
  .dialog-actions { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
