:root {
  color-scheme: light;
  --ink: #172a32;
  --muted: #617078;
  --soft-ink: #3d5058;
  --forest: #173f3a;
  --forest-deep: #0f302c;
  --green: #217a69;
  --green-dark: #14564a;
  --green-soft: #e5f2ee;
  --blue-soft: #e9f0f7;
  --gold: #d49a3a;
  --gold-soft: #fff3d9;
  --paper: #fffefa;
  --canvas: #f7f5ef;
  --panel: #ffffff;
  --line: #dbe2df;
  --line-strong: #c7d2ce;
  --shadow-sm: 0 1px 2px rgba(23, 42, 50, 0.05), 0 8px 22px rgba(23, 42, 50, 0.05);
  --shadow-lg: 0 20px 60px rgba(15, 48, 44, 0.18);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

body.reader-is-focused {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

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

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.shell {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--forest-deep);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(199, 210, 206, 0.85);
  background: rgba(255, 254, 250, 0.94);
  backdrop-filter: blur(16px);
}

.topbar {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  background: var(--forest);
  color: #fff;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 14px;
  letter-spacing: -0.01em;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.section-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-nav a {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--soft-ink);
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
}

.section-nav a:hover,
.section-nav a.active {
  background: var(--green-soft);
  color: var(--green-dark);
}

.section {
  padding-block: 80px;
  scroll-margin-top: 70px;
}

.overview {
  padding-top: 48px;
  padding-bottom: 0;
  background:
    radial-gradient(circle at 92% 6%, rgba(212, 154, 58, 0.11), transparent 24rem),
    var(--paper);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(350px, 0.85fr);
  align-items: stretch;
  gap: clamp(28px, 5vw, 72px);
}

.welcome-panel {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  justify-content: center;
  padding-block: 26px 42px;
}

.eyebrow,
.tag {
  margin: 0 0 9px;
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.115em;
  line-height: 1.25;
  text-transform: uppercase;
}

.welcome-panel h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(40px, 5vw, 66px);
  font-weight: 780;
  letter-spacing: -0.052em;
  line-height: 0.99;
}

.welcome-copy {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--soft-ink);
  font-size: 18px;
  line-height: 1.65;
}

.quick-actions,
.reader-actions,
.material-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-actions {
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--ink);
  font-size: 13px;
  font-weight: 780;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  border-color: #aebcb7;
  box-shadow: 0 4px 14px rgba(23, 42, 50, 0.08);
}

.button.primary {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

.button.primary:hover {
  border-color: var(--forest-deep);
  background: var(--forest-deep);
}

.button.quiet {
  background: transparent;
}

.button.text-button {
  min-height: auto;
  padding-inline: 4px;
  border-color: transparent;
  background: transparent;
  color: var(--green-dark);
  text-align: left;
}

.button.text-button:hover {
  border-color: transparent;
  box-shadow: none;
  text-decoration: underline;
}

.button.compact {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 12px;
}

.direction-card {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(26px, 4vw, 42px);
  border-radius: var(--radius-lg);
  background: var(--forest);
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.direction-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.direction-card .eyebrow {
  color: #a9dfd4;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d9ece7;
  font-size: 11px;
  font-weight: 720;
}

.status-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8cdec7;
  box-shadow: 0 0 0 4px rgba(140, 222, 199, 0.11);
}

.direction-card h2 {
  max-width: 500px;
  margin: 22px 0 12px;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 740;
  letter-spacing: -0.04em;
  line-height: 1.03;
}

.direction-card > p:not(.eyebrow) {
  margin: 0;
  color: #c9dfda;
}

.course-rhythm {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 12px;
  font-weight: 800;
}

.course-rhythm span {
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
}

.course-rhythm i {
  color: #88cabb;
  font-style: normal;
}

.facts {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.25fr;
  margin-top: 44px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts div {
  display: flex;
  min-height: 92px;
  align-items: center;
  gap: 13px;
  padding: 20px 28px;
  border-right: 1px solid var(--line);
}

.facts div:first-child {
  padding-left: 0;
}

.facts div:last-child {
  border-right: 0;
}

.facts strong {
  min-width: max-content;
  color: var(--forest);
  font-size: 22px;
  letter-spacing: -0.03em;
}

.facts span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.section-heading h2 {
  max-width: 790px;
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.section-heading > p:not(.eyebrow),
.section-heading > div > p:not(.eyebrow) {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--muted);
}

.split-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.section-heading .section-note {
  max-width: 310px;
  padding-left: 18px;
  border-left: 2px solid var(--gold);
  color: var(--soft-ink);
  font-size: 12px;
}

.guides-section {
  border-bottom: 1px solid var(--line);
  background: #edf3f1;
}

.doc-workspace {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.library-panel,
.doc-reader {
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.library-panel {
  align-self: start;
  padding: 18px;
}

.search-label {
  display: block;
  margin-bottom: 7px;
  color: var(--soft-ink);
  font-size: 12px;
  font-weight: 780;
}

.search-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fbfcfa;
  color: var(--muted);
}

.search-control:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(33, 122, 105, 0.11);
}

.search-control input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.search-control input::placeholder {
  color: #87949a;
}

kbd {
  min-width: 22px;
  padding: 2px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  text-align: center;
}

.library-count {
  margin: 16px 3px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.doc-list {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 4px;
}

.doc-button {
  position: relative;
  width: 100%;
  padding: 12px 11px 12px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.doc-button::before {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: transparent;
  content: "";
}

.doc-button strong,
.doc-button span,
.doc-button small {
  display: block;
}

.doc-button strong {
  font-size: 13px;
  font-weight: 780;
  line-height: 1.35;
}

.doc-button span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.doc-button small {
  margin-bottom: 4px;
  color: var(--green);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.doc-button:hover {
  background: #f2f6f4;
}

.doc-button.active {
  background: var(--green-soft);
  color: var(--green-dark);
}

.doc-button.active::before {
  background: var(--green);
}

.doc-button.active span {
  color: #4e6a62;
}

.empty-state {
  margin: 20px 4px 8px;
  color: var(--muted);
  font-size: 13px;
}

.doc-reader {
  min-width: 0;
  overflow: hidden;
}

.doc-reader.focused {
  position: fixed;
  inset: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-color: #a8bab4;
  box-shadow: 0 0 0 100vmax rgba(15, 48, 44, 0.52), var(--shadow-lg);
}

.reader-toolbar {
  display: flex;
  min-height: 94px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.reader-title-group {
  min-width: 0;
}

.reader-title-group .eyebrow {
  margin-bottom: 5px;
}

.reader-toolbar h3 {
  margin: 0;
  overflow: hidden;
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reader-meta {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.reader-actions {
  flex: 0 0 auto;
}

.reading-progress {
  height: 3px;
  overflow: hidden;
  background: #e9eeec;
}

.reading-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 100ms linear;
}

.reader-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 205px;
  min-width: 0;
  min-height: 0;
}

.reader-scroll {
  min-width: 0;
  max-height: min(72vh, 790px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.reader-scroll:focus-visible {
  outline: 3px solid rgba(33, 122, 105, 0.25);
  outline-offset: -3px;
}

.focused .reader-body {
  flex: 1;
  overflow: hidden;
}

.focused .reader-scroll {
  height: 100%;
  max-height: none;
}

.toc-panel {
  min-width: 0;
  padding: 28px 18px;
  border-left: 1px solid var(--line);
  background: #fbfcfa;
}

.toc-panel > p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc-panel nav {
  display: grid;
  max-height: 60vh;
  gap: 2px;
  overflow-y: auto;
}

.toc-link {
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  text-decoration: none;
}

.toc-link:hover,
.toc-link.active {
  background: var(--green-soft);
  color: var(--green-dark);
}

.toc-link.level-3 {
  padding-left: 18px;
}

.markdown {
  max-width: 78ch;
  margin-inline: auto;
  padding: 38px clamp(26px, 5vw, 58px) 70px;
  color: #2e4149;
  font-size: 16px;
  line-height: 1.76;
}

.markdown > :first-child {
  margin-top: 0;
}

.markdown h1,
.markdown h2,
.markdown h3,
.markdown h4 {
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.18;
  scroll-margin-top: 18px;
}

.markdown h1 {
  max-width: 19ch;
  margin: 0 0 30px;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 770;
}

.markdown h2 {
  margin: 48px 0 18px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 27px;
  font-weight: 750;
}

.markdown h3 {
  margin: 32px 0 12px;
  color: var(--green-dark);
  font-size: 20px;
  font-weight: 760;
}

.markdown h4 {
  margin: 26px 0 10px;
  font-size: 16px;
  font-weight: 800;
}

.markdown p {
  margin: 0 0 17px;
}

.markdown ul,
.markdown ol {
  margin: 0 0 20px;
  padding-left: 1.45rem;
}

.markdown li {
  margin: 6px 0;
  padding-left: 4px;
}

.markdown li::marker {
  color: var(--green);
  font-weight: 800;
}

.markdown strong {
  color: #1b343d;
}

.markdown a {
  color: #116b75;
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.markdown a:hover {
  color: #0b4c54;
}

.markdown blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  color: #5f4a24;
}

.markdown blockquote p:last-child {
  margin-bottom: 0;
}

.markdown hr {
  height: 1px;
  margin: 34px 0;
  border: 0;
  background: var(--line);
}

.markdown pre {
  max-width: 100%;
  margin: 24px 0;
  overflow: auto;
  padding: 18px 20px;
  border: 1px solid #264b47;
  border-radius: var(--radius-sm);
  background: var(--forest-deep);
  color: #e8f5f1;
  font-size: 13px;
  line-height: 1.65;
}

.markdown code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.markdown :not(pre) > code {
  padding: 2px 5px;
  border: 1px solid #d8e2df;
  border-radius: 5px;
  background: #edf3f1;
  color: #184b43;
  font-size: 0.88em;
}

.table-scroll {
  width: 100%;
  margin: 24px 0;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}

.markdown table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.5;
}

.markdown th,
.markdown td {
  padding: 11px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown tr:last-child td {
  border-bottom: 0;
}

.markdown th:last-child,
.markdown td:last-child {
  border-right: 0;
}

.markdown th {
  background: #edf3f1;
  color: var(--forest-deep);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.02em;
}

.markdown tbody tr:nth-child(even) {
  background: #fafbf9;
}

.doc-loading {
  display: grid;
  gap: 12px;
}

.doc-loading span {
  display: block;
  height: 14px;
  border-radius: 4px;
  background: #e9efec;
  animation: loading-pulse 1.2s ease-in-out infinite alternate;
}

.doc-loading span:first-child {
  width: 66%;
  height: 34px;
  margin-bottom: 12px;
}

.doc-loading span:nth-child(3) {
  width: 88%;
}

.doc-loading span:nth-child(4) {
  width: 74%;
}

@keyframes loading-pulse {
  to { opacity: 0.48; }
}

.material-heading {
  align-items: center;
}

.filter-group {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #efeee8;
}

.filter-button {
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  cursor: pointer;
}

.filter-button:hover {
  color: var(--ink);
}

.filter-button.active {
  background: #fff;
  color: var(--green-dark);
  box-shadow: 0 1px 4px rgba(23, 42, 50, 0.11);
}

.results-count {
  margin: 28px 0 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  text-transform: uppercase;
}

.material-group {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}

.material-group + .material-group {
  margin-top: 12px;
}

.material-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.material-summary::-webkit-details-marker {
  display: none;
}

.material-summary::marker {
  content: "";
}

.material-summary .eyebrow {
  margin: 0;
}

.material-summary-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.material-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 750;
}

.chevron {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.material-group[open] .chevron {
  transform: rotate(-135deg);
}

.material-group:hover .material-summary .eyebrow {
  color: var(--green-dark);
}

.material-group > .material-list {
  padding: 0 16px 16px;
}

.material-list {
  display: grid;
  gap: 8px;
}

.material-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(23, 42, 50, 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.material-row:hover {
  border-color: #b8c7c2;
  box-shadow: var(--shadow-sm);
}

.file-mark {
  display: grid;
  width: 46px;
  height: 52px;
  place-items: center;
  border: 1px solid #a7cbbf;
  border-radius: 8px 8px 8px 2px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 17px;
  font-weight: 850;
}

.file-mark.review {
  border-color: #d3bd8b;
  background: var(--gold-soft);
  color: #77551d;
}

.file-mark.test {
  border-color: #b8cadb;
  background: var(--blue-soft);
  color: #315b7d;
}

.file-mark.teacher {
  box-shadow: inset 0 -4px 0 rgba(23, 63, 58, 0.12);
}

.material-copy {
  min-width: 0;
}

.material-labels {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.material-labels .tag {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.audience {
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
}

.audience.student {
  background: var(--green-soft);
  color: var(--green-dark);
}

.audience.teacher {
  background: #ece8f5;
  color: #5e4c86;
}

.material-copy h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 770;
  letter-spacing: -0.018em;
}

.material-copy p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.file-meta {
  display: inline-block;
  margin-top: 7px;
  color: #819096;
  font-size: 10px;
  font-weight: 700;
}

.planned-note {
  display: grid;
  grid-template-columns: minmax(220px, 0.6fr) minmax(0, 1fr);
  align-items: center;
  gap: 30px;
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px dashed #c9bd9e;
  border-radius: var(--radius);
  background: #fbf7eb;
}

.planned-note .eyebrow {
  margin-bottom: 5px;
  color: #856422;
}

.planned-note h3,
.planned-note p {
  margin: 0;
}

.planned-note h3 {
  font-size: 16px;
}

.planned-note > p {
  color: #6f654f;
  font-size: 13px;
}

.level-section {
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}

.level-grid article {
  min-height: 245px;
  padding: 25px 22px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.level-grid article:last-child {
  border-right: 0;
  background: #f0f6f3;
}

.level-number {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  margin-bottom: 24px;
  border: 1px solid #acd0c4;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 850;
}

.level-kicker {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.level-grid h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.level-grid article > p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.footer {
  border-top: 1px solid var(--line);
  background: var(--forest-deep);
  color: #c8ddd8;
}

.footer .shell {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer p {
  margin: 0;
  font-size: 12px;
}

.footer strong {
  color: #fff;
}

:focus-visible {
  outline: 3px solid rgba(33, 122, 105, 0.38);
  outline-offset: 3px;
}

@media (max-width: 1040px) {
  .overview-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
    gap: 30px;
  }

  .welcome-panel h1 {
    font-size: clamp(38px, 5.5vw, 56px);
  }

  .doc-workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .reader-body {
    grid-template-columns: 1fr;
  }

  .toc-panel {
    display: none;
  }

  .level-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .level-grid article:nth-child(2) {
    border-right: 0;
  }

  .level-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 780px) {
  html {
    scroll-padding-top: 72px;
  }

  .shell {
    width: min(100% - 32px, 680px);
  }

  .topbar {
    min-height: 64px;
    gap: 16px;
  }

  .brand-copy small {
    display: none;
  }

  .section-nav {
    gap: 0;
  }

  .section-nav a {
    padding-inline: 8px;
    font-size: 11px;
  }

  .section {
    padding-block: 60px;
  }

  .overview {
    padding-top: 24px;
    padding-bottom: 0;
  }

  .overview-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .welcome-panel {
    min-height: 0;
    padding: 34px 0 44px;
  }

  .welcome-panel h1 {
    font-size: clamp(39px, 10vw, 56px);
  }

  .direction-card {
    min-height: 0;
    padding: 28px;
    box-shadow: none;
  }

  .facts {
    grid-template-columns: 1fr;
    margin-top: 30px;
  }

  .facts div,
  .facts div:first-child {
    min-height: 70px;
    padding: 14px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .facts div:last-child {
    border-bottom: 0;
  }

  .split-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .section-heading .section-note {
    max-width: 500px;
  }

  .doc-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc-workspace > *,
  .reader-toolbar,
  .reader-body {
    min-width: 0;
    max-width: 100%;
  }

  .library-panel {
    padding: 14px;
  }

  .doc-list {
    display: flex;
    width: 100%;
    gap: 7px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }

  .doc-button {
    flex: 0 0 220px;
    scroll-snap-align: start;
    border: 1px solid var(--line);
  }

  .reader-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .reader-toolbar h3 {
    white-space: normal;
  }

  .reader-scroll {
    max-height: 68svh;
  }

  .markdown {
    padding: 32px 24px 56px;
    font-size: 15px;
    line-height: 1.72;
  }

  .markdown h2 {
    margin-top: 40px;
    font-size: 24px;
  }

  .material-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .material-actions {
    grid-column: 2;
    justify-content: flex-start;
  }

  .planned-note {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 24px, 480px);
  }

  .topbar {
    min-height: 60px;
  }

  .brand {
    gap: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-copy strong {
    font-size: 12px;
  }

  .section-nav a {
    padding: 8px 6px;
    font-size: 10px;
  }

  .welcome-panel h1 {
    font-size: clamp(36px, 11vw, 48px);
  }

  .welcome-copy {
    font-size: 16px;
  }

  .quick-actions .button:not(.text-button) {
    flex: 1 1 calc(50% - 10px);
  }

  .quick-actions .text-button {
    flex-basis: 100%;
  }

  .direction-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .direction-card h2 {
    margin-top: 8px;
    font-size: 31px;
  }

  .course-rhythm {
    flex-wrap: wrap;
  }

  .section-heading h2 {
    font-size: 34px;
  }

  .reader-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .reader-actions .button {
    width: 100%;
  }

  .doc-reader.focused {
    inset: 0;
    border: 0;
    border-radius: 0;
  }

  .focused .reader-toolbar {
    padding: 12px 14px;
  }

  .focused .reader-title-group .eyebrow,
  .focused .reader-meta {
    display: none;
  }

  .focused .reader-toolbar h3 {
    font-size: 17px;
  }

  .material-row {
    align-items: start;
    padding: 15px;
  }

  .material-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 0.75fr 1fr;
  }

  .material-actions .button {
    width: 100%;
  }

  .level-grid {
    grid-template-columns: 1fr;
  }

  .level-grid article,
  .level-grid article:nth-child(2) {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .level-grid article:last-child {
    border-bottom: 0;
  }

  .footer .shell {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }
}

@media (max-width: 390px) {
  .brand-copy {
    display: none;
  }

  .section-nav {
    flex: 1;
    justify-content: flex-end;
  }

  .reader-actions {
    grid-template-columns: 1fr;
  }

  .focused .reader-actions {
    grid-template-columns: 1fr 1fr;
  }

  .material-row {
    grid-template-columns: 1fr;
  }

  .file-mark {
    width: 40px;
    height: 44px;
  }

  .material-actions {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .overview,
  .library-panel,
  .reader-toolbar,
  .reading-progress,
  .toc-panel,
  #materials,
  #levels,
  .footer {
    display: none !important;
  }

  body,
  .guides-section,
  .doc-reader {
    background: #fff;
  }

  .section,
  .guides-section {
    padding: 0;
  }

  .doc-workspace,
  .reader-body {
    display: block;
  }

  .doc-reader {
    border: 0;
    box-shadow: none;
  }

  .reader-scroll {
    max-height: none;
    overflow: visible;
  }

  .markdown {
    max-width: none;
    padding: 0;
    font-size: 11pt;
  }
}
