/* Newsletter: signup box (components/newsletter-box.php) and the confirm/unsubscribe pages. */

/* The card (guide bottom, front page): the logo's green with the logo icon big and cropped behind it, copy on the left,
   the form and its two promises on the right. */
.nl-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--s3) var(--s6);
  padding: clamp(28px, 4.5vw, 56px);
  border-radius: var(--radius-panel);
  background: var(--tone-green);
  color: var(--ink);
}
.nl-card-motif { right: -70px; bottom: -150px; width: 380px; fill: color-mix(in srgb, var(--ink) 7%, transparent); }
.nl-title { margin: 0 0 12px; font-family: var(--font-display); font-weight: 500; letter-spacing: var(--track-display); font-size: clamp(1.75rem, 3.2vw, 2.4rem); line-height: 1.1; text-wrap: balance; }
.nl-lead { margin: 0; font-size: var(--text-md); line-height: 1.5; max-width: 52ch; }
.nl-card-form { display: grid; gap: 14px; min-width: 0; }
@media (max-width: 860px) {
  .nl-card { grid-template-columns: 1fr; }
  .nl-card-motif { right: -60px; bottom: auto; top: -90px; width: 240px; }
}

.nl-form { display: grid; gap: 10px; min-width: 0; }
.nl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.nl-row input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  min-height: 54px;
  font: inherit;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  background: var(--surface);
  color: var(--ink);
}
.nl-row input[type="email"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.nl-row .nl-btn { flex: 0 1 auto; }
@media (max-width: 520px) {
  .nl-row .nl-btn { flex: 1 1 100%; }
}
.nl-promises { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; font-size: var(--text-sm); font-weight: 600; }
.nl-promise::before { content: "✓"; display: inline-block; margin-right: 6px; color: var(--eyebrow); font-weight: 800; }
.nl-msg { margin: 0; font-weight: 600; }
.nl-msg.is-error { color: var(--no-ink); }
.nl-box.is-done .nl-row, .nl-box.is-done .nl-promises { display: none; }
.nl-small { margin: 0; font-size: var(--text-xs); }
.nl-small a { color: inherit; text-underline-offset: 3px; }
.nl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* The strip under the toplist: one line and the form, shown only to the page views in the strip test (html.nl-strip-on,
   set before first paint in inc/newsletter.php). */
.nl-strip { display: none; }
html.nl-strip-on .nl-strip {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 440px);
  align-items: center;
  gap: var(--s2);
  margin-block: var(--s3);
  padding: 16px 16px 16px 20px;
  border-radius: var(--radius-card);
  background: var(--tone-green);
  color: var(--ink);
}
.nl-strip-icon { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); }
.nl-strip-icon .motif { position: static; z-index: auto; width: 24px; height: 24px; fill: var(--accent); } /* the logo icon in its own green */
.nl-strip-text { margin: 0; font-size: var(--text-sm); line-height: 1.4; }
.nl-strip-text strong { font-weight: 700; }
.nl-strip .nl-row input[type="email"], .nl-strip .nl-btn { min-height: 48px; }
.nl-strip .nl-btn { padding: 0 22px; }
@media (max-width: 860px) {
  html.nl-strip-on .nl-strip { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .nl-strip .nl-form { grid-column: 1 / -1; }
}

.guide-newsletter { margin-block: clamp(32px, 5vw, 56px); }

.nl-result { padding-block: clamp(40px, 8vw, 96px); }
.nl-result-card { max-width: 560px; display: grid; gap: 16px; }
.nl-result-card h1 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.15; }
.nl-result-lead { margin: 0; font-size: 1.1rem; }
.nl-result-guides { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.nl-result-guides a { color: var(--ink); font-weight: 600; }
