html, body, header, nav, main, article, footer, aside { box-sizing: border-box; }

/* Tokenized Palette */
:root {
  --bg: #1a0a2a;           /* deep plum base */
  --bg-2: #26163a;         /* darker plum for depth */
  --bg-3: #0f0621;          /* almost-black plum for contrast */
  --text: #eaffff;           /* high-contrast text on dark */
  --muted: #a6d6d9;          /* muted supporting text */
  --accent: #2ee0c6;          /* retro teal */
  --accent-2: #1bc2a8;        /* deeper teal for accents */
  --glass: rgba(18, 7, 35, 0.28); /* frosted glass panel bg */
  --glass-border: rgba(0, 255, 230, 0.38);
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --radius: 12px;
}

/* Base */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55;
  background-color: var(--bg);
  /* Layered background: checkerboard + gradient + subtle scanlines (pure CSS) */
  background-image:
    /* subtle plum checkerboard */
    linear-gradient(45deg, rgba(60,0,40,.25) 25%, rgba(60,0,40,.25) 25%, rgba(88,0,60,.25) 25%, rgba(88,0,60,.25) 50%, rgba(60,0,40,.25) 50%, rgba(60,0,40,.25) 75%, rgba(88,0,60,.25) 75%, rgba(88,0,60,.25) 100%),
    linear-gradient(-45deg, rgba(88,0,60,.25) 25%, rgba(60,0,40,.25) 25%, rgba(60,0,40,.25) 50%, rgba(88,0,60,.25) 50%, rgba(88,0,60,.25) 75%, rgba(60,0,40,.25) 75%, rgba(60,0,40,.25) 100%),
    linear-gradient(to bottom, rgba(15,0,40,.55), rgba(15,0,40,.55));
  background-size: 60px 60px, 60px 60px, 100% 100%;
  background-position: 0 0, 30px 30px, 0 0;
  background-blend-mode: overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  position: relative;
}
body::before {
  /* scanline overlay for subtle texture (no images) */
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  pointer-events: none;
  opacity: .25;
  mix-blend-mode: overlay;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}

/* Layout helpers */
.container { width: 100%; margin-inline: auto; padding-inline: 1rem; max-width: clamp(640px, 88vw, 1100px); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Structural */
header, nav, main, article, aside, footer { display: block; }
header { padding: 1.25rem 1rem; text-align: center; }
header h1 { font-size: clamp(1.6rem, 1.2rem + 2.2vw, 3rem); line-height: 1.15; margin: 0 0 0.25rem; letter-spacing: .2px; color: var(--text); }
header .meta { font-size: clamp(0.9rem, 0.6vw + 0.5rem, 1.05rem); color: var(--muted); }

/* Article content with glass panels */
main { padding: 0 0 2rem; }
article { margin: 0 auto; padding: 0; max-width: clamp(640px, 88vw, 900px); }
.featured-image { display: grid; justify-items: center; padding: 0.75rem 0 1rem; }
.image-frame, .featured-image { width: 100%; }
.image-frame {
  width: min(100%, 760px);
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  border: 1px solid rgba(0, 255, 230, 0.38);
  background: #000;
  box-shadow: var(--shadow);
  display: block;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: auto;
}
.content {
  padding: 0.75rem;
  border-radius: calc(var(--radius) - 4px);
  background: linear-gradient(to bottom right, rgba(10,0,40,.28), rgba(20,0,30,.28));
  border: 1px solid rgba(0, 255, 230, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 22px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(8px)) {
  .content { background: rgba(10,0,40,.42); }
}
h1, h2, h3 { color: var(--text); margin: .25rem 0 .75rem; }
h1 { font-size: clamp(1.6rem, 2.2vw + 1rem, 2.9rem); }
h2 { font-size: clamp(1.25rem, 1.2vw + 0.8rem, 1.75rem); }
h3 { font-size: clamp(1rem, 0.9vw + 0.8rem, 1.25rem); }

p { color: rgba(235, 246, 251, 0.95); margin: 0 0 1rem; }
em { font-style: italic; opacity: 0.95; }

ul { margin: 0 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; color: rgba(231,248,252,.95); }

/* Blockquotes */
blockquote {
  margin: 1rem 0;
  padding: .75rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(2,0,40,.28);
  border-radius: 6px;
  color: var(--text);
}

/* Product ad (footer area) */
.product-ad {
  margin: 1rem auto;
  padding: 1rem;
  max-width: clamp(320px, 90vw, 860px);
  text-align: center;
  border-radius: var(--radius);
  background: rgba(16, 0, 40, 0.28);
  border: 1px solid rgba(0, 255, 230, 0.34);
  box-shadow: var(--shadow);
}
.product-ad h3 { margin: 0 0 .5rem; font-size: 1.05rem; }
.product-ad a { display: inline-block; color: var(--text); text-decoration: none; padding: .6rem 1rem; border-radius: 999px; background: rgba(0, 255, 230, 0.25); border: 1px solid rgba(0, 255, 230, 0.5); }
.product-ad a:hover { background: rgba(0, 255, 230, 0.4); text-decoration: underline; }

/* Links and controls */
a {
  color: var(--accent);
  text-decoration: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid #baffff;
  outline-offset: 2px;
}
a:hover { text-decoration: underline; }

/* Buttons & controls (solid and outline variants) */
.btn, .cta, button {
  display: inline-block;
  padding: 0.72rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 224, 198, 0.7);
  background: linear-gradient(to bottom, rgba(46,224,198,.95), rgba(22,170,160,.95));
  color: #041a1a;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.btn:hover, .cta:hover, button:hover { transform: translateY(-1px); }
.btn:active, .cta:active, button:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(0, 255, 230, 0.6);
  box-shadow: none;
}
.btn--outline:hover { background: rgba(0,255,230,.15); }

/* Utility & components */
.card {
  background: rgba(14, 6, 28, 0.28);
  border: 1px solid rgba(0, 255, 230, 0.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.tag {
  display: inline-block;
  font-size: 12px;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: rgba(46, 224, 198, 0.22);
  border: 1px solid rgba(46, 224, 198, 0.5);
  color: #eaffff;
}

/* Navigation placeholder (structure-aware) */
nav { padding: .5rem 1rem; }

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .image-frame, .product-ad { border: 1px solid #000; }
  .content { background: transparent; box-shadow: none; }
}
