/**
 * Newsletter landing page — Super Portistas
 *
 * Serve a landing de subscrição, a página de confirmação e as preferências
 * públicas (magic link). Reflow segundo docs/RESPONSIVO.md (mobile-first).
 *
 * @package SuperPortistas
 */

.sp-newsletter-landing-page {
	background-color: #f4f7fb;
	overflow-x: hidden;
}

.sp-newsletter-landing-page__body {
	display: flex;
	flex-direction: column;
	gap: 32px;
	max-width: 1080px;
	padding-top: 0;
	padding-bottom: 48px;
}

@media (min-width: 768px) {
	.sp-newsletter-landing-page__body {
		gap: 48px;
		padding-bottom: 64px;
	}
}

/* Hero — full-bleed dark (mockup) */
.sp-newsletter-landing-hero {
	position: relative;
	overflow: hidden;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	background: linear-gradient(160deg, var(--sp-navy-grad-from, #06356f) 0%, var(--sp-navy-soft, #041f42) 100%);
	color: #fff;
}

.sp-newsletter-landing-hero__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 28px;
	max-width: 1080px;
	margin: 0 auto;
	padding: 36px 16px;
}

@media (min-width: 640px) {
	.sp-newsletter-landing-hero__inner {
		gap: 32px;
		padding: 44px 24px;
	}
}

@media (min-width: 1024px) {
	.sp-newsletter-landing-hero__inner {
		gap: 48px;
		padding: 56px 24px;
	}
}

/* `min-width` em vez do 320px do mockup: a 320px de viewport a base de 320
   somada ao padding rebentaria a linha. */
.sp-newsletter-landing-hero__content {
	flex: 1 1 100%;
	min-width: 0;
}

@media (min-width: 1024px) {
	.sp-newsletter-landing-hero__content {
		flex: 1 1 320px;
	}
}

.sp-newsletter-landing-hero__eyebrow {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--sp-accent, #ff8a3d);
}

/* Os 42px do mockup não são passo da escala; H1 de hub em banda escura é
   26 / 32 / 40 (RESPONSIVO 1.6). */
.sp-newsletter-landing-hero__title {
	margin: 0 0 12px;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.15;
	color: #fff;
}

@media (min-width: 768px) {
	.sp-newsletter-landing-hero__title {
		margin-bottom: 14px;
		font-size: 32px;
	}
}

@media (min-width: 1024px) {
	.sp-newsletter-landing-hero__title {
		font-size: 40px;
	}
}

.sp-newsletter-landing-hero__intro {
	margin: 0 0 20px;
	max-width: 480px;
	font-size: 16px;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.75);
}

@media (min-width: 768px) {
	.sp-newsletter-landing-hero__intro {
		margin-bottom: 24px;
	}
}

/* Social proof cluster (avatars + count) */
.sp-newsletter-landing-hero__proof {
	display: flex;
	align-items: center;
	gap: 12px;
}

.sp-newsletter-landing-hero__avatars {
	display: flex;
}

.sp-newsletter-landing-hero__avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 9999px;
	font-size: 11px;
	font-weight: 800;
	color: #fff;
	border: 2px solid #041f42;
}

.sp-newsletter-landing-hero__avatar + .sp-newsletter-landing-hero__avatar {
	margin-left: -8px;
}

.sp-newsletter-landing-hero__avatar--1 { background: #004b9b; }
.sp-newsletter-landing-hero__avatar--2 { background: #0066cc; }
.sp-newsletter-landing-hero__avatar--3 { background: var(--sp-navy-grad-from, #06356f); }

.sp-newsletter-landing-hero__proof-text {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
}

.sp-newsletter-landing-hero__proof-text strong {
	color: #fff;
	font-weight: 700;
}

/* Selo redondo do hero — usado pela página de confirmação. */
.sp-newsletter-landing-hero__badge {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.sp-newsletter-landing-hero__badge-icon {
	width: 28px;
	height: 28px;
}

@media (min-width: 768px) {
	.sp-newsletter-landing-hero__badge {
		width: 88px;
		height: 88px;
	}

	.sp-newsletter-landing-hero__badge-icon {
		width: 40px;
		height: 40px;
	}
}

/* Card compacto de subscrição embebido no hero (mockup) */
.sp-newsletter-hero-card {
	position: relative;
	z-index: 1;
	width: 100%;
	background: #fff;
	border-radius: 16px;
	padding: 24px;
	box-shadow: var(--sp-shadow-modal);
	box-sizing: border-box;
}

/* Em tablet o hero é uma coluna só: o cartão fica alinhado à esquerda em vez
   de esticar por 720px com um único campo de email. */
@media (min-width: 768px) {
	.sp-newsletter-hero-card {
		max-width: 420px;
		padding: 30px;
	}
}

@media (min-width: 1024px) {
	.sp-newsletter-hero-card {
		width: 380px;
		max-width: 380px;
	}
}

.sp-newsletter-hero-card__title {
	margin: 0 0 16px;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 21px;
	font-weight: 700;
	color: #0f172a;
}

.sp-newsletter-hero-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 16px;
}

/* 16px abaixo de `md`: menos do que isso e o iOS Safari faz zoom ao focar. */
.sp-newsletter-hero-form__input {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	border: 1px solid #dfe5ee;
	border-radius: 8px;
	background: #fff;
	color: #0f172a;
	font-family: "Libre Franklin", ui-sans-serif, system-ui, sans-serif;
	font-size: 16px;
	box-sizing: border-box;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 768px) {
	.sp-newsletter-hero-form__input {
		font-size: 14px;
	}
}

.sp-newsletter-hero-form__input:focus {
	outline: none;
	border-color: #004b9b;
	box-shadow: 0 0 0 2px #e8f0fa;
}

.sp-newsletter-hero-form__btn {
	height: 48px;
	border: none;
	border-radius: 8px;
	background: #004b9b;
	color: #fff;
	font-family: "Libre Franklin", ui-sans-serif, system-ui, sans-serif;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease;
}

.sp-newsletter-hero-form__btn:hover {
	background: #003d7a;
}

.sp-newsletter-hero-form__hint {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	color: #7c8aa5;
}

/* Benefits (mockup card grid) */
.sp-newsletter-landing-benefits__title {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Cartão sem imagem: 1 → 2 (tablet) → 3 (`lg`), como `.sp-community-card-grid`
   (RESPONSIVO 3.3). */
.sp-newsletter-landing-benefits__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.sp-newsletter-landing-benefits__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}
}

@media (min-width: 1024px) {
	.sp-newsletter-landing-benefits__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.sp-newsletter-landing-benefits__item {
	display: block;
	min-width: 0;
	background: #fff;
	border: 1px solid #dfe5ee;
	border-radius: 12px;
	padding: 20px;
}

@media (min-width: 768px) {
	.sp-newsletter-landing-benefits__item {
		padding: 24px;
	}
}

.sp-newsletter-landing-benefits__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: #e8f0fa;
	color: #004b9b;
	margin-bottom: 14px;
}

.sp-newsletter-landing-benefits__item-title {
	margin: 0 0 6px;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 18px;
	font-weight: 700;
	color: #0f172a;
}

.sp-newsletter-landing-benefits__item-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #475569;
}

/* Subscribe form — full width */
.sp-newsletter-landing-form-full {
	width: 100%;
	margin-bottom: 2rem;
}

.sp-newsletter-landing-form-full .newsletter-cta--landing {
	width: 100%;
	max-width: none;
}

/* FAQ + comunidade (70 / 30) */
.sp-newsletter-landing-faq-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	align-items: start;
	margin-bottom: 2rem;
}

@media (min-width: 1024px) {
	.sp-newsletter-landing-faq-row {
		grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
		gap: 1.75rem;
	}
}

.sp-newsletter-landing-faq-row__faq {
	min-width: 0;
}

.sp-newsletter-landing-faq-row__aside {
	min-width: 0;
}

.sp-newsletter-landing-faq-row__aside .sp-newsletter-landing-proof {
	height: 100%;
}

/* Landing form card */
.newsletter-cta--landing.sp-card {
	padding: 0;
	overflow: visible;
	background: #fff;
	border: 1px solid var(--sp-border, #dfe5ee);
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

/* Na landing o cartão é filete e nada mais — o mockup não lhe dá sombra, e o
   raio acompanha os cartões da página (12px), não o `sp-card` de 16px. O
   selector fica preso à landing: o mesmo bloco serve o CTA dos artigos. */
.sp-newsletter-landing-page .newsletter-cta--landing.sp-card {
	border-radius: 12px;
	box-shadow: none;
}

.newsletter-cta--landing .newsletter-cta-landing__header,
.newsletter-cta--landing .sp-newsletter-landing-subscribe__prefs-header {
	padding: 0;
}

/* Sem filete a separar o email dos temas: o mockup desenha um cartão contínuo
   e só a linha de acções lá em baixo é que ganha separador. */
.newsletter-cta--landing .sp-newsletter-landing-subscribe__prefs-header {
	margin: 0;
	padding-top: 0;
	border-top: 0;
}

.newsletter-cta--landing .newsletter-cta-landing__title {
	margin: 0;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 20px;
	font-weight: 700;
	color: var(--sp-ink, #0f172a);
}

@media (min-width: 768px) {
	.newsletter-cta--landing .newsletter-cta-landing__title {
		font-size: 22px;
	}
}

.newsletter-cta--landing .newsletter-cta-landing__subtitle {
	margin: 0.5rem 0 0;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: var(--sp-ink-muted, #475569);
}

.newsletter-cta--landing .newsletter-cta-landing__body {
	padding: 1.25rem 1.5rem 1.5rem;
}

.newsletter-cta--landing .newsletter-cta-landing__form {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	padding: 20px;
}

@media (min-width: 640px) {
	.newsletter-cta--landing .newsletter-cta-landing__form {
		gap: 1.5rem;
		padding: 24px;
	}
}

/* 30px é o padding do cartão no mockup — só cabe a partir do tablet. */
@media (min-width: 768px) {
	.newsletter-cta--landing .newsletter-cta-landing__form {
		padding: 30px;
	}
}

/* Cabeçalho do cartão de subscrição (mockup «Subscrever A Curva»). */
.sp-newsletter-landing-subscribe__intro-title {
	margin: 0 0 6px;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sp-ink, #0f172a);
}

@media (min-width: 768px) {
	.sp-newsletter-landing-subscribe__intro-title {
		font-size: 26px;
	}
}

.sp-newsletter-landing-subscribe__intro-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--sp-ink-muted, #475569);
}

/* Campo de email — mesma anatomia dos campos de Contactar e do catálogo
   EstadosFormularios: etiqueta em caixa alta, campo de 46px, borda de filete. */
.sp-newsletter-landing-subscribe__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.sp-newsletter-landing-subscribe__label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sp-ink-strong, #33415c);
}

.sp-newsletter-landing-subscribe__hint {
	margin: 2px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--sp-ink-soft, #7c8aa5);
}

.sp-newsletter-landing-subscribe__error {
	margin: 2px 0 0;
}

/* 16px abaixo de `md`: menos do que isso e o iOS Safari faz zoom ao focar. */
.newsletter-cta--landing .newsletter-cta-landing__input {
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	border: 1px solid var(--sp-border, #dfe5ee);
	border-radius: var(--sp-radius, 0.75rem);
	color: var(--sp-ink, #0f172a);
	background: #fff;
}

.newsletter-cta--landing .sp-newsletter-landing-subscribe__input {
	height: 46px;
	padding: 0 14px;
	border-radius: var(--sp-radius-sm, 8px);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

@media (min-width: 768px) {
	.newsletter-cta--landing .sp-newsletter-landing-subscribe__input {
		font-size: 14px;
	}
}

.newsletter-cta--landing .sp-newsletter-landing-subscribe__input::placeholder {
	color: var(--sp-ink-faint, #94a3b8);
}

.newsletter-cta--landing .sp-newsletter-landing-subscribe__input:focus {
	outline: none;
	border-color: var(--sp-porto, #004b9b);
	box-shadow: 0 0 0 2px var(--sp-porto-light, #e8f0fa);
}

.newsletter-cta--landing .sp-newsletter-landing-subscribe__input:disabled {
	background: var(--sp-surface-muted, #f4f7fb);
	color: var(--sp-ink-soft, #7c8aa5);
	cursor: not-allowed;
}

/* Anel a rodar do catálogo de estados: 18px, aro a 3px e volta em 0,8s. */
.sp-newsletter-landing-subscribe__spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 3px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: var(--sp-radius-pill, 9999px);
	animation: sp-newsletter-spin 0.8s linear infinite;
}

@keyframes sp-newsletter-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {

	.sp-newsletter-landing-subscribe__spinner {
		animation: none;
	}
}

.sp-newsletter-landing-subscribe__prefs-title {
	margin: 0;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 20px;
	font-weight: 700;
	color: var(--sp-ink, #0f172a);
}

@media (min-width: 768px) {
	.sp-newsletter-landing-subscribe__prefs-title {
		font-size: 22px;
	}
}

.sp-newsletter-landing-subscribe__prefs-header .newsletter-cta-landing__subtitle {
	margin: 0.5rem 0 0;
}

.newsletter-cta--landing .newsletter-cta-landing__submit {
	width: 100%;
	min-height: 2.75rem;
}

/* Botão do mockup: 48px, filete de 8px e 15/700. Ocupa a largura toda em
   telemóvel e encolhe ao conteúdo a partir de `sm`, como em Contactar. */
.sp-newsletter-landing-page .newsletter-cta-landing__submit {
	min-height: 48px;
	padding: 0 26px;
	border-radius: var(--sp-radius-sm, 8px);
	font-size: 15px;
	font-weight: 700;
}

@media (min-width: 640px) {
	.sp-newsletter-landing-page .newsletter-cta-landing__submit {
		width: auto;
		align-self: flex-start;
	}
}

.sp-newsletter-landing-page .newsletter-cta-landing__submit:disabled,
.sp-newsletter-prefs-public-page .sp-btn-primary:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.sp-newsletter-prefs-public-page .sp-btn-primary {
	min-height: 48px;
	padding: 0 24px;
	border-radius: var(--sp-radius-sm, 8px);
	font-size: 15px;
	font-weight: 700;
}

.newsletter-cta--landing .newsletter-cta-landing__consent {
	display: flex;
	gap: 0.625rem;
	align-items: flex-start;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--sp-ink-muted, #475569);
}

.newsletter-cta--landing .newsletter-cta-landing__consent input {
	margin-top: 0.2rem;
	flex-shrink: 0;
}

.newsletter-cta--landing .newsletter-cta-landing__consent a {
	color: var(--sp-porto, #004b9b);
	text-decoration: underline;
}

.newsletter-cta--landing .newsletter-cta-landing__gamification {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--sp-porto, #004b9b);
	background: var(--sp-porto-light, #e8f0fa);
	border-radius: var(--sp-radius, 0.75rem);
}

.newsletter-cta--landing .newsletter-cta-landing__error {
	margin: 0;
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	border-radius: var(--sp-radius, 0.75rem);
	border: 1px solid #fecaca;
	background: #fef2f2;
	color: var(--sp-danger-ink, #991b1b);
}

.newsletter-cta--landing .newsletter-cta-landing__success {
	padding: 1rem 0 0;
	text-align: center;
}

/* Na landing o sucesso substitui o formulário e é filho directo do cartão —
   sem isto encostava ao filete, porque o cartão não tem padding próprio. */
.sp-newsletter-landing-page .newsletter-cta-landing__success {
	padding: 20px;
}

@media (min-width: 640px) {
	.sp-newsletter-landing-page .newsletter-cta-landing__success {
		padding: 24px;
	}
}

@media (min-width: 768px) {
	.sp-newsletter-landing-page .newsletter-cta-landing__success {
		padding: 30px;
	}
}

.newsletter-cta--landing .newsletter-cta-landing__success-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: #f0fdf4;
	color: var(--sp-success-ink, #166534);
}

.newsletter-cta--landing .newsletter-cta-landing__success-title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--sp-ink, #0f172a);
}

.newsletter-cta--landing .newsletter-cta-landing__success-text {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--sp-ink-muted, #475569);
}

/* Social proof (mockup blockquote card) */
.sp-newsletter-landing-proof {
	background: #fff;
	border: 1px solid #dfe5ee;
	border-radius: 12px;
	padding: 28px 32px;
}

.sp-newsletter-landing-proof__title {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sp-newsletter-landing-proof__quote {
	margin: 0;
	padding: 0 0 0 20px;
	border-left: 3px solid #004b9b;
}

.sp-newsletter-landing-proof__quote p {
	margin: 0 0 10px;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-style: italic;
	font-size: 19px;
	line-height: 1.55;
	color: #1e293b;
}

.sp-newsletter-landing-proof__cite {
	font-size: 13px;
	color: #7c8aa5;
}

.sp-newsletter-landing-proof__cite strong {
	color: var(--sp-ink-strong, #33415c);
	font-weight: 700;
}

/* FAQ (mockup eyebrow + accordion) */
.sp-newsletter-landing-faq {
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

.sp-newsletter-landing-faq__header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
}

.sp-newsletter-landing-faq__title {
	margin: 0;
	font-family: "Libre Franklin", ui-sans-serif, system-ui, sans-serif;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #004b9b;
}

.sp-newsletter-landing-faq__rule {
	height: 1px;
	flex: 1;
	background: #dfe5ee;
}

.sp-newsletter-landing-faq__subtitle {
	display: none;
}

.sp-newsletter-landing-faq__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 720px;
}

.sp-newsletter-landing-faq__item {
	border: 1px solid #dfe5ee;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.sp-newsletter-landing-faq__question {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 20px;
	border: 0;
	background: transparent;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 16px;
	font-weight: 700;
	text-align: left;
	color: #0f172a;
	cursor: pointer;
}

.sp-newsletter-landing-faq__chevron {
	flex-shrink: 0;
	color: var(--sp-ink-soft, #7c8aa5);
	font-weight: 800;
	font-size: 18px;
	line-height: 1;
	transition: color 0.15s ease;
}

.sp-newsletter-landing-faq__question:hover .sp-newsletter-landing-faq__chevron {
	color: #004b9b;
}

.sp-newsletter-landing-faq__answer {
	padding: 0 20px 16px;
}

.sp-newsletter-landing-faq__answer p {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #475569;
}

/* Footer */
.sp-newsletter-landing-footer {
	padding: 0.5rem 0 1rem;
	text-align: center;
	font-size: 0.9375rem;
	color: var(--sp-ink-muted, #475569);
}

.sp-newsletter-landing-footer__link {
	color: var(--sp-porto, #004b9b);
	font-weight: 600;
	text-decoration: underline;
}

/* Confirmation page — cartão largo alinhado à esquerda, como no mockup
   FluxosNewsletter (não um cartão estreito centrado). */
.sp-newsletter-confirm-page__hero-inner {
	justify-content: space-between;
}

/* Abaixo de `sm` o selo desce para o texto ficar com a largura toda; a partir
   daí partilham a linha, como no mockup. */
@media (min-width: 640px) {
	.sp-newsletter-confirm-page__hero-inner .sp-newsletter-landing-hero__content {
		flex: 1 1 auto;
	}
}

.sp-newsletter-confirm-page__card {
	width: 100%;
	padding: 20px;
	border-radius: var(--sp-radius-lg, 1rem);
	text-align: left;
}

@media (min-width: 640px) {
	.sp-newsletter-confirm-page__card {
		padding: 24px;
	}
}

@media (min-width: 768px) {
	.sp-newsletter-confirm-page__card {
		padding: 32px;
	}
}

.sp-newsletter-confirm-page__status {
	margin: 0 0 0.75rem;
	font-size: 15px;
	font-weight: 600;
	color: var(--sp-ink, #0f172a);
}

.sp-newsletter-confirm-page__actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

@media (min-width: 640px) {
	.sp-newsletter-confirm-page__actions {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

.sp-newsletter-confirm-page__footer-note {
	margin: 1.5rem 0 0;
	font-size: 14px;
	color: var(--sp-ink-soft, #7c8aa5);
}

.sp-newsletter-confirm-page__prefs-hint {
	margin: 0 0 1.25rem;
	max-width: 40rem;
	font-size: 14px;
	line-height: 1.6;
	color: var(--sp-ink-muted, #475569);
}

/* Public preferences page */
.sp-newsletter-prefs-public-page {
	background-color: #f4f7fb;
	overflow-x: hidden;
}

.sp-newsletter-prefs-public-page__body {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 48rem;
	padding-top: 0;
	padding-bottom: 48px;
}

.sp-newsletter-prefs-public-page__hero .sp-newsletter-landing-hero__inner {
	max-width: 48rem;
}

.sp-newsletter-prefs-public-page__app {
	padding: 20px;
	border-radius: var(--sp-radius-lg, 1rem);
}

@media (min-width: 640px) {
	.sp-newsletter-prefs-public-page__app {
		padding: 24px;
	}
}

@media (min-width: 768px) {
	.sp-newsletter-prefs-public-page__app {
		padding: 28px;
	}
}

/* Cabeçalho do magic link: email + validade + estado da subscrição. */
.sp-newsletter-prefs-public-page__ident {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	padding-bottom: 20px;
	margin-bottom: 20px;
	border-bottom: 1px solid var(--sp-border, #dfe5ee);
}

.sp-newsletter-prefs-public-page__ident-email {
	margin: 0 0 4px;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sp-ink, #0f172a);
	overflow-wrap: anywhere;
}

@media (min-width: 768px) {
	.sp-newsletter-prefs-public-page__ident-email {
		font-size: 22px;
	}
}

.sp-newsletter-prefs-public-page__ident-note {
	margin: 0;
	font-size: 13px;
	color: var(--sp-ink-soft, #7c8aa5);
}

.sp-newsletter-prefs-public-page__badge {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	height: 26px;
	padding: 0 12px;
	border-radius: 9999px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: var(--sp-success, #16a34a);
	font-size: 12px;
	font-weight: 800;
}

.sp-newsletter-prefs-public-page__loading {
	padding: 2rem;
	text-align: center;
	color: var(--sp-ink-muted, #475569);
}

/* Link caducado: filete danger em vez do filete neutro do `sp-card` — é um
   beco sem saída, não um cartão de conteúdo. */
.sp-newsletter-prefs-public-page__error {
	padding: 24px;
	border-color: var(--sp-danger-border, #fecaca);
	text-align: left;
}

@media (min-width: 768px) {
	.sp-newsletter-prefs-public-page__error {
		padding: 28px;
	}
}

.sp-newsletter-prefs-public-page__error-title {
	margin: 0 0 8px;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sp-ink, #0f172a);
}

.sp-newsletter-prefs-public-page__error p {
	margin: 0 0 16px;
	max-width: 560px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--sp-ink-muted, #475569);
}

.sp-newsletter-prefs-public-page__error p:last-child {
	margin-bottom: 0;
}

.sp-newsletter-prefs-public-page__error-inline {
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
	border-radius: var(--sp-radius, 0.75rem);
	background: #fef2f2;
	color: var(--sp-danger-ink, #991b1b);
}

/* Landing subscribe with pre-DOI preferences */
.sp-newsletter-landing-subscribe__loading {
	padding: 1.5rem 1.5rem 2rem;
	text-align: center;
	color: var(--sp-ink-muted, #475569);
}

.sp-newsletter-landing-subscribe__prefs {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.sp-newsletter-landing-subscribe__section-title {
	margin: 0 0 1rem;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sp-ink, #0f172a);
}

.sp-newsletter-landing-subscribe__email-list {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--sp-border, #dfe5ee);
	border-radius: var(--sp-radius, 0.75rem);
	background: #fff;
	overflow: hidden;
}

.sp-newsletter-landing-subscribe__email-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
}

.sp-newsletter-landing-subscribe__email-row + .sp-newsletter-landing-subscribe__email-row {
	border-top: 1px solid var(--sp-border, #dfe5ee);
}

.sp-newsletter-landing-subscribe__email-row-label {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--sp-ink, #0f172a);
}

.sp-newsletter-landing-subscribe__email-row-desc {
	margin: 0.35rem 0 0;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--sp-ink-muted, #64748b);
}

.sp-newsletter-landing-subscribe__checkout {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	padding-top: 20px;
	border-top: 1px solid var(--sp-border, #dfe5ee);
}


/* Content preferences picker (landing) */
.sp-content-prefs {
	width: 100%;
}

.sp-newsletter-landing-subscribe .sp-content-prefs {
	margin: 0;
}

.sp-content-prefs__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
	margin-bottom: 0.5rem;
}

.sp-content-prefs__title {
	margin: 0;
	font-family: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--sp-ink, #0f172a);
}

.sp-content-prefs__actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

.sp-content-prefs__select-all {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.4rem 1rem;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--sp-porto, #004b9b);
	background: #fff;
	border: 1px solid var(--sp-porto, #004b9b);
	border-radius: 9999px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.sp-content-prefs__select-all:hover {
	background: var(--sp-porto, #004b9b);
	color: #fff;
}

.sp-content-prefs__select-all:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 75, 155, 0.2);
}

.sp-content-prefs__clear {
	padding: 0.4rem 0.75rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--sp-ink-muted, #64748b);
	background: transparent;
	border: none;
	border-radius: 0.375rem;
	cursor: pointer;
	transition: color 0.2s ease;
}

.sp-content-prefs__clear:hover {
	color: var(--sp-porto, #004b9b);
}

.sp-content-prefs__clear:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 75, 155, 0.15);
}

.sp-content-prefs__hint {
	margin: 0 0 1.25rem;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--sp-ink-muted, #64748b);
}

.sp-content-prefs__search-wrap {
	margin-bottom: 1.25rem;
}

.sp-content-prefs__search {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: var(--sp-ink, #0f172a);
	background: #fff;
	border: 1px solid var(--sp-border, #dfe5ee);
	border-radius: var(--sp-radius, 0.75rem);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Selector com o wrapper para ganhar a `newsletter-preferences.css`, que é
   carregada depois e fixa 15px — abaixo dos 16px o iOS Safari faz zoom. */
.sp-newsletter-landing-page .sp-content-prefs__search,
.sp-newsletter-prefs-public-page .sp-content-prefs__search {
	font-size: 16px;
}

@media (min-width: 768px) {
	.sp-newsletter-landing-page .sp-content-prefs__search,
	.sp-newsletter-prefs-public-page .sp-content-prefs__search {
		font-size: 15px;
	}
}

.sp-content-prefs__search::placeholder {
	color: var(--sp-ink-faint, #94a3b8);
}

.sp-content-prefs__search:focus {
	outline: none;
	border-color: var(--sp-porto, #004b9b);
	box-shadow: 0 0 0 3px rgba(0, 75, 155, 0.12);
}

.sp-content-prefs__list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.sp-content-prefs__item {
	border: 1px solid var(--sp-border, #dfe5ee);
	border-radius: var(--sp-radius, 0.75rem);
	background: #fff;
}

.sp-content-prefs__item--message {
	padding: 1.25rem;
	text-align: center;
}

.sp-content-prefs__message {
	margin: 0;
	font-size: 0.875rem;
	color: var(--sp-ink-muted, #64748b);
}

.sp-content-prefs__item-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.875rem 1rem;
	min-height: 3.25rem;
}

.sp-content-prefs__expand {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: 1;
	min-width: 0;
	min-height: 2.75rem;
	margin: 0;
	padding: 0.125rem 0.25rem;
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--sp-ink, #0f172a);
	text-align: left;
	background: transparent;
	border: none;
	border-radius: 0.375rem;
	cursor: pointer;
}

.sp-content-prefs__expand:focus-visible {
	outline: 2px solid var(--sp-porto, #004b9b);
	outline-offset: 2px;
}

.sp-content-prefs__chevron {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
	color: var(--sp-ink-faint, #94a3b8);
	transition: transform 0.2s ease;
}

.sp-content-prefs__chevron.is-open {
	transform: rotate(90deg);
}

.sp-content-prefs__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sp-content-prefs__toggle {
	position: relative;
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	cursor: pointer;
}

.sp-content-prefs__toggle-track {
	position: relative;
	display: block;
	width: 2.75rem;
	height: 1.5rem;
	background: #e8eef5;
	border-radius: 9999px;
	transition: background 0.2s ease;
}

.sp-content-prefs__toggle-track::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	width: 1.25rem;
	height: 1.25rem;
	background: #fff;
	border: 1px solid var(--sp-border, #dfe5ee);
	border-radius: 50%;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
	transition: transform 0.2s ease;
}

.sp-content-prefs__toggle--sm .sp-content-prefs__toggle-track {
	width: 2.5rem;
	height: 1.25rem;
}

.sp-content-prefs__toggle--sm .sp-content-prefs__toggle-track::after {
	width: 1rem;
	height: 1rem;
}

.sp-content-prefs__toggle .peer:checked + .sp-content-prefs__toggle-track {
	background: var(--sp-porto, #004b9b);
}

.sp-content-prefs__toggle .peer:checked + .sp-content-prefs__toggle-track::after {
	transform: translateX(1.25rem);
	border-color: #fff;
}

.sp-content-prefs__toggle--sm .peer:checked + .sp-content-prefs__toggle-track::after {
	transform: translateX(1.125rem);
}

.sp-content-prefs__subs {
	padding: 0 1rem 1rem 1.75rem;
	border-top: 1px solid var(--sp-border, #dfe5ee);
}

.sp-content-prefs__empty {
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	color: var(--sp-ink-faint, #94a3b8);
}

.sp-content-prefs__sub-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	min-height: 2.75rem;
	padding: 0.25rem 0;
}

.sp-content-prefs__sub-row + .sp-content-prefs__sub-row {
	border-top: 1px solid var(--sp-border, #dfe5ee);
}

.sp-content-prefs__sub-name {
	font-size: 0.875rem;
	color: var(--sp-ink-muted, #475569);
}

.sp-newsletter-landing-subscribe__section {
	margin: 0;
}

.sp-newsletter-landing-subscribe__section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.sp-newsletter-landing-subscribe__section-actions {
	display: flex;
	gap: 0.5rem;
}

.sp-newsletter-landing-subscribe__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.5rem 0;
}

.sp-newsletter-landing-subscribe__row-label {
	margin: 0;
	font-weight: 600;
	font-size: 0.9375rem;
}

.sp-newsletter-landing-subscribe__row-desc {
	margin: 0.25rem 0 0;
	font-size: 0.8125rem;
	color: var(--sp-ink-muted, #475569);
}

.sp-newsletter-landing-subscribe__category {
	border-bottom: 1px solid var(--sp-border, #dfe5ee);
	padding-bottom: 0.5rem;
	margin-bottom: 0.5rem;
}

.sp-newsletter-landing-subscribe__category:last-child {
	border-bottom: none;
	margin-bottom: 0;
}

.sp-newsletter-landing-subscribe__subs {
	margin-top: 0.5rem;
	padding-left: 1.5rem;
	border-left: 2px solid var(--sp-border, #dfe5ee);
}
