:root {
  --bg: #0b0f14;
  --bg-2: #141923;
  --text: #e7e5d7;
  --muted: #b6b1a0;
  --accent: #c6b888;      /* khaki */
  --accent-2: #8f8a4a;    /* deeper khaki */
  --card: rgba(255,255,255,0.08);
  --card-strong: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.28);
  --shadow: 0 8px 24px rgba(0,0,0,.45);
  --focus: 0 0 0 3px rgba(198, 182, 136, 0.9);
  --radius: 12px;
} 

/* Global baseline + layered, GPU-friendly background (gradient + scanline + star speckles) */
html, body { height: 100%; }
* { box-sizing: border-box; }

html, body {
  margin: 0;
}
body {
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  font-size: clamp(14px, 1.6vw, 18px);
  line-height: 1.6;
  background-color: var(--bg);
  /* Layered: star speckles, subtle khaki-tinted glow, and scanlines */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.15) 2px, transparent 2px),
    radial-gradient(circle at 40px 60px, rgba(255,255,255,.08) 2px, transparent 2px),
    radial-gradient(circle at 100px 40px, rgba(255,255,255,.06) 2px, transparent 2px),
    linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.65) 60%, rgba(0,0,0,.9)),
    linear-gradient(to bottom, rgba(255,255,255,.04), rgba(255,255,255,.04));
  background-size: 2px 2px, 60px 60px, 100px 100px, 100% 100%, 100% 100%;
  background-blend-mode: overlay, overlay, overlay, normal, normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  color-scheme: dark;
  -webkit-tap-highlight-color: transparent;
}
 
/* Layout helpers and typography */
.container { width: 100%; max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding: 0 1rem; }

header, main, footer, aside { display: block; }

/* Glass panel primitives (with fallback if backdrop-filter not supported) */
.glass {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(18,18,20,.88); }
}

/* Header: cyberpunk hero with clear hierarchy for title, meta, and CTA */
header {
  padding: 1.75rem 1rem;
  text-align: center;
}
header .title { font-weight: 800; letter-spacing: .2px; }
header h1 {
  margin: .25rem 0;
  font-size: clamp(1.8rem, 3.2vw + 0.6rem, 3.6rem);
  line-height: 1.08;
}
header .meta { color: var(--muted); font-size: clamp(0.9rem, 0.8vw + 0.8rem, 1.05rem); }

nav { margin-top: .5rem; display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; }
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(198,184,128,.15);
  font-weight: 600;
}
nav a:hover { text-decoration: underline; }

/* Main content area */
main { padding: 0; }
article { padding: 0; }

/* Featured image frame with aspect-ratio, object-fit, subtle glow */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 26px rgba(0,0,0,.35);
  background: #0a0a0a;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(1.05) contrast(1.02);
}
.featured-image { margin: .75rem 0 1rem; }

/* Content typography and structure */
.content { padding: 0 0 1rem; color: var(--text); }
h1, h2, h3 { color: var(--text); margin: .75rem 0 .4rem; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 2.6vw + 1rem, 2.8rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 1.6vw + 1rem, 1.8rem); font-weight: 700; }
h3 { font-size: clamp(1.05rem, 1.2vw + .8rem, 1.25rem); font-weight: 700; }
p { color: var(--muted); margin: .6rem 0 1rem; }

/* Key listing of grains as a compact list */
ul { padding-left: 1.25rem; margin: .6rem 0 1rem; color: var(--text); }
li { margin: .25rem 0; }

/* Utility classes required by the spec */
.container, .grid, .card, .tag { }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.card h4 { margin: .25rem 0; font-size: 1rem; font-weight: 700; }
/card p { margin: .25rem 0; color: var(--muted); }

/* Link and CTA styling (solid and outline variants) */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  display: inline-block;
  transition: transform .15s ease, background .2s ease;
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn, .cta {
  padding: .6rem 1rem;
  border: 1px solid rgba(198,184,128,.75);
  background: linear-gradient(135deg, rgba(198,184,128,.35), rgba(198,184,128,.15));
}
.btn.primary {
  background: linear-gradient(135deg, rgba(198,184,128,.65), rgba(198,184,128,.25));
  border-color: rgba(198,184,128,.95);
}
.btn.outline {
  background: rgba(0,0,0,.0);
  border-color: rgba(198,184,128,.75);
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 0;
}
a:hover, .btn:hover, .cta:hover { transform: translateY(-1px); }

/* Footer / ad panels (glass) */
footer {
  padding: 1rem 0 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  justify-items: center;
  align-items: stretch;
}
.product-ad, .sponsored-page {
  width: 100%;
  text-align: center;
}
.product-ad a, .sponsored-page a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(198,184,128,.18);
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Print styles: basic readability */
@media print {
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  .glass { background: #f7f7f7; border: 1px solid #ddd; }
}

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