:root {
  --bg: #0b0b14;
  --bg-2: #1a0b2b;
  --surface: rgba(18, 12, 40, 0.60);
  --surface-2: rgba(24, 10, 52, 0.50);
  --text: #e9e1ff;
  --muted: #c9baff;
  --accent: #D4A017;       /* mustard yellow */
  --accent-2: #7C3AED;     /* purple */
  --border: rgba(214, 174, 54, 0.55);
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  --blur: 12px;
  --radius: 14px;
  --focus: 2px solid rgba(124,58,237,0.95);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Layered background: gradient + subtle scanlines + glow accents (CSS only) */
  background:
    linear-gradient(to bottom, #0b0b14 0%, #0b0b14 60%, #1a0b2b 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(212,160,54,.14), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(124,58,237,.14), transparent 40%);
  background-blend-mode: normal, overlay, screen, normal;
  min-height: 100%;
  padding: 1rem;
  box-sizing: border-box;
}

html, body, header, nav, main, article, aside, footer {
  /* Glass panel baseline: soft frosted look with accessible contrast fallback */
  background: rgba(12, 8, 40, 0.28);
  border: 1px solid rgba(214, 174, 54, 0.50);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem auto;
  max-width: clamp(320px, 92vw, 1100px);
  color: var(--text);
  box-shadow: var(--shadow);
  /* Ensure content sits above background noise on all devices */
  position: relative;
}

/* Backdrop blur where supported, with graceful fallback when not */
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  html, body, header, nav, main, article, aside, footer {
    background: rgba(12, 8, 40, 0.22);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}

header {
  display: block;
  text-align: left;
}
header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.4rem, 4vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: .2px;
}
header .meta {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .92rem;
}
nav {
  display: inline-block;
  margin-top: .5rem;
}
nav a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  padding: .4rem .7rem;
  border: 1px solid rgba(124,58,237,.4);
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: none;
}
main {
  display: block;
}
article {
  padding: 0;
}
.featured-image {
  width: 100%;
  margin: .75rem 0;
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(212,174,54,.6);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.content { padding: 0; }

/* Typography hierarchy and readable line length */
h2 { font-size: clamp(1.25rem, 3.2vw, 1.75rem); margin: .5rem 0 0.5rem; }
h3 { font-size: clamp(1.05rem, 2.6vw, 1.25rem); margin: .5rem 0; }
p { margin: .5rem 0; }

blockquote {
  margin: .5rem 0;
  padding: .5rem 1rem;
  border-left: 4px solid var(--accent-2);
  background: rgba(124,58,237,.18);
  color: #fff;
  border-radius: 6px;
}

/* Lists appearance with accessible contrast */
ul, li { margin: 0 0 0.5rem 1.2rem; padding: 0; }
ul { list-style: disc; }
li { line-height: 1.5; }

/* Image frame and its image already defined; ensure alt-friendly visuals */

.content a, .content button, .btn, .cta, a {
  text-decoration-skip-ink: auto;
}
a, button, .btn, .cta {
  /* color tokens for interactive controls */
  color: var(--accent-2);
  text-decoration: none;
  cursor: pointer;
}
a:hover, a:focus-visible {
  text-decoration: underline;
  outline: none;
}
a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 4px;
}

/* Utility and layout helpers */
.container {
  width: 100%;
  max-width: clamp(640px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(18,12,40,.28);
  border: 1px solid rgba(214,174,54,.55);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25em .5em;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(124,58,237,.28);
  color: #fff;
  border: 1px solid rgba(124,58,237,.66);
}

/* Content-specific panel variants (for sections like product-ad) */
.product-ad {
  display: block;
  padding: .75rem;
  margin: .5rem 0;
  background: rgba(12,8,40,.28);
  border: 1px solid rgba(214,174,54,.6);
  border-radius: 12px;
  text-align: center;
}
.sponsored-page { text-align: center; }

/* Buttons and CTAs */
.btn {
  display: inline-block;
  padding: .6em 1.1em;
  border-radius: 999px;
  border: 1px solid rgba(214,174,54,.8);
  background: linear-gradient(135deg, rgba(212,160,54,.95), rgba(124,58,237,.95));
  color: #fff;
  font-weight: 700;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,0,0,.25); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(214,174,54,.8);
}
.cta {
  padding: .6em 1.1em;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #111;
  font-weight: 700;
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Print-friendly tweaks */
@media print {
  body { color: #000; background: #fff; -webkit-print-color-adjust: exact; }
  header, nav, main, article, aside, footer { background: transparent; border: none; }
  a { color: #00f; text-decoration: underline; }
}