/* ---------- Fonts ---------- */
/* Instrument Serif ships only with Regular + Italic; CSS rules requesting
   weights 700/900 will be browser-synthesized into a faux-heavy. */
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/Instrument-Serif/InstrumentSerif-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/Instrument-Serif/InstrumentSerif-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: block;
}

@font-face {
  font-family: 'Canela';
  src: url('fonts/canela-text-trial/CanelaText-Regular-Trial.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Canela';
  src: url('fonts/canela-text-trial/CanelaText-RegularItalic-Trial.otf') format('opentype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Canela';
  src: url('fonts/canela-text-trial/CanelaText-Medium-Trial.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Canela';
  src: url('fonts/canela-text-trial/CanelaText-Bold-Trial.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Canela';
  src: url('fonts/canela-text-trial/CanelaText-Black-Trial.otf') format('opentype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
/* Spec lives in CLAUDE.md → "Visual Design → Colour tokens".
   The --color-* tokens are the source of truth; the legacy aliases
   below exist only to keep older class rules working. */
:root {
  --color-ink: #1c1c1e;
  --color-navy: #26334d;
  --color-brand: #3d5a80;
  --color-brand-hover: #4a6fa5;
  --color-paper: #ffffff;
  --color-offwhite: #f8f7f4;
  --color-rule: #e5e7eb;
  --color-muted: #6b7280;

  /* Legacy aliases */
  --bg: var(--color-paper);
  --ink: var(--color-ink);
  --ink-soft: var(--color-ink);
  --muted: var(--color-muted);
  --muted-soft: #9ca3af;
  --border: var(--color-rule);
  --border-input: var(--color-rule);
  --surface: var(--color-offwhite);
  --surface-alt: var(--color-offwhite);
  --accent: var(--color-brand);
  --accent-hover: var(--color-brand-hover);
  --accent-mid: var(--color-navy);

  --radius: 6px;
  --radius-card: 8px;
  --maxw: 1120px;
  --gutter: clamp(20px, 4vw, 48px);
  --brand-stripes: linear-gradient(
    to right,
    #61bb46 0%, #61bb46 16.6667%,
    #fdb827 16.6667%, #fdb827 33.3333%,
    #f5821f 33.3333%, #f5821f 50%,
    #e03a3e 50%, #e03a3e 66.6667%,
    #963d97 66.6667%, #963d97 83.3333%,
    #159cd9 83.3333%, #159cd9 100%
  );
  --font-display: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Times New Roman', serif;
  --font-serif: 'Canela', 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Times New Roman', serif;
  --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

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

html, body { margin: 0; padding: 0; }
html, body { overflow-x: hidden; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; }

ul { margin: 0; padding: 0; list-style: none; }

.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;
}

/* ---------- Nav ---------- */
.nav {
  position: relative;
  z-index: 110;
  width: 100%;
  padding: 12px var(--gutter);
  background: #ffffff;
}

.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.nav__links {
  display: flex;
  gap: 28px;
  justify-self: end;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--ink);
}

.nav__links a {
  position: relative;
  padding: 4px 0;
  transition: opacity 180ms ease;
}
.nav__links:hover a { opacity: 0.4; }
.nav__links a:hover { opacity: 1; }

/* The mobile-only CTA in the slide-down menu; hidden on desktop where
   .nav__actions provides its own subscribe pill. */
.nav__links-cta { display: none; }

.nav__brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.nav__brand img {
  height: 21px;
  width: auto;
  display: block;
}

.nav__actions {
  justify-self: end;
  display: flex;
  align-items: center;
}

.nav__subscribe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: #ffffff;
  background: var(--brand-stripes);
  background-origin: border-box;
  background-clip: border-box;
  padding: 8px 18px;
  border-radius: var(--radius);
  transition: filter 180ms ease;
}
.nav__subscribe:hover { filter: brightness(0.92); }
.nav__subscribe[aria-current="page"] { filter: brightness(0.92); }

.nav__menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  justify-self: start;
}
.nav__menu-toggle span {
  display: block;
  width: 22px;
  height: 1.6px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
              opacity 180ms ease;
}
.nav__menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(5.6px) rotate(45deg);
}
.nav__menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav__menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-5.6px) rotate(-45deg);
}

/* Injected by JS on mobile menu; hidden on desktop */
.nav__menu-close {
  display: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(40px, 6vw, 96px) var(--gutter) clamp(32px, 5vw, 72px);
}

.hero__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  text-align: left;
}

.hero__text {
  max-width: 500px;
}

.hero__mascot {
  width: clamp(120px, 14vw, 172px);
  height: auto;
  margin: 0 auto 28px;
}

.hero__headline {
  font-family: var(--font-display);
  font-weight: 1000;
  font-size: clamp(52px, 6.3vw, 88px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 24px;
}

.hero__subtext {
  max-width: 480px;
  margin: 0 0 28px;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
/* The <br /> after "your inbox," is a mobile-only line-break to keep
   that phrase on the first line. Hide it on desktop where the natural
   wrap is already balanced. */
.hero__subtext br { display: none; }

.hero .subscribe-form {
  margin: 0;
}

.hero .subscribe-status {
  text-align: left;
}

.hero__illustration {
  display: block;
  width: clamp(320px, 34vw, 460px);
  height: auto;
  margin: 0;
  pointer-events: none;
  user-select: none;
}

/* ---------- Subscribe form ---------- */
.subscribe-form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}

.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 18px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border-input);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.subscribe-form input[type="email"]::placeholder { color: var(--muted-soft); }
.subscribe-form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 90, 128, 0.22);
}

.subscribe-form .btn {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--radius);
}
.subscribe-form .btn svg { display: block; }
.subscribe-form .btn:disabled { opacity: 0.65; cursor: wait; }

.hero .subscribe-form { max-width: 500px; }
.hero .subscribe-form input[type="email"] {
  height: 52px;
  font-size: 15px;
}
.hero .subscribe-form .btn {
  width: 52px;
  height: 52px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.005em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 180ms ease, color 180ms ease;
}

.btn--primary {
  background: var(--brand-stripes);
  background-origin: border-box;
  background-clip: border-box;
  color: #ffffff;
  font-weight: 600;
  transition: filter 180ms ease;
}
.btn--primary:hover { filter: brightness(0.92); }
.btn--primary:active { filter: brightness(0.85); }

.subscribe-notice {
  max-width: none;
  margin: 12px auto 0;
  font-family: var(--font-sans);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--muted);
  opacity: 0.78;
  text-align: center;
  white-space: nowrap;
}

.subscribe-status {
  min-height: 1.2em;
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.subscribe-status.is-success { color: var(--ink); }
.subscribe-status.is-error { color: #b00020; }

/* ---------- Archive ---------- */
.archive {
  padding: 0 var(--gutter) 96px;
}

.archive__heading {
  max-width: var(--maxw);
  margin: 0 auto 28px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 3.9vw, 47px);
  letter-spacing: -0.01em;
  color: var(--ink);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.archive__grid {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 40px 32px;
}

.post-card__link {
  display: block;
  color: var(--color-ink);
}

.post-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  margin-bottom: 16px;
  background-color: #ececea;
  background-size: cover;
  background-position: center;
}

.post-card__thumb--img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background-color: #ececea;
}

.post-card__thumb--fallback {
  background-color: #ececea;
}

/* ---------- Archive loading / empty ---------- */
.post-card__thumb--loading {
  background: #ececea;
  animation: pulse 1.6s ease-in-out infinite;
}
.post-card__bar {
  height: 12px;
  border-radius: 4px;
  background: #ececea;
  margin-bottom: 8px;
  animation: pulse 1.6s ease-in-out infinite;
}
.post-card__bar--meta { width: 38%; height: 10px; margin-top: 4px; }
.post-card__bar--title { width: 82%; height: 18px; margin-top: 12px; margin-bottom: 12px; }
.post-card__bar--excerpt { width: 100%; }
.post-card__bar--excerpt.is-short { width: 62%; margin-bottom: 0; }

.archive__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 36px 0;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.post-card__meta {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-transform: none;
}

.post-card__title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.post-card__excerpt {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Subscribe page ---------- */
.subscribe-page {
  max-width: 560px;
  margin: 0 auto;
  padding: clamp(48px, 10vw, 120px) var(--gutter);
  text-align: center;
}

.subscribe-page .hero__mascot { margin-bottom: 28px; }

.subscribe-page__headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--ink);
}

.subscribe-page__subtext {
  margin: 0 auto 32px;
  max-width: 420px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  width: 32px;
  height: 32px;
  color: var(--ink-soft);
  transition: color 180ms ease, transform 180ms ease;
}
.social-link:hover { color: var(--accent); transform: translateY(-1px); }

/* ---------- Legal pages ---------- */
.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(64px, 10vw, 120px);
}

.legal-page__headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}

.legal-page__updated {
  margin: 0 0 40px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--muted);
}

.legal-page__lead {
  margin: 0 0 28px;
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
}

.legal-page__article {
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.legal-page__article h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 40px 0 12px;
  color: var(--ink);
}

.legal-page__article p { margin: 0 0 16px; }
.legal-page__article ul {
  margin: 0 0 16px;
  padding-left: 20px;
}
.legal-page__article li { margin-bottom: 8px; }

.legal-page__article a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-page__article a:hover { color: var(--accent-hover); }

.legal-page__article strong { color: var(--ink); font-weight: 600; }

/* ---------- Post page (Beehiiv content wrapper) ---------- */
.post-page {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) var(--gutter) clamp(48px, 8vw, 96px);
}
.post-page__article img,
.post-page__article video {
  max-width: 100%;
  height: auto;
}

/* Force site typography over Beehiiv's inline font styles.
   !important is required because the Beehiiv HTML sets font-family
   directly on its elements. */
.post-page__article,
.post-page__article p,
.post-page__article li,
.post-page__article blockquote,
.post-page__article span,
.post-page__article div,
.post-page__article a,
.post-page__article strong,
.post-page__article em {
  font-family: var(--font-sans) !important;
}
.post-page__article {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.post-page__article p {
  margin: 0 0 18px;
}
.post-page__article a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-page__article a:hover { color: var(--accent-hover); }
.post-page__article strong { color: var(--ink); font-weight: 600; }

.post-page__article h1,
.post-page__article h2,
.post-page__article h3,
.post-page__article h4,
.post-page__article h5,
.post-page__article h6,
.post-page__article h1 *,
.post-page__article h2 *,
.post-page__article h3 *,
.post-page__article h4 *,
.post-page__article h5 *,
.post-page__article h6 * {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  color: var(--ink) !important;
  letter-spacing: -0.01em !important;
  line-height: 1.15 !important;
}
.post-page__article h1 {
  font-size: clamp(37px, 4.8vw, 53px);
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}
.post-page__article h2 {
  font-size: clamp(29px, 3.3vw, 35px);
  margin: 36px 0 12px;
}
.post-page__article h3 {
  font-size: clamp(24px, 2.6vw, 29px);
  margin: 28px 0 10px;
}
.post-page__article h4 {
  font-size: 22px;
  margin: 24px 0 8px;
}

/* The dek: the subtitle that sits directly under the post's main title.
   Beehiiv renders it as the h2 immediately following the leading h1. */
.post-page__article h1 + h2,
.post-page__article h1 + h2 *,
.post-page__article > header h2,
.post-page__article > header h2 *,
.post-page__article .subtitle,
.post-page__article .subtitle * {
  font-family: var(--font-sans) !important;
  font-weight: 400 !important;
  font-size: clamp(15px, 1.3vw, 16px) !important;
  letter-spacing: 0 !important;
  line-height: 1.5 !important;
  color: var(--muted) !important;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 22px var(--gutter);
  margin-top: auto;
}

.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--muted-soft);
}

.footer__links { display: flex; gap: 18px; }
.footer__links a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 180ms ease;
}
.footer__links a:hover { color: var(--accent); }

/* ---------- Page layout helpers ---------- */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
body.is-modal-open { overflow: hidden; }

/* ---------- Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[aria-hidden="false"] { display: flex; }

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(28, 28, 30, 0.45);
}

.modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(28, 28, 30, 0.18);
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  transition: color 180ms ease, background 180ms ease;
}
.modal__close:hover { color: var(--ink); background: var(--surface); }

.modal__mascot {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
}

.modal__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 22px;
}

.modal__form { margin: 0 auto; max-width: 360px; }
.modal__form input[type="email"] { height: 48px; }
.modal__form .btn { width: 48px; height: 48px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  /* iOS Safari renders antialiased as noticeably thinner than desktop.
     Switching to auto restores subpixel weight on mobile WebKit. */
  body {
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
  }
  .hero__headline,
  .archive__heading,
  .post-card__title,
  .subscribe-page__headline,
  .legal-page__headline,
  .legal-page__article h2,
  .modal__title {
    text-shadow:
      0 0 0.8px currentColor,
      0 0 0.8px currentColor,
      0 0 0.8px currentColor,
      0 0 0.8px currentColor,
      0 0 0.8px currentColor;
  }

  /* Nav: hamburger left | brand centered | (no subscribe pill on mobile) */
  .nav { padding: 10px var(--gutter); }
  .nav__inner {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }
  .nav__brand {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: center;
  }
  .nav__brand img {
    height: 21px;
  }
  .nav__menu-toggle {
    display: inline-flex;
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: auto;
    height: auto;
    gap: 4px;
    padding: 2px 0;
  }
  .nav__menu-toggle span {
    width: 22px;
  }
  .nav__actions { display: none; }

  /* Slide-down nav menu */
  .nav__links {
    position: fixed;
    inset: 0;
    z-index: 95;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 84px 28px 40px;
    background: #ffffff;
    transform: translateY(-100%);
    transition: transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1),
                visibility 0s linear 320ms;
    visibility: hidden;
  }
  body.is-menu-open .nav__menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 14px;
    right: var(--gutter);
    z-index: 100;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 0;
    color: var(--ink);
    cursor: pointer;
  }
  /* Hide the hamburger while the menu is open — the X replaces it */
  body.is-menu-open .nav__menu-toggle {
    visibility: hidden;
  }
  .nav__links[data-open="true"] {
    transform: translateY(0);
    visibility: visible;
    transition: transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1),
                visibility 0s linear 0s;
  }
  .nav__links li { width: 100%; }
  .nav__links a {
    display: block;
    width: 100%;
    padding: 18px 0;
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 26px;
    line-height: 1.2;
    color: var(--ink);
    border-bottom: 1px solid var(--border);
  }
  .nav__links:hover a { opacity: 1; }

  /* Mobile-only Subscribe CTA inside the slide-down menu */
  .nav__links-cta {
    margin-top: 24px;
  }
  .nav__links-cta a {
    background: var(--brand-stripes);
    background-origin: border-box;
    background-clip: border-box;
    color: #ffffff;
    text-align: center;
    padding: 16px;
    border-radius: var(--radius);
    border-bottom: 0;
    font-weight: 500;
    font-size: 18px;
    transition: filter 180ms ease;
  }
  .nav__links-cta a:hover { filter: brightness(0.92); }

  body.is-menu-open { overflow: hidden; }

  /* Hero — revert two-column desktop layout to single-column stack */
  .hero {
    padding: 32px var(--gutter) 24px;
  }
  .hero__inner {
    display: block;
    text-align: center;
  }
  .hero__text {
    max-width: 100%;
    padding-top: 32px;
  }
  .hero__mascot { width: 108px; margin-bottom: 18px; }
  .hero__headline {
    font-size: clamp(43px, 14vw, 67px);
    font-weight: 1000;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
  }
  .hero__subtext {
    font-size: 13px;
    line-height: 1.55;
    margin: 0 auto 24px;
    /* Wide enough so the first line ("...Straight to your inbox,")
       stays unbroken on most phones — the <br /> in the markup
       provides the intended split before "every Friday". */
    max-width: min(100%, 360px);
  }
  .hero__subtext br { display: inline; }
  .hero .subscribe-form { margin: 0 auto; }
  .hero .subscribe-status { text-align: center; }
  .hero__illustration {
    width: 100%;
    max-width: 330px;
    /* Negative top margin pulls the character up over the PNG's ~6.1%
       transparent header space so the full body/desk fits within shorter
       in-app browser viewports (e.g. Instagram). Fixed px max-width
       (no vh) keeps the size stable when in-app browser toolbars
       collapse on scroll. */
    margin: -16px auto 0;
  }

  /* Subscribe form: input + square arrow button, sized to feel
     proportional next to the headline rather than full-bleed. */
  .subscribe-form {
    flex-direction: row;
    gap: 8px;
    max-width: min(100%, 340px);
  }
  .subscribe-form input[type="email"] {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 1px solid var(--border-input);
    border-radius: var(--radius);
    /* 16px prevents iOS auto-zoom on focus. */
    font-size: 16px;
  }
  .subscribe-form .btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius);
  }
  .hero .subscribe-form { max-width: min(100%, 340px); }
  .hero .subscribe-form input[type="email"] { height: 44px; }
  .hero .subscribe-form .btn { width: 44px; height: 44px; }

  /* Subscribe notice (only present on legacy pages, kept defensive) */
  .subscribe-notice { white-space: normal; max-width: 420px; }

  /* Archive */
  .archive { padding: 0 var(--gutter) 64px; }
  .archive__heading {
    font-size: 31px;
    font-weight: 700;
    padding-bottom: 14px;
    margin-bottom: 22px;
    text-shadow: none;
  }
  .archive__grid {
    gap: 28px 0;
    grid-template-columns: 1fr;
  }
  .post-card__title { font-size: 25px; font-weight: 700; text-shadow: none; }
  .post-card__excerpt { font-size: 13.5px; }

  /* Subscribe page */
  .subscribe-page { padding: 36px var(--gutter) 72px; }
  .subscribe-page .hero__mascot { width: 108px; margin-bottom: 20px; }
  .subscribe-page__headline { font-size: 30px; font-weight: 800; }
  .subscribe-page__subtext {
    font-size: 14.5px;
    max-width: 100%;
  }
  .subscribe-page__subtext br { display: none; }
  .social-link { margin-top: 32px; }

  /* Modal */
  .modal { padding: 16px; }
  .modal__dialog {
    padding: 30px 22px 24px;
    border-radius: 14px;
    max-width: 100%;
  }
  .modal__close {
    width: 40px;
    height: 40px;
    top: 8px;
    right: 8px;
  }
  .modal__mascot { width: 56px; height: 56px; margin-bottom: 12px; }
  .modal__title { font-size: 20px; font-weight: 800; margin-bottom: 18px; }
  .modal__form { max-width: 100%; }
  .modal__form input[type="email"] { height: 46px; }
  .modal__form .btn { width: 46px; height: 46px; }

  /* Legal pages */
  .legal-page { padding: 36px var(--gutter) 64px; }
  .legal-page__headline { font-size: 32px; font-weight: 800; }
  .legal-page__updated { margin-bottom: 28px; }
  .legal-page__article {
    font-size: 15px;
    line-height: 1.65;
  }
  .legal-page__article h2 {
    font-size: 20px;
    font-weight: 800;
    margin-top: 32px;
  }

  /* Footer */
  .footer { padding: 18px var(--gutter); }
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer__links { gap: 14px; flex-wrap: wrap; }
}

@media (max-width: 380px) {
  .nav__brand { font-size: 20px; }
  .hero__subtext { font-size: 12.5px; }
  .subscribe-page__headline { font-size: 26px; }
  .legal-page__headline { font-size: 28px; }
}
