/* Palette Tokens (CSS Variables) */
:root{
  --bg: #050705;
  --bg-2: #0a0f0a;
  --text: #eafff0;
  --muted: #a8f5c3;
  --accent: #39ff14;
  --accent-2: #6b4a2b;
  --surface: rgba(8, 18, 12, 0.28);
  --surface-2: rgba(8, 18, 12, 0.18);
  --border: rgba(255,255,255,0.28);
  --radius: 12px;
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --card: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.22);
  --tag: rgba(57,255,20,0.15);
}

/* Base / Reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  /* Layered neon checkerboard + gradient base */
  background-image:
    linear-gradient(to bottom right, rgba(0,0,0,0.0), rgba(0,0,0,0.0)),
    linear-gradient(45deg, rgba(57,255,20,.25) 25%, transparent 25%) -2px 0/20px 20px,
    linear-gradient(-45deg, rgba(57,255,20,.25) 25%, transparent 25%) 0px 0/20px 20px;
  background-color: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100dvh;
  isolation: isolate;
}
body::before {
  /* subtle scanline/noise overlay (pure CSS) */
  content: "";
  position: fixed; inset: 0;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  pointer-events: none;
  mix-blend-mode: overlay;
  opacity: .25;
}
img { max-width: 100%; display: block; height: auto; }

/* Layout helpers */
.container { width: 100%; max-width: clamp(320px, 92vw, 1100px); margin-inline: auto; padding: 0 1rem; }

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

/* Card / tag utilities */
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius); padding: .75rem; }

/* Section / typography helpers */
.tag { display: inline-block; padding: .15em .6em; border-radius: 999px; font-size: .75rem; background: var(--tag); color: #d6ffd9; }

/* Glass panels (with backdrop-filter) + fallback */
header, main, article, footer, aside {
  background: rgba(4, 14, 10, 0.28);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) and not (-webkit-backdrop-filter: blur(12px)) {
  header, main, article, footer, aside {
    background: rgba(4, 14, 10, 0.65);
  }
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  header, main, article, footer, aside { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}

/* Header / hero */
header { text-align: center; gap: 0.5rem; }
header h1 { font-size: clamp(1.6rem, 2vw + 1rem, 2.8rem); margin: .25rem 0 .25rem; color: #eafff5; letter-spacing: .5px; }
header .meta { color: var(--muted); font-size: clamp(.85rem, 0.8vw + .6rem, 1rem); }

/* Navigation */
nav { margin-top: .25rem; }
nav a { color: var(--accent); text-decoration: none; padding: .25rem .6rem; border-radius: 6px; border: 1px solid rgba(57,255,20,.22); background: rgba(57,255,20,.08); }
nav a:hover, nav a:focus-visible { text-decoration: underline; outline: none; }

/* Main content / article layout */
main { display: grid; gap: 1rem; padding: 1rem 0; }

/* Featured image frame (with aspect-ratio) */
.featured-image { margin: 0 0 1rem; }
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 6px 18px rgba(0,0,0,.25);
  background: #0a0f0a;
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Article typography */
h2 { font-size: clamp(1.25rem, 2vw + 0.75rem, 2rem); margin: .75rem 0; color: #eafff2; }
p { color: rgba(234, 255, 246, 0.95); margin: .75rem 0; }
blockquote {
  margin: .75rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: #d9ffd9;
}
ul { margin: .75rem 0 1rem 1.25rem; color: #eafff0; }
li { margin: .25rem 0; }

/* Product ad / footer-ad blocks inside footer */
.product-ad, .sponsored-page { padding: .75rem; border-radius: 12px; border: 1px solid rgba(255,255,255,.28); background: rgba(12, 40, 20, .22); text-align: center; }
.product-ad a, .sponsored-page a { color: #eafff0; text-decoration: none; display: inline-block; padding: .5rem 1rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); background: rgba(57,255,20,.15); }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Footer text */
footer { padding: 1rem; text-align: center; }

/* Links / buttons / CTAs (high contrast, accessible focus) */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; }
button, .btn, .cta {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(57,255,20,.6);
  background: var(--accent);
  color: #041205;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); background: #2afc2a; }
button:focus-visible, .btn:focus-visible, .cta:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* responsive helpers for accessibility */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .btn, .cta { transform: none !important; }
}

/* Utility: print-friendly */
@media print {
  body { background: white; color: black; }
  header, main, article, footer { background: none; border: none; box-shadow: none; }
  a { text-decoration: underline !important; color: #000; }
}
