/* ==========================================================================
   Newsora 3.5 — Announcements, maintenance notice and Top up Sparks page
   Uses the theme tokens (--nw-*) so light / dark mode just work.
   ========================================================================== */

/* Announcement bar ---------------------------------------------------------- */
.nw-ann-stack { position: relative; z-index: 60; }
.nw-ann-bar {
	--ann: #6366f1;
	background: linear-gradient(90deg, color-mix(in srgb, var(--ann) 92%, #000) 0%, var(--ann) 55%, color-mix(in srgb, var(--ann) 70%, #a855f7) 100%);
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
}
.nw-ann-bar[hidden] { display: none; }
.nw-ann-bar.is-maint { --ann: #b45309; background: linear-gradient(90deg, #92400e, #d97706); }
.nw-ann-inner {
	max-width: var(--nw-container, 1280px);
	margin: 0 auto;
	padding: 9px 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 42px;
}
.nw-ann-tag {
	flex: none;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	padding: 4px 9px;
	border-radius: 99px;
	background: rgba(255, 255, 255, .2);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.nw-ann-ico { display: inline-flex; }
.nw-ann-text { flex: 1; min-width: 0; }
.nw-ann-text strong { font-weight: 700; }
.nw-ann-ex { opacity: .88; }
.nw-ann-cta {
	flex: none;
	color: var(--ann);
	background: #fff;
	font-weight: 600;
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 99px;
	text-decoration: none;
	white-space: nowrap;
	transition: transform .15s var(--nw-ease, ease);
}
.nw-ann-bar.is-maint .nw-ann-cta { color: #92400e; }
.nw-ann-cta:hover { transform: translateY(-1px); color: var(--ann); }
.nw-ann-pager { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: 12px; }
.nw-ann-pager em { font-style: normal; opacity: .85; min-width: 26px; text-align: center; }
.nw-ann-pager button, .nw-ann-x {
	appearance: none;
	border: 0;
	background: rgba(255, 255, 255, .16);
	color: #fff;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	display: inline-grid;
	place-items: center;
	padding: 0;
}
.nw-ann-x { flex: none; font-size: 18px; }
.nw-ann-pager button:hover, .nw-ann-x:hover { background: rgba(255, 255, 255, .3); }
@media (max-width: 720px) {
	.nw-ann-inner { flex-wrap: wrap; gap: 8px; padding: 8px 14px; }
	.nw-ann-ex { display: none; }
	.nw-ann-text { flex-basis: calc(100% - 90px); }
}

/* Announcement pop-up ------------------------------------------------------- */
.nw-ann-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(8, 10, 25, .55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: nwAnnFade .25s ease;
}
.nw-ann-modal[hidden] { display: none; }
.nw-ann-modal-card {
	position: relative;
	width: min(460px, 100%);
	background: var(--nw-bg, #fff);
	color: var(--nw-ink, #111);
	border-radius: 22px;
	padding: 34px 30px 26px;
	text-align: center;
	box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .45);
	border: 1px solid var(--nw-line, #e6e8ed);
	animation: nwAnnPop .3s var(--nw-ease, ease);
}
.nw-ann-modal-card .nw-ann-tag { color: var(--ann); background: color-mix(in srgb, var(--ann) 12%, transparent); box-shadow: none; }
.nw-ann-modal-card h2 { font-family: var(--nw-font-heading); font-size: 24px; line-height: 1.2; margin: 12px 0 10px; }
.nw-ann-modal-card p { color: var(--nw-ink-2, #454c5a); margin: 0 0 22px; }
.nw-ann-modal-ico {
	width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 18px;
	display: grid; place-items: center; color: #fff;
	background: linear-gradient(135deg, var(--ann), color-mix(in srgb, var(--ann) 60%, #a855f7));
	box-shadow: 0 14px 30px -10px var(--ann);
}
.nw-ann-modal-x {
	position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
	border: 0; background: var(--nw-surface, #f4f5f7); color: var(--nw-ink-2); font-size: 20px; cursor: pointer;
}
.nw-ann-modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.nw-ann-btn {
	display: inline-flex; align-items: center; justify-content: center;
	padding: 11px 20px; border-radius: 12px; font-weight: 600; font-size: 15px;
	background: var(--ann, var(--nw-accent)); color: #fff; text-decoration: none; border: 0; cursor: pointer;
}
.nw-ann-btn:hover { color: #fff; filter: brightness(1.06); }
.nw-ann-btn.is-ghost { background: var(--nw-surface); color: var(--nw-ink); }
@keyframes nwAnnFade { from { opacity: 0; } }
@keyframes nwAnnPop { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* Announcements archive ----------------------------------------------------- */
.nw-ann-timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 860px; }
.nw-ann-item { display: grid; grid-template-columns: 84px 1fr; gap: 22px; position: relative; padding-bottom: 22px; }
.nw-ann-item::before { content: ""; position: absolute; left: 41px; top: 70px; bottom: 0; width: 2px; background: var(--nw-line); }
.nw-ann-item:last-child::before { display: none; }
.nw-ann-date {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	width: 84px; height: 70px; border-radius: 16px; background: var(--nw-surface); border: 1px solid var(--nw-line);
}
.nw-ann-date strong { font-family: var(--nw-font-heading); font-size: 26px; line-height: 1; }
.nw-ann-date span { font-size: 12px; color: var(--nw-muted); margin-top: 4px; }
.nw-ann-card {
	--ann: #6366f1;
	background: var(--nw-bg); border: 1px solid var(--nw-line); border-radius: var(--nw-radius, 14px);
	padding: 22px 24px; box-shadow: var(--nw-shadow); border-left: 4px solid var(--ann);
	transition: transform .2s var(--nw-ease), box-shadow .2s;
}
.nw-ann-item .nw-ann-card { border-left-color: var(--ann); }
.nw-ann-card:hover { transform: translateY(-2px); }
.nw-ann-card-top { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.nw-ann-card .nw-ann-tag, .nw-ann-single .nw-ann-tag, .nw-ann-list .nw-ann-tag {
	color: var(--ann); background: color-mix(in srgb, var(--ann) 12%, transparent); box-shadow: none;
}
.nw-ann-flag { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: var(--nw-surface-2); color: var(--nw-ink-2); }
.nw-ann-flag.is-live { background: #dcfce7; color: #15803d; }
.nw-ann-card h2 { font-family: var(--nw-font-heading); font-size: 21px; line-height: 1.3; margin: 0 0 6px; }
.nw-ann-card h2 a { color: inherit; text-decoration: none; }
.nw-ann-card p { margin: 0 0 10px; color: var(--nw-ink-2); }
.nw-ann-more { font-weight: 600; font-size: 14px; color: var(--ann); text-decoration: none; }
.nw-ann-empty { text-align: center; padding: 60px 20px; color: var(--nw-muted); }
.nw-ann-narrow { max-width: 780px; }
.nw-ann-back { display: inline-block; margin: 6px 0 20px; font-size: 14px; color: var(--nw-muted); text-decoration: none; }
.nw-ann-single-head { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--nw-line); }
.nw-ann-single-head time { color: var(--nw-muted); font-size: 14px; }
.nw-ann-list { list-style: none; padding: 0; margin: 0; }
.nw-ann-list li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--nw-line); }
.nw-ann-list a { flex: 1; font-weight: 600; color: inherit; text-decoration: none; }
.nw-ann-list time { font-size: 13px; color: var(--nw-muted); }
@media (max-width: 640px) {
	.nw-ann-item { grid-template-columns: 1fr; gap: 10px; }
	.nw-ann-item::before { display: none; }
	.nw-ann-date { flex-direction: row; gap: 6px; width: auto; height: auto; padding: 6px 12px; justify-self: start; }
	.nw-ann-date strong { font-size: 16px; }
	.nw-ann-date span { margin: 0; }
}

/* Wallet → top-up call to action ------------------------------------------- */
.nw-sc-topup-cta {
	display: flex !important; align-items: center; gap: 16px; text-decoration: none; color: inherit;
	background: linear-gradient(135deg, rgba(14, 165, 233, .1), rgba(6, 182, 212, .04)) !important;
	border-color: rgba(14, 165, 233, .35) !important;
}
.nw-sc-topup-cta > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.nw-sc-topup-cta small { color: var(--nw-muted); }
.nw-sc-topup-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0ea5e9, #06b6d4); }

/* ==========================================================================
   Top up Sparks page
   ========================================================================== */
.nw-topup-body { --tp: #0ea5e9; --tp-2: #06b6d4; --tp-soft: rgba(14, 165, 233, .08); --tp-ring: rgba(14, 165, 233, .45); }

.nw-tp-hero {
	background:
		radial-gradient(900px 300px at 85% -40%, rgba(14, 165, 233, .14), transparent 70%),
		var(--nw-surface);
	border-bottom: 1px solid var(--nw-line);
	padding: 34px 0 40px;
}
.nw-tp-crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--nw-muted); margin-bottom: 16px; }
.nw-tp-crumbs a { color: inherit; text-decoration: none; }
.nw-tp-crumbs a:hover { color: var(--nw-ink); }
.nw-tp-kicker {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tp);
}
.nw-tp-title { font-family: var(--nw-font-heading); font-size: clamp(32px, 5vw, 48px); line-height: 1.05; letter-spacing: -.025em; margin: 8px 0 10px; }
.nw-tp-intro { margin: 0; color: var(--nw-ink-2); max-width: 640px; }

.nw-tp { padding: 28px 0 60px; }
.nw-tp-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.nw-tp-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--nw-surface); border: 1px solid var(--nw-line); border-radius: 99px; }
.nw-tp-tabs a {
	padding: 8px 18px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--nw-ink-2); text-decoration: none;
	transition: background .15s, color .15s;
}
.nw-tp-tabs a.is-active { background: var(--nw-ink); color: var(--nw-bg); }
.nw-tp-balance {
	display: inline-flex; align-items: center; gap: 7px; padding: 6px 6px 6px 14px; border-radius: 99px;
	border: 1px solid var(--nw-line); background: var(--nw-bg); text-decoration: none; color: var(--nw-ink); font-size: 14px;
}
.nw-tp-balance svg { color: var(--tp); }
.nw-tp-balance span { background: linear-gradient(135deg, var(--tp), var(--tp-2)); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; }

.nw-tp-alert { padding: 13px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 18px; border: 1px solid; }
.nw-tp-alert.is-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.nw-tp-alert.is-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.nw-tp-alert.is-err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.nw-tp-alert a { color: inherit; font-weight: 600; }
[data-scheme="dark"] .nw-tp-alert.is-ok { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .35); color: #6ee7b7; }
[data-scheme="dark"] .nw-tp-alert.is-warn { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .35); color: #fcd34d; }
[data-scheme="dark"] .nw-tp-alert.is-err { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .35); color: #fca5a5; }

.nw-tp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.nw-tp-main { display: grid; gap: 20px; min-width: 0; }
.nw-tp-card {
	background: var(--nw-bg); border: 1px solid var(--nw-line); border-radius: 16px; padding: 20px 22px;
	box-shadow: 0 1px 2px rgba(16, 20, 30, .04);
}
.nw-tp-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.nw-tp-card-head .nw-tp-h { margin: 0; }
.nw-tp-h { display: flex; align-items: center; gap: 7px; font-family: var(--nw-font-heading); font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.nw-tp-h svg { color: var(--tp); }
.nw-tp-fine { font-size: 13px; color: var(--nw-muted); margin: 4px 0 0; }
.nw-tp-center { text-align: center; }
.nw-tp-link { font-size: 14px; font-weight: 600; color: var(--tp); text-decoration: none; }

/* Tiles & packs */
.nw-tp-quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.nw-tp-tile, .nw-tp-pack { position: relative; cursor: pointer; display: block; }
.nw-tp-tile input, .nw-tp-pack input { position: absolute; opacity: 0; pointer-events: none; }
.nw-tp-tile span {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	height: 78px; border-radius: 14px; background: var(--nw-surface); border: 2px solid transparent;
	transition: border-color .15s, background .15s, transform .15s;
}
.nw-tp-tile strong { display: inline-flex; align-items: center; gap: 4px; font-size: 20px; font-family: var(--nw-font-heading); }
.nw-tp-tile strong svg { color: var(--tp); }
.nw-tp-tile small { font-size: 12px; color: var(--nw-muted); }
.nw-tp-tile:hover span { transform: translateY(-2px); }
.nw-tp-tile input:checked + span, .nw-tp-pack input:checked + span {
	border-color: var(--tp); background: var(--tp-soft); box-shadow: 0 0 0 4px rgba(14, 165, 233, .12);
}
.nw-tp-tile input:focus-visible + span, .nw-tp-pack input:focus-visible + span { outline: 2px solid var(--tp); outline-offset: 2px; }

.nw-tp-arrows { display: flex; gap: 6px; }
.nw-tp-arrows button {
	width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--nw-line); background: var(--nw-bg);
	color: var(--nw-ink); font-size: 18px; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.nw-tp-arrows button:hover { border-color: var(--tp); color: var(--tp); }
.nw-tp-packs {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 36px) / 3.4); gap: 12px;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 10px 2px 4px; margin: -10px -2px 0;
}
.nw-tp-packs::-webkit-scrollbar { display: none; }
.nw-tp-pack { scroll-snap-align: start; }
.nw-tp-pack span {
	position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px; height: 100%;
	border-radius: 14px; border: 2px solid var(--nw-line); background: var(--nw-bg); transition: border-color .15s, transform .15s;
}
.nw-tp-pack:hover span { transform: translateY(-2px); border-color: var(--tp-ring); }
.nw-tp-pack-ico {
	width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-style: normal;
	background: var(--tp-soft); color: var(--tp);
}
.nw-tp-pack strong { font-family: var(--nw-font-heading); font-size: 24px; line-height: 1; }
.nw-tp-pack strong small { font-size: 13px; font-weight: 500; color: var(--nw-muted); }
.nw-tp-pack b { font-size: 14px; color: var(--tp); }
.nw-tp-badge {
	position: absolute; top: -10px; right: 12px; font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: .08em;
	text-transform: uppercase; color: #fff; padding: 4px 8px; border-radius: 99px;
	background: linear-gradient(135deg, var(--tp), #6366f1); box-shadow: 0 6px 14px -6px var(--tp);
}

/* Custom */
.nw-tp-custom { display: flex; align-items: center; gap: 14px; cursor: text; }
.nw-tp-stepper {
	flex: 1; display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 99px;
	background: var(--nw-surface); border: 2px solid transparent; transition: border-color .15s;
}
.nw-tp-custom.is-on .nw-tp-stepper, .nw-tp-stepper:focus-within { border-color: var(--tp); background: var(--tp-soft); }
.nw-tp-stepper button {
	width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--nw-line); background: var(--nw-bg);
	color: var(--nw-ink); font-size: 18px; cursor: pointer; padding: 0; flex: none;
}
.nw-tp-stepper input {
	flex: 1; min-width: 0; border: 0; background: transparent; font-size: 16px; font-weight: 600; text-align: center;
	color: var(--nw-ink); padding: 6px; -moz-appearance: textfield; appearance: textfield;
}
.nw-tp-stepper input:focus { outline: none; }
.nw-tp-stepper input::-webkit-outer-spin-button, .nw-tp-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nw-tp-custom-total { flex: none; min-width: 80px; text-align: center; font-weight: 700; color: var(--tp); background: var(--tp-soft); padding: 9px 14px; border-radius: 99px; }

/* Summary */
.nw-tp-side { position: sticky; top: 96px; }
.nw-tp-summary {
	border-radius: 18px; padding: 22px; border: 1px solid rgba(14, 165, 233, .25);
	background: linear-gradient(180deg, rgba(14, 165, 233, .1), rgba(6, 182, 212, .03) 60%), var(--nw-bg);
	box-shadow: 0 20px 40px -24px rgba(14, 165, 233, .45);
}
.nw-tp-summary h2 { font-family: var(--nw-font-heading); font-size: 17px; margin: 0 0 14px; }
.nw-tp-summary dl { margin: 0; display: grid; gap: 10px; }
.nw-tp-summary dl div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.nw-tp-summary dt { color: var(--nw-muted); }
.nw-tp-summary dd { margin: 0; font-weight: 600; }
.nw-tp-summary dd.is-accent { color: var(--tp); }
.nw-tp-total {
	display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 18px; padding-top: 16px;
	border-top: 1px dashed var(--nw-line);
}
.nw-tp-total span { font-weight: 600; }
.nw-tp-total strong { font-family: var(--nw-font-heading); font-size: 30px; letter-spacing: -.02em; }
.nw-tp-pay {
	display: flex; align-items: center; justify-content: center; width: 100%; border: 0; cursor: pointer;
	padding: 15px 18px; border-radius: 99px; font-size: 16px; font-weight: 700; color: #fff; text-decoration: none;
	background: linear-gradient(135deg, var(--tp), var(--tp-2)); box-shadow: 0 12px 24px -12px var(--tp);
	transition: transform .15s, box-shadow .15s, filter .15s;
}
.nw-tp-pay:hover { color: #fff; transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 16px 30px -12px var(--tp); }
.nw-tp-pay[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.nw-tp-pay.is-busy { pointer-events: none; opacity: .8; }
.nw-tp-trust { list-style: none; margin: 14px 0 0; padding: 0; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--nw-muted); }
.nw-tp-trust li { display: inline-flex; align-items: center; gap: 5px; }

/* Tables */
.nw-tp-recent { margin-top: 24px; }
.nw-tp-table-wrap { overflow-x: auto; margin: 0 -22px; }
.nw-tp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.nw-tp-table th {
	text-align: left; font-size: 12px; font-weight: 600; color: var(--nw-muted); text-transform: uppercase; letter-spacing: .04em;
	padding: 10px 22px; background: var(--nw-surface); border-block: 1px solid var(--nw-line);
}
.nw-tp-table td { padding: 13px 22px; border-bottom: 1px solid var(--nw-line); white-space: nowrap; }
.nw-tp-table tr:last-child td { border-bottom: 0; }
.nw-tp-table code { font-size: 13px; background: none; padding: 0; color: var(--nw-ink-2); }
.nw-tp-pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; }
.nw-tp-pill.is-amber { background: #fef3c7; color: #92400e; }
.nw-tp-pill.is-green { background: #dcfce7; color: #166534; }
.nw-tp-pill.is-red { background: #fee2e2; color: #991b1b; }
.nw-tp-pill.is-grey { background: var(--nw-surface-2); color: var(--nw-ink-2); }
.nw-tp-act { text-align: right; }
.nw-tp-mini {
	display: inline-block; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 99px; margin-left: 4px;
	border: 1px solid var(--nw-line); color: var(--nw-ink-2); text-decoration: none;
}
.nw-tp-mini.is-primary { background: var(--tp); border-color: var(--tp); color: #fff; }
.nw-tp-empty { text-align: center; padding: 26px 10px 10px; color: var(--nw-muted); }
.nw-tp-empty svg { color: var(--tp); }
.nw-tp-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.nw-tp-filters a {
	font-size: 13px; padding: 5px 12px; border-radius: 99px; border: 1px solid var(--nw-line); color: var(--nw-ink-2); text-decoration: none;
}
.nw-tp-filters a.is-active { background: var(--nw-ink); color: var(--nw-bg); border-color: var(--nw-ink); }
.nw-tp-pages { display: flex; gap: 6px; justify-content: center; margin-top: 16px; }
.nw-tp-pages a { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--nw-line); text-decoration: none; color: inherit; }
.nw-tp-pages a.is-active { background: var(--tp); color: #fff; border-color: var(--tp); }
.nw-tp-gate { text-align: center; padding: 40px 20px; }
.nw-tp-gate svg { color: var(--tp); }
.nw-tp-btn { display: inline-block; padding: 11px 22px; border-radius: 99px; background: var(--tp); color: #fff; font-weight: 600; text-decoration: none; }

@media (max-width: 980px) {
	.nw-tp-grid { grid-template-columns: 1fr; }
	.nw-tp-side { position: static; }
	.nw-tp-packs { grid-auto-columns: calc((100% - 24px) / 2.4); }
}
@media (max-width: 560px) {
	.nw-tp-quick { grid-template-columns: repeat(3, 1fr); }
	.nw-tp-packs { grid-auto-columns: 62%; }
	.nw-tp-card { padding: 18px 16px; }
	.nw-tp-table-wrap { margin: 0; }
	.nw-tp-table thead { display: none; }
	.nw-tp-table, .nw-tp-table tbody, .nw-tp-table tr, .nw-tp-table td { display: block; width: 100%; }
	.nw-tp-table tr { border: 1px solid var(--nw-line); border-radius: 12px; padding: 6px 12px; margin-bottom: 10px; }
	.nw-tp-table td { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--nw-line); }
	.nw-tp-table td::before { content: attr(data-l); color: var(--nw-muted); font-size: 12px; }
	.nw-tp-table td.nw-tp-act { justify-content: flex-end; border: 0; }
	.nw-tp-table td.nw-tp-act::before { content: none; }
}
@media (prefers-reduced-motion: reduce) {
	.nw-tp-tile span, .nw-tp-pack span, .nw-tp-pay, .nw-ann-card, .nw-ann-modal, .nw-ann-modal-card { transition: none; animation: none; }
}

/* Keep the theme's generic button styles off the checkout button. */
.nw-tp .nw-tp-pay, .nw-tp button.nw-tp-pay[type="submit"] {
	background: linear-gradient(135deg, var(--tp), var(--tp-2)) !important;
	color: #fff !important; border: 0 !important; border-radius: 99px !important;
}
.nw-tp .nw-tp-stepper button, .nw-tp .nw-tp-arrows button { background: var(--nw-bg) !important; color: var(--nw-ink) !important; border: 1px solid var(--nw-line) !important; border-radius: 50% !important; }

/* v3.5.1 — compact top-up layout: every pack fits, no side scrolling ----- */
.nw-tp-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.nw-tp-main { gap: 16px; }
.nw-tp-card { padding: 16px 18px; }
.nw-tp-h { font-size: 15px; margin-bottom: 12px; }
.nw-tp-quick { gap: 10px; }
.nw-tp-tile span { height: 62px; border-radius: 12px; }
.nw-tp-tile strong { font-size: 17px; }
.nw-tp-tile small { font-size: 11.5px; }
.nw-tp-packs {
	display: grid; grid-auto-flow: row; grid-auto-columns: auto;
	grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
	gap: 10px; overflow: visible; scroll-snap-type: none; padding: 8px 0 0; margin: 0;
}
.nw-tp-pack span { gap: 5px; padding: 12px; border-radius: 12px; }
.nw-tp-pack-ico { width: 28px; height: 28px; border-radius: 8px; }
.nw-tp-pack-ico svg { width: 13px; height: 13px; }
.nw-tp-pack strong { font-size: 19px; white-space: nowrap; }
.nw-tp-pack strong small { font-size: 12px; }
.nw-tp-pack b { font-size: 13px; }
.nw-tp-badge { top: -9px; right: 8px; font-size: 9px; padding: 3px 7px; }
.nw-tp-summary { padding: 18px; }
.nw-tp-total { margin: 12px 0 14px; padding-top: 12px; }
.nw-tp-total strong { font-size: 24px; }
.nw-tp .nw-tp-pay, .nw-tp button.nw-tp-pay[type="submit"] { padding: 11px 16px; font-size: 14.5px; font-weight: 600; }
@media (max-width: 980px) { .nw-tp-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
	.nw-tp-packs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nw-tp-quick { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
	.nw-tp-tile span { height: 56px; }
	.nw-tp-tile strong { font-size: 15px; }
	.nw-tp-tile small { font-size: 10.5px; }
}

/* Trending: period label under the title */
.nw-trending-label { flex-wrap: wrap; row-gap: 2px; }
.nw-trending-period {
	flex-basis: 100%; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--nw-muted);
	padding-left: 26px;
}

/* Send a Spark — amounts follow the Top up list, payment confirmation ----- */
.nw-spark-opts { grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)) !important; gap: 8px !important; }
.nw-spark-opt > span { min-height: 78px !important; padding: 10px 4px !important; }
.nw-spark-opt strong { font-size: 20px !important; }
.nw-spark-opt small { font-size: 12px !important; }
.nw-spark-proof {
	margin: 18px 0 12px; padding: 18px; border-radius: 16px;
	border: 1.5px dashed color-mix(in srgb, var(--nw-accent) 45%, var(--nw-line));
	background: color-mix(in srgb, var(--nw-accent) 4%, var(--nw-bg));
	display: grid; gap: 12px;
}
.nw-spark-proof-head { display: flex; gap: 12px; align-items: flex-start; }
.nw-spark-proof-head h3 { margin: 0 0 2px; font-size: 16px; font-family: var(--nw-font-heading); }
.nw-spark-proof-head p { margin: 0; font-size: 13px; color: var(--nw-muted); }
.nw-spark-proof-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--nw-accent); }
.nw-spark-proof .nw-spark-field { margin: 0; }
.nw-spark-file { position: relative; display: block; }
.nw-spark-file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; z-index: 1; }
.nw-spark-file-ui {
	display: flex !important; align-items: center; justify-content: center; gap: 8px; padding: 14px; border-radius: 12px;
	border: 1.5px dashed var(--nw-line); background: var(--nw-bg); color: var(--nw-ink-2); font-size: 14px; text-align: center;
	transition: border-color .15s, background .15s;
}
.nw-spark-file-ui b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.nw-spark-file:hover .nw-spark-file-ui, .nw-spark-file input:focus-visible + .nw-spark-file-ui { border-color: var(--nw-accent); }
.nw-spark-file.has-file .nw-spark-file-ui { border-style: solid; border-color: var(--nw-accent); color: var(--nw-accent); }
.nw-spark-proof-btn {
	appearance: none; border: 0 !important; cursor: pointer; padding: 12px 16px !important; border-radius: 999px !important;
	font-weight: 700 !important; font-size: 15px !important; color: var(--nw-ink) !important;
	background: var(--nw-surface-2) !important; box-shadow: inset 0 0 0 1.5px var(--nw-ink);
	transition: background .15s, color .15s;
}
.nw-spark-proof-btn:hover { background: var(--nw-ink) !important; color: var(--nw-bg) !important; }

/* Free reading event */
.nw-ann-bar.is-free { background: linear-gradient(90deg, #15803d, #16a34a 55%, #10b981); }
.nw-ann-bar.is-free .nw-ann-cta { color: #15803d; }
.nw-free-note {
	display: flex; gap: 8px; align-items: center; padding: 12px 16px !important; margin: 0 0 22px !important; border-radius: 12px;
	background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-size: 15px; font-weight: 600;
}
[data-scheme="dark"] .nw-free-note { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .35); color: #6ee7b7; }

/* Mobile & tablet: article images edge to edge, text keeps its side padding.
   Works for every way WordPress writes images: image blocks (centered, resized,
   wrapped), classic captions with an inline width, and images in a paragraph
   or a link. */
@media (max-width: 1024px) {
	.nw-single { --nw-bleed: 24px; }

	/* Featured image */
	.nw-single .nw-single-media {
		margin-inline: calc(-1 * var(--nw-bleed)) !important;
		width: calc(100% + 2 * var(--nw-bleed)) !important;
		max-width: none !important;
		padding: 0 !important;
	}
	.nw-single .nw-single-media img { width: 100% !important; max-width: none !important; border-radius: 0 !important; display: block; }
	.nw-single .nw-single-media figcaption { padding-inline: var(--nw-bleed); text-align: left; }

	/* Image blocks inside the article (also in the members-only teaser) */
	.nw-single :is(.nw-prose, .nw-premium-teaser) > :is(figure, .wp-block-image, .wp-caption, img, picture),
	.nw-single :is(.nw-prose, .nw-premium-teaser) > p:has(> img:only-child),
	.nw-single :is(.nw-prose, .nw-premium-teaser) > p:has(> a:only-child > img:only-child),
	.nw-single :is(.nw-prose, .nw-premium-teaser) > p:has(> picture:only-child) {
		display: block !important;
		margin-left: calc(-1 * var(--nw-bleed)) !important;
		margin-right: calc(-1 * var(--nw-bleed)) !important;
		width: calc(100% + 2 * var(--nw-bleed)) !important;
		max-width: none !important;
		padding: 0 !important;
		float: none !important;
		text-align: left;
	}
	/* Wrappers inside them (figure inside .wp-block-image, links, aligncenter tables…) */
	.nw-single :is(.nw-prose, .nw-premium-teaser) > :is(figure, .wp-block-image, .wp-caption, p) :is(figure, a, picture, span):has(img) {
		display: block !important;
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		float: none !important;
	}
	.nw-single :is(.nw-prose, .nw-premium-teaser) > :is(figure, .wp-block-image, .wp-caption, p, picture) img,
	.nw-single :is(.nw-prose, .nw-premium-teaser) > img {
		display: block !important;
		width: 100% !important;
		max-width: none !important;
		height: auto !important;
		margin: 0 !important;
		border-radius: 0 !important;
		float: none !important;
	}
	.nw-single :is(.nw-prose, .nw-premium-teaser) > :is(figure, .wp-block-image, .wp-caption) :is(figcaption, .wp-caption-text) {
		display: block !important;
		padding-inline: var(--nw-bleed);
		caption-side: bottom;
	}
}
@media (max-width: 782px) {
	.nw-single { --nw-bleed: 16px; }
}
