:root {
  --navy-950: #071a3d;
  --navy-900: #0b2146;
  --navy-800: #14315f;
  --blue-700: #104fbf;
  --blue-600: #1763d4;
  --blue-100: #eaf2ff;
  --blue-050: #f6f9ff;
  --yellow-400: #f8c928;
  --yellow-100: #fff2b7;
  --ink: #10213f;
  --muted: #52617a;
  --line: #c4cede;
  --line-strong: #8492a8;
  --paper: #ffffff;
  --page: #f7f9fc;
  --table-head: #d9dde4;
  --code-bg: #f1f3f6;
  --focus: #ffbf00;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-soft: 0 12px 32px rgba(7, 26, 61, 0.08);
  --content-width: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.55 Arial, Helvetica, sans-serif;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue-700);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  color: var(--paper);
  background: var(--navy-950);
  border-radius: var(--radius-sm);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

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

.site-header {
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--content-width), calc(100% - 48px));
  min-height: 58px;
  margin: 0 auto;
  gap: 24px;
}

.site-header__inner--actions-only {
  justify-content: flex-end;
}

.site-header__inner--actions-only .site-nav {
  margin-left: auto;
}

.site-header__inner--full-width {
  width: calc(100% - 48px);
  padding: 0 23px;
}

.site-header__inner--brand-centred {
  position: relative;
  justify-content: flex-end;
}

.site-header__inner--brand-centred .site-name {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.site-header__inner--brand-centred .site-nav {
  margin-left: auto;
}

.site-breadcrumbs {
  width: calc(100% - 48px);
  margin: 0 auto;
  padding: 5px 23px 8px;
  border-top: 1px solid var(--line);
}

.site-breadcrumbs ol {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.site-breadcrumbs li {
  display: flex;
  align-items: center;
  min-width: 0;
  white-space: nowrap;
}

.site-breadcrumbs li.site-breadcrumbs__tab {
  margin-right: 0;
}

.site-breadcrumbs li.site-breadcrumbs__tab + li.site-breadcrumbs__tab::before {
  content: none;
}

.site-breadcrumbs__tab a {
  position: relative;
  padding-bottom: 3px;
}

.site-breadcrumbs__tab a::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 3px;
  content: "";
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.site-breadcrumbs__tab a:hover::after,
.site-breadcrumbs__tab a:focus-visible::after,
.site-breadcrumbs__tab a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-breadcrumbs li + li::before {
  margin: 0 7px;
  content: ">";
  opacity: 0.72;
}

.site-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.site-breadcrumbs a:hover,
.site-breadcrumbs a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-breadcrumbs a[aria-current="page"] {
  color: inherit;
}

.site-name {
  color: inherit;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 24px;
}

.site-nav > a {
  display: flex;
  align-items: center;
  position: relative;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.logout-form {
  display: flex;
  align-items: center;
  margin: 0;
}

.logout-form button {
  padding: 5px 0;
  color: var(--blue-700);
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.logout-form button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-nav > a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 10px;
  left: 0;
  height: 3px;
  background: var(--blue-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
}

.site-nav > a:hover::after,
.site-nav > a[aria-current="page"]::after {
  transform: scaleX(1);
}



.site-menu {
  display: flex;
  align-items: center;
  position: relative;
  color: var(--ink);
}

.site-menu__trigger {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.site-menu__trigger:hover,
.site-menu__trigger[aria-expanded="true"] {
  background: var(--blue-100);
}

.site-menu__trigger svg {
  width: 24px;
  height: 24px;
}

.site-account-link {
  display: flex;
  align-items: center;
  width: 42px;
  height: 42px;
  padding: 3px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  text-decoration: none;
}

.site-account-link:hover,
.site-account-link[aria-current="page"] {
  background: var(--yellow-100);
  border-color: var(--yellow-400);
}

.site-account-link::after {
  content: none !important;
}

.site-account-link__avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  color: var(--paper);
  border-radius: 50%;
  background: var(--navy-900);
  font-size: .78rem;
  font-weight: 700;
}

.site-account-link__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 100;
  width: min(410px, calc(100vw - 32px));
  max-height: calc(100vh - 80px);
  padding: 8px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: 0 18px 48px rgba(7, 26, 61, 0.22);
  overflow-y: auto;
}

.site-menu__panel[hidden],
.site-menu__depth-2[hidden] {
  display: none;
}

.site-menu__depth-1,
.site-menu__depth-2 {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-menu__depth-1 > li + li {
  margin-top: 3px;
}

.site-menu__top-link,
.site-menu__group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--navy-950);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font: inherit;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.site-menu__top-link:hover,
.site-menu__group-toggle:hover,
.site-menu__top-link[aria-current="page"] {
  background: var(--blue-100);
}

.site-menu__chevron {
  width: 9px;
  height: 9px;
  margin: 0 4px 3px 18px;
  flex: 0 0 auto;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.site-menu__group-toggle[aria-expanded="true"] .site-menu__chevron {
  margin-bottom: -3px;
  transform: rotate(225deg);
}

.site-menu__depth-2 {
  margin: 3px 0 8px;
  padding: 5px;
  border-radius: var(--radius-sm);
  background: var(--blue-050);
}

.site-menu__depth-2 a {
  display: block;
  padding: 8px 10px 8px 18px;
  color: var(--ink);
  border-left: 3px solid transparent;
  border-radius: 2px;
  font-size: 0.91rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.site-menu__placeholder-link {
  display: block;
  padding: 8px 10px 8px 18px;
  color: var(--muted);
  border-left: 3px solid transparent;
  font-size: 0.91rem;
  font-weight: 600;
  line-height: 1.3;
}

.site-menu__depth-2 a:hover,
.site-menu__depth-2 a[aria-current="page"] {
  color: var(--blue-700);
  border-left-color: var(--blue-600);
  background: var(--paper);
}

.site-menu__logout {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.site-menu__logout form {
  margin: 0;
}

.site-menu__logout .site-menu__top-link {
  color: var(--blue-700);
}

@media (max-width: 1040px) {
  .site-header--map .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 12px 0;
    gap: 12px;
  }

  .site-header--map .site-nav {
    align-self: auto;
  }
}

.home-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 59px);
}

.planning-index {
  width: calc(100% - 48px);
  margin: 0 auto;
  padding-top: 18px;
  padding-bottom: 48px;
}

.planning-index h1,
.planning-index h2 {
  flex: 1;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.35rem;
  line-height: 1.2;
}

.planning-index__group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
}

.planning-index__group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 20px;
  padding: 14px 22px;
  background: var(--blue-050);
  cursor: pointer;
  list-style: none;
}

.planning-index__group > summary::-webkit-details-marker {
  display: none;
}

.planning-index__group > summary::after {
  width: 10px;
  height: 10px;
  margin-right: 2px;
  flex: 0 0 auto;
  border-right: 3px solid var(--navy-950);
  border-bottom: 3px solid var(--navy-950);
  content: "";
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.planning-index__group[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.planning-index__group > summary:hover {
  background: var(--blue-100);
}

.planning-index__group > summary:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.planning-index__section + .planning-index__section {
  margin-top: 32px;
}

.planning-index__group + .planning-index__group {
  margin-top: 14px;
}

.planning-index__group > .resource-list {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.planning-index__subsection {
  margin: 0;
  padding: 0;
}

.planning-index__subsection + .planning-index__subsection {
  border-top: 1px solid var(--line);
}

.planning-index__subsection-header {
  padding: 18px 22px 16px;
  background: var(--paper);
}

.planning-index__subsection-header h3 {
  margin: 0;
  color: var(--navy-950);
  font-size: 1.12rem;
  line-height: 1.3;
}

.planning-index__subsection-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: .92rem;
}

.planning-index__subsection > .resource-list {
  border-bottom: 0;
}

.coaching-placeholder-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin: 0;
  padding: 1px 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.coaching-placeholder-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 58px;
  padding: 10px 16px;
  gap: 10px;
  background: var(--paper);
  font-weight: 700;
}

.coaching-placeholder-list li::before {
  content: "";
  width: 18px;
  height: 22px;
  border: 2px solid var(--muted);
  border-radius: 2px;
  background: linear-gradient(var(--muted), var(--muted)) 4px 6px / 8px 2px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 4px 11px / 8px 2px no-repeat,
    linear-gradient(var(--muted), var(--muted)) 4px 16px / 6px 2px no-repeat;
}

.coaching-placeholder-list small {
  padding: 3px 7px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--blue-050);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Educational theories reference */
.theories-main {
  min-height: calc(100vh - 59px);
  padding: 24px 0 56px;
  background: var(--page);
}

.theories-page {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
}

.theories-hero {
  padding: 34px clamp(24px, 4vw, 54px) 32px;
  color: var(--paper);
  background: var(--navy-950);
  border-bottom: 7px solid var(--yellow-400);
}

.theories-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.theories-hero p {
  max-width: 850px;
  margin: 15px 0 0;
  color: #e3ebf8;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
}

.theories-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 24px;
  margin-top: 22px;
}

.theories-intro__copy,
.theories-key {
  padding: 24px clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.theories-intro__copy h2,
.theories-key h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
}

.theories-intro__copy p,
.theories-key p {
  margin: 9px 0 0;
}

.theories-key {
  border-left: 5px solid var(--blue-600);
  background: var(--blue-050);
}

.theories-key h2 {
  color: var(--navy-950);
}

.theories-contents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.theories-contents a {
  display: block;
  padding: 8px 11px;
  color: var(--navy-950);
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: .86rem;
  font-weight: 700;
  text-decoration: none;
}

.theories-contents a:hover {
  background: var(--blue-100);
}

.theory-section {
  margin-top: 22px;
  padding: clamp(22px, 3.2vw, 38px);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.theory-section__heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.theory-section__number {
  margin: 2px 0 0;
  color: var(--blue-700);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.theory-section h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.15;
}

.theory-section__heading div > p {
  margin: 6px 0 0;
  color: var(--muted);
}

.theory-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  list-style: none;
  background: var(--line);
}

.theory-list > li {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100%;
  padding: 14px 16px;
  background: var(--paper);
  font-weight: 700;
  line-height: 1.35;
}

.theory-list > li:hover {
  background: var(--blue-050);
}

.theory-list .theory-list__caveat {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .83rem;
  font-weight: 400;
}

.theory-list__name {
  display: block;
  font-size: 1rem;
  line-height: 1.3;
}

.theory-list__summary {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.45;
}

.theory-list__label {
  display: block;
  margin-top: 15px;
  color: var(--navy-950);
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.35;
}

.theory-list__example {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.45;
}

.theory-list__annotations {
  margin: 3px 0 0;
  padding-left: 18px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.45;
}

.theory-list__annotations li {
  margin: 0;
  padding: 0;
  background: transparent;
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.45;
}

.theories-footer {
  margin-top: 22px;
  padding: 18px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 780px) {
  .theories-intro {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .theories-main {
    padding-top: 16px;
  }

  .theories-page {
    width: min(100% - 32px, var(--content-width));
  }

  .theories-hero {
    padding: 28px 22px 26px;
  }

  .theory-section {
    padding: 22px;
  }

  .theory-section__heading {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .theory-list {
    grid-template-columns: 1fr;
  }
}

.resource-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.resource-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  align-items: stretch;
  position: relative;
  min-height: 88px;
  background: var(--paper);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.resource-item + .resource-item {
  border-top: 1px solid var(--line);
}

.resource-item:hover,
.resource-item:focus-within {
  background: var(--blue-050);
  box-shadow: inset 5px 0 0 var(--blue-600);
}

.resource-item__icon {
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
}

.resource-item__icon svg {
  width: 54px;
  height: 54px;
  padding: 12px;
  color: var(--navy-950);
  background: var(--yellow-100);
  border-radius: var(--radius-sm);
}

.resource-item__copy {
  align-self: center;
  padding: 14px 24px;
}

.resource-item__copy h3 {
  margin: 0 0 3px;
  font-size: 1.15rem;
}

.resource-item__copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.resource-link {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  padding: 14px 24px;
  font-size: 1.08rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.resource-link::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  cursor: pointer;
}

.resource-link:focus-visible {
  outline: 0;
}

.resource-link:focus-visible::before {
  outline: 3px solid var(--focus);
  outline-offset: -3px;
}

.resource-link svg {
  width: 20px;
  transition: transform 160ms ease;
}

.resource-link:hover svg {
  transform: translateX(5px);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.sheet-main {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 59px);
  background: var(--page);
}

.sheet-page {
  width: min(1540px, calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.sheet-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 12px;
}

.sheet-page__header h1 {
  margin: 0 0 2px;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.sheet-page__header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.sheet-open-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 8px 12px;
  color: var(--paper);
  background: var(--blue-700);
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}

.sheet-open-link:hover {
  background: var(--navy-800);
}

.sheet-open-link svg {
  width: 20px;
  height: 20px;
}

.sheet-embed {
  height: calc(100vh - 168px);
  min-height: 680px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.sheet-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.reference-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  width: min(var(--content-width), 100%);
  margin: 0 auto;
}

.contents-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 30px 22px 34px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.contents-details summary {
  display: block;
  margin: 0 0 16px;
  font-size: 0.95rem;
  font-weight: 700;
  list-style: none;
}

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

.contents-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: contents;
}

.contents-list li {
  counter-increment: contents;
}

.contents-list a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 6px;
  position: relative;
  padding: 7px 0 7px 9px;
  color: var(--ink);
  font-size: 0.79rem;
  line-height: 1.3;
  text-decoration: none;
}

.contents-list a::before {
  content: counter(contents) ".";
  color: inherit;
}

.contents-list a::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: -10px;
  width: 3px;
  background: transparent;
}

.contents-list a:hover,
.contents-list a[aria-current="location"] {
  color: var(--blue-700);
}

.contents-list a[aria-current="location"]::after {
  background: var(--blue-600);
}

.rail-actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.rail-action {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 5px 0;
  color: var(--blue-700);
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.rail-action svg {
  width: 18px;
  height: 18px;
}

.reference-main {
  min-width: 0;
  padding: 16px 44px 70px;
}

.reference-intro {
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.reference-intro h1 {
  margin: 0 0 3px;
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.reference-intro p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.activity-section {
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 18px;
}

.activity-section:last-of-type {
  border-bottom: 0;
}

.activity-section h2 {
  margin: 0 0 8px;
  color: var(--blue-700);
  font-size: 1.25rem;
  line-height: 1.2;
}

.activity-section h3 {
  margin: 14px 0 6px;
  font-size: 1rem;
}

.activity-section p {
  margin: 8px 0;
}

.qa-intro {
  margin-bottom: 0;
}

.qa-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0 0;
  border: 1px solid var(--line);
}

.qa-meta div {
  padding: 9px 12px;
}

.qa-meta div + div {
  border-left: 1px solid var(--line);
}

.qa-meta dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.qa-meta dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.qa-section h3 {
  margin-top: 18px;
  color: var(--navy-900);
  font-size: 1rem;
}

.qa-rule-list,
.qa-checklist,
.qa-process {
  margin: 12px 0 0;
  padding-left: 24px;
}

.qa-rule-list li,
.qa-checklist li,
.qa-process li {
  margin: 7px 0;
  padding-left: 4px;
}

.qa-rule-list code,
.qa-section p code,
.qa-section li code {
  padding: 1px 4px;
  color: var(--navy-900);
  background: var(--blue-100);
  border-radius: 2px;
  font: 700 0.78rem/1.4 Consolas, "Courier New", monospace;
  white-space: nowrap;
}

.qa-checklist {
  list-style: none;
  padding-left: 0;
}

.qa-checklist li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  padding-left: 0;
}

.qa-checklist li::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border: 2px solid var(--blue-700);
  background: var(--paper);
}

.qa-checklist--gate {
  padding: 12px 16px;
  border: 2px solid var(--navy-900);
  background: var(--blue-050);
}

.qa-callout {
  margin: 14px 0;
  padding: 13px 16px;
  border-left: 5px solid var(--blue-600);
  background: var(--blue-050);
}

.qa-callout--required {
  border-left-color: var(--yellow-400);
  background: #fffaf0;
}

.qa-callout p:last-child {
  margin-bottom: 0;
}

.qa-table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
}

.qa-table th,
.qa-table td {
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  text-align: left;
  vertical-align: top;
}

.qa-table th {
  border-bottom: 3px solid #000000;
  background: var(--table-head);
}

.qa-table th:first-child,
.qa-table td:first-child {
  width: 22%;
  font-weight: 700;
}

.qa-footer {
  margin-top: 24px;
}

.task-instruction {
  font-weight: 700;
}

.response-lines {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
}

.response-lines span {
  display: block;
  height: 34px;
  border-bottom: 1px solid var(--line-strong);
}

.response-lines--compact span {
  height: 27px;
}

.worksheet-table {
  width: 100%;
  margin: 16px 0 4px;
  border-collapse: collapse;
  table-layout: fixed;
}

.worksheet-table th,
.worksheet-table td {
  padding: 10px 12px;
  border: 1px solid #596579;
  text-align: center;
  vertical-align: top;
}

.worksheet-table th {
  color: var(--ink);
  background: var(--table-head);
  border-bottom: 4px solid #000000;
  font-weight: 700;
}

.worksheet-table td {
  min-height: 42px;
}

.worksheet-table .blank-cell {
  height: 48px;
}

.mcq-table th:not(:first-child),
.mcq-table td:not(:first-child) {
  text-align: center;
}

.match-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 14px 0 18px;
  border: 1px solid #596579;
}

.match-options span {
  padding: 9px;
  border-right: 1px solid #596579;
}

.match-options span:last-child {
  border-right: 0;
}

.match-options strong {
  display: inline-block;
  min-width: 24px;
  margin-right: 6px;
  padding-right: 7px;
  border-right: 1px solid #596579;
}

.word-bank {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 14px 0 18px;
  border: 1px solid #596579;
}

.word-bank__title {
  grid-column: 1 / -1;
  padding: 9px;
  background: var(--table-head);
  border-bottom: 1px solid #596579;
  font-weight: 700;
  text-align: center;
}

.word-bank span:not(.word-bank__title) {
  padding: 8px 12px;
  border-right: 1px solid #596579;
  border-bottom: 1px solid #596579;
  text-align: center;
}

.word-bank span:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.word-bank span:nth-child(3n + 1) {
  border-right: 0;
}

.inline-blank {
  display: inline-block;
  min-width: 104px;
  border-bottom: 1px solid var(--ink);
  transform: translateY(-2px);
}

.fill-blank-paragraph {
  line-height: 3.1;
}

.code-bank {
  grid-template-columns: repeat(4, 1fr);
  font-family: Consolas, "Courier New", monospace;
}

.code-bank span:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.code-bank span:nth-child(4n + 1) {
  border-right: 0;
}

.code-panel {
  margin: 18px 0 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--code-bg);
}

.code-panel__label {
  padding: 12px 16px 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.code-panel pre {
  margin: 0;
  padding: 12px 16px 18px;
  font: 0.96rem/1.65 Consolas, "Courier New", monospace;
}

.code-listing {
  margin: 12px 16px 18px;
  padding: 0;
  list-style: none;
  counter-reset: code-line;
  font: 0.96rem/1.7 Consolas, "Courier New", monospace;
}

.code-listing li {
  display: grid;
  grid-template-columns: 42px minmax(max-content, 1fr);
  min-height: 1.7em;
  padding: 0;
  white-space: nowrap;
  counter-increment: code-line;
}

.code-listing li::before {
  content: counter(code-line);
  padding-right: 12px;
  color: #667085;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.code-listing code {
  display: block;
  padding-left: 14px;
  color: #1f2937;
  border-left: 2px solid #d25a5a;
  font: inherit;
}

.code-listing .code-indent-1 code {
  padding-left: calc(14px + 2ch);
}

.syntax-keyword { color: #7a3eb1; font-weight: 700; }
.syntax-function { color: #005bbb; }
.syntax-name { color: #26364a; }
.syntax-number { color: #c33b2f; }
.syntax-operator { color: #0f766e; }

.misconception-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: misconception;
}

.misconception-list li {
  counter-increment: misconception;
  margin-bottom: 22px;
}

.misconception-list li::before {
  content: counter(misconception, lower-roman) ") ";
  font-weight: 700;
}

.odd-one-out {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.odd-one-out span {
  padding: 11px;
  border: 1px solid var(--line-strong);
  text-align: center;
}

.ordering-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 36px;
  align-items: start;
  margin-top: 16px;
}

.order-list {
  display: grid;
  gap: 7px;
}

.order-list span {
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
}

.order-list strong {
  display: inline-block;
  width: 28px;
}

.order-stack {
  border: 1px solid #596579;
}

.order-stack strong,
.order-stack span {
  display: block;
  min-height: 40px;
  padding: 9px;
  border-bottom: 1px solid #596579;
  text-align: center;
}

.order-stack strong {
  background: var(--table-head);
}

.order-stack strong:last-child {
  border: 0;
}

.diagram-frame {
  position: relative;
  min-height: 310px;
  margin-top: 18px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.diagram-frame svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 306px;
}

.network-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.network-options span {
  padding: 10px;
  border: 1px solid var(--line-strong);
  text-align: center;
}

.requirements {
  margin: 12px 0 0;
  padding-left: 26px;
}

.requirements li {
  margin: 5px 0;
}

.reference-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.back-to-top {
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 980px) {
  .reference-layout {
    grid-template-columns: 1fr;
  }

  .contents-rail {
    position: static;
    height: auto;
    padding: 22px 28px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .contents-list {
    columns: 2;
  }

  .contents-list li {
    break-inside: avoid;
  }

  .rail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
  }

  .reference-main {
    padding: 32px 36px 64px;
  }
}

@media (max-width: 720px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    width: min(100% - 32px, var(--content-width));
    min-height: auto;
    padding: 9px 0 7px;
    gap: 5px;
  }

  .site-header__inner--full-width {
    width: calc(100% - 32px);
    padding: 12px 23px;
  }

  .site-header__inner--brand-centred {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    padding: 9px 23px;
  }

  .site-header__inner--brand-centred .site-name {
    position: static;
    transform: none;
    text-align: center;
  }

  .site-header__inner--brand-centred .site-nav {
    align-self: flex-end;
    margin-left: 0;
  }

  .site-breadcrumbs {
    width: calc(100% - 32px);
    padding: 6px 0 8px;
  }

  .site-breadcrumbs ol {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .site-breadcrumbs li {
    white-space: normal;
  }

  .site-breadcrumbs a {
    overflow-wrap: anywhere;
  }

  .site-name {
    font-size: 0.98rem;
  }

  .site-nav {
    align-self: auto;
    gap: 16px;
  }

  .site-nav > a {
    padding-bottom: 5px;
    font-size: 0.82rem;
  }

  .site-nav > a::after {
    bottom: 0;
  }

  .planning-index,
  .site-footer__inner {
    width: min(100% - 32px, var(--content-width));
  }

  .planning-index {
    width: calc(100% - 32px);
  }

  .planning-index {
    padding-top: 14px;
  }

  .coaching-placeholder-list {
    grid-template-columns: 1fr;
  }

  .resource-item {
    grid-template-columns: 70px minmax(0, 1fr);
    min-height: 0;
  }

  .resource-item__icon svg {
    width: 46px;
    height: 46px;
    padding: 10px;
  }

  .resource-item__copy {
    padding: 12px 14px;
  }

  .resource-link {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
  }

  .sheet-page {
    width: min(100% - 32px, 1540px);
    padding-top: 14px;
  }

  .sheet-page__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .sheet-open-link {
    width: auto;
    justify-content: center;
  }

  .sheet-embed {
    height: 72vh;
    min-height: 560px;
  }

  .contents-list {
    columns: 1;
  }

  .contents-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--paper);
    cursor: pointer;
  }

  .contents-details summary::after {
    content: "+";
    color: var(--blue-700);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
  }

  .contents-details[open] summary::after {
    content: "−";
  }

  .contents-details[open] .contents-list {
    margin-top: 12px;
  }

  .reference-main {
    padding: 18px 18px 45px;
  }

  .activity-section {
    overflow-x: auto;
  }

  .worksheet-table {
    min-width: 680px;
  }

  .match-options,
  .word-bank,
  .code-bank,
  .odd-one-out,
  .network-options,
  .ordering-grid {
    grid-template-columns: 1fr;
  }

  .match-options span,
  .word-bank span:not(.word-bank__title) {
    border-right: 0;
    border-bottom: 1px solid #596579;
  }

  .word-bank span:last-child,
  .match-options span:last-child {
    border-bottom: 0;
  }

  .diagram-frame {
    min-width: 620px;
  }

  .reference-footer {
    flex-direction: column;
  }

  .qa-meta {
    grid-template-columns: 1fr 1fr;
  }

  .qa-meta div + div {
    border-left: 0;
  }

  .qa-meta div:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .qa-meta div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .qa-table {
    min-width: 0;
  }
}

@media print {
  :root {
    --line: #777777;
    --line-strong: #555555;
  }

  @page {
    margin: 14mm;
  }

  body {
    color: #000000;
    background: #ffffff;
    font-size: 10.5pt;
  }

  .site-header,
  .contents-rail,
  .rail-actions,
  .back-to-top,
  .skip-link {
    display: none !important;
  }

  .reference-layout {
    display: block;
    width: 100%;
  }

  .reference-main {
    padding: 0;
  }

  .reference-intro h1 {
    font-size: 24pt;
  }

  .activity-section {
    break-inside: avoid;
  }

  .qa-section {
    break-inside: auto;
  }

  .qa-section h2,
  .qa-section h3 {
    break-after: avoid;
  }

  .qa-callout,
  .qa-table,
  .qa-checklist--gate {
    break-inside: avoid;
  }

  .activity-section h2 {
    color: #000000;
  }

  .code-panel {
    background: #f2f2f2;
  }

  .reference-footer {
    color: #000000;
  }
}

/* Curriculum planning constraints */
.constraints-main {
  min-height: calc(100vh - 59px);
  padding: 24px 0 56px;
  background: var(--page);
}

.constraints-page {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
}

.constraints-hero {
  padding: 34px clamp(24px, 4vw, 54px) 32px;
  color: var(--paper);
  background: var(--navy-950);
  border-bottom: 7px solid var(--yellow-400);
}

.constraints-eyebrow {
  margin: 0 0 8px;
  color: var(--yellow-100);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.constraints-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.constraints-hero > p:last-child {
  max-width: 850px;
  margin: 15px 0 0;
  color: #e3ebf8;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
}

.constraints-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 22px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.constraints-summary div {
  padding: 17px 20px;
}

.constraints-summary div + div {
  border-left: 1px solid var(--line);
}

.constraints-summary dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.constraints-summary dd {
  margin: 3px 0 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.constraints-section {
  margin-top: 22px;
  padding: clamp(22px, 3.2vw, 38px);
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.constraints-section__heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.constraints-section__number {
  margin: 2px 0 0;
  color: var(--blue-700);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.constraints-section__heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.15;
}

.constraints-section__heading div > p {
  margin: 6px 0 0;
  color: var(--muted);
}

.constraints-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
}

.constraints-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.constraints-table--centred {
  min-width: 760px;
}

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

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

.constraints-table tbody tr:last-child > * {
  border-bottom: 0;
}

.constraints-table thead th {
  color: var(--paper);
  background: var(--navy-900);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.constraints-table tbody th {
  color: var(--navy-950);
  background: var(--blue-050);
}

.constraints-table tbody tr:nth-child(even) td {
  background: #fbfcff;
}

.constraints-table--centred td:not(:first-child) {
  text-align: center;
}

.constraints-cell-line {
  display: block;
}

.constraints-cell-line + .constraints-cell-line {
  margin-top: 4px;
}

.constraint-note {
  margin-top: 20px;
  padding: 16px 18px;
  border-left: 5px solid var(--blue-600);
  background: var(--blue-050);
}

.constraint-note--warning {
  border-left-color: #bf7a00;
  background: #fff8e8;
}

.constraint-note--critical {
  border-left-color: var(--yellow-400);
  background: #fffbed;
}

.constraint-note h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.constraint-note p {
  margin: 0;
}

.term-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.term-card {
  border: 1px solid var(--line);
  background: #fbfcff;
}

.term-card h3 {
  margin: 0;
  padding: 11px 15px;
  color: var(--paper);
  background: var(--navy-900);
  font-size: 1rem;
}

.term-card dl {
  margin: 0;
}

.term-card dl div {
  padding: 11px 15px;
}

.term-card dl div + div {
  border-top: 1px solid var(--line);
}

.term-card dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.term-card dd {
  margin: 2px 0 0;
}

.calendar-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.calendar-rules > div {
  padding-top: 16px;
  border-top: 4px solid var(--yellow-400);
}

.calendar-rules h3 {
  margin: 0;
  font-size: 1.05rem;
}

.calendar-rules ul {
  margin: 9px 0 0;
  padding-left: 21px;
}

.calendar-rules li + li {
  margin-top: 7px;
}

.constraints-source {
  margin: 22px 0 0;
  padding-top: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.calculation-steps {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: calculation-step;
}

.calculation-steps li {
  position: relative;
  min-height: 46px;
  padding: 11px 15px 11px 58px;
  border: 1px solid var(--line);
  background: #fbfcff;
  counter-increment: calculation-step;
}

.calculation-steps li::before {
  content: counter(calculation-step);
  position: absolute;
  top: 9px;
  left: 13px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--paper);
  background: var(--blue-700);
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.formula-grid p {
  margin: 0;
  padding: 15px;
  color: var(--paper);
  background: var(--navy-950);
}

.formula-grid span,
.formula-grid strong {
  display: block;
}

.formula-grid span {
  margin-bottom: 4px;
  color: var(--yellow-100);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.constraints-footer {
  padding: 22px 6px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.constraints-footer p {
  margin: 4px 0;
}

@media (max-width: 900px) {
  .constraints-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .constraints-summary div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .constraints-summary div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .term-grid,
  .formula-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .constraints-main {
    padding-top: 0;
  }

  .constraints-page {
    width: 100%;
  }

  .constraints-hero {
    padding: 26px 20px 24px;
  }

  .constraints-summary {
    margin-bottom: 14px;
    border-right: 0;
    border-left: 0;
  }

  .constraints-summary div {
    padding: 14px 16px;
  }

  .constraints-section {
    margin: 14px 16px 0;
    padding: 20px 16px;
  }

  .constraints-section__heading {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .constraints-section__number {
    margin: 0;
  }

  .calendar-rules {
    grid-template-columns: 1fr;
  }

  .constraints-footer {
    padding: 18px 20px 0;
  }
}

@media print {
  .constraints-main {
    padding: 0;
    background: #ffffff;
  }

  .constraints-page {
    width: 100%;
  }

  .constraints-hero {
    padding: 0 0 18px;
    color: #000000;
    background: #ffffff;
    border-bottom-color: #000000;
  }

  .constraints-hero > p:last-child,
  .constraints-eyebrow {
    color: #000000;
  }

  .constraints-summary,
  .constraints-section {
    box-shadow: none;
  }

  .constraints-section {
    break-inside: avoid;
  }
}

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

.map-main {
  min-height: calc(100vh - 59px);
  background: var(--page);
}

.map-main [hidden] {
  display: none !important;
}

.map-page {
  width: min(1540px, calc(100% - 48px));
  margin: 0 auto;
  padding: 16px 0 46px;
}

.map-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 11px;
}

.map-page__header h1 {
  margin: 0 0 2px;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.map-page__header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.map-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  color: #253655;
  border: 1px solid var(--line);
  background: var(--paper);
}

.map-summary span {
  padding: 8px 14px;
}

.map-summary span + span {
  border-left: 1px solid var(--line);
}

.map-controls {
  display: grid;
  grid-template-columns: minmax(260px, 2fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-top: 0;
  background: #eef3fa;
}

.map-main--student .map-controls {
  grid-template-columns: minmax(260px, 2fr) minmax(190px, 1fr) minmax(180px, .8fr) auto;
}

.map-control {
  display: grid;
  gap: 5px;
  color: var(--navy-900);
  font-size: 0.82rem;
  font-weight: 700;
}

.map-control input,
.map-control select {
  min-height: 40px;
  width: 100%;
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: 0.95rem/1.2 Arial, Helvetica, sans-serif;
}

.map-reset {
  min-height: 40px;
  padding: 8px 14px;
  color: var(--blue-700);
  border: 1px solid var(--blue-700);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.map-reset:hover {
  color: var(--paper);
  background: var(--blue-700);
}

.map-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 2px 8px;
}

.map-results-bar p {
  margin: 0;
  font-size: 0.88rem;
}

#map-results {
  color: var(--navy-900);
  font-weight: 700;
}

.map-results-hint {
  color: var(--muted);
  text-align: right;
}

.map-table-wrap {
  overflow: visible;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.course-resources__unit-picker,
.course-resources__sections {
  margin: 22px 0 0;
}

.course-resources__unit-picker h2,
.course-resources__sections h2 {
  margin: 0 0 8px;
  color: var(--navy-900);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.course-resources__unit-tabs-wrap {
  position: static;
}

.course-resources__section-tabs-wrap {
  position: static;
}

.course-resources__panel {
  padding-top: 20px;
}

.course-resources__unavailable {
  padding: 20px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.course-resources__unavailable h2 {
  margin: 0 0 5px;
  color: var(--navy-900);
  font-size: 1.22rem;
}

.course-resources__unavailable p {
  margin: 0;
  color: var(--muted);
}

.course-resources__table th:nth-child(1),
.course-resources__table th:nth-child(2),
.course-resources__table th:nth-child(4),
.course-resources__table th:nth-child(5),
.course-resources__table th:nth-child(6),
.course-resources__table th:nth-child(7),
.course-resources__table th:nth-child(8) {
  width: 1%;
  white-space: nowrap;
}

.course-resources__resource-cell {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.map-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

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

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

.map-table th {
  color: var(--paper);
  background: var(--navy-900);
  font-size: 0.88rem;
}

.map-table th:nth-child(1),
.map-table th:nth-child(2),
.map-table th:nth-child(4),
.map-table th:nth-child(5),
.map-table th:nth-child(6),
.map-table th:nth-child(7),
.map-table th:nth-child(8) {
  width: 1%;
  white-space: nowrap;
}

.status-pill--presentation {
  color: var(--blue-900);
  background: var(--blue-100);
}

.status-pill--digital-presentation {
  color: #4a2377;
  background: #eee3fa;
}

.status-pill--locked {
  color: #52617a;
  background: #e4e8ef;
}

.map-date-cell {
  min-width: 108px;
  white-space: nowrap;
  font-weight: 700;
}

.map-date-pending {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 400;
}

@media (min-width: 821px) {
  .map-main--student .map-table {
    table-layout: fixed;
  }

  .map-main--student .map-table th:nth-child(1) { width: 10%; }
  .map-main--student .map-table th:nth-child(2) { width: 9%; }
  .map-main--student .map-table th:nth-child(3) { width: 7%; }
  .map-main--student .map-table th:nth-child(4) { width: auto; white-space: normal; }
  .map-main--student .map-table th:nth-child(n+5) { width: 7.5%; white-space: normal; }
}

.map-row:nth-child(even) {
  background: #f8faff;
}

.map-row:hover {
  background: var(--blue-050);
}

.map-unit-cell {
  display: table-cell;
  min-width: 145px;
  max-width: 190px;
}

.unit-badge {
  width: fit-content;
  padding: 2px 7px;
  color: var(--paper);
  border-radius: 999px;
  background: var(--blue-700);
  font-size: 0.75rem;
  font-weight: 700;
}

.unit-badge--2,
.unit-badge--6 { background: #5b3f9b; }
.unit-badge--3,
.unit-badge--7 { background: #0f6b68; }
.unit-badge--4,
.unit-badge--8 { background: #8a4b11; }

.unit-title {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
}

.map-subtopic,
.map-title {
  font-weight: 700;
}

.map-subtopic {
  font-variant-numeric: tabular-nums;
}

.status-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.status-pill--link {
  text-decoration: none;
  white-space: nowrap;
}

.status-pill--link:hover {
  color: #ffffff;
  background: #1e5631;
}

.status-pill--link:focus-visible {
  outline: 3px solid #ffbf47;
  outline-offset: 2px;
}

.status-pill--complete {
  color: #1e5631;
  background: #d9ead3;
}

.status-pill--other {
  color: #754700;
  background: #fff0c2;
}

.status-pill--none {
  color: #46536a;
  background: #e7e9ed;
}

.map-details summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 5px 8px;
  color: var(--blue-700);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.map-details summary::before {
  content: "+";
  font-size: 1rem;
  line-height: 1;
}

.map-details[open] summary::before {
  content: "−";
}

.map-details-cell {
  position: relative;
  white-space: nowrap;
}

.map-details {
  position: relative;
}

.map-details summary:hover {
  color: var(--paper);
  background: var(--blue-700);
}

.map-details[open] summary {
  margin-bottom: 12px;
}

.map-detail-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: min(560px, calc(100vw - 72px));
  max-height: 70vh;
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 16px 38px rgba(7, 26, 61, 0.18);
}

.map-detail {
  min-width: 0;
}

.map-detail--wide {
  grid-column: auto;
}

.map-detail h3 {
  margin: 0 0 5px;
  color: var(--navy-800);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.map-detail p {
  margin: 0;
  color: #263855;
  font-size: 0.86rem;
}

.map-preline {
  white-space: pre-line;
}

.presentation-link {
  font-size: 0.86rem;
  font-weight: 700;
}

.map-empty {
  margin: 0;
  padding: 28px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  text-align: center;
}

.map-footer {
  margin-top: 28px;
}

@media (max-width: 820px) {
  .map-page {
    width: min(100% - 32px, 1540px);
    padding-top: 13px;
  }

  .map-page__header,
  .map-results-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .map-results-hint {
    text-align: left;
  }

  .map-controls,
  .map-main--student .map-controls {
    grid-template-columns: 1fr;
  }

  .map-reset {
    width: fit-content;
  }

  .map-summary span {
    width: 100%;
  }

  .map-summary span + span {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .map-table-wrap {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .map-table,
  .map-table tbody,
  .map-table tr,
  .map-table td {
    display: block;
    width: 100%;
  }

  .map-table thead {
    display: none;
  }

  .map-row {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    background: var(--paper) !important;
  }

  .map-table td {
    display: grid;
    grid-template-columns: 95px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 0;
    border: 0;
  }

  .map-main--student .map-table td,
  .map-main--student .map-unit-cell {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .map-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .map-unit-cell {
    grid-template-columns: 95px minmax(0, 1fr);
  }

  .map-unit-cell::before {
    grid-row: 1 / 3;
  }

  .map-details-cell {
    grid-template-columns: 1fr !important;
    padding-top: 10px !important;
    border-top: 1px solid var(--line) !important;
  }

  .map-details-cell::before {
    display: none;
  }

  .map-detail-panel {
    grid-template-columns: 1fr;
    position: static;
    width: 100%;
    max-height: none;
    overflow: visible;
    box-shadow: none;
  }

  .map-detail--wide {
    grid-column: auto;
  }
}

@media print {
  .map-controls,
  .map-page__header .sheet-open-link,
  .map-results-hint,
  .map-details-cell,
  .map-table th:last-child {
    display: none !important;
  }

  .map-page {
    width: 100%;
    padding: 0;
  }

  .map-table th:nth-child(1) { width: 18%; }
  .map-table th:nth-child(2) { width: 8%; }
  .map-table th:nth-child(3) { width: 32%; }
  .map-table th:nth-child(4) { width: 12%; }
  .map-table th:nth-child(5) { width: 12%; }
  .map-table th:nth-child(6) { width: 12%; }
  .map-table th:nth-child(7) { width: 12%; }
}

/* Schemes of Work */
.sow-library__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 4px 9px;
  border-top: 1px solid var(--line);
}

.sow-library__header h1 {
  padding: 0;
  border: 0;
}

.sow-library__header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.sow-course-list {
  display: grid;
  gap: 14px;
}

.sow-course__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 13px 18px;
  color: #fff;
  background: var(--navy-950);
  border: 1px solid var(--navy-950);
  cursor: pointer;
  list-style: none;
  transition: background 150ms ease;
}

.sow-course__header::-webkit-details-marker {
  display: none;
}

.sow-course__header::marker {
  content: "";
}

.sow-course__header:hover {
  background: var(--navy-900);
}

.sow-course__header:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.sow-course__header::after {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin: 0 3px 5px 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
  transition: transform 150ms ease;
}

.sow-course[open] > .sow-course__header::after {
  transform: rotate(225deg);
}

.sow-course__header > div {
  min-width: 0;
}

.sow-course__header h2 {
  margin: 0 0 2px;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1.2;
}

.sow-course__header p,
.sow-course__summary {
  margin: 0;
  color: #d9e3f4;
  font-size: 0.84rem;
}

.sow-course__summary {
  flex: 0 0 auto;
  margin-left: auto;
  max-width: 360px;
  text-align: right;
}

.sow-course .resource-list {
  border-top: 0;
}

.sow-year-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 9px 18px;
  color: var(--navy-900);
  background: var(--blue-050);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 700;
}

.sow-year-divider::after {
  height: 1px;
  flex: 1 1 auto;
  background: var(--line-strong);
  content: "";
}

.sow-library .resource-item__copy h3 {
  margin: 0 0 3px;
  font-size: 1.15rem;
}

.resource-item__icon--muted svg {
  color: #5d687b;
  background: #edf0f4;
}

.resource-item--unavailable {
  color: #34445f;
  background: #fbfcfe;
}

.resource-item--unavailable:hover {
  background: #fbfcfe;
  box-shadow: none;
}

.resource-item__number {
  display: grid;
  place-items: center;
  color: var(--navy-900);
  border-right: 1px solid var(--line);
  font-size: 1.4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.resource-status {
  align-self: center;
  margin-right: 24px;
  padding: 4px 9px;
  color: #46536a;
  background: #e7e9ed;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.sow-main {
  min-height: calc(100vh - 59px);
  background: var(--page);
}

.sow-page {
  width: min(var(--content-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 18px 0 52px;
}

.sow-page__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  padding-bottom: 16px;
}

.sow-page__header h1 {
  margin: 0 0 4px;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
}

.sow-page__header > div > p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.sow-summary {
  display: grid;
  grid-template-columns: repeat(4, auto);
  margin: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

.sow-summary div {
  min-width: 96px;
  padding: 8px 12px;
}

.sow-summary div + div {
  border-left: 1px solid var(--line);
}

.sow-summary dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.sow-summary dd {
  margin: 1px 0 0;
  color: var(--navy-900);
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
}

.sow-tabs-wrap {
  position: sticky;
  top: 0;
  z-index: 30;
  overflow: hidden;
  border: 1px solid var(--navy-900);
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(7, 26, 61, 0.08);
}

.sow-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: thin;
}

.sow-tab {
  position: relative;
  flex: 1 0 auto;
  min-height: 46px;
  padding: 10px 16px;
  color: var(--navy-900);
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--paper);
  font: 700 0.87rem/1.2 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.sow-tab:last-child {
  border-right: 0;
}

.sow-tab:hover {
  background: var(--blue-050);
}

.sow-tab[aria-selected="true"] {
  color: var(--paper);
  background: var(--navy-900);
}

.sow-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 0;
  left: 14px;
  height: 4px;
  background: var(--yellow-400);
}

.sow-panel {
  padding-top: 20px;
}

.sow-panel[hidden] {
  display: none;
}

.sow-panel__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.sow-panel__heading h2 {
  margin: 0 0 2px;
  color: var(--navy-900);
  font-size: 1.22rem;
  line-height: 1.2;
}

.sow-panel__heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.sow-source-documents {
  margin: 0 0 20px;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  background: var(--blue-050);
}

.sow-source-documents__heading h2 {
  margin: 0 0 2px;
  color: var(--navy-900);
  font-size: 1.06rem;
  line-height: 1.2;
}

.sow-source-documents__heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.sow-source-documents__links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.sow-document-link {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  padding: 12px;
  color: var(--navy-900);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.sow-document-link:hover {
  border-color: var(--blue-700);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.sow-document-link__badge {
  flex: 0 0 auto;
  padding: 5px 6px;
  color: var(--paper);
  background: var(--navy-900);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.sow-document-link__copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.sow-document-link__copy strong,
.sow-document-link__copy small {
  overflow-wrap: anywhere;
}

.sow-document-link__copy strong {
  font-size: 0.9rem;
  line-height: 1.2;
}

.sow-document-link__copy small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.sow-document-link__arrow {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--blue-700);
  font-size: 1.2rem;
  line-height: 1;
}

.sow-panel__actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.sow-panel__actions button {
  padding: 6px 10px;
  color: var(--blue-700);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: 700 0.78rem/1.2 Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.sow-panel__actions button:hover {
  color: var(--paper);
  background: var(--blue-700);
}

.sow-time-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.sow-time-table {
  width: 100%;
  border-collapse: collapse;
}

.sow-time-table th,
.sow-time-table td {
  padding: 12px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.sow-time-table th {
  color: var(--paper);
  background: var(--navy-900);
  font-size: 0.82rem;
}

.sow-time-table th:nth-child(n + 2),
.sow-time-table td:nth-child(n + 2) {
  width: 18%;
  white-space: nowrap;
}

.sow-time-table th:last-child,
.sow-time-table td:last-child {
  border-right: 0;
}

.sow-time-table tbody tr:last-child td {
  border-bottom: 0;
  background: var(--blue-050);
  font-weight: 700;
}

.sow-journey {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.sow-journey h2 {
  margin: 0 0 10px;
  color: var(--navy-900);
  font-size: 1.18rem;
}

.sow-journey ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  background: var(--paper);
  counter-reset: sow-step;
}

.sow-journey li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 0 10px;
  padding: 14px;
  counter-increment: sow-step;
}

.sow-journey li + li {
  border-left: 1px solid var(--line);
}

.sow-journey li::before {
  content: counter(sow-step);
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--navy-900);
  background: var(--yellow-100);
  font-weight: 700;
}

.sow-journey strong {
  color: var(--navy-900);
}

.sow-journey span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.sow-lesson-list {
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.sow-lesson + .sow-lesson {
  border-top: 1px solid var(--line);
}

.sow-lesson summary {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  padding: 10px 16px 10px 0;
  cursor: pointer;
  list-style: none;
}

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

.sow-lesson summary:hover {
  background: var(--blue-050);
}

.sow-lesson[open] summary {
  background: var(--blue-050);
  box-shadow: inset 5px 0 0 var(--blue-600);
}

.sow-lesson__number {
  display: grid;
  place-items: center;
  align-self: stretch;
  color: var(--navy-900);
  border-right: 1px solid var(--line);
  background: var(--yellow-100);
  font-size: 1.08rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sow-lesson__summary-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.sow-lesson__summary-copy strong {
  color: var(--navy-900);
  font-size: 1rem;
  line-height: 1.3;
}

.sow-lesson__summary-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sow-lesson__toggle {
  position: relative;
  width: 20px;
  height: 20px;
}

.sow-lesson__toggle::before,
.sow-lesson__toggle::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 2px;
  left: 2px;
  height: 2px;
  background: var(--blue-700);
}

.sow-lesson__toggle::after {
  transform: rotate(90deg);
  transition: transform 140ms ease;
}

.sow-lesson[open] .sow-lesson__toggle::after {
  transform: rotate(0);
}

.sow-lesson__content {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  border-top: 1px solid var(--line);
}

.sow-detail {
  min-width: 0;
  padding: 16px 18px;
}

.sow-detail--objective {
  grid-column: 1 / -1;
}

.sow-detail--objective ~ .sow-detail {
  border-top: 1px solid var(--line);
}

.sow-detail--objective ~ .sow-detail:nth-child(2n) {
  border-left: 0;
}

.sow-detail--objective ~ .sow-detail:nth-child(2n + 1) {
  border-left: 1px solid var(--line);
}

.sow-detail:nth-child(even) {
  border-left: 1px solid var(--line);
}

.sow-detail:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.sow-detail h3 {
  margin: 0 0 7px;
  color: var(--navy-900);
  font-size: 0.78rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.sow-detail p,
.sow-detail ul {
  margin: 0;
  color: #263855;
  font-size: 0.88rem;
}

.sow-detail--homework p {
  white-space: pre-line;
}

.sow-detail ul {
  padding-left: 20px;
}

.sow-detail li + li {
  margin-top: 4px;
}

.sow-resource-link {
  color: var(--blue-700);
  font-weight: 700;
  text-underline-offset: 2px;
}

.sow-resource-link:hover {
  color: var(--navy-900);
}

.sow-resource-link:focus-visible {
  outline: 3px solid var(--yellow-400);
  outline-offset: 3px;
}

.sow-detail--terms ul {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 4px;
  padding-left: 0;
  list-style: none;
}

.sow-detail--terms li {
  display: flex;
  align-items: baseline;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.sow-detail--terms li + li {
  margin-top: 0;
}

.sow-detail--terms li::before {
  content: "•";
  flex: 0 0 auto;
  margin-right: 8px;
}

.sow-script-warning {
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 5px solid var(--yellow-400);
  background: #fffaf0;
}

@media (max-width: 1040px) {
  .sow-page__header {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .sow-summary {
    width: 100%;
  }

  .sow-summary div {
    min-width: 0;
  }

  .sow-journey ol {
    grid-template-columns: 1fr 1fr;
  }

  .sow-journey li:nth-child(3) {
    border-left: 0;
  }

  .sow-journey li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .sow-library__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .sow-course-list {
    gap: 12px;
  }

  .sow-course__header {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
    padding: 12px 14px;
  }

  .sow-course__summary {
    grid-column: 1;
    max-width: none;
    text-align: left;
  }

  .sow-course__header::after {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0 3px 4px 8px;
  }

  .resource-item--unavailable {
    grid-template-columns: 54px minmax(0, 1fr) auto;
  }

  .sow-year-divider {
    padding: 8px 14px;
  }

  .resource-item--unavailable .resource-item__copy {
    padding-left: 12px;
  }

  .resource-status {
    margin-right: 12px;
  }

  .sow-page {
    width: min(100% - 32px, var(--content-width));
    padding-top: 14px;
  }

  .sow-summary {
    grid-template-columns: 1fr 1fr;
  }

  .sow-summary div + div {
    border-left: 0;
  }

  .sow-source-documents__links {
    grid-template-columns: 1fr;
  }

  .sow-summary div:nth-child(even) {
    border-left: 1px solid var(--line);
  }

  .sow-summary div:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .sow-tab {
    min-height: 42px;
    padding: 9px 13px;
    font-size: 0.8rem;
  }

  .sow-panel__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .sow-journey ol {
    grid-template-columns: 1fr;
  }

  .sow-journey li + li,
  .sow-journey li:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .sow-lesson summary {
    grid-template-columns: 44px minmax(0, 1fr) 20px;
    gap: 11px;
    min-height: 70px;
    padding-right: 12px;
  }

  .sow-lesson__toggle {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .sow-lesson__summary-copy span {
    white-space: normal;
  }

  .sow-lesson__content {
    grid-template-columns: 1fr;
  }

  .sow-detail:nth-child(even) {
    border-left: 0;
  }

  .sow-detail--objective ~ .sow-detail {
    border-left: 0;
  }

  .sow-detail:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 460px) {
  .resource-item--unavailable {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .resource-item--unavailable .resource-status {
    grid-column: 2;
    width: fit-content;
    margin: 0 0 12px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sow-lesson__toggle::after {
    transition: none;
  }
}

@media print {
  .sow-tabs-wrap,
  .sow-panel__actions,
  .sow-main > .site-footer {
    display: none !important;
  }

  .sow-main,
  .sow-page {
    width: 100%;
    padding: 0;
    background: #ffffff;
  }

  .sow-panel[hidden] {
    display: block;
  }

  .sow-panel {
    break-before: page;
  }

  #panel-overview {
    break-before: auto;
  }

  .sow-lesson {
    break-inside: avoid;
  }

  .sow-lesson:not([open]) > .sow-lesson__content {
    display: grid;
  }
}

/* Resource map lesson SOW lightbox. */
.map-details-button, .map-sow-dialog__close {
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--blue-700);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.map-details-button:hover, .map-sow-dialog__close:hover {
  background: var(--blue-700);
  color: white;
}
body.map-modal-open { overflow: hidden; }
.map-sow-dialog {
  width: min(960px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  color: var(--navy-900);
  box-shadow: 0 24px 80px rgb(7 26 61 / 30%);
  overflow: hidden;
}
.map-sow-dialog[open] { display: flex; flex-direction: column; }
.map-sow-dialog::backdrop { background: rgb(7 18 42 / 65%); }
.map-sow-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  background: #f1f5fc;
  flex-shrink: 0;
}
.map-sow-dialog__context { margin: 0 0 8px; font-size: .85rem; }
.map-sow-dialog__header h2 { margin: 0; font-size: 1.35rem; line-height: 1.35; }
.map-sow-dialog__close { flex-shrink: 0; }
.map-sow-dialog__body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.map-sow-dialog .sow-detail { padding: 20px 24px; }
.map-sow-dialog .sow-detail ol { margin: 0; padding-left: 20px; font-size: .88rem; color: #263855; }
.map-sow-dialog__notice { padding: 24px; }
@media (max-width: 600px) {
  .map-sow-dialog__header { padding: 16px; gap: 12px; }
  .map-sow-dialog__header h2 { font-size: 1.1rem; }
  .map-sow-dialog .sow-lesson__content { grid-template-columns: minmax(0, 1fr); }
  .map-sow-dialog .sow-detail { padding: 16px; border-left: 0; }
}

/* Keep resource column headings below the shared navigation while scrolling. */
@media screen and (min-width: 821px) {
  :is(#ocr-resource-table, .course-resources__table) thead th {
    position: sticky;
    top: var(--map-header-offset, 0px);
    z-index: 20;
    box-shadow: inset 0 -1px var(--line), 0 2px 3px rgb(7 26 61 / 10%);
  }
}
@media screen and (max-width: 820px) {
  :is(#ocr-resource-table, .course-resources__table) .map-details-cell {
    grid-template-columns: 95px minmax(0, 1fr) !important;
  }
  :is(#ocr-resource-table, .course-resources__table) .map-details-cell::before { display: block; }
  :is(#ocr-resource-table, .course-resources__table) .map-details-button { justify-self: center; }
}

:is(#ocr-resource-table, .course-resources__table) .map-status-cell,
:is(#ocr-resource-table, .course-resources__table) .map-details-cell {
  text-align: center;
  vertical-align: middle;
}
@media screen and (max-width: 820px) {
  :is(#ocr-resource-table, .course-resources__table) .map-status-cell > * { justify-self: center; }
  :is(#ocr-resource-table, .course-resources__table) td::before { text-align: left; }
}

/* One visual treatment for every actionable resource-map control. */
:is(#ocr-resource-table, .course-resources__table) .status-pill--link,
:is(#ocr-resource-table, .course-resources__table) .map-details-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #22643b;
  border-radius: var(--radius-sm);
  background: #22643b;
  color: var(--paper);
  font: 700 0.88rem/1.4 Arial, Helvetica, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
:is(#ocr-resource-table, .course-resources__table) .status-pill--link:hover,
:is(#ocr-resource-table, .course-resources__table) .map-details-button:hover {
  background: #184b2c;
  border-color: #184b2c;
  color: var(--paper);
  text-decoration: none;
}
:is(#ocr-resource-table, .course-resources__table) .status-pill--link:focus-visible,
:is(#ocr-resource-table, .course-resources__table) .map-details-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.course-resources__resource-cell { justify-content: center; }
.course-resources__table th:last-child { width: 1%; white-space: nowrap; }

.course-resources__overview {
  margin: 16px 0;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-sm);
}
.course-resources__overview > summary { padding: 14px 18px; cursor: pointer; font-weight: 700; }
#course-overview-content { padding: 0 18px 18px; }
#course-overview-content .sow-summary { margin: 12px 0; }
#course-overview-content .sow-panel { border: 0; padding: 0; }

/* Shared compact header: breadcrumbs, brand and menu in one row. */
.site-header__inner--compact {
  display: flex;
  width: 100%;
  min-height: 48px;
  padding: 4px 20px;
  gap: 20px;
}
.site-header__inner--compact .site-breadcrumbs {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 4px 0;
  border: 0;
  overflow-x: auto;
}
.site-header__inner--compact .site-breadcrumbs ol { flex-wrap: nowrap; }
.site-header__inner--compact .site-name {
  position: static;
  transform: none;
  flex: 0 1 auto;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-header__inner--compact .site-nav { flex: 0 0 auto; margin: 0; gap: 10px; }
.site-header__inner--compact .site-menu__trigger { width: 36px; height: 36px; min-height: 36px; padding: 7px; }
.site-header__inner--compact .site-account-link { width: 36px; height: 36px; min-height: 36px; padding: 3px; }
.site-header__inner--compact .site-account-link__avatar { width: 28px; height: 28px; font-size: .7rem; }
@media (max-width: 720px) {
  .site-header__inner--compact { flex-direction: row; padding: 4px 10px; gap: 10px; }
  .site-header__inner--compact .site-name { max-width: 44%; font-size: .8rem; }
  .site-header__inner--compact .site-breadcrumbs { max-width: none; }
}

/* Keep each breadcrumb intact; the compact trail scrolls on narrow screens. */
.site-header__inner--compact .site-breadcrumbs li { flex-shrink: 0; white-space: nowrap; }
.site-header__inner--compact .site-breadcrumbs a { overflow-wrap: normal; }
