html, body {
  height: 100%;
  margin: 0;
}

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

:root {
  --bg: #071419;
  --bg-2: #0b1f1f;
  --text: #e8fff7;
  --muted: #9debd6;
  --accent: #2ee8a7;      /* Teal */
  --accent-2: #b6ff5c;    /* Lime accent */
  --glass: rgba(8, 18, 18, 0.22);
  --glass-border: rgba(46, 232, 167, 0.4);
  --card: rgba(8, 18, 18, 0.28);
  --card-border: rgba(46, 232, 167, 0.5);
  --shadow: 0 8px 28px rgba(0,0,0,.55);
  --radius: 14px;
  --focus: 2px solid var(--accent-2);
}

html { color-scheme: dark; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  /* Layered teal grid paper + subtle noise/scanlines */
  background-image:
    linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)),
    linear-gradient(to right, rgba(46,232,167,.10) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(46,232,167,.10) 1px, transparent 1px),
    radial-gradient(circle at 10% 0%, rgba(0,0,0,.20), transparent 40%);
  background-size: auto, 24px 24px, 24px 24px, 100% 100%;
  background-position: 0 0, 0 0, 0 0, 0 0;
  background-repeat: no-repeat, repeat, repeat, no-repeat;
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Reduced motion fallback */
  scroll-behavior: smooth;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6fbf7;
    --bg-2: #eef6f0;
    --text: #0b1e1a;
    --muted: #3a5550;
    --accent: #127d58;
    --accent-2: #1f7a00;
    --glass: rgba(255,255,255,.72);
    --glass-border: rgba(18,125,88,.5);
    --card: rgba(255,255,255,.8);
    --card-border: rgba(18,125,88,.4);
  }
  body {
    background-image:
      linear-gradient(rgba(255,255,255,.6), rgba(255,255,255,.6)),
      linear-gradient(to right, rgba(18,125,88,.08) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(18,125,88,.08) 1px, transparent 1px),
      radial-gradient(circle at 10% 0%, rgba(0,0,0,.05), transparent 40%);
    background-size: auto, 24px 24px, 24px 24px, 100% 100%;
    background-position: 0 0, 0 0, 0 0, 0 0;
  }
}

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

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

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.image-frame,
.image-frame img {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(46, 232, 167, 0.5);
  box-shadow: 0 6px 22px rgba(0,0,0,.35);
}

.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  display: block;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: translateZ(0);
}

/* Structural selectors (required by prompt) */
html, body, header, nav, main, article, footer, aside {
  /* base structure kept lean; additional styling below where needed */
}

/* Header / Hero */
header {
  margin-block: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(46, 232, 167, .5);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.75rem, 1.2rem + 3.5vw, 3rem);
  line-height: 1.1;
  letter-spacing: .2px;
}
header .meta {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.8rem, 0.4vw + 0.8rem, 1rem);
  opacity: .95;
}

/* Main content area */
main {
  padding: 0 0 2rem;
}
article {
  padding: 0;
  margin: 0 auto;
  max-width: clamp(520px, 88vw, 800px);
}
article h2 {
  font-size: clamp(1.25rem, 0.9rem + 2vw, 1.75rem);
  margin: 1rem 0 0.25rem;
}
article p {
  font-size: clamp(0.95rem, 0.6vw + 0.95rem, 1.1rem);
  line-height: 1.55;
  margin: 0.75rem 0;
  color: color-m-mix(in oklab, var(--text), black 0%);
}
article ul {
  padding-inline: 1.25rem;
  margin: 0.75rem 0 1rem;
}
article li { margin: 0.25rem 0; }

/* Footer / product ad panels (glass panels) */
footer {
  padding: 1rem 0 2rem;
}
.product-ad, .sponsored-page {
  display: inline-block;
  min-width: 0;
  padding: 0;
  margin: 0.25rem 0.5rem;
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(46,232,167,.5);
  transition: transform .2s ease, background .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover {
  background: rgba(0,0,0,.38);
  transform: translateY(-1px);
}
footer p {
  margin: 0.75rem 0 0;
  font-size: .9rem;
  color: var(--muted);
}

/* Links and controls (interactive elements) */
a, button, .btn, .cta {
  text-decoration: none;
  color: var(--text);
  outline: none;
}
a:focus-visible, a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
button, .btn, .cta {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.btn {
  display: inline-block;
  padding: .7rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(46,232,167,.6);
  background: linear-gradient(#0b1414, #0b1414 60%, #0a0f0f);
  color: var(--text);
  transition: transform .15s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: linear-gradient(#0a1717, #0b1f1f); }
.btn:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.btn--outline {
  background: transparent;
  border: 1px solid rgba(46,232,167,.6);
  color: var(--text);
}
.btn--outline:hover { background: rgba(46,232,167,.08); }

/* Utility: tags */
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  color: #001a12;
  background: linear-gradient(135deg, #a3f700 0%, #2ee8a7 100%);
  border: 1px solid rgba(0,0,0,.15);
}

/* Accessibility: focus ring for interactive elements (keyboard) uses high contrast */
:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Content container helpers (for potential .content usage) */
.content {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(0,0,0,.2);
  border: 1px solid rgba(46,232,167,.4);
  backdrop-filter: blur(8px);
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Print styles for readability */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .image-frame { break-inside: avoid; }
}
