/* Ai Teacher site. Design: docs/reference/design/site-design.md
   (taken from docs/reference/design/site/prototype/styles.css).
   Part 1: styles of the legal pages (privacy, terms, ru/*, 404), tokens in the app palette.
   Part 2: components of the pages that site/build.mjs generates (landing, catalog, courses).
   This file is written by hand; the generator does not touch it. */

/* ---------- Part 1: legal pages and tokens ---------- */

:root {
  color-scheme: light dark;
  --bg: #f6f2ea;            /* surface */
  --surface: #f0ebe1;       /* surfaceContainerLow */
  --text: #1c1b19;          /* onSurface */
  --muted: #5c574f;         /* onSurfaceVariant */
  --border: #dcd3c3;        /* outlineVariant */
  --link: #216487;          /* primary */
  --link-visited: #6b3fa8;

  --card: #fffdf8;          /* surfaceContainerLowest */
  --border-strong: #8a8276; /* outline */
  --accent: #216487;        /* primary */
  --on-accent: #ffffff;
  --accent-soft: #d3e8f4;   /* primaryContainer */
  --on-accent-soft: #0f3e57;
  --warm: #b4532f;          /* tertiary: only on --card */
  --warm-soft: #fbe3d6;     /* tertiaryContainer */
  --on-warm-soft: #5a2410;
  --band: #2b6c8f;          /* launcher icon background, store screenshots */
  --band-step: #255e7d;     /* stairs of the feature graphic */
  --on-band: #ffffff;
  --sun: #f2b53a;           /* dot of the feature graphic */
  --bezel: #1c1b19;
  --focus: #216487;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", Charter, "Bitstream Charter", "Sitka Heading", Cambria, Georgia, "Noto Serif", serif;

  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 28px;

  --gutter: 16px;
  --section-y: 56px;
  --badge-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #1d1c19;
    --text: #eee9e0;
    --muted: #b7b0a4;
    --border: #3a3631;
    --link: #92cef5;
    --link-visited: #c3a6f2;

    --card: #201e1b;
    --border-strong: #8e877c;
    --accent: #92cef5;
    --on-accent: #00344b;
    --accent-soft: #1c4a63;
    --on-accent-soft: #cfe8f7;
    --warm: #ffb596;
    --warm-soft: #5a2a16;
    --on-warm-soft: #ffdbcb;
    --band: #1c4a63;
    --band-step: #163d52;
    --on-band: #ffffff;
    --sun: #f2b53a;
    --bezel: #000000;
    --focus: #92cef5;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 0.95rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:visited {
  color: var(--link-visited);
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

.brand:visited {
  color: var(--text);
}

h1 {
  margin: 40px 0 8px;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  margin: 44px 0 12px;
  font-size: 1.35rem;
  line-height: 1.3;
}

h3 {
  margin: 28px 0 8px;
  font-size: 1.0625rem;
  line-height: 1.4;
}

p {
  margin: 0 0 16px;
}

ul {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

li {
  margin-bottom: 8px;
}

li:last-child {
  margin-bottom: 0;
}

.meta {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.95rem;
}

.summary {
  margin: 0 0 8px;
  padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.summary ul {
  margin-bottom: 0;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
}

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

.link-list li {
  margin-bottom: 10px;
}

.site-footer {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin-bottom: 8px;
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }

  .page {
    padding: 0 16px 48px;
  }

  h1 {
    margin-top: 28px;
    font-size: 1.6rem;
  }

  h2 {
    margin-top: 36px;
    font-size: 1.2rem;
  }

  .summary {
    padding: 14px 16px;
  }
}

/* ---------- Part 2: site components ---------- */

@media (min-width: 600px) {
  :root {
    --gutter: 24px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 32px;
    --section-y: 88px;
  }
}

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

.skip-link {
  position: absolute;
  left: 8px;
  top: 8px;
  transform: translateY(calc(-100% - 16px));
  z-index: 10;
  padding: 12px 16px;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--focus);
  border-radius: var(--radius-s);
}

.skip-link:focus {
  transform: none;
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure {
  max-width: 68ch;
}

/* headings of the new pages: serif, own margins (globals above set other margins) */
.display,
.title-1,
.title-2,
.card-title {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.display {
  margin: 0 0 16px;
  font-size: clamp(2.125rem, 1.25rem + 3.6vw, 3.5rem);
  line-height: 1.08;
  max-width: 18ch;
}

.title-1 {
  margin: 0 0 16px;
  font-size: clamp(1.875rem, 1.35rem + 2.2vw, 2.75rem);
  line-height: 1.12;
  max-width: 24ch;
}

.title-2 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
  line-height: 1.2;
}

.title-3 {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

.lede {
  margin: 0 0 24px;
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  max-width: 60ch;
}

.small {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- masthead ---------- */

.masthead {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  min-width: 0;
  color: var(--text);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

.logo:visited {
  color: var(--text);
}

.logo img {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.masthead-nav {
  display: flex;
  gap: 8px;
}

.masthead-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 12px;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-s);
}

.masthead-nav a:visited {
  color: var(--text);
}

.masthead-nav a:hover,
.masthead-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

/* ---------- focus: one rule for the new components ---------- */

.logo:focus-visible,
.masthead-nav a:focus-visible,
.course-card:focus-visible,
.pill:focus-visible,
.crumbs a:focus-visible,
.colophon a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

/* ---------- band: brand-blue carrier with stairs ---------- */

.band {
  position: relative;
  overflow: hidden;
  background: var(--band);
  color: var(--on-band);
}

.band a:not(.gp-badge) {
  color: var(--on-band);
}

.band :focus-visible {
  outline: 3px solid var(--on-band);
  outline-offset: 2px;
}

.stairs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background:
    linear-gradient(var(--band-step), var(--band-step)) 0 100% / 25% 25% no-repeat,
    linear-gradient(var(--band-step), var(--band-step)) 33.333% 100% / 25.1% 50% no-repeat,
    linear-gradient(var(--band-step), var(--band-step)) 66.667% 100% / 25.1% 75% no-repeat,
    linear-gradient(var(--band-step), var(--band-step)) 100% 100% / 25.1% 100% no-repeat;
  pointer-events: none;
}

.stairs::after {
  content: "";
  position: absolute;
  /* on the top step, at the right edge of the content column: never under the phone or the badge */
  right: max(var(--gutter), calc((100% - 1120px) / 2 + var(--gutter)));
  top: -36px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sun);
}

@media (min-width: 1024px) {
  .stairs {
    height: 112px;
  }

  .stairs::after {
    top: -48px;
    width: 32px;
    height: 32px;
  }
}

/* ---------- Google Play badge (official PNG with clear space inside the canvas) ---------- */

.gp-badge {
  display: inline-block;
  line-height: 0;
  /* the PNG's transparent clear space is 41/250 of its height: pull the visible badge onto the text edge */
  margin-inline-start: calc(var(--badge-h) * -0.164);
  border-radius: 10px;
}

.gp-badge img {
  display: block;
  width: auto;
  height: var(--badge-h);
}

.gp-badge:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: calc(var(--badge-h) * -0.12);
}

.band .gp-badge:focus-visible {
  outline-color: var(--on-band);
}

/* ---------- hero (landing) ---------- */

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-areas: "copy" "shot";
  gap: 24px;
  padding-top: 40px;
}

.hero-copy {
  grid-area: copy;
}

.hero-copy .lede {
  color: var(--on-band);
}

.hero-shot {
  grid-area: shot;
  justify-self: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-areas: "copy shot";
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 48px;
    padding-top: 72px;
  }

  .hero-copy {
    padding-bottom: 152px;
    align-self: center;
  }

  .hero-shot {
    align-self: end;
  }
}

/* ---------- phone screenshot ---------- */

.phone {
  display: block;
  margin: 0;
  width: 220px;
  overflow: hidden;
  border: 8px solid var(--bezel);
  border-radius: 32px;
  background: var(--bezel);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}

/* hero: the phone rises out of the stairs, its lower part is cut by the band edge */
.phone--rising {
  width: 240px;
  height: 320px;
  border-bottom: 0;
  border-radius: 32px 32px 0 0;
}

.phone--rising img {
  border-radius: 24px 24px 0 0;
}

@media (min-width: 900px) {
  .phone {
    width: 280px;
  }

  .phone--rising {
    width: 300px;
    height: 520px;
  }
}

/* ---------- sections ---------- */

.section {
  padding-block: var(--section-y);
}

.section--card {
  background: var(--card);
  border-block: 1px solid var(--border);
}

.section--sunk {
  background: var(--surface);
}

/* two plain sections in a row share one gap */
.section:not(.section--card):not(.section--sunk):not(.band) + .section:not(.section--card):not(.section--sunk):not(.band) {
  padding-top: 0;
}

.section-head {
  margin-bottom: 32px;
}

.section-head .title-2 {
  margin-bottom: 12px;
}

.section-head p:last-child {
  margin-bottom: 0;
}

/* text + phone */
.split {
  display: grid;
  grid-template-areas: "text" "media";
  gap: 32px;
  align-items: center;
}

.split-text {
  grid-area: text;
}

.split-media {
  grid-area: media;
  justify-self: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-areas: "text media";
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 64px;
  }

  .split--media-first {
    grid-template-areas: "media text";
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

/* heading on the left, body on the right (wide screens) */
.side {
  display: grid;
  gap: 8px;
  align-content: start;
}

@media (min-width: 900px) {
  .side {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 64px;
  }

  .side > .title-2 {
    margin-bottom: 0;
  }
}

.side-body > :last-child {
  margin-bottom: 0;
}

/* lists in prose */
.ticks {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.ticks li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 36px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.ticks li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: calc(0.2em + 6px);
  width: 6px;
  height: 10px;
  border: solid var(--on-accent-soft);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dots {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.dots li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 24px;
}

.dots li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

/* notes: research (evidence) and expect (caution) */
.notes {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .notes {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

.note {
  padding: 24px;
  border-radius: var(--radius-m);
  background: var(--accent-soft);
  color: var(--on-accent-soft);
}

.note--caution {
  background: var(--warm-soft);
  color: var(--on-warm-soft);
}

.note a {
  color: inherit;
  text-decoration-thickness: 1px;
}

.note .title-2 {
  font-size: clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem);
}

.note > :last-child {
  margin-bottom: 0;
}

/* ---------- breadcrumb ---------- */

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  color: var(--muted);
}

.crumbs li {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.crumbs li + li::before {
  content: "\203A" / "";
  padding-inline: 6px;
  color: var(--muted);
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--muted);
}

.crumbs a:visited {
  color: var(--muted);
}

.crumbs [aria-current="page"] {
  color: var(--text);
}

/* ---------- page head (course, catalog) ---------- */

.page-head {
  padding-block: 8px 48px;
}

@media (min-width: 1024px) {
  .page-head {
    padding-bottom: 64px;
  }
}

.page-head .gp-badge {
  --badge-h: 64px;
}

.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 8px 0 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--warm);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
}

.facts {
  margin: -8px 0 20px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- course card ---------- */

.card-grid {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-grid > li {
  display: flex;
  margin: 0;
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

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

@media (min-width: 960px) {
  .card-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

.course-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  color: var(--text);
  text-decoration: none;
}

.course-card:visited {
  color: var(--text);
}

.course-card:hover {
  border-color: var(--border-strong);
}

.course-card:hover .card-title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

.card-cat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-height: 28px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--warm);
}

.card-title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.25;
}

.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.card-foot {
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
  font-size: 0.875rem;
}

.course-card--compact {
  padding: 16px;
  gap: 6px;
}

.course-card--compact .card-title {
  font-size: 1.0625rem;
}

@media (min-width: 600px) {
  .course-card--compact .card-title {
    font-size: 1.1875rem;
  }
}

/* textbook titles as pills (landing) */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pill-list li {
  margin: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.pill:visited {
  color: var(--text);
}

.pill:hover {
  border-color: var(--border-strong);
  text-decoration: underline;
}

.subhead {
  margin: 40px 0 8px;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

.more-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 24px;
  font-weight: 600;
}

/* ---------- lessons: a stair ---------- */

.lessons {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lesson {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin: 0;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
}

.lesson:nth-child(2) {
  margin-left: 12px;
}

.lesson:nth-child(3) {
  margin-left: 24px;
}

.lesson-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-s);
  background: var(--accent-soft);
  color: var(--on-accent-soft);
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1;
}

.lesson-title {
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}

.lesson-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 900px) {
  .lessons[data-count="3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
  }

  .lessons[data-count="3"] .lesson {
    grid-template-columns: minmax(0, 1fr);
    margin-left: 0;
    padding: 20px;
  }

  .lessons[data-count="3"] .lesson:nth-child(1) {
    min-height: 184px;
  }

  .lessons[data-count="3"] .lesson:nth-child(2) {
    min-height: 224px;
  }

  .lessons[data-count="3"] .lesson:nth-child(3) {
    min-height: 264px;
  }
}

/* ---------- example dialog ---------- */

.dialog {
  margin: 0;
  max-width: 640px;
}

.dialog-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border-radius: var(--radius-l);
}

@media (min-width: 600px) {
  .dialog-thread {
    padding: 24px;
  }
}

.turn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 94%;
}

.turn--you {
  align-self: flex-end;
  max-width: 85%;
}

@media (min-width: 600px) {
  .turn {
    max-width: 86%;
  }

  .turn--you {
    max-width: 78%;
  }
}

.turn-avatar {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.turn-text {
  margin: 0;
  padding: 12px 16px;
  border-radius: 6px var(--radius-m) var(--radius-m) var(--radius-m);
  background: var(--card);
  border: 1px solid var(--border);
  line-height: 1.5;
}

.turn--you .turn-text {
  border-radius: var(--radius-m) 6px var(--radius-m) var(--radius-m);
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.dialog-caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ---------- FAQ ---------- */

.faq-item {
  padding-block: 20px;
  border-top: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq-q {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

.faq-a > :last-child {
  margin-bottom: 0;
}

/* ---------- sources and license ---------- */

.attribution {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m);
}

@media (min-width: 600px) {
  .attribution {
    padding: 28px;
  }
}

.attribution .title-2 {
  font-size: clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem);
}

.caveat {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: var(--radius-s);
  background: var(--warm-soft);
  color: var(--on-warm-soft);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.source-list {
  margin: 0;
  padding-left: 1.4em;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.source-list li {
  margin: 0 0 8px;
}

.source-meta {
  color: var(--muted);
}

.source-meta a {
  color: var(--muted);
}

@media (min-width: 900px) {
  .source-list--cols {
    columns: 2;
    column-gap: 40px;
  }

  .source-list--cols li {
    break-inside: avoid;
  }
}

.source-list--plain {
  padding-left: 0;
  list-style: none;
}

/* ---------- final CTA ---------- */

.cta-final {
  padding-block: 56px 120px;
}

.cta-final-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.cta-final .title-2 {
  margin: 0;
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
}

.cta-final p {
  margin: 0 0 8px;
  max-width: 52ch;
}

@media (min-width: 900px) {
  .cta-final {
    padding-block: 80px 160px;
  }

  .cta-final-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 48px;
  }

  .cta-final-inner .gp-badge {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

/* ---------- colophon (footer) ---------- */

.colophon {
  padding-block: 32px 40px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

.colophon-inner {
  display: grid;
  gap: 16px;
}

.colophon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  margin: 0 0 0 -12px;
  padding: 0;
  list-style: none;
}

.colophon-links li {
  margin: 0;
}

.colophon-links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 12px;
  color: var(--text);
}

.colophon-links a:visited {
  color: var(--text);
}

.colophon-legal {
  margin: 0;
  font-size: 0.875rem;
}

@media (min-width: 900px) {
  .colophon-inner {
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 40px;
  }

  .colophon-links {
    justify-self: end;
  }

  .colophon-legal {
    grid-column: 1 / -1;
  }
}

/* course page: reading column, wide rows break out of it */
.col {
  max-width: 760px;
}

.course-section {
  padding-block: 40px 0;
}

@media (min-width: 1024px) {
  .course-section {
    padding-top: 56px;
  }
}

.course-section .title-2 {
  margin-bottom: 16px;
}

.course-section:last-of-type {
  padding-bottom: var(--section-y);
}
