:root {
  /* Palette: blue cosmic nebula + magenta accents (tokenized) */
  --bg: #0b1a2b;
  --bg-2: #0a1b2a;
  --text: #e9f2ff;
  --muted: #a8b7d9;
  --accent: #ff3ad6;       /* magenta accent */
  --accent-2: #4fb7ff;     /* blue-cyan accent */
  --accent-hover: #e01bd0;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.18);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  --radius: 12px;
  --radius-sm: 8px;
  --focus: 3px solid rgba(0, 170, 255, 0.8);
  --focus-offset: 2px;
}

* { box-sizing: border-box; }
html { height: 100%; }
:focus-visible { outline: none; }

html, body { height: auto; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  min-height: 100%;
  /* Layered background: gradient + subtle noise/scanlines (pure CSS) */
  background-image:
    radial-gradient(circle at 20% 0%, rgba(0, 160, 255, 0.25), transparent 25%),
    radial-gradient(circle at 85% 20%, rgba(255, 0, 180, 0.25), transparent 25%),
    linear-gradient(135deg, rgba(6,12,40,0.95) 0%, rgba(6,12,40,0.92) 60%, rgba(10,0,40,0.95) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,.03) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  background-blend-mode: screen;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.6;
  font-size: clamp(14px, 1.1vw, 16px);
  color-scheme: dark;
}

/* Layout utilities & base rulers */
.container {
  max-width: clamp(640px, 90vw, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.95rem;
  box-shadow: var(--shadow);
  color: var(--text);
}

.tag {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--accent);
  color: #fff;
  line-height: 1;
}

/* Glass panels with backdrop-filter (with fallback) */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.9);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: var(--surface-strong); border-color: rgba(255,255,255,.35); }
}

/* Image frame styling */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.25);
  background: #111;
  box-shadow: 0 4px 16px rgba(0,0,0,.25), inset 0 0 12px rgba(255,255,255,.04);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
}

/* Core typographic scales (mobile-first) */
h1, h2, h3 { color: var(--text); margin: 0.5rem 0 0.25rem; font-weight: 700; line-height: 1.25; }
h1 { font-size: clamp(1.6rem, 2.6vw, 3.5rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.1rem, 1.6vw, 1.6rem); }
p { margin: 0.4rem 0 1rem; color: #e8f0ff; }

.meta { color: var(--muted); font-size: clamp(0.78rem, 0.8vw, 0.92rem); }

header, main, footer, aside, nav, article, .content {
  display: block;
}

/* Header & hero */
header {
  padding: 1.25rem 0 0.75rem;
  text-align: center;
}
header h1 {
  font-size: clamp(1.8rem, 3vw, 3.75rem);
  line-height: 1.12;
  margin: 0.25rem auto 0.6rem;
  max-width: 70ch;
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
}
header .meta { margin-top: 0.25rem; }

/* Global link and button treatments for accessibility and contrast */
a {
  color: var(--accent-2);
  text-decoration: none;
}
a:hover, a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--accent);
}
button, .btn, .cta {
  font-family: inherit;
  font-size: 1rem;
  border-radius: 8px;
  padding: 0.72em 1.1em;
  border: 1px solid transparent;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  display: inline-block;
  text-align: center;
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}
button:hover, .btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: var(--accent-hover);
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--accent-2);
}
.btn--outline:hover {
  background: rgba(79,183,255,.15);
}
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }

/* Main layout & content regions */
main { padding: 1rem 0; }
article { display: block; }

/* Content helpers */
.content { padding: 0.75rem 0 1rem; }

/* Lists & bullets */
ul { padding-left: 1.25rem; margin: 0.75rem 0 0.75rem; }
li { margin: 0.25rem 0; color: #eaf2ff; }

/* Footer & promotional blocks */
footer { padding: 1rem 0; text-align: center; color: var(--muted); }
.product-ad, .sponsored-page {
  display: inline-block;
  min-width: 140px;
  margin: 0.25rem;
}
.product-ad a, .sponsored-page a { color: #fff; text-decoration: none; }

/* Print styles for basic readability */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .glass { background: #fff; border: 1px solid #000; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
} 

/* Small utility tweaks for better mobile spacing */
@media (max-width: 640px) {
  header { padding: 0.75rem 0; }
  .container { padding-inline: .5rem; }
  .image-frame { border-radius: 10px; }
}