/* Nextline Subscriptions – front end. Colours come from --nls-brand / --nls-radius (Settings → General). */
.nls {
	--nls-text: #1f2933;
	--nls-muted: #616e7c;
	--nls-border: #d9dee4;
	--nls-bg: #ffffff;
	--nls-soft: #f5f7fa;
	--nls-error: #b42318;
	--nls-success: #067647;
	box-sizing: border-box;
	color: var(--nls-text);
	font-size: 16px;
	line-height: 1.5;
}
.nls *, .nls *::before, .nls *::after { box-sizing: inherit; }

/* Space above/below plugin pages. Padding (not margin) so theme resets and margin-collapse can't remove it.
   Override per theme: .nls-page { --nls-page-space: 64px; } */
.nls-page { padding: var(--nls-page-space, 48px) 16px; }
.nls-page::after { content: ""; display: table; clear: both; }

.nls-card {
	background: var(--nls-bg);
	border: 1px solid var(--nls-border);
	border-radius: var(--nls-radius, 8px);
	padding: 28px;
	max-width: 440px;
	margin: 0 auto;
}
.nls-account { max-width: 960px; margin: 0 auto; }
.nls-account .nls-card { max-width: none; margin: 0 0 20px; }

.nls-auth__title { margin: 0 0 8px; font-size: 1.5em; line-height: 1.25; }
.nls-auth__lead { margin: 0 0 20px; color: var(--nls-muted); }
.nls-auth__switch { margin: 20px 0 0; text-align: center; color: var(--nls-muted); }

.nls-form { margin: 0; }
.nls-field { margin: 0 0 16px; }
.nls-field > label:not(.nls-check) { display: block; font-weight: 600; margin: 0 0 6px; font-size: .95em; }
.nls-field--inline { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .95em; }
.nls-optional { font-weight: 400; color: var(--nls-muted); }

.nls input[type="text"],
.nls input[type="email"],
.nls input[type="tel"],
.nls input[type="password"] {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--nls-border);
	border-radius: calc(var(--nls-radius, 8px) * .75);
	background: #fff;
	color: var(--nls-text);
	font-size: 16px; /* prevents zoom on iOS */
	line-height: 1.3;
	margin: 0;
	box-shadow: none;
}
.nls input:focus {
	outline: 2px solid var(--nls-brand);
	outline-offset: 1px;
	border-color: var(--nls-brand);
}

.nls-check { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 400; cursor: pointer; }
.nls-check input { margin-top: 4px; }
.nls .nls-check a {
	color: var(--nls-brand);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.nls .nls-check a:hover,
.nls .nls-check a:focus { text-decoration-thickness: 2px; }

.nls-password { position: relative; }
.nls-password input { padding-right: 68px !important; }
.nls-password__toggle {
	position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
	background: transparent; border: 0; padding: 6px 8px; margin: 0;
	color: var(--nls-brand); font-size: 14px; font-weight: 600; cursor: pointer; line-height: 1;
}

.nls-meter { display: flex; align-items: center; gap: 10px; margin-top: 8px; min-height: 18px; }
.nls-meter__bar { flex: 1; height: 6px; border-radius: 3px; background: var(--nls-soft); position: relative; overflow: hidden; }
.nls-meter__bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--nls-meter, 0%); background: var(--nls-meter-color, #d9dee4); transition: width .2s; }
.nls-meter__label { font-size: 13px; color: var(--nls-muted); min-width: 64px; text-align: right; }
.nls-help { margin: 6px 0 0; font-size: 13px; color: var(--nls-muted); }
.nls-match.is-error { color: var(--nls-error); }

.nls-phone { display: flex; gap: 8px; }
.nls .nls-phone__code { flex: 0 0 76px; width: 76px; text-align: center; }
.nls .nls-phone__number { flex: 1; }

.nls-decoy { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.nls-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.nls-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 10px 20px;
	border: 1px solid var(--nls-border); border-radius: calc(var(--nls-radius, 8px) * .75);
	background: #fff; color: var(--nls-text);
	font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.nls-btn:hover { text-decoration: none; filter: brightness(.97); }
/* Themes often colour all links (e.g. ".entry-content a"); keep button text readable in every state. */
.nls a.nls-btn, .nls a.nls-btn:visited, .nls a.nls-btn:hover, .nls a.nls-btn:focus, .nls a.nls-btn:active { color: var(--nls-text) !important; text-decoration: none !important; }
.nls-btn--primary,
.nls a.nls-btn--primary, .nls a.nls-btn--primary:visited, .nls a.nls-btn--primary:hover, .nls a.nls-btn--primary:focus, .nls a.nls-btn--primary:active,
.nls button.nls-btn--primary, .nls button.nls-btn--primary:hover, .nls button.nls-btn--primary:focus {
	background: var(--nls-brand) !important; border-color: var(--nls-brand) !important; color: var(--nls-btn-text, #fff) !important;
}
.nls-btn--primary:hover, .nls-btn--primary:focus { filter: brightness(.92); }
.nls-btn--block { display: flex; width: 100%; }
.nls-btn[disabled] { opacity: .55; cursor: not-allowed; }
.nls-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.nls-alert { border-radius: calc(var(--nls-radius, 8px) * .75); padding: 12px 14px; margin: 0 0 16px; font-size: .95em; border: 1px solid; }
.nls-alert p { margin: 0; }
.nls-alert ul { margin: 0; padding-left: 18px; }
.nls-alert--error { background: #fef3f2; border-color: #fecdca; color: var(--nls-error); }
.nls-alert--success { background: #ecfdf3; border-color: #abefc6; color: var(--nls-success); }
.nls-alert--info { background: var(--nls-soft); border-color: var(--nls-border); color: var(--nls-text); }
.nls-alert a { color: inherit; text-decoration: underline; }

.nls-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--nls-muted); font-size: 14px; }
.nls-divider::before, .nls-divider::after { content: ""; flex: 1; height: 1px; background: var(--nls-border); }

.nls-google { margin: 0 0 4px; }
.nls-google__button { display: flex; justify-content: center; min-height: 44px; }
.nls-google__error { margin-top: 10px; }

.nls-turnstile { min-height: 65px; }

.nls-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-right: 6px; }
.nls-status--active { background: #ecfdf3; color: var(--nls-success); }
.nls-status--expired { background: #fef3f2; color: var(--nls-error); }
.nls-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 20px; }
.nls-dl dt { color: var(--nls-muted); }
.nls-dl dd { margin: 0; }

/* Plans */
.nls-plans { margin: 0; }
.nls-plans__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.nls-plan-card {
	position: relative; display: flex; flex-direction: column; gap: 6px;
	border: 1px solid var(--nls-border); border-radius: var(--nls-radius, 8px);
	padding: 24px 20px; background: #fff; text-align: center;
}
.nls-plan-card--featured, .nls-plan-card--selected { border: 2px solid var(--nls-brand); }
.nls-plan-card__flag {
	position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
	background: var(--nls-brand); color: #fff; font-size: 12px; font-weight: 700;
	padding: 3px 10px; border-radius: 999px; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em;
}
.nls-plan-card__name { margin: 0; font-size: 1.15em; }
.nls-plan-card__price { font-size: 2em; font-weight: 800; line-height: 1.1; }
.nls-price__regular { color: var(--nls-muted, #6b7280); font-weight: 500; text-decoration-thickness: 2px; margin-right: .15em; }
.nls-plan-card__price .nls-price__regular { font-size: .55em; vertical-align: middle; }
.nls-price__now { text-decoration: none; background: none; color: inherit; }
.nls-price .screen-reader-text, .nls-hdr .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.nls-plan-card__duration { color: var(--nls-muted); font-size: .95em; }
.nls-plan-card__desc { margin: 6px 0 0; font-size: .95em; color: var(--nls-muted); }
.nls-plan-card .nls-btn { margin-top: auto; }
.nls-plan-card__duration + .nls-btn, .nls-plan-card__desc + .nls-btn { margin-top: 16px; }
.nls-plans__login { text-align: center; margin-top: 20px; color: var(--nls-muted); }

@media (max-width: 480px) {
	.nls-page { padding: var(--nls-page-space-mobile, 24px) 0; }
	.nls-card { padding: 20px 16px; border-left: 0; border-right: 0; border-radius: 0; }
}

/* ---------- Premium badge ---------- */
.nls-badge {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 2px 8px; border-radius: 999px;
	background: var(--nls-brand, #1d4ed8); color: #fff;
	font-size: 11px; font-weight: 700; line-height: 1.5; letter-spacing: .04em; text-transform: uppercase;
	vertical-align: middle; white-space: nowrap;
}
.nls-badge__icon { flex: none; }
.nls-crown { display: inline-flex; width: .8em; height: .8em; color: var(--nls-crown, #e0a100); vertical-align: -.05em; line-height: 1; }
.nls-crown svg { width: 100%; height: 100%; display: block; }
.nls-crown--before { margin-right: .05em; }
.nls-crown--after { margin-left: .05em; }
.nls-badge--title { margin-right: 6px; font-size: .45em; position: relative; top: -.15em; }

/* ---------- Teaser + paywall box ---------- */
.nls-teaser { position: relative; }
.nls-teaser::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.5em; pointer-events: none;
	background: linear-gradient(to bottom, rgba(255,255,255,0), var(--nls-paywall-fade, #fff) 90%);
}
.nls-paywall {
	margin: 8px 0 32px;
	border: 1px solid var(--nls-border, #d9dee4);
	border-top: 4px solid var(--nls-brand, #1d4ed8);
	border-radius: var(--nls-radius, 8px);
	background: var(--nls-soft, #f5f7fa);
	text-align: center;
	clear: both;
}
.nls-paywall__inner { max-width: 520px; margin: 0 auto; padding: 32px 20px; }
.nls-paywall__icon { display: inline-flex; color: var(--nls-brand, #1d4ed8); margin-bottom: 8px; }
.nls .nls-paywall__title { margin: 0 0 8px; font-size: 1.4em; line-height: 1.3; }
.nls .nls-paywall__text { margin: 0 0 12px; color: var(--nls-muted); }
.nls .nls-paywall__price { margin: 0 0 16px; }
.nls .nls-paywall__actions { margin: 0 0 12px; display: flex; justify-content: center; }
.nls .nls-paywall__actions .nls-btn { min-width: 220px; }
.nls .nls-paywall__login { margin: 0; color: var(--nls-muted); font-size: .95em; }
.nls-paywall__login a { color: var(--nls-brand, #1d4ed8); font-weight: 600; }

/* ---------- Account tables & checkout messages ---------- */
.nls-table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: .95em; }
.nls-table th { text-align: left; font-weight: 600; color: var(--nls-muted); border-bottom: 1px solid var(--nls-border); padding: 8px 6px; }
.nls-table td { border-bottom: 1px solid var(--nls-border); padding: 10px 6px; }
.nls-num, .nls-table .nls-num { text-align: right; white-space: nowrap; }
.nls-account__welcome { margin: 0 0 16px; }
.nls-checkout-msg { margin-bottom: 20px; }

/* ---------------- My Account (Phase 5) ---------------- */
.nls-account h3 { font-size: 1.05em; margin: 24px 0 10px; }
.nls-account__top h3 { margin-top: 8px; }
.nls-account__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nls-account__head .nls-auth__title { margin-bottom: 8px; }
.nls-account__logout { color: var(--nls-muted); font-size: .95em; }
.nls-account__days { color: var(--nls-muted); }
.nls-account .nls-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.nls-account__articles { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 0 0 20px; }
.nls-account__articles .nls-card { margin: 0; }
@media (min-width: 760px) { .nls-account__articles { grid-template-columns: 1fr 1fr; } }
.nls-articles h3 { margin-top: 0; }
.nls-articles__list { list-style: none; margin: 0; padding: 0; }
.nls-articles__item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--nls-border); }
.nls-articles__item:first-child { border-top: 0; padding-top: 0; }
.nls-articles__thumb { flex: 0 0 64px; }
.nls-articles__thumb img { width: 64px; height: 64px; object-fit: cover; border-radius: calc(var(--nls-radius, 8px) * .5); display: block; }
.nls-articles__title { display: block; font-weight: 600; color: var(--nls-text); line-height: 1.35; text-decoration: none; }
.nls-articles__title:hover { color: var(--nls-brand); text-decoration: underline; }
.nls-articles__meta { display: block; font-size: 13px; color: var(--nls-muted); margin-top: 2px; }
.nls-articles__empty { color: var(--nls-muted); margin: 0; }
.nls-articles__more { margin: 12px 0 0; font-size: .95em; }
.nls-articles__more a { color: var(--nls-brand); }
.nls-tabs { padding-top: 8px; }
.nls-tabs__list { display: flex; gap: 4px; border-bottom: 1px solid var(--nls-border); margin: 0 0 20px; overflow-x: auto; scrollbar-width: none; }
.nls-tabs__tab { padding: 12px 14px; color: var(--nls-muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.nls-tabs__tab:hover { color: var(--nls-text); text-decoration: none; }
.nls-tabs__tab[aria-selected="true"] { color: var(--nls-brand); border-bottom-color: var(--nls-brand); }
.nls-tabs__panel > h3:first-child { margin-top: 0; }
.nls-tabs__panel .nls-form { max-width: 480px; }
.nls-tabs__panel .nls-check { display: flex; margin: 0 0 10px; }
.nls-details { margin: 0 0 12px; }
.nls-details summary { cursor: pointer; color: var(--nls-brand); font-weight: 600; margin: 0 0 12px; }
.nls-link-btn { background: none; border: 0; padding: 0; color: var(--nls-brand); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.nls-devices { list-style: none; margin: 0 0 14px; padding: 0; max-width: 560px; }
.nls-devices__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--nls-border); }
.nls-devices__item .nls-status { margin-left: 6px; font-size: 12px; }
.nls-danger { margin-top: 32px; padding: 16px; border: 1px solid #fecdca; border-radius: var(--nls-radius, 8px); background: #fffbfa; max-width: 560px; }
.nls-danger h3 { margin-top: 0; color: var(--nls-error); }
.nls-danger p { margin: 0 0 8px; }
.nls-btn--danger { background: var(--nls-error); border-color: var(--nls-error); color: #fff; }
.nls-btn--danger:hover, .nls-btn--danger:focus { color: #fff; filter: brightness(.92); }
@media (max-width: 600px) {
	.nls-table th:nth-child(2), .nls-table td:nth-child(2) { max-width: 120px; }
	.nls-devices__item { flex-direction: column; align-items: flex-start; }
}
.nls-danger .nls-details summary { color: var(--nls-error); }
@media (max-width: 600px) {
	.nls-account .nls-card { padding: 20px 16px; }
	.nls-tabs__tab { padding: 12px 10px; }
}

/* ---------- Header login / account block: nls_header_account() ----------
   Inherits the theme's font. Tune from the theme, e.g.
   .nls-hdr { --nls-hdr-btn-pad: 14px 28px; --nls-hdr-btn-size: 17px; } */
.nls-hdr { display: inline-flex; align-items: center; gap: 18px; font: inherit; line-height: 1.2; }
.nls-hdr a { text-decoration: none; }
.nls-hdr__subscribe {
	display: inline-flex; align-items: center; justify-content: center;
	padding: var(--nls-hdr-btn-pad, 12px 24px);
	background: var(--nls-brand, #c8102e); color: var(--nls-btn-text, #fff) !important;
	font-size: var(--nls-hdr-btn-size, 16px); font-weight: 700; text-transform: uppercase; letter-spacing: .02em;
	border-radius: var(--nls-hdr-btn-radius, 0); white-space: nowrap; transition: filter .15s;
}
.nls-hdr__subscribe:hover, .nls-hdr__subscribe:focus-visible { filter: brightness(.9); }
.nls-hdr__login { color: inherit; font-size: var(--nls-hdr-link-size, 18px); white-space: nowrap; }
.nls-hdr__login:hover, .nls-hdr__login:focus-visible { color: var(--nls-brand, #c8102e); }

.nls-hdr__menu { position: relative; }
.nls-hdr__user {
	display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none;
	padding: 4px 6px 4px 4px; border-radius: 999px; color: inherit; user-select: none;
}
.nls-hdr__user::-webkit-details-marker { display: none; }
.nls-hdr__user::marker { content: ""; }
.nls-hdr__user:hover, .nls-hdr__menu[open] .nls-hdr__user { background: rgba(0,0,0,.05); }
.nls-hdr__user:focus-visible { outline: 2px solid var(--nls-brand, #c8102e); outline-offset: 2px; }
.nls-hdr__avatar {
	position: relative; display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; border-radius: 50%; flex: none;
	background: #1f2933; color: #fff; font-weight: 700; font-size: 16px;
}
.nls-hdr__avatar--premium { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--nls-crown, #e0a100); }
.nls-hdr__name { font-size: var(--nls-hdr-link-size, 18px); max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nls-hdr__chevron { transition: transform .15s; }
.nls-hdr__menu[open] .nls-hdr__chevron { transform: rotate(180deg); }

.nls-hdr__panel {
	position: absolute; right: 0; top: calc(100% + 10px); z-index: 1000; min-width: 260px;
	background: #fff; color: #1f2933; border: 1px solid #e5e7eb; border-radius: 10px;
	box-shadow: 0 12px 32px rgba(0,0,0,.14); overflow: hidden; text-align: left;
}
.nls-hdr__who { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-bottom: 1px solid #eef0f3; font-size: 14px; }
.nls-hdr__who strong { font-size: 15px; }
.nls-hdr__who span { color: #616e7c; overflow-wrap: anywhere; }
.nls-hdr__status { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 13px; font-weight: 600; }
.nls-hdr__status--premium { color: #8a6100 !important; }
.nls-hdr__status--premium svg { color: var(--nls-crown, #e0a100); }
.nls-hdr__links { display: flex; flex-direction: column; padding: 6px 0; }
.nls-hdr__links a { padding: 10px 16px; color: #1f2933; font-size: 15px; }
.nls-hdr__links a:hover, .nls-hdr__links a:focus-visible { background: #f5f7fa; color: var(--nls-brand, #c8102e); outline: none; }
.nls-hdr__links .nls-hdr__logout { border-top: 1px solid #eef0f3; margin-top: 6px; padding-top: 12px; }

@media (max-width: 782px) {
	.nls-hdr { gap: 10px; }
	.nls-hdr__name, .nls-hdr__chevron { display: none; }
	.nls-hdr__subscribe { padding: 8px 14px; font-size: 14px; }
	.nls-hdr__login { font-size: 15px; }
	.nls-hdr__panel { min-width: 240px; max-width: calc(100vw - 24px); }
}
