/*
 * Pulse UI kit — iptvchecker.com
 * Components only use tokens from tokens.css. No !important, no utility soup.
 */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: var(--lh-body);
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
svg.icon { flex-shrink: 0; }
h1, h2, h3, h4 { margin: 0; line-height: var(--lh-snug); font-weight: 650; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent-text); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
code, kbd, .mono { font-family: var(--font-mono); font-feature-settings: normal; }
.num { font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; } /* the one exception: [hidden] must always win */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: var(--z-toast);
  background: var(--accent); color: var(--on-accent); padding: var(--s-2) var(--s-4);
  border-radius: var(--r-md); font-weight: 600;
}
.skip-link:focus { top: var(--s-3); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--s-4); }
.container--narrow { max-width: var(--container-narrow); }
@media (min-width: 768px) { .container { padding-inline: var(--s-5); } }
.section { padding-block: var(--s-8); }
.section--tight { padding-block: var(--s-7); }
.section + .section { border-top: 1px solid var(--border); }
.stack > * + * { margin-top: var(--s-4); }
.stack-sm > * + * { margin-top: var(--s-2); }
.stack-lg > * + * { margin-top: var(--s-6); }
.row { display: flex; align-items: center; gap: var(--s-3); }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: var(--fs-12); font-weight: 600; letter-spacing: var(--tracking-label);
  text-transform: uppercase; color: var(--text-3);
}
.lede { font-size: var(--fs-18); color: var(--text-2); max-width: 60ch; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: var(--fs-14); }
.tiny { font-size: var(--fs-12); }
.h2 { font-size: var(--fs-24); letter-spacing: var(--tracking-display); }
@media (min-width: 768px) { .h2 { font-size: var(--fs-32); } }
.h3 { font-size: var(--fs-18); }
.prose { max-width: 70ch; color: var(--text-2); }
.prose h2 { color: var(--text); font-size: var(--fs-24); margin-top: var(--s-6); margin-bottom: var(--s-3); }
.prose h3 { color: var(--text); font-size: var(--fs-18); margin-top: var(--s-5); margin-bottom: var(--s-2); }
.prose p, .prose ul, .prose ol { margin-block: 0 var(--s-4); }
.prose li + li { margin-top: var(--s-1); }
.prose strong { color: var(--text); font-weight: 600; }
.prose code { font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: var(--r-sm); color: var(--text); }
.prose a { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.site-header__inner { height: var(--header-h); display: flex; align-items: center; gap: var(--s-4); }
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--text);
  font-weight: 700; font-size: var(--fs-18); letter-spacing: -0.02em; min-height: var(--touch);
}
.brand:hover { text-decoration: none; }
.brand__tld { color: var(--text-3); font-weight: 500; }
.brand__badge {
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: var(--accent-text);
  border: 1px solid var(--accent-ring); border-radius: var(--r-full); padding: 1px 8px; margin-left: 2px;
}
.nav { display: none; margin-left: auto; align-items: center; gap: var(--s-1); }
.nav__link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s-3);
  color: var(--text-2); font-size: var(--fs-14); font-weight: 500; border-radius: var(--r-md);
  transition: color var(--dur-2) var(--ease-out), background-color var(--dur-2) var(--ease-out);
}
.nav__link:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav__link[aria-current='page'] { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.header-actions .nav-login, .header-actions .nav-signup { display: none; }
@media (min-width: 480px) { .header-actions .nav-signup { display: inline-flex; } }
@media (min-width: 900px) {
  .header-actions .nav-login { display: inline-flex; }
  .nav { display: flex; }
  .header-actions { margin-left: var(--s-2); }
  .header-actions .menu-toggle { display: none; }
}
.drawer {
  border-top: 1px solid var(--border); background: var(--bg);
  padding: var(--s-3) var(--s-4) var(--s-5);
}
.drawer__link {
  display: flex; align-items: center; min-height: var(--touch); padding: 0 var(--s-3);
  color: var(--text); font-weight: 500; border-radius: var(--r-md);
}
.drawer__link:hover { background: var(--surface-2); text-decoration: none; }
@media (min-width: 900px) { .drawer { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface-2); --btn-fg: var(--text); --btn-border: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--touch); padding: 0 var(--s-4);
  background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-border);
  border-radius: var(--r-md); font-weight: 600; font-size: var(--fs-14); line-height: 1;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.btn:hover { text-decoration: none; background: var(--surface-3); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }
.btn--primary { --btn-bg: var(--accent); --btn-fg: var(--on-accent); --btn-border: var(--accent); }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { --btn-bg: transparent; --btn-border: transparent; color: var(--text-2); }
.btn--ghost:hover { color: var(--text); background: var(--surface-2); }
.btn--outline { --btn-bg: transparent; }
.btn--danger { --btn-bg: var(--down-soft); --btn-fg: var(--down-text); --btn-border: transparent; }
.btn--lg { min-height: 52px; padding: 0 var(--s-5); font-size: var(--fs-16); border-radius: var(--r-md); }
.btn--sm { min-height: 36px; padding: 0 var(--s-3); font-size: var(--fs-14); }
.btn--block { width: 100%; }
.btn--icon { width: var(--touch); padding: 0; }
.btn--icon.btn--sm { width: 36px; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--btn-fg); border-right-color: transparent; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Fields ---------- */
.label { display: block; font-size: var(--fs-14); font-weight: 600; color: var(--text); margin-bottom: var(--s-2); }
.help { font-size: var(--fs-14); color: var(--text-3); margin-top: var(--s-2); }
.input {
  width: 100%; min-height: var(--touch); padding: 0 var(--s-4);
  background: var(--surface-1); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  font: inherit; font-size: var(--fs-16);
  transition: border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: var(--text-3); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input--mono { font-family: var(--font-mono); font-size: 15px; letter-spacing: -0.01em; }
.input--lg { min-height: 56px; }
.input[aria-invalid='true'] { border-color: var(--down); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-5);
}
.card--flush { padding: 0; }
.card--inset { background: var(--surface-2); border-color: transparent; }
.card__section { padding: var(--s-5); }
.card__section + .card__section { border-top: 1px solid var(--border); }
@media (min-width: 768px) { .card { padding: var(--s-6); } .card--flush { padding: 0; } .card__section { padding: var(--s-5) var(--s-6); } }

/* ---------- Badges ---------- */
.badge {
  --badge-fg: var(--text-2); --badge-bg: var(--surface-2); --badge-dot: var(--text-3);
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: var(--r-full); background: var(--badge-bg); color: var(--badge-fg);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--badge-dot); }
.badge--plain::before { display: none; }
.badge--up { --badge-fg: var(--up-text); --badge-bg: var(--up-soft); --badge-dot: var(--up); }
.badge--warn { --badge-fg: var(--warn-text); --badge-bg: var(--warn-soft); --badge-dot: var(--warn); }
.badge--down { --badge-fg: var(--down-text); --badge-bg: var(--down-soft); --badge-dot: var(--down); }
.badge--trial { --badge-fg: var(--trial-text); --badge-bg: var(--trial-soft); --badge-dot: var(--trial); }
.badge--accent { --badge-fg: var(--accent-text); --badge-bg: var(--accent-soft); --badge-dot: var(--accent); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-full);
  color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.chip .icon { width: 14px; height: 14px; }

/* ---------- Stat ---------- */
.stat__label { font-size: var(--fs-12); color: var(--text-3); font-weight: 500; }
.stat__value { font-size: var(--fs-20); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stat__value--sm { font-size: var(--fs-16); }

/* ---------- Uptime strip (also the brand motif) ---------- */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; height: 36px; align-items: end; }
.strip__bar {
  height: 100%; border-radius: 3px; background: var(--nodata);
  transition: transform var(--dur-2) var(--ease-out);
}
.strip__bar--up { background: var(--up); }
.strip__bar--warn { background: var(--warn); }
.strip__bar--down { background: var(--down); }
.strip__bar--empty { background: transparent; border: 1px dashed var(--border-strong); }
.strip__bar:hover { transform: scaleY(1.08); }
.strip__labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--fs-12); color: var(--text-3); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s-3); font-size: var(--fs-12); color: var(--text-3); }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend__swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--nodata); }
.legend__swatch--up { background: var(--up); }
.legend__swatch--warn { background: var(--warn); }
.legend__swatch--down { background: var(--down); }

/* ---------- Ring (days left) ---------- */
.ring { position: relative; width: 112px; height: 112px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring__track { stroke: var(--surface-3); }
.ring__value { stroke: var(--ring-color, var(--accent)); stroke-linecap: round; transition: stroke-dashoffset 700ms var(--ease-out); }
.ring__center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring__number { font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring__unit { font-size: var(--fs-12); color: var(--text-3); margin-top: 4px; }

/* ---------- Meter (connections) ---------- */
.meter { display: flex; gap: 4px; height: 10px; }
.meter__seg { flex: 1; border-radius: 3px; background: var(--surface-3); }
.meter__seg--on { background: var(--accent); }
.meter--full .meter__seg--on { background: var(--warn); }

/* ---------- Definition grid ---------- */
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-5); margin: 0; }
.kv > div { min-width: 0; }
.kv dt { font-size: var(--fs-12); color: var(--text-3); font-weight: 500; margin-bottom: 2px; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (min-width: 640px) { .kv--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Copy row ---------- */
.copy-row {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  background: var(--surface-2); border-radius: var(--r-md); min-height: 52px;
}
.copy-row__label { font-size: var(--fs-12); color: var(--text-3); }
.copy-row__value { font-family: var(--font-mono); font-size: 14px; overflow-wrap: anywhere; color: var(--text); }
.copy-row__value--masked { letter-spacing: 0.15em; }

/* ---------- Disclosure / FAQ ---------- */
.disclosure { border-top: 1px solid var(--border); }
.disclosure:last-child { border-bottom: 1px solid var(--border); }
.disclosure > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  min-height: 56px; padding: var(--s-3) 0; font-weight: 600; color: var(--text);
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary .icon { color: var(--text-3); transition: transform var(--dur-2) var(--ease-out); }
.disclosure[open] > summary .icon { transform: rotate(180deg); }
.disclosure__body { padding: 0 0 var(--s-5); color: var(--text-2); max-width: 70ch; }
.disclosure--card { border: 1px solid var(--border); border-radius: var(--r-md); padding: 0 var(--s-4); }
.disclosure--card:last-child { border-bottom: 1px solid var(--border); }

/* ---------- Callout ---------- */
.callout {
  --callout-fg: var(--text); --callout-bg: var(--surface-2); --callout-edge: var(--border-strong);
  display: flex; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md);
  background: var(--callout-bg); border-left: 3px solid var(--callout-edge); color: var(--callout-fg);
}
.callout--warn { --callout-bg: var(--warn-soft); --callout-edge: var(--warn); }
.callout--down { --callout-bg: var(--down-soft); --callout-edge: var(--down); }
.callout--up { --callout-bg: var(--up-soft); --callout-edge: var(--up); }
.callout--accent { --callout-bg: var(--accent-soft); --callout-edge: var(--accent); }

/* ---------- Lists ---------- */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 26px; color: var(--text-2); }
.ticks li + li { margin-top: var(--s-2); }
.ticks li::before {
  content: ''; position: absolute; left: 4px; top: 0.55em; width: 10px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.ticks--muted li::before { border-color: var(--text-3); }

/* ---------- Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: var(--r-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Toast ---------- */
.toast-region { position: fixed; z-index: var(--z-toast); left: 50%; bottom: var(--s-5); transform: translateX(-50%); display: grid; gap: var(--s-2); width: min(92vw, 420px); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s-3);
  background: var(--surface-3); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); padding: var(--s-3) var(--s-4); box-shadow: var(--shadow-pop);
  font-size: var(--fs-14); font-weight: 500; animation: toast-in var(--dur-3) var(--ease-out);
}
.toast--up .icon { color: var(--up); }
.toast--down .icon { color: var(--down); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: var(--s-7) var(--s-6); color: var(--text-3); font-size: var(--fs-14); }
.site-footer__grid { display: grid; gap: var(--s-6); }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer__title { font-size: var(--fs-12); font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s-3); }
.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.site-footer__links a { color: var(--text-2); }
.site-footer__base { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; }

/* ---------- Region picker (server-injected on home + country pages) ---------- */
.region-picker { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.region-picker__label { font-size: var(--fs-14); color: var(--text-3); margin-right: var(--s-2); }
.region-picker__link {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s-3);
  border: 1px solid var(--border); border-radius: var(--r-full); color: var(--text-2); font-size: var(--fs-14);
}
.region-picker__link:hover { border-color: var(--border-strong); color: var(--text); text-decoration: none; }
.region-picker__link.is-active { border-color: var(--accent-ring); color: var(--accent-text); background: var(--accent-soft); }

/* ---------- Pulse mark ---------- */
.pulse-mark__line { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; }
.pulse-mark.is-beating .pulse-mark__line { animation: beat 720ms var(--ease-out) 1; }
@keyframes beat { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }

.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--up); flex-shrink: 0; }
.live-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--up); opacity: 0; animation: ping 2.4s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(0.6); opacity: 0.7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .live-dot::after { display: none; }
}

/* ---------- Content pages ---------- */
.page-head { margin-bottom: var(--s-6); }
.page-title { font-size: clamp(1.9rem, 5vw, 2.6rem); font-weight: 750; letter-spacing: -0.03em; margin-top: var(--s-2); }
.page-body section + section { margin-top: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--border); }
.page-body h2:first-child { margin-top: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline > li { position: relative; padding-left: var(--s-5); padding-bottom: var(--s-6); border-left: 1px solid var(--border); }
.timeline > li::before { content: ''; position: absolute; left: -5px; top: 0.55em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.timeline > li:not(:first-child)::before { background: var(--border-strong); }
.timeline h2 { margin: 0; font-size: var(--fs-18); }
.timeline time { display: block; font-family: var(--font-mono); font-size: var(--fs-12); color: var(--text-3); margin: 2px 0 var(--s-2); }

/* ---------- Sponsored offers (ads-display.js) ----------
   Always labelled; CTA sits apart from the page's own buttons so a tap meant for
   "Try again" or "Watch this line" can't land on an ad. */
.results-inline-ad-slot { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px dashed var(--border); }
.results-ads-slot { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.card__section > .results-ads-slot:first-child { margin-top: 0; }
.ad {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto;
  grid-template-areas: 'meta meta meta' 'media body cta';
  align-items: center; gap: var(--s-3) var(--s-4);
  padding: var(--s-4); border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface-1); color: var(--text);
}
.ad--featured { background: var(--surface-2); border-color: var(--border-strong); }
.ad__meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); min-height: 24px; }
.ad__label {
  display: inline-flex; align-items: center; height: 22px; padding: 0 var(--s-2);
  border: 1px solid var(--border-strong); border-radius: var(--r-full);
  font-size: 11px; font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--text-2);
}
.ad__label--reseller { border-color: transparent; background: var(--warn-soft); color: var(--warn-text); text-transform: none; letter-spacing: 0; }
.ad__why { font-size: var(--fs-12); color: var(--text-3); }
.ad__dismiss {
  margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--text-3); cursor: pointer;
}
.ad__dismiss:hover { background: var(--surface-3); color: var(--text); }
.ad__media {
  grid-area: media; width: 48px; height: 48px; border-radius: var(--r-md); overflow: hidden;
  display: grid; place-items: center; background: var(--surface-3); color: var(--text-2);
}
.ad__media img { width: 100%; height: 100%; object-fit: contain; }
.ad__body { grid-area: body; min-width: 0; }
.ad__title { margin: 0; font-size: var(--fs-16); font-weight: 650; line-height: var(--lh-snug); }
.ad__title a { color: var(--text); }
.ad__title a:hover { color: var(--accent-text); }
.ad__text { margin: 2px 0 0; font-size: var(--fs-14); color: var(--text-2); }
.ad__cta { grid-area: cta; white-space: nowrap; }
.ad__cta svg { flex-shrink: 0; }
.ad--featured .ad__cta { --btn-bg: var(--accent-soft); --btn-fg: var(--accent-text); --btn-border: var(--accent-ring); }
.ad--featured .ad__cta:hover { background: var(--accent); color: var(--on-accent); }
.ad--stacked { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'meta' 'media' 'body' 'cta'; }
.ad--stacked .ad__media { width: 100%; height: 160px; }
.ad--stacked .ad__media img { object-fit: cover; }
.ad--stacked .ad__cta { justify-self: start; }
@media (max-width: 559px) {
  .ad { grid-template-areas: 'meta meta' 'media body' 'cta cta'; grid-template-columns: 48px minmax(0, 1fr); }
  .ad__cta { width: 100%; margin-top: var(--s-1); }
  .ad--stacked { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'meta' 'media' 'body' 'cta'; }
  .ad--stacked .ad__cta { justify-self: stretch; }
}

/* Legacy hook: shared scripts (account-upsell.js, ads-display.js) toggle `.hidden`. Keep last. */
.hidden, .header-actions .hidden { display: none; }

/* ---------- auth pages (login, signup) ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: var(--s-6, 24px) var(--s-4); }
.auth__box { width: min(420px, 100%); display: grid; gap: var(--s-4); }
.auth__brand { justify-self: center; }
.auth .card { display: grid; gap: var(--s-4); }
.auth h1 { margin: 0; }
.auth__lede { margin: 0; color: var(--text-2); }
.auth__foot { text-align: center; display: grid; gap: var(--s-2); color: var(--text-3); font-size: var(--fs-14); }
.auth form { display: grid; gap: var(--s-4); }
.auth .hint { margin: var(--s-1) 0 0; font-size: var(--fs-12); color: var(--text-3); }
.auth .msg { margin: 0; padding: var(--s-3); border-radius: var(--r-sm); font-size: var(--fs-14); }
.auth .msg--ok { background: var(--up-soft); color: var(--up-text); }
.auth .msg--err { background: var(--down-soft); color: var(--down-text); }
.auth .input--code { font-family: var(--font-mono); font-size: var(--fs-24); letter-spacing: 0.4em; text-align: center; }
