html, body, header, nav, main, article, footer, aside {
  margin: 0;
  padding: 0;
  height: auto;
}

/* Tokenized color palette (pewter / dark matter) */
:root {
  --bg: #0b0e14;
  --bg-2: #141821;
  --text: #eaf2ff;
  --muted: #cbd6e4;
  --accent: #7b92a8;      /* pewter blue-grey */
  --accent-2: #5a6470;    /* dark matter accent */
  --glass: rgba(255, 255, 255, 0.08);
  --glass-2: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 28px rgba(0,0,0,0.45);
  --radius: 14px;
  --focus-ring: 0 0 0 3px rgba(124, 200, 255, 0.6);
}

/* Layered, GPU-friendly background: gradient + subtle scanlines/noise */
html, body {
  height: 100%;
}
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background:
    /* subtle scanline / noise layer */
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    /* soft nebula gradient */ 
    linear-gradient(135deg, #0b0e14 0%, #11131a 60%, #0b0e14 100%),
    linear-gradient(to bottom, rgba(20,24,32,.85), rgba(8,8,12,.95));
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

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

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

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

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

@supports not (backdrop-filter: blur(12px)) {
  .card, header, main, footer, aside {
    background: rgba(20,20,26, 0.92);
    border-color: rgba(255,255,255, 0.4);
  }
  .card { box-shadow: 0 6px 16px rgba(0,0,0,.5); }
}

header, main, footer, aside {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem auto;
  max-width: 1100px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Header (title + meta) */
header {
  text-align: center;
}
header h1 {
  font-size: clamp(1.6rem, 1.6rem + 2vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 0.25rem;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.8rem, 0.8rem + 0.4vw, 0.95rem);
}

/* Simple navigation styling with accessible focus */
nav {
  margin-top: 0.5rem;
}
nav a {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
nav a:hover { background: rgba(255,255,255,0.08); }
nav a:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Hero content area within the main container */
main {
  display: grid;
  gap: 1rem;
  align-items: start;
}
.featured-image {
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.25);
}
.image-frame { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.25); }
.image-frame img { width: 100%; height: auto; display: block; object-fit: cover; }

/* Article typography and structure */
article h2 { font-size: clamp(1.25rem, 1.6vw + 0.8rem, 2rem); margin: 0.75rem 0 0.25rem; }
article h3 { font-size: clamp(1.05rem, 1.4vw + 0.6rem, 1.4rem); margin: 0.75rem 0 0.25rem; color: var(--text); }
article p { color: var(--muted); margin: 0.5rem 0 1rem; }
article ul { margin: 0.5rem 0 1rem 1.25rem; color: var(--muted); }
article li { margin: 0.25rem 0; }
blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 0.9rem;
  margin: 0.8rem 0;
  color: var(--text);
  opacity: 0.95;
}
blockquote footer { font-size: 0.9rem; color: var(--muted); }

@media (min-width: 720px) {
  main { grid-template-columns: 1fr; }
}

/* Content wrapper (for potential .content usage) */
.content { padding: 0.25rem 0; }

/* Product ad section in footer */
.product-ad, .sponsored-page {
  text-align: center;
  padding: 0.9rem;
  border-radius: var(--radius);
}
.product-ad { background: rgba(123, 154, 190, 0.12); border: 1px solid rgba(255,255,255,0.25); }
.sponsored-page { background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.25); }

/* Footer text and links */
footer { display: grid; gap: 0.75rem; justify-items: center; padding: 1rem 1rem 1.25rem; }

/* Link and button treatments (high-contrast, accessible) */
a, button, .btn, .cta {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  background: none;
  padding: 0.65em 1.05em;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  display: inline-block;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
a:hover, button:hover, .btn:hover, .cta:hover {
  text-decoration: underline;
  text-decoration-thickness: 0.2em;
}
.btn {
  background: var(--accent);
  color: #041018;
  border-color: rgba(0,0,0,0.25);
}
.btn:hover { background: #6a8aa2; color: white; }
.btn:active { transform: translateY(1px); }
.btn.outline {
  background: transparent;
  border: 1px solid var(--accent-2);
  color: var(--text);
}
.btn.outline:hover { background: rgba(138, 170, 196, 0.15); }

/* Utilities (grid, tags) */
.tag {
  display: inline-block;
  padding: 0.15em 0.6em;
  font-size: 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--text);
  background: rgba(255,255,255,0.08);
}

/* Print-friendly tweaks (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; border: none; box-shadow: none; }
  a, button { color: #000; }
}
