:root {
  --navy: #102252;
  --coral: #ef765e;
  --sage: #8fb46e;
  --blue: #5f82b2;
  --cream: #fffaf3;
  --paper: #fffdf9;
  --muted: #65708b;
  --line: rgba(16, 34, 82, 0.13);
  --page: #f3f5f8;
  color: var(--navy);
  background: var(--page);
  font-family: "Nunito", Avenir, "Avenir Next", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  width: min(100% - 28px, 1380px);
  min-height: 100vh;
  margin: 24px auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(16, 34, 82, 0.08);
}

.draft-banner {
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #d29c22;
  color: var(--navy);
  background: #fff1c7;
  text-align: center;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 4px solid rgba(239, 118, 94, 0.42);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  color: white;
  background: var(--navy);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(22px, 5vw, 70px);
  background: var(--cream);
}

.site-header {
  border-bottom: 1px solid var(--line);
  border-radius: 30px 30px 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 1.35rem;
  font-weight: 900;
  text-decoration: none;
}

.brand img {
  width: 126px;
  height: auto;
}

.brand span {
  color: var(--muted);
}

.site-link,
.site-footer a {
  font-weight: 900;
  text-decoration: none;
}

.site-link:hover,
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.article-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  align-items: center;
  min-height: 520px;
  padding: clamp(48px, 7vw, 92px) clamp(30px, 8vw, 110px);
  overflow: hidden;
  color: white;
  isolation: isolate;
}

.article-hero::before,
.article-hero::after {
  position: absolute;
  z-index: -1;
  content: "";
  border-radius: 48% 52% 61% 39% / 44% 39% 61% 56%;
  background: rgba(255, 255, 255, 0.1);
}

.article-hero::before {
  width: 420px;
  height: 420px;
  top: -170px;
  left: -110px;
}

.article-hero::after {
  width: 180px;
  height: 180px;
  right: 29%;
  bottom: -110px;
  opacity: 0.55;
  transform: rotate(25deg);
}

.article-hero--blue {
  background: var(--blue);
}

.article-hero--mint {
  background: #35746c;
}

.article-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 690px;
}

.article-topic {
  margin: 0;
  color: var(--cream);
  font-size: clamp(0.88rem, 1.5vw, 1.05rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.article-hero h1 {
  max-width: 650px;
  margin: 16px 0 20px;
  font-size: clamp(3rem, 6.4vw, 5.6rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.article-subtitle {
  max-width: 650px;
  margin: 0;
  color: #f6f8fc;
  font-size: clamp(1.2rem, 2.15vw, 1.7rem);
  line-height: 1.55;
}

.article-byline {
  margin: 28px 0 0;
  color: #ffe2d9;
  font-size: 1.05rem;
  font-weight: 900;
}

.article-hero__doodle {
  width: min(100%, 500px);
  max-height: 390px;
  margin-inline: auto;
  filter:
    brightness(0)
    invert(1)
    drop-shadow(0 16px 28px rgba(16, 34, 82, 0.12));
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 700px) minmax(200px, 260px);
  justify-content: center;
  gap: clamp(42px, 7vw, 88px);
  padding: clamp(56px, 8vw, 104px) clamp(24px, 7vw, 96px) 110px;
}

.article-content {
  width: 100%;
  max-width: 700px;
  min-width: 0;
}

.article-content h2,
.article-content h3 {
  color: var(--navy);
  text-wrap: balance;
  scroll-margin-top: 24px;
}

.article-content h2 {
  margin: 3.2rem 0 1rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  margin: 2rem 0 0.55rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

.article-content p,
.article-content li {
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.16rem);
  line-height: 1.82;
}

.article-content p {
  margin: 0 0 1.25rem;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1.75rem;
  padding-left: 1.45rem;
}

.article-content li + li {
  margin-top: 0.65rem;
}

.article-content strong {
  color: var(--navy);
}

.article-content a {
  color: #3d679f;
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.article-content blockquote {
  position: relative;
  margin: 2rem 0;
  padding: 24px 26px 24px 32px;
  border: 1px solid rgba(143, 180, 110, 0.42);
  border-radius: 24px;
  background: #f0f5e9;
  transform: rotate(-0.25deg);
}

.article-content blockquote:nth-of-type(even) {
  border-color: rgba(239, 118, 94, 0.3);
  background: #fff0e9;
  transform: rotate(0.25deg);
}

.article-content blockquote::before {
  position: absolute;
  top: -16px;
  right: 22px;
  color: var(--coral);
  content: "✦";
  font-size: 2rem;
}

.article-content blockquote p {
  margin: 0;
}

.margin-notes {
  position: sticky;
  top: 24px;
  align-self: start;
  display: grid;
  gap: 28px;
}

.margin-note {
  position: relative;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--cream);
}

.margin-note::after {
  position: absolute;
  right: 18px;
  bottom: -22px;
  color: var(--navy);
  content: "⌁";
  font-family: "Patrick Hand", cursive;
  font-size: 3rem;
  opacity: 0.18;
  transform: rotate(-14deg);
}

.margin-note--coral {
  border-color: rgba(239, 118, 94, 0.32);
  background: #fff0e9;
  transform: rotate(1deg);
}

.margin-note--sage {
  border-color: rgba(143, 180, 110, 0.42);
  background: #f0f5e9;
  transform: rotate(-1deg);
}

.margin-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.margin-note__title {
  margin-bottom: 10px !important;
  color: var(--coral) !important;
  font-family: "Patrick Hand", cursive;
  font-size: 1.65rem;
}

.site-footer {
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  border-radius: 0 0 30px 30px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .article-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    min-height: 460px;
  }

  .article-layout {
    grid-template-columns: minmax(0, 700px);
  }

  .margin-notes {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: -1;
  }
}

@media (max-width: 650px) {
  body {
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .site-header,
  .site-footer {
    padding: 16px 20px;
    border-radius: 0;
  }

  .brand img {
    width: 108px;
  }

  .article-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 52px 24px 38px;
  }

  .article-hero h1 {
    font-size: clamp(3rem, 15vw, 4.4rem);
  }

  .article-hero__doodle {
    width: min(84%, 360px);
    max-height: 250px;
    margin-top: 26px;
  }

  .article-layout {
    padding: 48px 22px 76px;
  }

  .margin-notes {
    grid-template-columns: 1fr;
  }

  .article-content blockquote {
    margin-inline: -4px;
  }
}

@media (max-width: 390px) {
  .site-link {
    font-size: 0.9rem;
  }

  .brand span {
    display: none;
  }

  .article-layout {
    padding-inline: 18px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  body {
    width: 100%;
    margin: 0;
    border: 0;
    box-shadow: none;
  }

  .site-header,
  .site-footer,
  .margin-notes {
    display: none;
  }

  .article-hero {
    min-height: 0;
    color: var(--navy);
    background: white;
  }

  .article-hero__doodle {
    filter: none;
  }

  .article-layout {
    display: block;
    padding: 40px 0;
  }
}
