:root {
  /* Palette: mint + navy with glassy, high-contrast surface */
  --bg: #061226;
  --bg-2: #0b1a2b;
  --surface-rgb: 10, 180, 170; /* mint accent for rgba() */
  --text: #eafff7;
  --muted: #b8f2dd;
  --accent: #2ef5c2;
  --accent-2: #1bd2b0;
  --card: rgba(8, 22, 40, 0.34);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 24px rgba(0,0,0,.28);
  --ring: 0 0 0 3px rgba(46, 245, 198, 0.55);
  --radius: 14px;
}

/* Global reset & typography (mobile-first) */
html, body {
  height: 100%;
}
*,
*::before,
*::after { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(6,18,38,.95) 0%, rgba(8,20,38,.95) 60%, rgba(6,18,38,.95) 100%);
  background-image:
    linear-gradient(135deg, rgba(2, 8, 20, .95), rgba(6, 20, 38, .95) 60%, rgba(2, 8, 20, .95)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100vh;
}

/* Layered background helpers (subtle scanlines) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient( circle at 15% 0%, rgba(32,255,219,.08), transparent 40% ),
              radial-gradient( circle at 75% 20%, rgba(0,0,0,.08), transparent 40% );
  mix-blend-mode: screen;
  border-radius: 0;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
  html, body { background-attachment: scroll; }
}

/* Layout utilities & panels */
.container {
  width: 100%;
  max-width: clamp(680px, 62vw, 1200px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(var(--surface-rgb), 0.22);
  border: 1px solid rgba(var(--surface-rgb), 0.34);
  box-shadow: var(--shadow);
  color: var(--text);
}
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  font-size: .78rem;
  border-radius: 999px;
  background: rgba(var(--surface-rgb), 0.25);
  border: 1px solid rgba(var(--surface-rgb), 0.42);
  color: var(--text);
}
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.04);
}

/* Glass panels (with backdrop-filter) */
.glass {
  background: rgba(var(--surface-rgb), 0.18);
  border: 1px solid rgba(var(--surface-rgb), 0.34);
  border-radius: 12px;
  box-shadow: 0 8px 26px rgba(0,0,0,.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass {
    background: rgba(var(--surface-rgb), 0.32);
  }
}

/* Section elements (required selectors) */
header, nav, main, article, footer, aside {
  /* structural defaults to ensure readable spacing without layout collapse */
  padding: 0;
  margin: 0;
}
header {
  text-align: center;
  padding: 1.75rem 1rem 1rem;
}
header h1 {
  font-size: clamp(1.75rem, 1rem + 4vw, 3.25rem);
  line-height: 1.08;
  margin: 0 0 .4rem;
  font-weight: 700;
  letter-spacing: .2px;
}
header .meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: .5rem;
}
nav {
  margin-top: .25rem;
}
nav a {
  color: var(--accent);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
}
nav a:hover,
nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  color: var(--accent-2);
}
main {
  padding: 0 1rem 2rem;
}
article {
  padding: 1rem;
  display: block;
}
footer {
  padding: 1rem;
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}
aside { display: block; }

/* Content blocks styling */
.content { padding: 0; margin: 0; }

/* Text & typography (responsive) */
h2 { font-size: clamp(1.4rem, 0.6rem + 2vw, 2.4rem); margin: .6rem 0 .4rem; letter-spacing: .2px; }
h3 { font-size: clamp(1.1rem, 0.5vw + 1.2rem, 1.6rem); margin: .6rem 0; }
p { margin: .75rem 0; color: #eafff5; }
blockquote {
  margin: .75rem 0;
  padding: .5rem 1rem;
  border-left: 3px solid var(--accent);
  color: #eafff5;
  background: rgba(var(--surface-rgb), 0.18);
  border-radius: 6px;
}

/* Lists */
ul { padding-left: 1.25rem; margin: .75rem 0; }
li { margin: .25rem 0; }

/* Links & interactive elements */
a, button, .btn, .cta {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 1px solid rgba(var(--surface-rgb), 0.42);
  padding: .6rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
  display: inline-block;
}
a, .btn, .cta { color: var(--text); }
a:hover, a:focus-visible { text-decoration: underline; outline: none; }
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); }
.btn {
  background: rgba(var(--surface-rgb), 0.28);
  border-color: rgba(var(--surface-rgb), 0.46);
}
.btn--solid {
  background: linear-gradient(135deg, rgba(var(--surface-rgb), .58), rgba(var(--surface-rgb), .28));
  border: 1px solid rgba(var(--surface-rgb), .60);
  color: #04160f;
}
.btn--outline {
  background: transparent;
  border: 1px solid rgba(var(--surface-rgb), .60);
}
:focus-visible {
  outline: 3px solid rgba(var(--surface-rgb), 0.85);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Image assets */
.featured-image { width: 100%; margin: 1rem 0; }
@media (min-width: 720px) {
  .featured-image { margin: 1.25rem auto; }
}
.featured-image img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); }

/* Special sections (e.g., product-ad) styled as glass panels in footer */
.product-ad, .sponsored-page {
  width: min(100%, 720px);
  padding: .75rem 1rem;
}
.product-ad a, .sponsored-page a { text-decoration: none; color: var(--text); }
.product-ad { background: rgba(var(--surface-rgb), .22); border: 1px solid rgba(var(--surface-rgb), .34); border-radius: 12px; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  nav, header { display: none; }
  article { padding: 0; }
}

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