:root {
  --ink: #171b27;
  --muted: #5d6575;
  --line: #d8e2ec;
  --paper: #fffdf8;
  --soft: #eef8fa;
  --blue: #176b87;
  --green: #1f9d55;
  --gold: #d9a400;
  --rose: #c84648;
  --shadow: 0 22px 70px rgba(23, 27, 39, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:focus-visible {
  outline: 3px solid #0b65d8;
  outline-offset: 4px;
}

button:focus-visible {
  outline: 3px solid #0b65d8;
  outline-offset: 4px;
}

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

.skip-link {
  background: white;
  color: var(--ink);
  font-weight: 850;
  left: 16px;
  padding: 10px 14px;
  position: fixed;
  top: 12px;
  transform: translateY(-160%);
  z-index: 20;
}

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

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 56px);
}

.brand {
  align-items: center;
  color: var(--ink);
  display: inline-flex;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  align-items: center;
  background: var(--blue);
  border-radius: 12px;
  color: var(--paper);
  display: inline-flex;
  font-size: 1.55rem;
  font-weight: 900;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.2rem;
}

.brand small,
.top-nav a,
.lead,
.section-heading p,
.resource-card p,
.site-footer span {
  color: var(--muted);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.top-nav a {
  font-weight: 750;
  text-decoration: none;
}

.breadcrumb {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-weight: 750;
  gap: 9px;
}

.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.breadcrumb span {
  color: var(--muted);
}

main {
  overflow: hidden;
}

.section-width {
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
}

.hero {
  background: #eef6f8;
  border-bottom: 1px solid var(--line);
  padding: 34px clamp(18px, 4vw, 56px) 30px;
}

.hero-copy {
  margin: 0 auto;
}

.eyebrow {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 4.35rem;
  letter-spacing: 0;
  line-height: 1;
  margin-bottom: 14px;
}

h2 {
  font-size: 3.35rem;
  letter-spacing: 0;
  line-height: 1.04;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.45rem;
  line-height: 1.12;
  margin-bottom: 12px;
}

.lead {
  font-size: 1.2rem;
  max-width: 68ch;
}

.hero-kicker {
  color: var(--ink);
  font-size: 1.45rem;
  font-weight: 800;
  margin-bottom: 14px;
  max-width: 720px;
}

.hero .hero-kicker {
  max-width: 820px;
}

.hero .role-grid {
  margin-top: 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  border: 2px solid var(--blue);
  display: inline-flex;
  font-weight: 850;
  min-height: 48px;
  padding: 10px 16px;
  text-decoration: none;
}

.button.primary {
  background: var(--blue);
  color: white;
}

.button.secondary {
  background: transparent;
}

.role-chooser {
  padding: 42px clamp(18px, 4vw, 56px) 52px;
}

.role-heading {
  margin-bottom: 24px;
}

.role-heading h2 {
  font-size: 2.6rem;
  margin: 0;
}

.role-heading .eyebrow {
  margin-bottom: 8px;
}

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

.role-choice {
  background: white;
  border: 1px solid var(--line);
  border-top: 7px solid var(--blue);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 170px;
  padding: 18px 20px;
  text-decoration: none;
}

.teacher-choice {
  border-top-color: var(--green);
}

.parent-choice {
  border-top-color: var(--gold);
}

.role-choice:hover,
.role-choice:focus-visible {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.role-number,
.role-label {
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.teacher-choice .role-number,
.teacher-path .role-label {
  color: #13733d;
}

.parent-choice .role-number,
.parent-path .role-label {
  color: #8a6800;
}

.role-choice strong {
  font-size: 1.55rem;
  line-height: 1.1;
  margin: 8px 0 7px;
}

.role-choice small {
  color: var(--muted);
  font-size: 1rem;
}

.role-choice b {
  color: var(--blue);
  margin-top: auto;
  padding-top: 12px;
}

.teacher-choice b {
  color: #13733d;
}

.parent-choice b {
  color: #8a6800;
}

.hero-shortcuts {
  align-items: center;
  border-top: 1px solid rgba(23, 27, 39, 0.22);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-top: 18px;
  padding-top: 16px;
}

.hero-shortcuts a {
  color: var(--blue);
  font-weight: 800;
  text-underline-offset: 3px;
}

.product-preview {
  background: var(--ink);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.5fr);
  margin: 32px auto;
  max-width: 1200px;
  overflow: hidden;
  position: relative;
}

.product-preview img {
  display: block;
  height: auto;
  margin-inline: auto;
  max-width: 1280px;
  width: 100%;
}

.product-preview figcaption {
  align-content: center;
  background: var(--ink);
  color: #dce4eb;
  display: grid;
  font-size: 1.05rem;
  padding: 28px;
}

.product-preview figcaption strong {
  color: white;
}

.role-path {
  border-bottom: 1px solid var(--line);
}

.student-path {
  background: var(--paper);
}

.teacher-path {
  background: #eef8f1;
}

.parent-path {
  background: #fff8df;
}

.role-path-inner {
  align-items: start;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
  padding: 68px clamp(18px, 4vw, 56px);
}

.role-intro h2 {
  font-size: 2.55rem;
  margin-top: 10px;
}

.role-intro p {
  color: var(--muted);
  font-size: 1.08rem;
}

.path-links {
  border-bottom: 1px solid rgba(23, 27, 39, 0.22);
}

.path-links a {
  align-items: center;
  border-top: 1px solid rgba(23, 27, 39, 0.22);
  color: var(--ink);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1fr) auto;
  min-height: 92px;
  padding: 15px 12px;
  text-decoration: none;
}

.path-links a:hover,
.path-links a:focus-visible {
  background: rgba(255, 255, 255, 0.62);
}

.path-links span {
  color: var(--muted);
}

.path-links b {
  color: var(--blue);
  font-size: 1.5rem;
}

.status-strip {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-strip div {
  border-right: 1px solid var(--line);
  min-height: 112px;
  padding: 22px clamp(18px, 3vw, 34px);
}

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

.status-strip strong {
  color: var(--blue);
  display: block;
  font-size: 2.4rem;
  line-height: 1;
}

.status-strip span {
  color: var(--muted);
  display: block;
  font-weight: 700;
  margin-top: 8px;
}

.section {
  margin: 0 auto;
  max-width: 1200px;
  padding: clamp(52px, 7vw, 90px) clamp(18px, 4vw, 56px);
}

.section-heading {
  max-width: 790px;
}

.library-section {
  padding-top: 30px;
}

.shelf {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 28px;
}

.shelf-heading {
  align-items: baseline;
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}

.shelf-heading span {
  color: var(--blue);
  font-weight: 950;
}

.shelf-heading h3 {
  font-size: 2.1rem;
  margin-bottom: 0;
}

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

.library-grid {
  margin-top: 0;
}

.resource-card {
  background: white;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 24px;
}

.resource-card.featured {
  border-top: 7px solid var(--blue);
  box-shadow: 0 16px 42px rgba(23, 107, 135, 0.13);
}

.resource-card:nth-child(2) {
  border-top: 7px solid var(--green);
}

.resource-card:nth-child(3) {
  border-top: 7px solid var(--gold);
}

.muted-card {
  border-top: 7px solid var(--rose);
}

.tag {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.resource-card a {
  font-weight: 850;
  margin-top: auto;
}

.resource-links {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: auto;
}

.resource-card .resource-links a {
  margin-top: 0;
}

.resource-links .secondary-link {
  color: var(--muted);
  font-weight: 700;
}

.split-section {
  align-items: start;
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
}

.layer-list {
  border: 1px solid var(--line);
}

.layer-list div {
  align-items: baseline;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr) auto;
  padding: 18px 20px;
}

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

.layer-list strong {
  color: var(--blue);
  font-size: 1.1rem;
}

.layer-list span {
  color: var(--muted);
}

.layer-list b {
  background: #f0f6f8;
  color: var(--blue);
  font-size: 1.05rem;
  min-width: 42px;
  padding: 6px 10px;
  text-align: center;
}

.site-footer {
  align-items: center;
  background: var(--ink);
  color: white;
  display: flex;
  gap: 22px;
  justify-content: space-between;
  padding: 28px clamp(18px, 4vw, 56px);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer span {
  color: #cfd6df;
}

/* Mapiku avalehe ja rollivaadete kompaktne põhitee. */
.home-start {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 26px clamp(18px, 4vw, 56px) 30px;
}

.home-start h1 {
  font-size: 3.2rem;
  margin-bottom: 8px;
}

.home-lead {
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 20px;
}

.release-status {
  border: 1px solid var(--accent);
  color: var(--accent);
  display: inline-block;
  font-size: 0.74em;
  font-weight: 800;
  margin-right: 8px;
  padding: 2px 7px;
  text-transform: uppercase;
}

.home-start .role-choice {
  border-top-width: 5px;
  min-height: 124px;
  padding: 14px 18px;
}

.home-start .role-choice strong {
  font-size: 1.45rem;
  margin: 0 0 5px;
}

.home-start .role-choice b {
  padding-top: 8px;
}

body[data-mapik-view="home"] { background: #ffffff; }
.home-start .student-choice { background: #f1f8fc; }
.home-start .teacher-choice { background: #eff9f2; }
.home-start .parent-choice { background: #fff9e8; }

.home-start .game-choice {
  align-items: center;
  border-top-color: var(--rose);
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 320px;
  margin: 16px auto 0;
  max-width: 920px;
  min-height: 142px;
}

.game-choice > span {
  min-width: 0;
}

.game-choice > span > strong,
.game-choice > span > small {
  display: block;
}

.home-start .game-choice b {
  color: #a82e31;
  display: block;
}

.game-choice img {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  display: block;
  height: auto;
  object-fit: cover;
  width: 100%;
}

.home-direct,
.home-library,
.role-more {
  padding-left: clamp(18px, 4vw, 56px);
  padding-right: clamp(18px, 4vw, 56px);
}

.home-activities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 20px; }
.home-activity { min-width: 0; border-top: 3px solid var(--rose); padding-top: 12px; }
.home-activity.explore-choice { border-color: var(--blue); }
.home-activity.presentation-choice { border-color: var(--green); }
.teacher-presentation-links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 18px 0; }
.activity-choice { display: grid; grid-template-columns: minmax(0, 1fr) 112px; align-items: center; gap: 12px; text-decoration: none; }
.activity-choice strong { display: block; font-size: 1.3rem; }
.activity-choice small { display: block; color: var(--muted); margin-top: 6px; }
.activity-choice img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: white; }
.activity-shortcut { display: inline-block; margin-top: 10px; }
.catalog-collections { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.catalog-collections button { border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 10px 14px; color: inherit; font: inherit; cursor: pointer; }
.catalog-collections button[aria-pressed="true"] { border-bottom-color: var(--blue); background: var(--soft); font-weight: 700; }
.catalog-shortcuts { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 0; }
.catalog-results a.has-preview { grid-template-columns: minmax(0, 1fr) 150px; column-gap: 14px; }
.catalog-results a.has-preview > :not(img) { grid-column: 1; }
.catalog-preview { grid-column: 2; grid-row: 1 / span 4; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; background: white; }
.catalog-results li { display: flow-root; }
@media (max-width: 1000px) {
  .home-activities { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .activity-choice { grid-template-columns: minmax(0, 1fr) 112px; }
  .catalog-results a.has-preview { grid-template-columns: minmax(0, 1fr); }
  .catalog-preview { grid-column: 1; grid-row: auto; max-height: 150px; }
}

.home-direct {
  padding-bottom: 30px;
  padding-top: 30px;
}

.home-daily {
  background: #fff2bd;
  border-bottom: 1px solid #e4cf78;
  border-top: 1px solid #e4cf78;
}

.home-daily-inner {
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.6fr);
  padding: 24px clamp(18px, 4vw, 56px) 26px;
}

.home-daily-heading {
  align-content: start;
  display: grid;
  gap: 8px;
}

.home-daily-heading .eyebrow {
  color: #755800;
  margin-bottom: 0;
}

.home-daily-heading h2 {
  font-size: 1.55rem;
  margin-bottom: 0;
}

.home-daily-copy {
  align-self: center;
}

.home-daily-copy p {
  font-size: 1.06rem;
  margin-bottom: 8px;
}

.home-daily-copy .daily-math-example {
  border-left: 3px solid var(--blue);
  color: #3f4858;
  font-weight: 750;
  margin-bottom: 0;
  padding-left: 12px;
}

.daily-math-next {
  background: transparent;
  border: 1px solid #8a6b00;
  color: #5e4900;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  justify-self: start;
  min-height: 38px;
  padding: 6px 12px;
}

.daily-math-next:hover {
  background: #fff9df;
}

.home-library {
  padding-bottom: 44px;
  padding-top: 12px;
}

.home-curriculum {
  padding-bottom: 24px;
}

.home-curriculum-intro {
  color: var(--muted);
  margin: 0 0 11px;
  max-width: 72ch;
}

.home-curriculum-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.curriculum-law-links {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  gap: 5px 18px;
  margin-top: 12px;
}

.curriculum-law-links span {
  color: var(--muted);
  font-weight: 750;
}

.curriculum-law-links a {
  font-weight: 750;
}

.home-catalog {
  padding: 34px clamp(18px, 4vw, 56px) 44px;
}

.home-visitor {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 9px 0 0;
}

.site-footer .home-visitor span {
  color: white;
  display: inline;
  font-weight: 750;
}

.home-visitor a {
  color: #9dd8e7;
  font-size: 0.9rem;
}

.home-catalog-link {
  align-items: center;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 17px 16px;
  text-decoration: none;
}

.home-catalog-link:hover,
.home-catalog-link:focus-visible {
  background: var(--soft);
}

.home-catalog-link small,
.home-catalog-link strong {
  display: block;
}

.home-catalog-link small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.home-catalog-link strong {
  color: var(--blue);
  font-size: 1.25rem;
}

.home-catalog-link b {
  color: var(--blue);
  white-space: nowrap;
}

.compact-heading {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 13px;
}

.compact-heading h2 {
  font-size: 1.65rem;
  margin-bottom: 0;
}

.compact-heading .eyebrow {
  margin-bottom: 5px;
}

.compact-heading a {
  font-weight: 800;
  white-space: nowrap;
}

.library-subheading {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-top: 24px;
}

.library-subheading-first {
  margin-top: 0;
}

.library-subheading h3 {
  font-size: 1.35rem;
  margin: 0;
}

.library-subheading .eyebrow {
  margin-bottom: 4px;
}

.library-subheading > p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 2px;
  max-width: 58ch;
  text-align: right;
}

.curriculum-links {
  margin-top: 11px;
}

.informatics-links {
  margin-top: 11px;
}

.direct-grid,
.library-links,
.material-choice-grid,
.quick-links {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.mathematics-links,
.terminology-links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 11px;
}

.mathematics-links > a:nth-child(3n),
.terminology-links > a:nth-child(3n) {
  border-right: 0;
}

.mathematics-links > a:nth-child(-n + 3) {
  border-bottom: 1px solid var(--line);
}

.direct-grid > a,
.library-links > a,
.material-choice-grid > a,
.quick-links > a {
  border-right: 1px solid var(--line);
  color: var(--ink);
  display: block;
  min-width: 0;
  padding: 14px 16px;
  text-decoration: none;
}

.direct-grid > a:last-child,
.library-links > a:last-child,
.material-choice-grid > a:last-child,
.quick-links > a:last-child {
  border-right: 0;
}

.direct-grid > a:hover,
.direct-grid > a:focus-visible,
.library-links > a:hover,
.library-links > a:focus-visible,
.material-choice-grid > a:hover,
.material-choice-grid > a:focus-visible,
.quick-links > a:hover,
.quick-links > a:focus-visible {
  background: var(--soft);
}

.direct-grid strong,
.direct-grid span,
.direct-grid small,
.library-links strong,
.library-links span,
.material-choice-grid strong,
.material-choice-grid span,
.quick-links strong,
.quick-links span {
  display: block;
}

.direct-grid strong,
.library-links strong,
.material-choice-grid strong,
.quick-links strong {
  color: var(--blue);
  font-size: 1.03rem;
  line-height: 1.25;
}

.direct-grid span,
.direct-grid small,
.library-links span,
.material-choice-grid span,
.quick-links span {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 5px;
}

.role-switcher {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  justify-content: flex-end;
}

.role-page {
  --role-color: #176b87;
  --role-soft: #eef8fb;
}

.teacher-page {
  --role-color: #2f6f4e;
  --role-soft: #eef7f1;
}

.parent-page {
  --role-color: #7a5200;
  --role-soft: #fff7df;
}

.role-page .site-header {
  border-top: 4px solid var(--role-color);
}

.role-switcher-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.role-switcher a,
.role-switcher strong {
  color: var(--blue);
  font-weight: 800;
  padding: 5px 0;
  text-decoration: none;
}

.role-switcher strong {
  background: var(--role-soft);
  border-left: 4px solid var(--role-color);
  color: var(--role-color);
  padding: 5px 9px;
}

.role-start {
  background: var(--role-soft);
  border-bottom: 1px solid var(--line);
  padding: 22px 0 28px;
}

.role-start .section-width {
  padding-left: clamp(18px, 4vw, 56px);
  padding-right: clamp(18px, 4vw, 56px);
}

.role-title .eyebrow {
  color: var(--role-color);
  margin-bottom: 3px;
}

.role-title h1 {
  color: var(--role-color);
  font-size: 2.75rem;
  margin-bottom: 7px;
}

.role-title > p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 0;
  max-width: 78ch;
}

.role-tools-grid {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  margin-top: 20px;
}

.teacher-tools-grid {
  grid-template-columns: minmax(430px, 1fr) minmax(280px, 0.72fr);
}

.quick-choice,
.topic-search {
  border-top: 4px solid var(--role-color);
  margin: 0;
  padding-top: 10px;
}

.quick-choice[id] {
  scroll-margin-top: 24px;
}

.quick-choice h2,
.topic-search h2,
.material-choice h2 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.grade-strip {
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.grade-strip a {
  align-items: center;
  background: white;
  border-right: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  font-size: 1.05rem;
  font-weight: 850;
  justify-content: center;
  min-height: 48px;
  min-width: 0;
  text-decoration: none;
}

.grade-strip a:last-child {
  border-right: 0;
}

.grade-strip a:hover,
.grade-strip a:focus-visible {
  background: white;
  color: var(--blue);
  outline-offset: -3px;
}

.topic-search label {
  color: var(--muted);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
}

.search-row input,
.search-row button {
  border: 1px solid #9eacba;
  border-radius: 0;
  font: inherit;
  min-height: 46px;
}

.search-row input {
  min-width: 0;
  padding: 8px 10px;
}

.search-row button {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
  cursor: pointer;
  font-weight: 850;
  padding: 8px 16px;
}

.search-row input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(11, 101, 216, 0.2);
  outline-offset: 1px;
}

.search-help {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 8px 0 0;
}

.material-choice {
  margin-top: 18px;
}

.material-choice-grid > a {
  min-height: 76px;
  padding-bottom: 11px;
  padding-top: 11px;
}

.role-more {
  padding-bottom: 42px;
  padding-top: 28px;
}

.quick-links > a {
  min-height: 90px;
}

.help-questions {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-questions li {
  border-right: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: 28px minmax(0, 1fr);
  padding: 14px;
}

.help-questions li:last-child {
  border-right: 0;
}

.help-questions span {
  color: #7b5e00;
  font-size: 1.1rem;
  font-weight: 900;
}

.help-questions strong {
  line-height: 1.35;
}

.support-note {
  border-left: 5px solid var(--gold);
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 90ch;
  padding: 5px 0 5px 14px;
}

.role-page .teacher-class-row {
  min-height: 38px;
  padding: 4px;
}

.role-page .teacher-class-row a {
  min-width: 68px;
  padding: 4px 8px;
}

.catalog-page .catalog-head {
  padding-bottom: 18px;
  padding-top: 20px;
}

.catalog-page .catalog-head h1 {
  font-size: 2.35rem;
  margin-bottom: 7px;
}

.catalog-page .catalog-head .eyebrow {
  margin-bottom: 5px;
}

.catalog-page .catalog-head .hero-kicker {
  font-size: 1rem;
  margin-bottom: 0;
}

.catalog-page .catalog-workspace {
  padding-top: 22px;
}

.role-page-head {
  background: #eef6f8;
  border-bottom: 1px solid var(--line);
  padding: 28px clamp(18px, 4vw, 56px) 24px;
}

.role-page-head h1 {
  font-size: 3rem;
  margin-bottom: 10px;
}

.role-page-head .hero-kicker {
  max-width: 860px;
}

.activity-jumps {
  border-bottom: 1px solid rgba(23, 27, 39, 0.24);
  border-top: 1px solid rgba(23, 27, 39, 0.24);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.activity-jumps a {
  border-right: 1px solid rgba(23, 27, 39, 0.24);
  color: var(--ink);
  min-height: 66px;
  padding: 11px 16px;
  text-decoration: none;
}

.activity-jumps a:last-child {
  border-right: 0;
}

.activity-jumps a:hover,
.activity-jumps a:focus-visible {
  background: white;
}

.activity-jumps strong,
.activity-jumps span {
  display: block;
}

.activity-jumps strong {
  color: var(--blue);
  font-size: 1.15rem;
}

.activity-jumps span {
  color: var(--muted);
  margin-top: 3px;
}

.student-section {
  padding: 58px clamp(18px, 4vw, 56px);
}

.student-section[id],
.teacher-section[id],
.parent-section[id] {
  scroll-margin-top: 24px;
}

.student-section-heading {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: 54px minmax(0, 1fr);
  margin-bottom: 30px;
  max-width: 900px;
}

.student-section-heading h2 {
  font-size: 2.65rem;
  margin-bottom: 10px;
}

.student-section-heading p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 0;
}

.step-number {
  border-top: 5px solid var(--blue);
  color: var(--blue);
  font-size: 1.15rem;
  font-weight: 950;
  padding-top: 8px;
}

.school-stage {
  align-items: start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
  padding: 22px 0;
}

.school-stage h3 {
  font-size: 1.2rem;
  margin: 10px 0 0;
}

.class-links {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  max-width: 720px;
}

.class-links a {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 88px;
  text-decoration: none;
}

.class-links a:hover,
.class-links a:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 8px 22px rgba(23, 107, 135, 0.13);
}

.class-links strong {
  color: var(--blue);
  font-size: 1.55rem;
  line-height: 1;
}

.class-links span {
  color: var(--muted);
  font-size: 0.82rem;
}

.student-band {
  background: #eef8f1;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  max-width: none;
}

.student-band-inner {
  margin: 0 auto;
}

.student-route-list {
  border-bottom: 1px solid rgba(23, 27, 39, 0.22);
}

.student-route-list a {
  align-items: center;
  border-top: 1px solid rgba(23, 27, 39, 0.22);
  color: var(--ink);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(190px, 0.55fr) minmax(0, 1fr) auto;
  min-height: 84px;
  padding: 14px 12px;
  text-decoration: none;
}

.student-route-list a:hover,
.student-route-list a:focus-visible {
  background: rgba(255, 255, 255, 0.72);
}

.student-route-list span {
  color: var(--muted);
}

.student-route-list b {
  border: 1px solid currentColor;
  color: var(--blue);
  padding: 8px 12px;
  white-space: nowrap;
}

.teacher-page-head {
  background: #eef8f1;
}

.teacher-page .eyebrow,
.teacher-page .activity-jumps strong,
.teacher-page .step-number {
  color: #13733d;
}

.teacher-page .step-number {
  border-top-color: var(--green);
}

.teacher-section {
  padding: 42px clamp(18px, 4vw, 56px);
}

.teacher-section-heading {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: 54px minmax(0, 1fr);
  margin-bottom: 30px;
  max-width: 920px;
}

.teacher-section-heading h2 {
  font-size: 2.65rem;
  margin-bottom: 10px;
}

.teacher-section-heading p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 0;
}

.teacher-class-list {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.teacher-class-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(100px, 1fr) auto auto auto;
  min-height: 64px;
  padding: 9px 4px;
}

.teacher-class-row a {
  border: 1px solid var(--line);
  font-weight: 800;
  min-width: 76px;
  padding: 7px 10px;
  text-align: center;
  text-decoration: none;
}

.teacher-class-row a:hover,
.teacher-class-row a:focus-visible {
  background: #eef8f1;
  border-color: var(--green);
}

.teacher-band {
  background: #eef8f1;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  max-width: none;
}

.teacher-band-inner {
  margin: 0 auto;
}

.teacher-route-list {
  border-bottom: 1px solid rgba(23, 27, 39, 0.22);
}

.teacher-route-list a {
  align-items: center;
  border-top: 1px solid rgba(23, 27, 39, 0.22);
  color: var(--ink);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(210px, 0.58fr) minmax(0, 1fr) auto;
  min-height: 84px;
  padding: 14px 12px;
  text-decoration: none;
}

.teacher-route-list a:hover,
.teacher-route-list a:focus-visible {
  background: rgba(255, 255, 255, 0.72);
}

.teacher-route-list span,
.teacher-layer-grid span {
  color: var(--muted);
}

.teacher-route-list b {
  border: 1px solid currentColor;
  color: #13733d;
  padding: 8px 12px;
  white-space: nowrap;
}

.teacher-layer-grid {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teacher-layer-grid a {
  border-right: 1px solid var(--line);
  color: var(--ink);
  min-height: 150px;
  padding: 22px;
  text-decoration: none;
}

.teacher-layer-grid a:last-child {
  border-right: 0;
}

.teacher-layer-grid a:hover,
.teacher-layer-grid a:focus-visible {
  background: #eef8f1;
}

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

.teacher-layer-grid strong {
  color: #13733d;
  font-size: 1.15rem;
  margin-bottom: 9px;
}

.parent-page-head {
  background: #fff8df;
}

.parent-page .eyebrow,
.parent-page .activity-jumps strong,
.parent-page .step-number {
  color: #7b5e00;
}

.parent-page .step-number {
  border-top-color: var(--gold);
}

.parent-section {
  padding: 58px clamp(18px, 4vw, 56px);
}

.parent-section-heading {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: 54px minmax(0, 1fr);
  margin-bottom: 30px;
  max-width: 930px;
}

.parent-section-heading h2 {
  font-size: 2.65rem;
  margin-bottom: 10px;
}

.parent-section-heading p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
  margin-bottom: 0;
}

.parent-class-links {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(76px, 1fr));
}

.parent-class-links a {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 86px;
  text-decoration: none;
}

.parent-class-links a:hover,
.parent-class-links a:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 8px 22px rgba(217, 164, 0, 0.14);
}

.parent-class-links strong {
  color: #7b5e00;
  font-size: 1.5rem;
  line-height: 1;
}

.parent-class-links span {
  color: var(--muted);
  font-size: 0.82rem;
}

.parent-band {
  background: #fff8df;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  max-width: none;
}

.parent-band-inner {
  margin: 0 auto;
}

.support-table {
  border-bottom: 1px solid rgba(23, 27, 39, 0.22);
}

.support-row {
  align-items: center;
  border-top: 1px solid rgba(23, 27, 39, 0.22);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(210px, 0.62fr) minmax(0, 1fr) auto;
  min-height: 86px;
  padding: 14px 12px;
}

.support-row span {
  color: var(--muted);
}

.support-row a {
  border: 1px solid currentColor;
  color: #7b5e00;
  font-weight: 800;
  padding: 8px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.support-row a:hover,
.support-row a:focus-visible {
  background: white;
}

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

.parent-questions li {
  align-items: center;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: 48px minmax(0, 1fr);
  min-height: 72px;
  padding: 10px 4px;
}

.parent-questions li:last-child {
  border-bottom: 1px solid var(--line);
}

.parent-questions span {
  color: #7b5e00;
  font-size: 1.35rem;
  font-weight: 950;
  text-align: center;
}

.parent-questions strong {
  font-size: 1.12rem;
}

.support-boundary {
  border-left: 6px solid var(--gold);
  margin-top: 28px;
  max-width: 880px;
  padding: 5px 0 5px 18px;
}

.support-boundary p {
  color: var(--muted);
  margin: 6px 0 0;
}

.catalog-head {
  background: #eef6f8;
  border-bottom: 1px solid var(--line);
  padding: 42px clamp(18px, 4vw, 56px) 36px;
}

.catalog-head h1 {
  font-size: 3.5rem;
  margin-bottom: 14px;
}

.catalog-workspace {
  padding: 38px clamp(18px, 4vw, 56px) 68px;
}

.catalog-filters {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr));
  padding-bottom: 24px;
}

.catalog-field {
  display: grid;
  gap: 6px;
}

.catalog-field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.catalog-field input,
.catalog-field select,
.catalog-reset,
.catalog-share,
.catalog-more {
  background: white;
  border: 1px solid #aebbc8;
  border-radius: 0;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 9px 11px;
}

.catalog-field input:focus,
.catalog-field select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(11, 101, 216, 0.2);
  outline-offset: 1px;
}

.catalog-reset,
.catalog-share,
.catalog-more {
  color: var(--blue);
  cursor: pointer;
  font-weight: 850;
}

.catalog-reset:hover,
.catalog-share:hover,
.catalog-more:hover,
.catalog-reset:focus-visible,
.catalog-share:focus-visible,
.catalog-more:focus-visible {
  background: var(--soft);
  border-color: var(--blue);
}

.catalog-summary {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 64px;
}

.catalog-summary output {
  color: var(--muted);
  font-weight: 800;
}

.catalog-summary-copy {
  display: grid;
  gap: 4px;
}

.catalog-active-filters {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  max-width: 72ch;
}

.catalog-share-status {
  color: #13733d;
  font-weight: 800;
  text-align: right;
}

.catalog-share-status[data-state="error"] {
  color: #a12a24;
}

.catalog-share-feedback {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.catalog-share-fallback {
  background: white;
  border: 1px solid #aebbc8;
  color: var(--ink);
  font: inherit;
  max-width: min(520px, 60vw);
  min-height: 42px;
  padding: 7px 9px;
  width: 520px;
}

.catalog-share-fallback:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgba(11, 101, 216, 0.2);
  outline-offset: 1px;
}

.catalog-results {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.catalog-results li {
  border-top: 1px solid var(--line);
  min-width: 0;
}

.catalog-results a {
  color: var(--ink);
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 17px 10px;
  text-decoration: none;
}

.catalog-results a:hover,
.catalog-results a:focus-visible {
  background: var(--soft);
}

.catalog-results strong {
  color: var(--blue);
  font-size: 1.08rem;
  line-height: 1.25;
}

.catalog-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 0 18px 12px;
}

.catalog-results .catalog-result-actions a {
  display: inline;
  min-height: 0;
  padding: 4px 0;
  font-weight: 700;
}

.catalog-result-meta,
.catalog-result-summary,
.catalog-result-tags {
  color: var(--muted);
  font-size: 0.9rem;
}

.catalog-result-summary {
  color: var(--ink);
  font-size: 0.96rem;
  line-height: 1.42;
}

.catalog-result-tags {
  font-weight: 750;
}

.catalog-more {
  margin-top: 24px;
}

.catalog-empty {
  border-left: 6px solid var(--gold);
  color: var(--muted);
  margin-top: 12px;
  padding: 14px 18px;
}

.feedback-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.feedback-link {
  background: white;
  color: var(--ink);
  flex: 0 0 auto;
  font-weight: 850;
  padding: 10px 16px;
  text-decoration: none;
}

.error-main {
  min-height: 620px;
  padding: 88px clamp(18px, 4vw, 56px);
}

.error-main h1 {
  font-size: 3.5rem;
  max-width: 820px;
}

.error-main .hero-kicker {
  max-width: 720px;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0 58px;
}

.error-routes {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.error-routes a {
  color: var(--ink);
  display: grid;
  gap: 6px;
  min-height: 130px;
  padding: 22px;
  text-decoration: none;
}

.error-routes a + a {
  border-left: 1px solid var(--line);
}

.error-routes a:hover,
.error-routes a:focus-visible {
  background: var(--soft);
}

.error-routes strong {
  color: var(--blue);
  font-size: 1.16rem;
}

.error-routes span {
  color: var(--muted);
}

.terminology-workspace {
  padding-bottom: 72px;
  padding-top: 30px;
}

.terminology-filter {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.34fr) auto;
  padding-bottom: 20px;
}

.terminology-filter label {
  display: grid;
  gap: 7px;
}

.terminology-filter label span {
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.terminology-filter input,
.terminology-filter select {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink);
  font: inherit;
  min-height: 48px;
  padding: 10px 13px;
  width: 100%;
}

.terminology-filter button {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--teal-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 48px;
  padding: 10px 16px;
}

.terminology-summary {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 58px;
}

.terminology-summary output {
  font-weight: 800;
}

.terminology-summary nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.terminology-summary a {
  color: var(--teal-dark);
  font-weight: 800;
}

.terminology-section {
  border-top: 5px solid var(--teal);
  padding-top: 24px;
}

.terminology-section + .terminology-section {
  margin-top: 64px;
}

.terminology-questions {
  border-top-color: #a65318;
}

.terminology-rules {
  border-top-color: var(--amber);
}

.terminology-section-head {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.terminology-section-head h2,
.terminology-section-head p {
  margin-bottom: 0;
}

.terminology-section-head > strong {
  color: var(--ink-soft);
  white-space: nowrap;
}

.terminology-table-wrap {
  border: 1px solid var(--line);
  margin-top: 18px;
  max-width: 100%;
  overflow: auto;
}

.terminology-table {
  border-collapse: collapse;
  font-size: 0.93rem;
  line-height: 1.45;
  min-width: 1180px;
  width: 100%;
}

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

.terminology-table th {
  background: #eaf4f6;
  color: var(--ink);
  font-size: 0.8rem;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 1;
}

.terminology-table tbody tr:nth-child(even) {
  background: #f8faf9;
}

.terminology-table td:nth-child(1) {
  color: var(--ink-soft);
  font-weight: 700;
  width: 10%;
}

.terminology-table td:nth-child(2),
.terminology-table td:nth-child(3) {
  font-weight: 800;
  width: 13%;
}

.terminology-table td:nth-child(4),
.terminology-table td:nth-child(5) {
  width: 24%;
}

.terminology-table tr:target {
  outline: 3px solid var(--amber);
  outline-offset: -3px;
  scroll-margin-top: 16px;
}

.terminology-permalink {
  color: var(--teal-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.terminology-permalink:hover,
.terminology-permalink:focus-visible {
  color: var(--blue);
  text-decoration-thickness: 2px;
}

.question-table td:last-child {
  color: #87400f;
  font-weight: 800;
  white-space: nowrap;
}

.usage-rule-table {
  min-width: 760px;
}

.usage-rule-table td:nth-child(1),
.usage-rule-table td:nth-child(2) {
  width: 25%;
}

.usage-rule-table td:nth-child(3) {
  width: auto;
}

.terminology-empty {
  border-left: 4px solid var(--amber);
  padding: 12px 16px;
}

.project-head {
  background: #eef6f8;
  border-bottom: 1px solid var(--line);
  padding: 34px clamp(18px, 4vw, 56px) 30px;
}

.project-head h1 {
  font-size: 3.4rem;
  margin-bottom: 10px;
}

.project-head .hero-kicker {
  max-width: 820px;
}

.project-content {
  max-width: 960px;
  padding: 10px clamp(18px, 4vw, 56px) 54px;
}

.project-section {
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}

.project-section:last-child {
  border-bottom: 0;
}

.project-section h2 {
  font-size: 2rem;
  margin-bottom: 14px;
}

.project-section p {
  max-width: 78ch;
}

.environments-head .hero-kicker {
  max-width: 900px;
}

.environments-content {
  max-width: 1180px;
}

.environment-section-heading {
  align-items: end;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.environment-section-heading h2,
.environment-section-heading p {
  margin-bottom: 0;
}

.environment-section-heading > p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 34rem;
  text-align: right;
}

.environment-list {
  border-bottom: 1px solid var(--line);
}

.environment-entry {
  align-items: start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 18px 28px;
  grid-template-columns: minmax(245px, 0.72fr) minmax(300px, 1fr) auto;
  padding: 20px 0;
}

.environment-entry h2,
.environment-entry h3 {
  font-size: 1.25rem;
  margin: 4px 0 7px;
}

.english-collections-page .project-head {
  padding-block: 22px;
}

.english-collections-page .project-head h1 {
  font-size: 2rem;
}

.english-collections-page .project-section {
  padding-block: 20px;
}

.environment-entry > p {
  margin: 2px 0 0;
}

.environment-meta,
.environment-author,
.environment-note {
  color: var(--muted);
  font-size: 0.88rem;
}

.environment-meta {
  color: var(--blue);
  font-weight: 850;
  margin: 0;
}

.environment-author {
  margin: 0;
}

.environment-open,
.primary-link {
  border: 1px solid currentColor;
  color: var(--blue);
  display: inline-block;
  font-weight: 850;
  padding: 9px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.environment-open:hover,
.environment-open:focus-visible,
.primary-link:hover,
.primary-link:focus-visible {
  background: var(--soft);
}

.environment-submit .environment-note {
  border-left: 4px solid var(--line);
  margin-top: 22px;
  padding-left: 14px;
}

.curriculum-path-head .hero-kicker {
  max-width: 900px;
}

.curriculum-page-nav {
  border-bottom: 1px solid rgba(23, 27, 39, 0.24);
  border-top: 1px solid rgba(23, 27, 39, 0.24);
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 24px;
}

.curriculum-page-nav a {
  border-right: 1px solid rgba(23, 27, 39, 0.24);
  color: var(--ink);
  font-weight: 800;
  padding: 11px 16px;
  text-decoration: none;
}

.curriculum-page-nav a:last-child {
  border-right: 0;
}

.curriculum-path-content {
  max-width: 1120px;
}

.track-comparison {
  border-bottom: 1px solid var(--line);
  margin: 24px 0 0;
}

.track-comparison > div {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(130px, 0.55fr) repeat(2, minmax(0, 1fr));
  margin: 0;
}

.track-comparison dt,
.track-comparison dd {
  margin: 0;
  padding: 14px 16px;
}

.track-comparison dt {
  font-weight: 850;
}

.track-comparison dd {
  border-left: 1px solid var(--line);
}

.track-comparison dd strong {
  display: none;
}

.track-comparison-head {
  background: #eef3f6;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 850;
}

.curriculum-clarification,
.source-use-note {
  border-left: 5px solid var(--blue);
  margin-top: 26px;
  padding: 14px 0 14px 18px;
}

.curriculum-clarification h3,
.source-use-note h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.curriculum-clarification ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.curriculum-clarification li + li {
  margin-top: 7px;
}

.course-section-heading {
  align-items: end;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.course-section-heading h2,
.course-section-heading p {
  margin-bottom: 0;
}

.course-section-heading p {
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 41rem;
}

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

.course-list > li {
  align-items: baseline;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px 18px;
  grid-template-columns: 48px minmax(245px, 0.85fr) minmax(300px, 1.15fr);
  padding: 15px 0;
}

.course-number {
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 900;
}

.course-list > li > strong {
  line-height: 1.35;
}

.course-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.course-links a {
  font-size: 0.9rem;
  font-weight: 750;
}

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

.curriculum-source-list li {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 13px 0;
}

.curriculum-source-list a {
  font-weight: 800;
}

.curriculum-source-list span,
.source-checked {
  color: var(--muted);
  font-size: 0.9rem;
}

.source-use-note p:last-child {
  margin-bottom: 0;
}

.license-text {
  background: #f7fafb;
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 14px 0 0;
  max-height: 24rem;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
}

.project-credit {
  background: #eef8fa;
  border-left: 5px solid var(--blue);
  margin: 18px 0;
  padding: 16px 20px;
}

.project-credit p {
  margin-bottom: 6px;
}

.project-credit p:last-child {
  margin-bottom: 0;
}

.project-principles {
  margin: 0;
  padding-left: 1.3rem;
}

.project-principles li + li {
  margin-top: 8px;
}

.project-section-heading {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.project-section-heading h2,
.project-section-heading p {
  margin-bottom: 0;
}

.project-history-source {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  max-width: 26rem;
  text-align: right;
}

.project-milestones,
.project-commit-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.project-milestones li {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 20px;
  grid-template-columns: 110px minmax(0, 1fr);
  padding: 16px 0;
}

.project-milestones time,
.project-commit-meta {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.project-milestones p {
  color: var(--muted);
  margin: 4px 0 0;
}

.commit-history {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin-top: 18px;
}

.commit-history summary {
  color: var(--blue);
  cursor: pointer;
  font-weight: 850;
  padding: 17px 0;
}

.project-commit-list {
  margin-top: 0;
}

.project-commit-list > li {
  border-top: 1px solid var(--line);
  padding: 15px 0;
}

.project-commit-list strong {
  display: block;
  margin-top: 5px;
}

.project-commit-list p {
  color: var(--muted);
  margin: 4px 0 0;
}

.project-commit-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-commit-meta code,
.project-tag {
  background: #eef3f6;
  color: var(--ink);
  padding: 2px 6px;
}

.project-tag {
  font-size: 0.75rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .error-routes {
    grid-template-columns: 1fr;
  }

  .error-routes a {
    min-height: 0;
  }

  .error-routes a + a {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .split-section,
  .role-path-inner,
  .product-preview {
    grid-template-columns: 1fr;
  }

  .status-strip,
  .card-grid,
  .role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parent-choice {
    grid-column: 1 / -1;
  }

  .role-path-inner {
    gap: 28px;
  }

  .status-strip div:nth-child(2) {
    border-right: 0;
  }

  .school-stage {
    grid-template-columns: 1fr;
  }

  .class-links {
    grid-template-columns: repeat(3, minmax(76px, 1fr));
  }

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

  .teacher-layer-grid {
    grid-template-columns: 1fr;
  }

  .teacher-layer-grid a {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    min-height: 0;
  }

  .teacher-layer-grid a:last-child {
    border-bottom: 0;
  }

  .parent-class-links {
    grid-template-columns: repeat(4, minmax(70px, 1fr));
  }

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

  .search-field {
    grid-column: 1 / -1;
  }

  .project-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .project-history-source {
    text-align: left;
  }

  .course-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .course-list > li {
    grid-template-columns: 42px minmax(190px, 0.8fr) minmax(240px, 1.2fr);
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 3.15rem;
  }

  h2 {
    font-size: 2.4rem;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .breadcrumb {
    font-size: 0.94rem;
  }

  .project-head h1 {
    font-size: 2.55rem;
  }

  .project-milestones li {
    gap: 5px;
    grid-template-columns: 1fr;
  }

  .curriculum-page-nav {
    display: grid;
    grid-template-columns: 1fr;
  }

  .curriculum-page-nav a,
  .curriculum-page-nav a:last-child {
    border-bottom: 1px solid rgba(23, 27, 39, 0.24);
    border-right: 0;
  }

  .curriculum-page-nav a:last-child {
    border-bottom: 0;
  }

  .track-comparison-head {
    display: none !important;
  }

  .track-comparison > div {
    grid-template-columns: 1fr;
    padding: 14px 0;
  }

  .track-comparison dt,
  .track-comparison dd {
    border: 0;
    padding: 4px 0;
  }

  .track-comparison dd strong {
    color: var(--blue);
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
  }

  .course-list > li {
    align-items: start;
    gap: 5px 10px;
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 14px 0;
  }

  .course-links {
    grid-column: 2;
  }

  .error-main {
    min-height: 0;
    padding-bottom: 58px;
    padding-top: 58px;
  }

  .error-main h1 {
    font-size: 2.75rem;
  }

  .hero {
    min-height: 0;
    padding-bottom: 40px;
    padding-top: 42px;
  }

  .hero-kicker {
    font-size: 1.2rem;
  }

  .status-strip,
  .card-grid,
  .role-grid,
  .layer-list div {
    grid-template-columns: 1fr;
  }

  .parent-choice {
    grid-column: auto;
  }

  .role-heading {
    display: block;
  }

  .role-choice {
    min-height: 145px;
  }

  .product-preview figcaption {
    font-size: 0.94rem;
  }

  .role-path-inner {
    padding-bottom: 52px;
    padding-top: 52px;
  }

  .role-intro h2 {
    font-size: 2.15rem;
  }

  .path-links a {
    align-items: start;
    grid-template-columns: 1fr auto;
  }

  .path-links span {
    grid-column: 1 / -1;
  }

  .status-strip div {
    border-right: 0;
  }

  .resource-card {
    min-height: 0;
  }

  .role-page-head h1 {
    font-size: 2.75rem;
  }

  .activity-jumps {
    grid-template-columns: 1fr;
  }

  .activity-jumps a {
    border-bottom: 1px solid rgba(23, 27, 39, 0.24);
    border-right: 0;
    min-height: 72px;
  }

  .activity-jumps a:last-child {
    border-bottom: 0;
  }

  .student-section-heading {
    gap: 14px;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .student-section-heading h2 {
    font-size: 2.1rem;
  }

  .class-links {
    grid-template-columns: repeat(3, minmax(68px, 1fr));
  }

  .student-route-list a {
    align-items: start;
    grid-template-columns: 1fr auto;
  }

  .student-route-list span {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .teacher-section-heading {
    gap: 14px;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .teacher-section-heading h2 {
    font-size: 2.1rem;
  }

  .teacher-class-row {
    gap: 6px;
    grid-template-columns: minmax(64px, 1fr) repeat(3, minmax(62px, auto));
  }

  .teacher-class-row strong {
    grid-column: auto;
  }

  .teacher-class-row a {
    font-size: 0.82rem;
    min-width: 0;
    padding: 5px 4px;
  }

  .teacher-route-list a {
    align-items: start;
    grid-template-columns: 1fr auto;
  }

  .teacher-route-list span {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .parent-section-heading {
    gap: 14px;
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .parent-section-heading h2 {
    font-size: 2.1rem;
  }

  .parent-class-links {
    grid-template-columns: repeat(3, minmax(68px, 1fr));
  }

  .support-row {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .support-row a {
    justify-self: start;
    white-space: normal;
  }

  .catalog-head h1 {
    font-size: 2.75rem;
  }

  .catalog-filters,
  .catalog-results {
    grid-template-columns: 1fr;
  }

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

  .catalog-share-status {
    text-align: left;
  }

  .catalog-share-feedback {
    justify-items: start;
    width: 100%;
  }

  .catalog-share-fallback {
    max-width: 100%;
    width: 100%;
  }

  .search-field {
    grid-column: auto;
  }

  .catalog-results a {
    min-height: 0;
  }

  .terminology-filter {
    grid-template-columns: 1fr;
  }

  .terminology-summary,
  .terminology-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .terminology-section + .terminology-section {
    margin-top: 44px;
  }

  .terminology-table {
    font-size: 0.88rem;
    min-width: 1040px;
  }

  .usage-rule-table {
    min-width: 700px;
  }
}

@media (max-width: 700px) {
  .terminology-table-wrap {
    border: 0;
    overflow: visible;
  }

  .terminology-table {
    display: block;
    min-width: 0;
  }

  .terminology-table thead {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .terminology-table tbody {
    display: grid;
    gap: 12px;
  }

  .terminology-table tbody tr,
  .terminology-table tbody tr:nth-child(even) {
    background: #fff;
    border: 1px solid var(--line);
    display: grid;
  }

  .terminology-table td,
  .terminology-table td:nth-child(n) {
    border: 0;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(82px, 0.34fr) minmax(0, 1fr);
    padding: 10px 12px;
    width: auto;
  }

  .terminology-table td + td {
    border-top: 1px solid var(--line);
  }

  .terminology-table td::before {
    color: var(--ink-soft);
    content: attr(data-label);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .question-table td:last-child {
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .environment-entry {
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1fr);
  }

  .environment-open {
    grid-column: 2;
    justify-self: start;
  }

  .direct-grid,
  .library-links,
  .material-choice-grid,
  .quick-links,
  .help-questions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .direct-grid > a:nth-child(2n),
  .library-links > a:nth-child(2n),
  .material-choice-grid > a:nth-child(2n),
  .quick-links > a:nth-child(2n),
  .help-questions li:nth-child(2n) {
    border-right: 0;
  }

  .direct-grid > a:nth-child(-n + 2),
  .library-links > a:nth-child(-n + 2),
  .material-choice-grid > a:nth-child(-n + 2),
  .quick-links > a:nth-child(-n + 2),
  .help-questions li:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .mathematics-links > a:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .terminology-links > a:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .mathematics-links > a:nth-child(2n),
  .terminology-links > a:nth-child(2n) {
    border-right: 0;
  }

  .mathematics-links > a:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .site-header {
    gap: 10px;
  }

  .role-switcher {
    justify-content: flex-start;
  }

  .role-tools-grid,
  .teacher-tools-grid {
    grid-template-columns: 1fr;
  }

  .grade-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .grade-strip a:nth-child(6n) {
    border-right: 0;
  }

  .grade-strip a:nth-child(-n + 6) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .environments-head h1 {
    font-size: 2.45rem;
  }

  .environment-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .environment-section-heading > p {
    text-align: left;
  }

  .environment-entry {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .environment-open {
    grid-column: 1;
  }

  .home-start {
    padding-bottom: 22px;
    padding-top: 22px;
  }

  .home-start h1 {
    font-size: 2.65rem;
  }

  .home-lead {
    margin-bottom: 15px;
  }

  .home-start .role-choice {
    min-height: 0;
  }

  .home-start .game-choice {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 14px;
  }

  .game-choice img {
    display: none;
  }

  .home-daily-inner {
    gap: 14px;
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: 22px;
    padding-top: 22px;
  }

  .home-direct,
  .role-more {
    padding-bottom: 28px;
    padding-top: 24px;
  }

  .compact-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .home-catalog-link {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-left: 0;
    padding-right: 0;
  }

  .library-subheading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .library-subheading > p {
    text-align: left;
  }

  .direct-grid,
  .library-links,
  .material-choice-grid,
  .quick-links,
  .help-questions {
    grid-template-columns: 1fr;
  }

  .direct-grid > a,
  .library-links > a,
  .material-choice-grid > a,
  .quick-links > a,
  .help-questions li {
    border-bottom: 1px solid var(--line);
    border-right: 0;
    min-height: 0;
  }

  .direct-grid > a:last-child,
  .library-links > a:last-child,
  .material-choice-grid > a:last-child,
  .quick-links > a:last-child,
  .help-questions li:last-child {
    border-bottom: 0;
  }

  .role-start {
    padding-top: 18px;
  }

  .role-title h1 {
    font-size: 2.35rem;
  }

  .role-tools-grid {
    gap: 18px;
    margin-top: 16px;
  }

  .material-choice {
    margin-top: 16px;
  }

  .catalog-page .catalog-head h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 430px) {
  .role-switcher {
    gap: 2px 13px;
  }

  .grade-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grade-strip a:nth-child(6n) {
    border-right: 1px solid var(--line);
  }

  .grade-strip a:nth-child(4n) {
    border-right: 0;
  }

  .grade-strip a:nth-child(-n + 8) {
    border-bottom: 1px solid var(--line);
  }

  .grade-strip a:nth-child(n + 9) {
    border-bottom: 0;
  }

  .search-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .search-row button {
    padding-left: 12px;
    padding-right: 12px;
  }

  .role-page .teacher-class-row {
    grid-template-columns: minmax(64px, 1fr) repeat(3, minmax(62px, auto));
  }
}

@media (prefers-reduced-motion: reduce) {
  .role-choice {
    transform: none;
  }
}

@media (max-width: 700px) {
  .home-start .role-choice { min-height: 0; padding: 12px 14px; }
  .home-start .role-choice strong { font-size: 1.25rem; }
  .home-start .role-choice small { font-size: .9rem; }
  .home-start .role-choice b { display: none; }
}

@media (max-width: 480px) {
  .role-page .teacher-class-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 0;
  }
  .teacher-class-row > strong { grid-column: 1 / -1; }
  .role-page .teacher-class-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 6px 3px;
  }
}
