:root {
  --bg: #0b0f14;
  --bg-2: #141923;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --text: #e8f7f0;
  --muted: #98a7b8;
  --accent: #2bd4a5;
  --accent-2: #7ee6d0;
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 20px rgba(0,0,0,.25);
  --radius: 12px;
  --focus: 0 0 0 4px rgba(43,212,165,.38);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { margin: 0; padding: 0; color: var(--text); background: 
  linear-gradient(135deg, rgba(9,12,18,.95) 0%, rgba(15,20,28,.95) 60%, rgba(9,12,18,.95) 100%), 
  #0b0f14; }

/* Layered background: subtle gradient base + scanlines/noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to bottom right, rgba(255,255,255,.04), rgba(255,255,255,.04)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}
:focus { outline: none; }

/* Base layout helpers */
.container { width: 100%; padding-inline: 1rem; margin-inline: auto; max-width: clamp(320px, 90vw, 1120px); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1rem; }

header, main, footer, aside, nav, article {
  z-index: 1;
}

/* Glass/frosted surface with sane fallback */
 glass, .glass { 
  /* placeholder for potential utility class usage */
}

header, main, footer, article, aside {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 1rem;
  margin: 0.75rem auto;
}

/* Fallback when backdrop-filter not supported */
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, article, aside {
    background: rgba(255,255,255,.12);
  }
}

/* Typography */
html { font-size: 16px; }
@media (min-width: 420px) {
  html { font-size: 15px; }
}
@media (min-width: 768px) {
  html { font-size: 16px; }
}
body { line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Header hero styling */
header {
  display: block;
  text-align: left;
  padding: 1rem 1rem;
}
header h1 {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto;
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.08;
  margin: 0 0 .25rem;
  letter-spacing: .2px;
}
header .meta {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  color: var(--muted);
  margin: 0 0 .75rem;
}
nav a {
  color: var(--accent-2);
  text-decoration: none;
  padding: .25em .5em;
  border-radius: 6px;
  border: 1px solid rgba(43,212,165,.4);
}
nav a:hover { text-decoration: underline; }

/* Main content and article layout */
main { display: block; }
article {
  padding: 1rem;
  margin: 0.75rem auto 1.25rem;
  max-width: 900px;
}
.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,.25);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  background: #000;
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content helpers */
.content { padding: 0.5rem 0 0; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: .25rem 0 .5rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); margin: .75rem 0 .4rem; }
p { margin: 0 0 1rem; color: color-m-mix(in oklab, var(--text) 96%, black 4%); }
blockquote {
  margin: .5rem 0 1rem;
  padding: .75rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(43,212,165,.12);
  border-radius: 6px;
}
ul { margin: 0 0 1rem 1.15rem; padding: 0; }
li { margin: .25rem 0; }

/* Inline "tag" utility */
.tag {
  display:inline-block;
  padding: .15em .6em;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(43,212,165,.25);
  border: 1px solid rgba(43,212,165,.6);
  color: #eafff4;
}

/* Product/ad style in footer */
footer {
  display: block;
  padding: 1rem;
  margin: 0.5rem auto;
  text-align: center;
  gap: 1rem;
}
.product-ad, .sponsored-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  padding: .75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  text-decoration: none;
}
footer p { color: var(--muted); margin: .75rem 0 0; }

/* Link and button styles (focus-visible, accessible) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 2px;
}
a:hover { text-decoration: underline; }

/* Button variants */
.btn {
  display: inline-block;
  padding: .6em 1.05em;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn.primary {
  background: rgba(43,212,165,.92);
  color: #042216;
  border-color: rgba(43,212,165,.92);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Print styles for readability */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; box-shadow: none; border: none; }
  a { text-decoration: underline; }
}

/* Reduced motion for user preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}