:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --accent: #2563eb;
  --border: #dbe2f0;
  --maxw: 920px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Trebuchet MS", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.page-layout {
  width: min(100% - 2rem, 1120px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(10.5rem, 13rem) minmax(0, 1fr);
  gap: 0 1.5rem;
  align-items: start;
}

.page-layout-header {
  grid-column: 1 / -1;
  padding: 2rem 0 1rem;
  margin: 0;
}

.page-toc {
  grid-column: 1;
  grid-row: 2;
  position: sticky;
  top: 1rem;
  align-self: start;
  padding: 0.75rem 0 1rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
  border-right: 1px solid var(--border);
  padding-right: 0.85rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

.page-toc-title {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.9;
}

.page-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-toc-list li {
  margin: 0 0 0.4rem;
}

.page-toc-list a {
  display: block;
  color: var(--text);
  text-decoration: none;
  border-radius: 4px;
  padding: 0.15rem 0.25rem;
  margin: 0 -0.25rem;
}

.page-toc-list a:hover,
.page-toc-list a:focus-visible {
  background: rgba(37, 99, 235, 0.1);
  color: var(--text);
}

.page-toc-list--nested {
  margin: 0.35rem 0 0.5rem;
  padding-left: 0.65rem;
  border-left: 2px solid var(--border);
}

.page-toc-list--nested li {
  margin-bottom: 0.35rem;
}

.page-layout-main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
}

.page-layout-main main,
.page-layout-main footer {
  width: 100%;
  margin-inline: 0;
}

.page-layout-main footer {
  padding: 0.5rem 0 2rem;
  color: var(--muted);
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

h2[id],
h3[id] {
  scroll-margin-top: 1.25rem;
}

main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

main section + section {
  margin-top: 1.5rem;
}

.submission-note {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.submission-lead {
  font-weight: 700;
  color: var(--text);
  opacity: 0.85;
}

.page-toc .submission-note--sidebar {
  margin-top: 1.15rem;
  padding-top: 1rem;
  margin-bottom: 0;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  line-height: 1.5;
}

.page-toc .submission-note--sidebar .submission-lead {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.95;
}

.page-toc .submission-note--sidebar a {
  word-break: break-word;
}

.paper-list {
  padding-left: 1.2rem;
}

/* No bullets: each assignment is already a bordered module */
.activity-list {
  padding-left: 0;
  list-style: none;
}

.activity-list > li::marker {
  content: none;
}

.paper-list li,
.activity-list li {
  margin-bottom: 0.9rem;
}

/* Classroom Activities: separate major assignments from each other */
.activity-list > li {
  list-style: none;
  margin-bottom: 1.85rem;
  padding: 1.25rem 1.15rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.045);
}

.activity-list > li:last-child {
  margin-bottom: 0;
}

/* Nested example assignments: each row is its own sub-card */
.activity-list .activity-examples {
  margin: 0.5rem 0 0;
  padding-left: 0;
  list-style: none;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.activity-list .activity-examples > li {
  margin-bottom: 0;
  padding: 1.15rem 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.035);
}

/* Example rows use dividers only—no discs beside pairing boxes */
.activity-list .activity-examples > li::marker {
  content: none;
}

.activity-list .activity-prompts {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  list-style: decimal;
  list-style-position: outside;
}

.activity-list .activity-prompts li {
  margin-bottom: 0.55rem;
}

/* Numbered prompts on a top-level activity card: markers inside padding, not beside the border */
.activity-list > li > .activity-prompts {
  list-style-position: inside;
  padding-left: 0;
}

.activity-list .activity-prompts li > p {
  margin: 0 0 0.45rem;
}

.activity-list .activity-prompts li > p:last-child {
  margin-bottom: 0;
}

.activity-list .activity-examples-prompts {
  margin: 0.4rem 0 0;
  padding-left: 1.25rem;
  list-style: decimal;
  list-style-position: outside;
}

.activity-list .activity-examples-prompts li {
  margin-bottom: 0.45rem;
}

.activity-list .activity-examples > li > p:not(.activity-reflect-lead) {
  margin: 0 0 0.55rem;
  color: var(--muted);
}

.activity-list .activity-examples > li .activity-pairing {
  margin-top: 1.05rem;
  padding: 1.05rem 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.055);
}

.activity-list .activity-examples > li > div.activity-pairing:first-of-type {
  margin-top: 1.2rem;
}

.activity-list .activity-examples > li .activity-pairing + .activity-pairing {
  margin-top: 1.25rem;
}

.activity-list .activity-examples > li ul.activity-canonical-prompts {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
}

.activity-list .activity-examples > li ul.activity-canonical-prompts > li {
  margin-bottom: 0.85rem;
}

.activity-list .activity-examples > li ul.activity-canonical-prompts > li:last-child {
  margin-bottom: 0;
}

.activity-list .activity-examples > li ul.activity-canonical-prompts p {
  margin: 0;
}

.activity-list .activity-examples > li .activity-pairing p {
  margin: 0 0 0.55rem;
  color: var(--muted);
}

.activity-list .activity-examples > li .activity-pairing p:last-child {
  margin-bottom: 0;
}

.activity-list .activity-examples-prompts + p {
  margin-top: 0.55rem;
}

.activity-list .activity-examples > li > .activity-prompts {
  margin: 0.55rem 0 0;
}

.activity-list .activity-reflect-lead {
  margin: 0 0 0.35rem;
  color: var(--muted);
}

a {
  color: #1d4ed8;
  text-underline-offset: 2px;
}

a:hover,
a:focus-visible {
  color: #1e3a8a;
}

.paper-meta {
  display: block;
  color: var(--muted);
}

.paper-rationale {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.paper-abstract {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
  opacity: 0.88;
}

.contributors {
  margin-top: 1.25rem;
  padding-top: 0;
}

.page-toc .contributors--sidebar {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.page-toc .contributors--sidebar .contributors-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.page-toc .contributors--sidebar .contributors-list {
  padding-left: 1rem;
  font-size: 0.78rem;
  line-height: 1.45;
}

.page-toc .contributors--sidebar .contributors-acknowledgment {
  margin-top: 0.55rem;
  font-size: 0.72rem;
  line-height: 1.5;
}

.contributors-title {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.contributors-list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.contributors-list li {
  margin-bottom: 0.35rem;
}

.contributors-acknowledgment {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 800px) {
  .page-layout {
    display: flex;
    flex-direction: column;
    width: min(100% - 1.25rem, 1120px);
  }

  .page-toc {
    position: static;
    max-height: none;
    overflow: visible;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 1rem;
    margin-bottom: 0.35rem;
  }
}

#top {
  scroll-margin-top: 1rem;
}
