/* Put Kids First / Les enfants d'abord
   Handmade, flat, crayon-and-paper style. No shadows, no gradients. */

:root {
  --paper: #f8f1df;
  --paper-2: #f3e7c8;
  --ink: #1e2a4a;
  --navy: #234272;
  --navy-deep: #1a3058;
  --orange: #e07a2f;
  --orange-deep: #b85a14;
  --yellow: #f3cc63;
  --peach: #f8d7b0;
  --sky: #cde3f5;
  --mint: #ccebd6;
  --lilac: #e4d5f2;
  --cream: #fff8ea;
  --line: #1e2a4a;
  --muted: #3d4a66;
  --ok: #1f6b43;
  --wobble-a: 28px 14px 32px 12px / 14px 30px 12px 28px;
  --wobble-b: 16px 30px 12px 26px / 28px 12px 30px 14px;
  --wobble-c: 22px 10px 26px 16px / 10px 24px 14px 22px;
  --wobble-d: 12px 22px 18px 10px / 20px 12px 10px 24px;
  --wobble-pill: 255px 18px 240px 16px / 16px 240px 18px 255px;
  --font: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hand: "Patrick Hand", "Nunito", "Segoe UI", cursive;
  --max: 70rem;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

html:lang(fr) [data-lang="en"],
html[lang="en"] [data-lang="fr"],
html:not([lang="fr"]) [data-lang="fr"] {
  display: none !important;
}

html[lang="fr"] [data-lang="en"] {
  display: none !important;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  min-height: 100vh;
  isolation: isolate;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.16 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 240px 240px;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--navy);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  text-decoration-skip-ink: auto;
}

a:hover { color: var(--orange-deep); }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 1000;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
  padding: 0.5rem 0.9rem;
  border: 3px solid var(--ink);
  border-radius: var(--wobble-c);
}

.skip-link:focus { top: 0.4rem; }

/* Doodles */
.doodle {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  color: inherit;
  flex-shrink: 0;
  vertical-align: middle;
  overflow: visible;
}

.doodle use { pointer-events: none; }

.doodle-lg { width: 3.25rem; height: 3.25rem; }
.doodle-xl { width: 4.25rem; height: 4.25rem; }
.doodle-wide { width: 4.5rem; height: 3rem; }
.doodle-arrow { width: 4.5rem; height: 2rem; }
.doodle-sun { width: 4rem; height: 4rem; color: var(--yellow); }
.doodle-heart { color: var(--orange); }
.doodle-star { color: var(--orange); }

.title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.has-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 0.35rem;
}

.has-underline::after {
  content: "";
  display: block;
  width: min(100%, 14rem);
  height: 12px;
  margin-top: 0.1rem;
  background: url("../img/doodles.svg#underline") no-repeat left center / 100% 12px;
  color: var(--orange);
  /* # fragment backgrounds are unreliable; use a data URI instead below if needed */
}

h1.has-underline::after,
h2.has-underline::after,
.hero h1::after {
  content: "";
  display: block;
  width: min(100%, 16rem);
  height: 14px;
  margin-top: 0.15rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 18' fill='none' stroke='%23e07a2f' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M3 11c18-6 36-6 54-2 20 4.5 38 5 58 1 14-3 28-6 42-1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 100% 14px;
  background-position: left center;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  color: var(--cream);
  border-bottom: 3px solid var(--ink);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem 0.85rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "logo lang"
    "nav  nav";
  gap: 0.55rem 1rem;
  align-items: center;
}

.logo {
  grid-area: logo;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--cream);
  line-height: 1.1;
  min-width: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo .doodle { width: 1.55rem; height: 1.55rem; color: #f3cc63; }

.logo:hover { color: var(--cream); }

.logo-main {
  font-family: var(--hand);
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
}

.logo-sub {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--yellow);
}

.lang-toggle {
  grid-area: lang;
  justify-self: end;
  align-self: start;
  display: inline-flex;
  border: 3px solid var(--cream);
  border-radius: var(--wobble-pill);
  overflow: hidden;
  background: var(--navy-deep);
}

.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-family: var(--hand);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  padding: 0.28rem 0.8rem 0.15rem;
  cursor: pointer;
  min-width: 2.75rem;
  min-height: 2.25rem;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--yellow);
  color: var(--ink);
}

.lang-toggle button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
  z-index: 1;
}

.site-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.site-nav a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.35rem 0.75rem;
  border: 3px solid transparent;
  border-radius: var(--wobble-pill);
}

.site-nav a:hover {
  color: var(--cream);
  border-color: rgba(255, 248, 234, 0.55);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--ink);
}

@media (min-width: 800px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo nav lang";
    padding: 0.7rem 1.5rem;
  }

  .lang-toggle { align-self: center; }

  .site-nav { padding-left: 1.1rem; }
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

main { display: block; }

.section { padding: 2.6rem 0; }

.section-kicker {
  display: inline-block;
  font-family: var(--hand);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--orange-deep);
  margin: 0 0 0.15rem;
}

h1, h2, h3, h4 {
  font-family: var(--hand);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin: 0 0 0.7rem;
}

h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.55rem); }
h3 { font-size: 1.45rem; }

p { margin: 0 0 1rem; }

.lede {
  font-size: 1.2rem;
  line-height: 1.5;
  max-width: 42rem;
}

/* Hero as a cutout of construction paper */
.hero {
  background: transparent;
  padding: 1.25rem 0 0.5rem;
}

.hero-inner {
  background: var(--navy);
  color: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 42px 18px 50px 22px / 20px 46px 16px 40px;
  padding: 2rem 1.4rem 1.8rem;
  position: relative;
}

.hero h1 {
  color: var(--cream);
  margin-bottom: 0.15rem;
  max-width: 14ch;
}

.hero-sub {
  font-family: var(--hand);
  color: var(--yellow);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 1rem;
}

.hero .lede,
.hero p { color: #f3ead6; }

.hero .section-kicker { color: var(--yellow); }

.hero-doodles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
  align-items: flex-end;
  margin-top: 1.15rem;
  color: var(--cream);
}

.hero .doodle-sun {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  color: var(--yellow);
}

@media (min-width: 800px) {
  .hero-inner { padding: 2.4rem 2.2rem 2rem; }
  .hero .doodle-sun { top: 1.3rem; right: 1.8rem; width: 5rem; height: 5rem; }
}

@media (max-width: 520px) {
  .hero h1 { max-width: none; padding-right: 3.5rem; }
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--hand);
  font-size: 1.2rem;
  line-height: 1.15;
  text-decoration: none;
  border: 3px solid var(--ink);
  border-radius: var(--wobble-pill);
  padding: 0.65rem 1.25rem 0.5rem;
  min-height: 2.85rem;
  cursor: pointer;
  background: var(--cream);
  color: var(--ink);
}

.btn:hover { background: var(--yellow); color: var(--ink); }

.btn-primary {
  background: var(--orange);
  color: var(--ink);
}

.btn-primary:hover { background: var(--yellow); color: var(--ink); }

.btn-secondary {
  background: var(--navy);
  color: var(--cream);
}

.btn-secondary:hover { background: var(--navy-deep); color: var(--cream); }

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: var(--cream);
}

.btn-ghost:hover { background: var(--yellow); color: var(--ink); border-color: var(--ink); }

.btn-outline {
  background: var(--cream);
  color: var(--ink);
}

.btn-lg {
  padding: 0.8rem 1.5rem 0.65rem;
  font-size: 1.35rem;
}

/* Stats */
.stats-band {
  background: transparent;
  padding: 2.4rem 0 1.5rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.stat {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-a);
  padding: 1rem 0.9rem 1.05rem;
}

.stat:nth-child(1) { background: var(--peach); border-radius: var(--wobble-a); }
.stat:nth-child(2) { background: var(--sky); border-radius: var(--wobble-b); }
.stat:nth-child(3) { background: var(--mint); border-radius: var(--wobble-c); }
.stat:nth-child(4) { background: var(--lilac); border-radius: var(--wobble-d); }
.stat:nth-child(5) { background: var(--yellow); border-radius: var(--wobble-b); }

.stat-value {
  display: block;
  font-family: var(--hand);
  font-size: clamp(2.1rem, 6vw, 3rem);
  color: var(--navy);
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  margin-top: 0.3rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.stat-source {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

@media (max-width: 719px) {
  .stat:last-child { grid-column: 1 / -1; }
}

@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1000px) {
  .stat-grid { grid-template-columns: repeat(5, 1fr); }
}

/* School cards */
.school-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 700px) {
  .school-grid { grid-template-columns: 1fr 1fr; }
}

.school-card {
  appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: var(--ink);
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-a);
  padding: 1.1rem 1.15rem 1.15rem;
  cursor: pointer;
  color-scheme: light;
}

.school-card:nth-child(2) { border-radius: var(--wobble-b); background: var(--sky); }
.school-card:nth-child(3) { border-radius: var(--wobble-c); background: var(--peach); }
.school-card:nth-child(4) { border-radius: var(--wobble-d); background: var(--mint); }

.school-card:hover,
.school-card:active,
.school-card:focus,
.school-card[aria-expanded="true"] {
  background: #f6e2a1;
  color: var(--ink);
}

.school-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.school-card .school-name,
.school-card .school-teaser,
.school-card .school-more,
.school-card .school-more p,
.school-card .card-hint,
.school-card:hover .school-name,
.school-card:hover .school-teaser,
.school-card:hover .school-more,
.school-card:hover .school-more p,
.school-card:hover .card-hint,
.school-card[aria-expanded="true"] .school-name,
.school-card[aria-expanded="true"] .school-teaser,
.school-card[aria-expanded="true"] .school-more,
.school-card[aria-expanded="true"] .school-more p,
.school-card[aria-expanded="true"] .card-hint {
  color: var(--ink);
}

.school-name {
  margin: 0;
  color: var(--navy);
  font-size: 1.45rem;
}

.portable-badge {
  flex-shrink: 0;
  background: var(--navy);
  color: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 18px 10px 16px 12px / 12px 16px 10px 18px;
  min-width: 4.4rem;
  text-align: center;
  padding: 0.25rem 0.5rem 0.35rem;
}

.portable-badge strong {
  display: block;
  font-family: var(--hand);
  font-size: 1.7rem;
  line-height: 1;
}

.portable-badge span {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.05rem;
}

.school-teaser {
  margin: 0.5rem 0 0;
  color: var(--ink);
  font-size: 0.95rem;
}

.school-more {
  display: none;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 3px dashed var(--ink);
  color: var(--ink);
}

.school-card[aria-expanded="true"] .school-more { display: block; }

.card-hint {
  margin-top: 0.65rem;
  font-family: var(--hand);
  font-size: 1.05rem;
  color: var(--navy);
}

.school-card[aria-expanded="true"] .card-hint-open { display: none; }
.school-card[aria-expanded="false"] .card-hint-close { display: none; }

/* Timeline */
.timeline {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0 0 0 0.7rem;
  border-left: 4px solid var(--navy);
}

.timeline-item { margin: 0 0 0.65rem; position: relative; }

.timeline-btn {
  appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-c);
  padding: 0.8rem 1rem 0.8rem 1.2rem;
  cursor: pointer;
  position: relative;
}

.timeline-btn::before {
  content: "";
  position: absolute;
  left: -1.05rem;
  top: 1.15rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 60% 40% 55% 45%;
  background: var(--yellow);
  border: 3px solid var(--ink);
}

.timeline-item.is-goal .timeline-btn {
  background: var(--peach);
}

.timeline-item.is-goal .timeline-btn::before { background: var(--orange); }

.timeline-btn:hover,
.timeline-btn[aria-expanded="true"] {
  background: var(--yellow);
}

.timeline-when {
  display: block;
  font-family: var(--hand);
  color: var(--navy);
  font-size: 1.2rem;
}

.timeline-title { display: block; margin-top: 0.1rem; }

.timeline-detail {
  display: none;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.timeline-btn[aria-expanded="true"] .timeline-detail { display: block; }

/* Letter */
.letter-section {
  background: transparent;
  padding: 2.4rem 0 2.8rem;
}

.letter-sheet {
  background: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 18px 28px 16px 24px / 24px 16px 28px 18px;
  overflow: hidden;
  max-width: 52rem;
  margin: 0 auto;
}

.letter-banner {
  background: var(--navy);
  color: var(--cream);
  padding: 1.4rem 1.4rem 1.2rem;
  border-bottom: 3px solid var(--ink);
}

.letter-banner h2 {
  color: var(--cream);
  margin: 0 0 0.25rem;
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
}

.letter-banner p {
  color: var(--yellow);
  font-family: var(--hand);
  font-size: 1.2rem;
  margin: 0;
}

.letter-body { padding: 1.4rem 1.4rem 1.8rem; }

.letter-ask {
  color: var(--navy);
  font-weight: 800;
  font-size: 1.12rem;
  line-height: 1.4;
}

.letter-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 1.15rem 0;
}

.letter-stats div {
  background: var(--sky);
  border: 3px solid var(--ink);
  padding: 0.6rem 0.7rem;
  border-radius: var(--wobble-d);
}

.letter-stats div:nth-child(2) { background: var(--peach); }
.letter-stats div:nth-child(3) { background: var(--mint); }
.letter-stats div:nth-child(4) { background: var(--lilac); }
.letter-stats div:nth-child(5) { background: var(--yellow); }

.letter-stats strong {
  display: block;
  font-family: var(--hand);
  color: var(--navy);
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1;
}

.letter-stats span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  margin-top: 0.2rem;
}

@media (min-width: 700px) {
  .letter-banner,
  .letter-body { padding-left: 2.1rem; padding-right: 2.1rem; }
  .letter-stats { grid-template-columns: repeat(5, 1fr); }
}

.letter-timeline {
  display: grid;
  grid-template-columns: 7.25rem 1fr;
  gap: 0.4rem 1rem;
  margin: 1rem 0 1.25rem;
  align-items: start;
}

@media (min-width: 700px) {
  .letter-timeline { grid-template-columns: 7.5rem 1fr 7.5rem 1fr; }
}

.letter-timeline dt {
  font-family: var(--hand);
  font-size: 1.15rem;
  color: var(--navy);
  margin: 0;
}

.letter-timeline dd { margin: 0 0 0.55rem; }

.help-box {
  background: var(--peach);
  border: 3px solid var(--ink);
  border-left: 8px solid var(--orange);
  border-radius: 6px 18px 14px 8px / 16px 8px 18px 6px;
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
}

.help-box h3 { margin: 0 0 0.35rem; font-size: 1.35rem; }

.help-box ol {
  margin: 0;
  padding-left: 1.2rem;
}

.help-box li { margin: 0.25rem 0; }

/* CTA */
.cta-band {
  background: transparent;
  color: var(--ink);
  padding: 0 0 3rem;
  text-align: center;
}

.cta-inner {
  background: var(--navy);
  color: var(--cream);
  border: 3px solid var(--ink);
  border-radius: 36px 20px 40px 18px / 18px 40px 16px 36px;
  padding: 2.1rem 1.4rem 2.2rem;
}

.cta-band h2 { color: var(--cream); }

.cta-band p {
  color: #f3ead6;
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.cta-band .btn-row { justify-content: center; }

/* FAQ / inner pages */
.page-intro { padding: 2rem 0 1.1rem; }

.page-intro .lede { margin-bottom: 0.4rem; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-bottom: 3rem;
}

.faq-item {
  border: 3px solid var(--ink);
  border-radius: var(--wobble-c);
  background: var(--cream);
  overflow: hidden;
}

.faq-item:nth-child(2n) { background: var(--sky); border-radius: var(--wobble-b); }
.faq-item:nth-child(3n) { background: var(--peach); border-radius: var(--wobble-d); }
.faq-item[open] { background: var(--yellow); }

.faq-item summary {
  cursor: pointer;
  font-family: var(--hand);
  font-size: 1.25rem;
  color: var(--navy);
  padding: 0.85rem 1.05rem 0.75rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-family: var(--hand);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--orange-deep);
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "\2212"; }

.faq-item .faq-answer {
  padding: 0 1.1rem 1.1rem;
  border-top: 3px dashed var(--ink);
  padding-top: 0.85rem;
}

.faq-answer ul {
  margin: 0.3rem 0 0.8rem;
  padding-left: 1.2rem;
}

.faq-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.98rem;
}

.faq-table th,
.faq-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border-bottom: 2px solid var(--ink);
}

.faq-table th {
  color: var(--navy);
  white-space: nowrap;
  width: 9rem;
  font-family: var(--hand);
  font-size: 1.1rem;
  font-weight: 400;
}

/* Templates */
.howto {
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-b);
  padding: 1.05rem 1.2rem;
  margin: 1.15rem 0 1.5rem;
}

.details-form {
  background: var(--peach);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-a);
  padding: 1.15rem 1.2rem 1.3rem;
  margin-bottom: 1.8rem;
}

.details-form h2 { margin-bottom: 0.3rem; }

.form-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}

label {
  display: block;
  font-weight: 800;
  color: var(--navy);
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
}

input[type="text"],
select {
  width: 100%;
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 3px solid var(--ink);
  border-radius: 14px 8px 16px 10px / 10px 16px 8px 14px;
  background: var(--cream);
  color: var(--ink);
  min-height: 2.75rem;
}

input[type="text"]:focus,
select:focus {
  outline: 3px solid var(--orange);
  outline-offset: 1px;
}

.placeholder-mark,
.letter-text mark,
.letter-preview mark {
  background: var(--yellow);
  color: var(--ink);
  padding: 0 0.15em;
  border-radius: 3px;
  font-weight: 800;
}

.letter-card {
  border: 3px solid var(--ink);
  border-radius: var(--wobble-b);
  padding: 1.25rem 1.2rem 1.3rem;
  margin-bottom: 1.4rem;
  background: var(--cream);
}

.letter-card:nth-child(odd) { border-radius: var(--wobble-a); }

.letter-card h2 {
  font-size: 1.6rem;
  margin-bottom: 0.35rem;
}

.recipient-meta {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.recipient-meta a { font-weight: 800; }

.letter-preview {
  background: #fffdf6;
  border: 3px dashed var(--ink);
  border-radius: 12px 18px 10px 16px / 16px 10px 18px 12px;
  padding: 1rem 1.1rem;
  white-space: pre-wrap;
  font-family: var(--font);
  line-height: 1.55;
  margin: 0 0 1rem;
}

.mla-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.mla-list li {
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: var(--wobble-d);
  padding: 0.5rem 0.75rem;
}

.note {
  font-size: 0.92rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--navy-deep);
  color: #e8dcbd;
  padding: 2rem 0 2.3rem;
  font-size: 0.92rem;
  border-top: 3px solid var(--ink);
}

.site-footer a { color: var(--yellow); }

.site-footer strong { color: var(--cream); }

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 700px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
  }
}

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

.copied-toast {
  font-family: var(--hand);
  font-size: 1.1rem;
  color: var(--ok);
  margin-left: 0.5rem;
}

.nowrap { white-space: nowrap; }

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

h1.has-underline,
h2.has-underline {
  display: block;
}

h1.has-underline .doodle,
h2.has-underline .doodle {
  display: inline-block;
  vertical-align: -0.15em;
  margin-right: 0.15rem;
}

h1.has-underline::after,
h2.has-underline::after {
  display: block;
  width: min(16rem, 70%);
}

h1.has-underline .doodle { width: 2.5rem; height: 2.5rem; color: var(--orange-deep); }
h2.has-underline .doodle { width: 2.15rem; height: 2.15rem; color: var(--navy); }
