:root {
  /* Palette tokens (emerald / turquoise + glassy neutrals) */
  --bg: #031e14;
  --bg-2: #04231a;
  --text: #eafff7;
  --muted: #9ff0d4;
  --accent: #2bd7a6;       /* emerald-turquoise */
  --accent-2: #00e6c2;     /* turquoise glow */
  --card: rgba(8, 28, 22, 0.32);
  --glass: rgba(8, 28, 22, 0.28);
  --border: rgba(0, 255, 200, 0.45);
  --shadow: 0 6px 20px rgba(0,0,0,0.25);
  --radius: 14px;
  --focus: 3px solid rgba(0, 255, 200, 0.95);
  --text-on-glass: #eafff0;
  --tag: rgba(0, 255, 200, 0.15);
  --tag-border: rgba(0, 255, 200, 0.35);
  --cta-solid: rgba(0, 180, 150, 0.35);
  --cta-border: rgba(0, 180, 150, 0.65);
  --focus-ring: 0 0 0 4px rgba(0, 255, 200, 0.55);
}

html, body {
  height: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  background:
    linear-gradient(135deg, rgba(0, 150, 120, 0.28), rgba(0, 255, 200, 0.20) 40%, rgba(0, 0, 0, 0) 100%),
    radial-gradient(circle at 15% -10%, rgba(0,255,200,0.25), transparent 25%),
    linear-gradient(#031a12, #02150f 60%, #020f0a);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  position: relative;
  isolation: isolate;
  z-index: 0;
}

/* Subtle layered noise/scanline overlay (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(0,255,180,.15), transparent 25%);
  opacity: .55;
  pointer-events: none;
  mix-blend-mode: overlay;
  /* Reduce motion impact on the grain layer if requested later */
}

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

.grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: saturate(1.1) blur(8px);
  -webkit-backdrop-filter: saturate(1.1) blur(8px);
  color: var(--text);
}

/* Header / hero */
header {
  padding: 1rem 0.75rem;
  text-align: center;
  border-bottom: 0;
  margin: 0 auto 1rem;
  width: min(100%, 1100px);
}

header h1 {
  font-size: clamp(1.4rem, 1.2rem + 2vw, 2.4rem);
  line-height: 1.15;
  margin: 0.25rem 0 0.25rem;
  color: #eafff6;
  letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}

header .meta {
  margin-top: .25rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: clamp(.85rem, 0.6vw + .8rem, 1rem);
  opacity: .95;
}

nav {
  margin-top: .5rem;
}

nav a {
  display: inline-block;
  padding: .55rem 1rem;
  border-radius: 999px;
  color: #d0fff0;
  background: rgba(2, 22, 16, 0.35);
  border: 1px solid rgba(0, 255, 200, 0.5);
  text-decoration: none;
}
nav a:hover { text-decoration: underline; color: #eafff7; }

main {
  padding: 0 0.5rem 1rem;
}

article {
  max-width: clamp(320px, 90vw, 980px);
  margin: 0 auto;
}

/* Image frame (supporting .image-frame and .featured-image in HTML) */
.image-frame,
.featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 200, 0.35);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  display: block;
  margin: 0.5rem 0 1rem;
  background: rgba(2, 22, 12, 0.25);
}
.image-frame img,
.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
  /* Subtle glow on edges */
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 0 12px rgba(0,255,200,.25);
}
.image-frame,
.featured-image {
  border-color: rgba(0,255,200,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Typography & content helpers */
.content {
  color: var(--text);
  line-height: 1.6;
  font-size: clamp(1rem, 0.92vw + 0.8rem, 1.125rem);
  max-width: 60ch;
}
.content h2,
.content h3 {
  color: #eafff7;
}
.content ul {
  margin: .75em 0 1em;
  padding-left: 1.15em;
}
.content li { margin: .25em 0; }

blockquote {
  margin: 1em auto;
  padding: .75em 1em;
  border-left: 4px solid var(--accent);
  background: rgba(2, 22, 16, 0.28);
  border-radius: 8px;
  color: #eafff2;
}

/* Sections that map to .product-ad / .sponsored-page in footer */
.product-ad,
.sponsored-page {
  display: block;
  text-align: center;
  padding: .75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(0, 255, 200, 0.5);
  background: rgba(8, 28, 22, 0.28);
  text-decoration: none;
  color: var(--text-on-glass);
  transition: transform .2s ease, background .2s ease;
}
.product-ad:hover,
.sponsored-page:hover { transform: translateY(-1px); background: rgba(8, 28, 22, 0.38); }

/* Footer layout */
footer {
  padding: 1rem;
  display: grid;
  gap: 1rem;
  justify-items: center;
  align-items: stretch;
  grid-template-columns: 1fr;
}
footer p { margin: 0; color: var(--muted); }

/* Utility classes (grid, card, tag) */
.container { width: 100%; max-width: clamp(320px, 92vw, 1200px); margin-inline: auto; padding-inline: 1rem; }
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.card.smol { padding: .75rem; }

/* Tag style for small accent chips */
.tag {
  display: inline-block;
  padding: .15em .5em;
  border-radius: 999px;
  font-size: .75rem;
  border: 1px solid var(--tag-border);
  background: var(--tag);
  color: #d6fff2;
}

/* Links & buttons (accessibility-friendly focus states) */
a,
button,
.btn,
.cta {
  text-decoration: none;
  color: var(--accent-2);
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
a:hover { text-decoration: underline; color: #6ff6e0; }
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: rgba(0,255,200,.95);
}

/* Buttons (solid and outline variants) */
button,
.btn,
.cta {
  padding: .6rem .95rem;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 200, 0.7);
  background: rgba(0, 120, 100, 0.25);
  color: var(--text);
  cursor: pointer;
}
.btn.primary,
.cta.primary {
  background: linear-gradient(135deg, rgba(0,255,200,.6), rgba(0,180,140,.6));
  border-color: rgba(0,255,200,.9);
}
button:hover,
.btn:hover,
.cta:hover { transform: translateY(-1px); background: rgba(0, 180, 150, 0.32); }

/* Focus ring offset helper */
:focus-visible { outline: none; outline-offset: 0; }
:focus-visible { box-shadow: var(--focus-ring); }

/* Responsive typography & layout tweaks */
@media (min-width: 640px) {
  header { padding: 1.25rem 0; }
  article { padding: 0 0.25rem; }
}
@media (min-width: 900px) {
  .container { padding-inline: 0; }
  article { padding: 0 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, nav, main, footer { page-break-after: auto; }
  a { color: #00a; text-decoration: underline; }
}