.gst-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.55);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}

.gst-modal[hidden] {
  display: none !important;
}

.gst-modal__dialog {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.gst-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
}

.gst-modal__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.gst-modal__close {
  border: none;
  background: #f3f4f6;
  color: #374151;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  outline: none;
}

.gst-modal__close:focus:not(:focus-visible) {
  outline: none;
}

.gst-modal__close:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.gst-modal__body {
  padding: 1rem 1.1rem 1.05rem;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.52;
}

.gst-modal__intro {
  margin: 0 0 0.15rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #4b5563;
}

.gst-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 0.75rem 1.1rem 1rem;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
}

.gst-btn {
  border-radius: 10px;
  padding: 0.55rem 0.95rem;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  outline: none;
}

.gst-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.gst-btn--secondary {
  background: #ffffff;
  border-color: #e5e7eb;
  color: #374151;
}

.gst-btn--primary {
  background: #3b82f6;
  border-color: #2563eb;
  color: #ffffff;
}

.gst-pref-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.gst-pref-row:first-of-type {
  margin-top: 0.75rem;
}

.gst-pref-row input[type='checkbox'] {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0 0;
  cursor: pointer;
}

.gst-pref-row__text {
  flex: 1 1 0;
  min-width: 0;
}

.gst-pref-row__title {
  display: block;
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.35;
  cursor: pointer;
}

.gst-pref-row__desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #6b7280;
}

.gst-note {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #6b7280;
}

.gst-error {
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: #b91c1c;
}

/* Footer newsletter modal (#newsletter-modal, source footer_modal) — opened with .is-open */
#newsletter-modal.nl-foot-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10050;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.55);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}

#newsletter-modal.nl-foot-overlay.is-open {
  display: flex;
}

#newsletter-modal .nl-foot-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 1.35rem 1.25rem 1.15rem;
  box-sizing: border-box;
  overflow: hidden;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #0f172a;
}

#newsletter-modal .nl-foot-banner {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  margin: -0.35rem auto 1.15rem;
  object-fit: contain;
  max-height: 270px;
}

#newsletter-modal.nl-foot--success .nl-foot-banner {
  max-height: 300px;
}

#newsletter-modal.nl-foot--success .nl-foot-card {
  padding-bottom: 1rem;
}

/* Author `display:flex` must not override native [hidden] (otherwise form + success stack). */
#newsletter-modal .nl-foot-step-form[hidden],
#newsletter-modal .nl-foot-step-success[hidden] {
  display: none !important;
}

#newsletter-modal .nl-foot-step-success:not([hidden]) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#newsletter-modal .nl-foot-step-success .nl-foot-success-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #0f172a;
}

#newsletter-modal .nl-foot-step-success .nl-foot-success-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #475569;
}

#newsletter-modal .nl-foot-got-it {
  margin-top: 1.1rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  letter-spacing: 0.01em;
  text-align: center;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.12);
  box-sizing: border-box;
}

#newsletter-modal .nl-foot-got-it:hover {
  filter: brightness(1.04);
}

#newsletter-modal .nl-foot-got-it:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}

#newsletter-modal .nl-foot-privacy {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #64748b;
}

#newsletter-modal .nl-foot-privacy__link {
  color: #2563eb;
  text-decoration: none;
}

#newsletter-modal .nl-foot-privacy__link:hover {
  text-decoration: underline;
}

#newsletter-modal .nl-foot-steps {
  display: block;
  box-sizing: border-box;
}

#newsletter-modal .nl-foot-card h2 {
  margin: 0 2.5rem 0.4rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #0f172a;
}

#newsletter-modal .nl-foot-desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #64748b;
}

#newsletter-modal #newsletter-name,
#newsletter-modal #newsletter-email {
  width: 100%;
  min-height: 48px;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  font-size: 0.95rem;
  box-sizing: border-box;
  background: #fafbfc;
  color: #0f172a;
}

#newsletter-modal #newsletter-name {
  margin-top: 0;
}

#newsletter-modal #newsletter-email {
  margin-top: 0.55rem;
}

#newsletter-modal #newsletter-name::placeholder,
#newsletter-modal #newsletter-email::placeholder {
  color: #94a3b8;
}

#newsletter-modal #newsletter-name:focus,
#newsletter-modal #newsletter-email:focus {
  outline: none;
  border-color: #93c5fd;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}

#newsletter-modal .nl-foot-ts {
  margin-top: 0.85rem;
  min-height: 68px;
}

#newsletter-modal .nl-foot-x {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

#newsletter-modal .nl-foot-x:hover {
  background: #f8fafc;
  color: #0f172a;
}

#newsletter-modal .nl-foot-x:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}

#newsletter-modal #newsletter-submit {
  margin-top: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.12);
}

#newsletter-modal #newsletter-submit:hover {
  filter: brightness(1.04);
}

#newsletter-modal #newsletter-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  filter: none;
}

#newsletter-modal #newsletter-message.nl-foot-msg {
  margin: 0.85rem 0 0;
  min-height: 1.3em;
  font-size: 0.88rem;
  line-height: 1.45;
  font-weight: 500;
}

#newsletter-modal #newsletter-message.ok {
  color: #15803d;
}

#newsletter-modal #newsletter-message.err {
  color: #b91c1c;
}

/* Non-production host: Turnstile skipped; see isNewsletterDevHost() in site-footer.js */
#newsletter-modal.nl-newsletter--dev #newsletter-turnstile {
  display: none;
  min-height: 0;
  margin: 0;
}

#newsletter-modal.nl-newsletter--dev .nl-foot-ts {
  min-height: 0;
  margin-top: 0;
}

@media (max-width: 420px) {
  #newsletter-modal .nl-foot-card {
    padding: 1.15rem 1.05rem 1rem;
  }

  #newsletter-modal .nl-foot-card h2 {
    font-size: 1.22rem;
  }
}

@media (max-width: 430px) {
  .gst-modal {
    padding: 0.75rem;
  }

  .gst-modal__dialog {
    max-width: 100%;
  }

  #newsletter-modal.nl-foot-overlay {
    padding: 0.75rem;
  }

  #newsletter-modal .nl-foot-card {
    max-width: 100%;
  }
}

/* Footer middle column: legal row — each link label stays on one line; row may wrap between items on narrow widths */
/* Footer about blurb: room for two full-sentence lines without squeezing the footer row */
.footer .footer-about-col {
  flex: 1 1 18rem;
  min-width: 260px;
  max-width: 38rem;
}

.footer .footer-about-body {
  font-size: 0.93rem;
  color: #cbd5e1;
  line-height: 1.55;
  margin-bottom: 0.5rem;
  text-align: left;
  max-width: 36rem;
}

.footer .footer-legal-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.55rem;
}

.footer .footer-legal-links a {
  white-space: nowrap;
}

.footer .footer-legal-links .separator {
  flex: 0 0 auto;
  user-select: none;
  color: #a1a1aa;
}
