/* A focused newsletter page within the existing site chrome. */
html:has(#newsletter),
body:has(#newsletter) {
  background: var(--pb-bg, #0b0c0f);
}

body:has(#newsletter) .md-header,
body:has(#newsletter) .md-tabs {
  background: var(--pb-bg, #0b0c0f);
  color: #fff;
  box-shadow: none;
}

body:has(#newsletter) .md-tabs {
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

body:has(#newsletter) .md-tabs__link {
  color: #d4d9e2;
}

body:has(#newsletter) .md-tabs__item--active .md-tabs__link {
  color: #fff;
}

body:has(#newsletter) .md-main__inner {
  display: block;
  max-width: none;
  margin: 0;
}

body:has(#newsletter) .md-content,
body:has(#newsletter) .md-content__inner {
  max-width: none;
  margin: 0;
  padding: 0;
}

body:has(#newsletter) .md-content__inner::before,
body:has(#newsletter) .md-content__inner::after,
body:has(#newsletter) .md-content__inner > h1:first-child,
body:has(#newsletter) .md-content__button,
body:has(#newsletter) .md-sidebar--secondary,
body:has(#newsletter) .md-footer,
body:has(#newsletter) .md-top {
  display: none;
}

@media screen and (min-width: 76.25em) {
  body:has(#newsletter) .md-sidebar--primary {
    display: none;
  }
}


/* The page in the channel style (17 Oct 2026): flat colours only, the video's dot grid,
   a heavy headline with one yellow accent word, and the yellow / blue / green step pills. */
body:has(#newsletter) .md-main {
  background-color: var(--pb-bg, #0b0c0f);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='12' cy='12' r='1.1' fill='%231a202a'/%3E%3C/svg%3E");
}

#newsletter {
  --nl-fg: #f5f7fa;
  --nl-muted: #a9b3c3;
  --nl-dim: #7d8797;
  --nl-line: #222a36;
  --nl-card: #111826;
  --nl-cardline: #2a3446;
  --nl-ink: #04070d;
  --nl-yellow: #f2cc60;
  --nl-blue: #58a6ff;
  --nl-green: #56d364;
  --nl-head: "Avenir Next", "Nunito Sans", var(--md-text-font, Inter), system-ui, sans-serif;
  --nl-mono: var(--md-code-font, "JetBrains Mono"), ui-monospace, Menlo, monospace;
  box-sizing: border-box;
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: calc(100svh - 100px);
  width: 100%;
  padding: 56px 32px 72px;
  color: var(--nl-fg);
}

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

#newsletter h1,
#newsletter p,
#newsletter ul,
#newsletter li {
  margin: 0;
  padding: 0;
  border: 0;
}

#newsletter .nl-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
  width: 100%;
  max-width: 1120px;
}

#newsletter .nl-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#newsletter .nl-eyebrow,
#newsletter .nl-lib-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--nl-muted);
  font-family: var(--nl-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#newsletter .nl-mark {
  width: 10px;
  height: 10px;
  background: var(--nl-yellow);
}

#newsletter h1 {
  margin-top: 20px;
  color: var(--nl-fg);
  font-family: var(--nl-head);
  font-size: 64px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.04;
}

#newsletter .nl-accent {
  position: relative;
  display: inline-block;
  color: var(--nl-yellow);
}

#newsletter .nl-accent::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: -7px;
  left: 2px;
  height: 6px;
  background: var(--nl-yellow);
}

#newsletter .nl-lead {
  max-width: 31em;
  margin-top: 26px;
  color: var(--nl-muted);
  font-size: 19px;
  line-height: 1.55;
  text-wrap: balance;
}

#newsletter .nl-gets {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 26px;
  list-style: none;
}

#newsletter .nl-gets li {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #dce2ea;
  font-size: 16.5px;
  line-height: 1.4;
}

#newsletter .nl-pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  color: #0a0c0b;
  font-family: var(--nl-head);
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}

#newsletter .nl-y { background: var(--nl-yellow); }
#newsletter .nl-b { background: var(--nl-blue); }
#newsletter .nl-g { background: var(--nl-green); }

#newsletter .nl-embed {
  width: 100%;
  max-width: 480px;
  min-width: 0;
  min-height: 110px;
  margin-top: 28px;
}

#newsletter-loading {
  padding: 24px 0;
  color: var(--nl-muted);
  font-size: 14px;
}

#newsletter .nl-embed iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  border: none;
  background: var(--pb-bg, #0b0c0f);
  /* beehiiv's frame paints white below its own content; hide the sub-pixel row under the button */
  clip-path: inset(0 0 1px 0);
}

#newsletter .nl-reassurance {
  margin-top: 10px;
  color: var(--nl-dim);
  font-size: 14px;
  line-height: 1.6;
}

#newsletter .nl-reassurance a {
  margin-left: 4px;
  color: var(--nl-muted);
  text-decoration: underline;
  text-decoration-color: rgba(169, 179, 195, 0.4);
  text-underline-offset: 3px;
}

#newsletter .nl-reassurance a:hover {
  color: var(--nl-fg);
  text-decoration-color: currentColor;
}

#newsletter .nl-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 480px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--nl-line);
}

#newsletter .nl-avatar {
  flex: none;
  width: 48px;
  height: 48px;
  padding: 8px;
  border: 1px solid var(--nl-cardline);
  border-radius: 24px;
  background: var(--nl-card);
}

#newsletter .nl-proof p {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#newsletter .nl-proof strong {
  color: var(--nl-fg);
  font-size: 16px;
  font-weight: 600;
}

#newsletter .nl-proof span {
  color: var(--nl-muted);
  font-size: 14.5px;
}

#newsletter .nl-proof a {
  color: var(--nl-blue);
}

#newsletter .nl-proof a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

#newsletter a:focus-visible {
  outline: 2px solid var(--nl-blue);
  outline-offset: 4px;
  border-radius: 2px;
}

/* the cheat sheet card: flat fills, hard ink shadow, dashed outline for the next (planned) sheet */
#newsletter .nl-lib {
  justify-self: center;
  width: 100%;
  max-width: 440px;
}

#newsletter .nl-lib-label {
  margin-bottom: 30px;
}

#newsletter .nl-stack {
  position: relative;
  padding: 48px 48px 0 0;
}

#newsletter .nl-sheet {
  border-radius: 10px;
}

#newsletter .nl-ghost {
  position: absolute;
  top: 0;
  right: 0;
  left: 48px;
  height: calc(100% - 48px);
  border: 1.5px dashed #46526a;
}

#newsletter .nl-ghost span {
  position: absolute;
  top: 5px;
  right: 14px;
  color: var(--nl-dim);
  font-family: var(--nl-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#newsletter .nl-back {
  position: absolute;
  top: 24px;
  right: 24px;
  left: 24px;
  height: calc(100% - 48px);
  border: 1.5px solid #222c3c;
  background: #0e141f;
}

#newsletter .nl-front {
  position: relative;
  padding: 26px 26px 22px;
  border: 1.5px solid var(--nl-cardline);
  background: var(--nl-card);
  box-shadow: 10px 10px 0 var(--nl-ink);
}

#newsletter .nl-sheet-top {
  display: flex;
  justify-content: space-between;
  color: var(--nl-dim);
  font-family: var(--nl-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#newsletter .nl-sheet-title {
  margin-top: 14px;
  color: var(--nl-fg);
  font-family: var(--nl-head);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.12;
}

#newsletter .nl-rule {
  width: 44px;
  height: 5px;
  margin-top: 14px;
  background: var(--nl-yellow);
}

#newsletter .nl-steps {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 22px;
}

#newsletter .nl-steps::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 13px;
  width: 2px;
  background: #2e3a4e;
}

#newsletter .nl-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

#newsletter .nl-step-t {
  display: block;
  color: var(--nl-fg);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.3;
}

#newsletter .nl-mono {
  display: block;
  margin-top: 3px;
  color: var(--nl-muted);
  font-family: var(--nl-mono);
  font-size: 12px;
}

#newsletter .nl-cmd {
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid #232c3a;
  border-radius: 6px;
  background: #0a0e15;
  color: var(--nl-muted);
  font-family: var(--nl-mono);
  font-size: 12.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

#newsletter .nl-prompt {
  color: var(--nl-green);
}

#newsletter .nl-sheet-foot {
  margin-top: 16px;
  color: var(--nl-dim);
  font-family: var(--nl-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#newsletter .nl-lib-cap {
  margin-top: 26px;
  color: var(--nl-muted);
  font-family: var(--nl-mono);
  font-size: 13px;
}

#newsletter .nl-lib-cap b {
  color: var(--nl-yellow);
}

/* tablet: one column, the card under the form */
@media screen and (max-width: 60em) {
  #newsletter .nl-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
    max-width: 600px;
  }

  #newsletter .nl-lib {
    justify-self: start;
  }
}

/* phone: the form right under the headline */
@media screen and (max-width: 37.5em) {
  #newsletter {
    align-items: start;
    padding: 30px 20px 48px;
  }

  #newsletter .nl-hero {
    gap: 44px;
  }

  #newsletter .nl-eyebrow {
    font-size: 11.5px;
  }

  #newsletter h1 {
    margin-top: 16px;
    font-size: 42px;
  }

  #newsletter .nl-lead {
    margin-top: 20px;
    font-size: 16.5px;
    text-wrap: pretty;
  }

  #newsletter .nl-embed { order: 4; margin-top: 24px; }
  #newsletter .nl-reassurance { order: 5; font-size: 13px; }
  #newsletter .nl-gets { order: 6; margin-top: 28px; }
  #newsletter .nl-proof { order: 7; }

  #newsletter .nl-gets li {
    font-size: 15.5px;
  }

  #newsletter .nl-lib-label {
    margin-bottom: 22px;
  }

  #newsletter .nl-stack {
    padding: 40px 40px 0 0;
  }

  #newsletter .nl-ghost {
    left: 40px;
    height: calc(100% - 40px);
  }

  #newsletter .nl-back {
    top: 20px;
    right: 20px;
    left: 20px;
    height: calc(100% - 40px);
  }

  #newsletter .nl-front {
    padding: 22px 20px 20px;
    box-shadow: 7px 7px 0 var(--nl-ink);
  }

  #newsletter .nl-sheet-title {
    font-size: 23px;
  }
}

@media screen and (max-width: 23em) {
  #newsletter {
    padding-right: 16px;
    padding-left: 16px;
  }

  #newsletter h1 {
    font-size: 38px;
  }
}

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

/* the welcome page (after the double opt-in): download buttons and the sheet preview */
#newsletter .nl-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

#newsletter .nl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 24px;
  border: 1.5px solid var(--nl-cardline);
  border-radius: 8px;
  color: var(--nl-fg);
  font-family: var(--nl-head);
  font-size: 17px;
  font-weight: 700;
}

#newsletter .nl-btn-primary {
  border-color: var(--nl-blue);
  background: var(--nl-blue);
  color: #06101c;
  box-shadow: 5px 5px 0 var(--nl-ink);
}

#newsletter .nl-btn:hover {
  border-color: var(--nl-fg);
}

#newsletter .nl-btn:focus-visible {
  outline: 2px solid var(--nl-blue);
  outline-offset: 4px;
}

#newsletter .nl-preview {
  display: block;
  justify-self: center;
  width: 100%;
  max-width: 420px;
}

#newsletter .nl-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1.5px solid var(--nl-cardline);
  border-radius: 10px;
  box-shadow: 10px 10px 0 var(--nl-ink);
}

#newsletter .nl-preview-cap {
  margin-top: 20px;
  color: var(--nl-muted);
  font-family: var(--nl-mono);
  font-size: 13px;
}

#newsletter a.nl-btn,
#newsletter a.nl-preview,
#newsletter a.nl-preview * {
  text-decoration: none;
}
