:root {
  --ink: #294c7e;
  --muted: #65748b;
  --paper: #f9fafb;
  --surface: #ffffff;
  --line: #e5e7eb;
  --leaf: #2b4c8c;
  --leaf-dark: #1e3a6f;
  --sun: #92cd9a;
  --coral: #8bc34a;
  --sky: #e8edf9;
  --shadow: 0 18px 50px rgba(43, 76, 140, 0.09);
  --radius-lg: 28px;
  --radius-md: 20px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 92% 5%, rgba(146, 205, 154, 0.22) 0 7rem, transparent 7.1rem),
    radial-gradient(circle at 3% 45%, rgba(43, 76, 140, 0.08) 0 8rem, transparent 8.1rem),
    var(--paper);
}

a {
  color: inherit;
}

.site-shell {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
}

.site-header,
.page-content,
.site-footer {
  width: min(100% - 32px, 1120px);
  margin-inline: auto;
}

.site-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 148px;
  height: auto;
}

.header-note {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-content {
  flex: 1;
  padding-block: 56px 72px;
}

.intro {
  max-width: 780px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 10px;
  color: var(--leaf);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 720px;
  margin: 0;
  font-family: "Nunito", sans-serif;
  font-size: clamp(2.75rem, 10vw, 5.5rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.collection-section {
  margin-top: 48px;
}

.all-cohorts-index .page-content,
.cohort-index .page-content {
  padding-block: 24px 64px;
}

.all-cohorts-index .collection-section,
.cohort-index .collection-section {
  margin-top: 28px;
}

.subject-index .page-content {
  padding-block: 26px 64px;
}

.subject-index .breadcrumb {
  margin-bottom: 14px;
}

.subject-index .intro {
  max-width: none;
}

.subject-index .intro h1 {
  max-width: none;
  font-size: clamp(2rem, 7.4vw, 4.8rem);
  line-height: 1;
  white-space: nowrap;
}

.subject-index .collection-section {
  margin-top: 28px;
}

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

.section-heading h2 {
  margin: 0;
  font-family: "Nunito", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.count-pill {
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.collection-card {
  position: relative;
  display: grid;
  overflow: hidden;
  min-height: 260px;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 24px;
  border: 1px solid rgba(43, 76, 140, 0.12);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.collection-card::after {
  position: absolute;
  right: -68px;
  bottom: -90px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(244, 201, 93, 0.2);
  content: "";
}

.collection-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(43, 76, 140, 0.13);
}

.collection-card:focus-visible,
.brand:focus-visible,
.back-link:focus-visible {
  outline: 4px solid rgba(43, 76, 140, 0.24);
  outline-offset: 4px;
}

.card-symbol {
  display: flex;
  width: 100%;
  min-height: 128px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: var(--radius-md);
  font-family: "Nunito", sans-serif;
  font-weight: 900;
}

.card-symbol--letters {
  background: #dceae3;
  color: var(--leaf);
  font-size: 4.25rem;
  letter-spacing: -0.12em;
}

.card-symbol--letters span:last-child {
  color: var(--coral);
  transform: translateY(6px);
}

.card-symbol--blend {
  gap: 7px;
  background: #dcecf1;
  color: #367a92;
  font-size: 4rem;
  letter-spacing: -0.08em;
}

.card-symbol--blend span:nth-child(2) {
  color: var(--coral);
  transform: translateY(6px);
}

.card-symbol--blend span:last-child {
  color: var(--leaf);
}

.card-symbol--sight-words {
  flex-direction: column;
  gap: 0;
  background: #dceae3;
  color: var(--leaf);
  font-size: 2.15rem;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.card-symbol--sight-words span:last-child {
  color: #6cae75;
  transform: translateX(12px);
}

.card-symbol--sight-words-2 {
  background: #e7e2f4;
}

.card-symbol--sight-words-2 span:last-child {
  color: #7865a8;
}

.card-symbol--starting-sounds,
.card-symbol--ending-sounds {
  overflow: hidden;
  background: #eef4eb;
}

.card-symbol--starting-sounds img,
.card-symbol--ending-sounds img {
  display: block;
  width: 100%;
  height: 128px;
  object-fit: cover;
}

.card-symbol--foundations {
  gap: 12px;
  background: linear-gradient(135deg, #dceae3 0 50%, #f7dfcb 50% 100%);
  color: var(--leaf);
  font-size: 4rem;
}

.card-symbol--foundations span:last-child {
  color: var(--coral);
  transform: translateY(5px);
}

.card-symbol--numbers {
  gap: 1px;
  background: #f7dfcb;
  color: var(--coral);
  font-size: 3.45rem;
  letter-spacing: -0.1em;
}

.card-symbol--numbers span:nth-child(2) {
  color: var(--leaf);
  transform: translateY(-5px);
}

.card-symbol--numbers span:nth-child(3) {
  color: #367a92;
  transform: translateY(5px);
}

.card-symbol--compare {
  gap: 9px;
  background: #dcecf1;
  color: #367a92;
  font-size: 3.3rem;
  letter-spacing: -0.04em;
}

.card-symbol--compare span:nth-child(2) {
  color: var(--muted);
  font-size: 2.35rem;
}

.card-symbol--compare span:last-child {
  color: var(--coral);
}

.card-symbol--addition {
  gap: 9px;
  background: #e7e0f2;
  color: #7865a8;
  font-size: 3.3rem;
  letter-spacing: -0.04em;
}

.card-symbol--addition span:nth-child(2) {
  color: var(--muted);
  font-size: 2.25rem;
}

.card-symbol--addition span:last-child {
  color: var(--coral);
}

.card-symbol--multi-digit {
  min-width: 0;
  gap: 3px;
  font-size: 2.18rem;
  letter-spacing: -0.08em;
}

.card-symbol--wide-equation {
  min-width: 0;
  gap: 4px;
  font-size: 2.32rem;
  letter-spacing: -0.07em;
}

.card-symbol--multi-digit span,
.card-symbol--wide-equation span {
  min-width: 0;
  white-space: nowrap;
}

.card-symbol--wide-equation span:nth-child(2) {
  font-size: 1.65rem;
}

.card-symbol--object-addition {
  gap: 8px;
  background: #e7e0f2;
  color: #7865a8;
  font-family: system-ui, sans-serif;
  font-size: 2.7rem;
  letter-spacing: 0;
}

.card-symbol--object-addition span:nth-child(2) {
  color: var(--muted);
  font-family: "Nunito", sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
}

.card-symbol--grammar {
  gap: 8px;
  background: #f3e7c9;
  color: #8c5b22;
  font-size: 2.15rem;
  letter-spacing: -0.05em;
}

.card-symbol--grammar span:nth-child(2) {
  color: var(--coral);
}

.card-symbol--articles span:last-child {
  color: var(--leaf);
}

.card-symbol--opposites {
  background: #dcecf1;
  color: #367a92;
}

.card-symbol--opposites span:nth-child(2) {
  color: var(--muted);
  font-size: 1.7rem;
}

.card-symbol--opposites span:last-child {
  color: var(--coral);
}

.card-symbol--plurals {
  background: #e7e2f4;
  color: #7865a8;
  font-size: 1.7rem;
}

.card-symbol--plurals span:nth-child(2) {
  color: var(--muted);
  font-size: 1.45rem;
}

.card-symbol--plurals span:last-child {
  color: var(--leaf);
}

.card-symbol--prepositions {
  flex-direction: column;
  gap: 0;
  background: #dceae3;
  color: var(--leaf);
  font-size: 1.65rem;
  line-height: 1;
}

.card-symbol--prepositions span:nth-child(2) {
  color: #367a92;
  transform: translateX(10px);
}

.card-symbol--prepositions span:last-child {
  color: var(--coral);
  transform: translateX(-8px);
}

.card-grid {
  display: grid;
  gap: 18px;
}

.card-content {
  align-self: center;
}

.exercise-number {
  display: block;
  width: fit-content;
  margin-bottom: 9px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--leaf);
  color: white;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.card-content h3 {
  margin: 0;
  font-family: "Nunito", sans-serif;
  font-size: 2rem;
  letter-spacing: -0.035em;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.card-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.round-arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--leaf);
  color: white;
  font-size: 1.25rem;
  transition: transform 180ms ease, background 180ms ease;
}

.collection-card:hover .round-arrow {
  transform: translateX(3px);
  background: var(--leaf-dark);
}

.site-footer {
  padding-block: 24px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--leaf);
  font-weight: 700;
  text-underline-offset: 3px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 600;
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--leaf);
}

.breadcrumb-separator {
  opacity: 0.45;
}

@media (max-width: 699px) {
  .brand-logo {
    width: 126px;
  }

  .header-note {
    display: none;
  }

  .card-grid {
    gap: 12px;
  }

  .card-grid .collection-card {
    min-height: 0;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 14px;
  }

  .card-grid .card-symbol {
    display: flex;
    width: 72px;
    height: 72px;
    min-height: 72px;
    border-radius: 16px;
    font-size: 1.65rem;
    letter-spacing: -0.05em;
  }

  .card-grid .card-symbol img {
    width: 100%;
    height: 72px;
    object-fit: cover;
  }

  .card-grid .card-symbol--sight-words {
    font-size: 0.92rem;
    letter-spacing: -0.04em;
  }

  .card-grid .card-symbol--sight-words span:last-child {
    transform: translateX(4px);
  }

  .card-grid .card-symbol--grammar {
    gap: 3px;
    font-size: 0.9rem;
  }

  .card-grid .card-symbol--opposites {
    font-size: 0.78rem;
  }

  .card-grid .card-symbol--opposites span:nth-child(2) {
    font-size: 0.8rem;
  }

  .card-grid .card-symbol--plurals {
    flex-direction: column;
    gap: 0;
    font-size: 0.8rem;
    line-height: 1;
  }

  .card-grid .card-symbol--plurals span:nth-child(2) {
    font-size: 0.7rem;
    transform: rotate(90deg);
  }

  .card-grid .card-symbol--object-addition {
    overflow: hidden;
    gap: 1px;
    font-size: 1.08rem;
    white-space: nowrap;
  }

  .card-grid .card-symbol--object-addition span:nth-child(2) {
    font-size: 0.9rem;
  }

  .card-grid .card-symbol--prepositions {
    flex-direction: column;
    gap: 0;
    font-size: 0.8rem;
    line-height: 0.95;
  }

  .card-grid .card-kicker {
    margin-bottom: 7px;
    font-size: 0.66rem;
  }

  .card-grid .exercise-number {
    display: inline-block;
    margin-bottom: 7px;
    padding: 4px 7px;
    font-size: 0.6rem;
  }

  .card-grid .card-content h3 {
    font-size: 1.4rem;
    line-height: 1.1;
  }

  .card-grid .card-meta {
    margin-top: 10px;
  }

  .card-grid .round-arrow {
    display: none;
  }
}

@media (min-width: 700px) {
  .site-header,
  .page-content,
  .site-footer {
    width: min(100% - 64px, 1120px);
  }

  .site-header {
    min-height: 88px;
  }

  .page-content {
    padding-block: 84px 104px;
  }

  .all-cohorts-index .page-content,
  .cohort-index .page-content {
    padding-block: 32px 84px;
  }

  .collection-section {
    margin-top: 64px;
  }

  .all-cohorts-index .collection-section,
  .cohort-index .collection-section {
    margin-top: 36px;
  }

  .subject-index .page-content {
    padding-block: 42px 84px;
  }

  .subject-index .collection-section {
    margin-top: 36px;
  }

  .collection-card {
    min-height: 230px;
    grid-template-columns: minmax(220px, 0.7fr) 1fr;
    align-items: stretch;
    padding: 28px;
  }

  .card-symbol {
    min-height: 174px;
  }

  .card-symbol--starting-sounds img,
  .card-symbol--ending-sounds img {
    height: 174px;
  }

  .card-content {
    padding: 8px 64px 8px 8px;
  }

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

  .card-grid .collection-card {
    min-height: 170px;
    grid-template-columns: 138px 1fr;
    gap: 20px;
    padding: 20px;
  }

  .card-grid .card-symbol {
    min-height: 130px;
  }

  .card-grid .card-symbol--starting-sounds img,
  .card-grid .card-symbol--ending-sounds img {
    height: 130px;
  }

  .card-grid .card-content {
    padding: 8px 54px 8px 0;
  }

  .card-grid .card-content h3 {
    font-size: 1.45rem;
    line-height: 1.15;
  }

  .card-grid .card-meta {
    margin-top: 12px;
  }
}

@media (min-width: 1000px) {
  .collection-card {
    grid-template-columns: 310px 1fr;
  }

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

  .card-grid .collection-card {
    grid-template-columns: 138px 1fr;
  }
}

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