:root {
  --bg: #fbf6ef;
  --ink: #10203f;
  --body: #3a4758;
  --muted: #5c6874;
  --teal: #12756c;
  --teal-dark: #0c5c56;
  --teal-soft: #e7f4f1;
  --card: #ffffff;
  --line: rgba(16, 32, 63, 0.08);
  --reminders: #e7f6f3;
  --mistake: #f3eee6;
  --shadow: 0 10px 28px rgba(16, 32, 63, 0.06);
  --radius: 18px;
  --wrap: 1000px;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 1.03125rem;
  line-height: 1.55;
}

a:focus,
button:focus,
input:focus {
  outline: 3px solid var(--teal);
  outline-style: solid;
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2.75rem));
  margin-inline: auto;
}

.site-header {
  padding: 1.35rem 0 0.25rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 1.75rem;
}

.brand {
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1.35rem;
}

.site-header nav a {
  color: var(--ink);
  font-size: 0.975rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.35rem 0.05rem;
}

.site-header nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(220px, 0.78fr);
  align-items: center;
  gap: 0.5rem 1.5rem;
  padding: 2.75rem 0 0.5rem;
}

.hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.05rem, 4.15vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.032em;
  line-height: 1.12;
}

.hero h1 .line {
  display: block;
}

.hero-art {
  width: min(100%, 440px);
  height: auto;
  justify-self: center;
  display: block;
  /* The illustration's cream is lighter than the page. Darken drops that
     matte into the page colour and leaves the darker drawing unchanged. */
  mix-blend-mode: darken;
}

.hero-actions:empty {
  display: none;
}

.button {
  display: inline-block;
  margin-top: 1.35rem;
  padding: 0.72rem 1.25rem;
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
}

.button:hover {
  background: var(--teal-dark);
  color: #fff;
}

.intro {
  padding: 4.25rem 0 0;
  text-align: center;
}

.intro h2,
.panel h2,
.site-footer h2 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.intro h2 {
  font-size: 1.7rem;
}

.intro h2::after,
.panel h2::after {
  content: "";
  display: block;
  width: 2.35rem;
  height: 3px;
  margin-top: 0.7rem;
  background: var(--teal);
  border-radius: 999px;
}

.intro h2::after {
  margin-inline: auto;
}

.lede {
  max-width: 36rem;
  margin: 1.15rem auto 0;
  color: var(--body);
}

.subjects {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.85rem 0 0;
  padding: 0;
  list-style: none;
}

.subjects li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  padding: 1.55rem 0.75rem 1.3rem;
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  background: var(--teal-soft);
  border-radius: 50%;
}

.icon svg {
  width: 1.85rem;
  height: 1.85rem;
  display: block;
}

.sessions {
  margin: 1.45rem 0 0;
  text-align: center;
}

.stack {
  display: grid;
  gap: 1rem;
  padding: 1.65rem 0 0.25rem;
}

.panel {
  padding: 1.2rem 1.4rem 1.35rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.panel h2 {
  font-size: 1.15rem;
}

.panel h2::after {
  margin-top: 0.55rem;
}

.panel p {
  margin: 0.8rem 0 0;
}

.fine-print {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.panel--reminders {
  background: var(--reminders);
  border-color: #d5ece7;
}

.panel--mistake {
  background: var(--mistake);
  border-color: #e6dfd2;
}

a {
  color: var(--teal);
  text-underline-offset: 0.14em;
}

.lede a,
.sessions a,
.panel a,
.missing a {
  text-decoration-thickness: 1px;
}

.lede a:hover,
.sessions a:hover,
.panel a:hover,
.missing a:hover {
  color: var(--teal-dark);
}

.optout {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.95rem;
}

.optout input,
.optout button {
  height: 2.75rem;
  border: 0;
  border-radius: 10px;
  font: inherit;
}

.optout input {
  flex: 1 1 8rem;
  min-width: 0;
  padding: 0 0.9rem;
  background: #e4dfd6;
  color: var(--ink);
}

.optout input::placeholder {
  color: #5c5852;
  opacity: 1;
}

.optout button {
  appearance: none;
  padding: 0 1.05rem;
  background: #cfc9bf;
  color: #3f3c38;
  font-weight: 600;
}

.optout input:disabled,
.optout button:disabled {
  opacity: 1;
  cursor: not-allowed;
}

.site-footer {
  padding: 2.85rem 0 2.6rem;
  text-align: center;
}

.site-footer h2 {
  font-size: 0.98rem;
}

.site-footer p {
  max-width: 40rem;
  margin: 0.55rem auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.site-footer .copyright {
  margin-top: 0.95rem;
  font-size: 0.875rem;
}

.nowrap {
  white-space: nowrap;
}

.missing {
  padding: 4.75rem 0 5.25rem;
  text-align: center;
}

.missing h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.missing h1::after {
  content: "";
  display: block;
  width: 2.35rem;
  height: 3px;
  margin: 0.85rem auto 0;
  background: var(--teal);
  border-radius: 999px;
}

.missing p {
  margin: 1.15rem 0 0;
}

section:focus {
  outline: none;
}

section:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 6px;
}

@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .hero-copy {
    max-width: 36rem;
  }

  .hero-art {
    width: min(100%, 380px);
    margin-top: 0.5rem;
  }

  .intro {
    padding-top: 3rem;
  }
}

@media (max-width: 640px) {
  .subjects {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(var(--wrap), calc(100% - 1.75rem));
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .site-header nav {
    justify-content: flex-start;
    gap: 0.15rem 0.85rem;
  }

  .site-header nav a {
    font-size: 0.9rem;
  }

  .hero h1 {
    font-size: clamp(1.85rem, 8.4vw, 2.35rem);
  }

  .intro h2 {
    font-size: 1.45rem;
  }

  .panel {
    padding: 1.05rem 1rem 1.15rem;
  }
}
