:root {
  /* Palette: brown base with mint accents */
  --bg: #271501;
  --bg-2: #3b1f0f;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.25);
  --text: #e9fbf5;
  --muted: #b8d8d0;
  --accent: #2ee6c0;       /* mint */
  --accent-2: #1ac6a2;       /* deeper mint */
  --focus: 3px solid color-m-mint; /* placeholder, overridden below */
  --shadow-soft: 0 8px 20px rgba(0,0,0,.25);
  --radius: 12px;
}

html, body {
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.25) 100%), 
              radial-gradient(circle at 20% 10%, rgba(114, 60, 18, 0.75) 0%, rgba(41,16,8,0.9) 60%, rgba(0,0,0,0.95) 100%), 
              #000;
  background-color: var(--bg);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Layered scanline/noise over background (pure CSS) */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 6px 6px, 6px 6px;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
  opacity: 0.25;
}

/* Subtle subtle grain via additional overlay for depth */
html::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.04);
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
  filter: saturate(0.8);
}

/* Base stacking context for content above background layers */
* { box-sizing: border-box; }

/* Layout utilities */
.container {
  width: 100%;
  max-width: clamp(640px, 90vw, 1200px);
  margin-inline: auto;
  padding: 0 1rem;
}

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

.grid-auto {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Glass panels (fallback included) */
header, main, aside, article, footer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem 0;
  box-shadow: var(--shadow-soft);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
}
@supports not (backdrop-filter: blur(10px)) {
  header, main, aside, article, footer {
    background: rgba(255,255,255,0.16);
  }
}
header { display: block; text-align: center; }
header h1 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.6rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  font-weight: 700;
}
header .meta {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: clamp(0.8rem, 1.6vw, 0.95rem);
}
nav {
  display: inline-block;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.32);
  background: rgba(0,0,0,0.15);
  transition: transform .2s ease;
}
nav a:hover { transform: translateY(-1px); text-decoration: underline; }

/* Featured image wrapper (image-frame styling) */
.featured-image {
  margin: 0 0 1rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.featured-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  filter: saturate(1.05);
}
.image-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}

/* Main typography and content */
main { padding: 0; }
article {
  display: block;
  line-height: 1.6;
}
article h2 {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  margin: 0 0 0.5rem;
  color: #e9fff7;
}
article h3 {
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  margin: 1rem 0 0.5rem;
}
article p { font-size: clamp(0.95rem, 2.5vw, 1.05rem); color: #eafff4; margin: 0.5rem 0; }
article blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(46,230,192,0.08);
  border-radius: 6px;
  color: #eafff4;
}
article ol, article ul {
  padding-left: 1.25rem;
  margin: 0.75rem 0;
}
article li { margin: 0.35rem 0; }

/* Content helper utility (for potential content wrappers) */
.content { padding: 1rem; }

/* Product/ad / footer blocks behaving as glass panels */
.product-ad, .sponsored-page {
  display: inline-block;
  width: auto;
  margin: 0.25rem;
}
.product-ad a, .sponsored-page a {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.38);
  background: rgba(0,0,0,0.15);
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Utility elements (tags) */
.tag {
  display: inline-block;
  padding: 0.15em 0.5em;
  font-size: 0.75rem;
  border-radius: 999px;
  color: #05211a;
  background: rgba(46, 228, 192, 0.3);
  border: 1px solid rgba(46, 228, 192, 0.6);
  margin-right: 0.4em;
}

/* Buttons & links (interactive states) */
a.btn, button.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(46, 228, 192, 0.8);
  text-decoration: none;
  font-weight: 600;
  color: #04201a;
  background: var(--accent);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
a.btn:hover, button.btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: #22d7bb;
}
a.btn:focus-visible, button.btn:focus-visible, .cta:focus-visible {
  outline: 3px solid #9ffbd9;
  outline-offset: 3px;
}
a.btn.secondary, .cta.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(46, 228, 192, 0.8);
}
a.btn.secondary:hover, .cta.secondary:hover {
  background: rgba(46, 228, 192, 0.15);
  color: #eafff5;
}
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  text-decoration: underline;
}
p a:hover { text-decoration: underline; }

/* Image and media frame helpers */
.content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Lists visuals: high contrast on glass */
ul, ol {
  list-style: none;
  padding-left: 0;
}
ul li, ol li {
  padding-left: 1.25rem;
  position: relative;
  margin: 0.25rem 0;
}
ul li::marker {
  color: var(--accent);
}
ul li::before {
  content: "•";
  position: absolute; left: 0; color: var(--accent);
}
ol { counter-reset: item; }
ol li { counter-increment: item; }
ol li::before {
  content: counter(item) ".";
  margin-right: .5em;
  color: var(--accent-2);
  font-weight: 700;
  position: absolute; left: -1em;
}

/* Typography scale helpers for responsive headings */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: .2px; }
h1 { font-weight: 800; }
h2 { font-weight: 700; }
h3 { font-weight: 700; }

/* Accessibility: prefer-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  nav a { transition: none; }
  a.btn, button.btn, .cta { transition: none; }
}

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