:root {
  --bg: #0f1116;
  --bg-2: #1b1f27;
  --text: #e9f0f5;
  --muted: #a6a6a6;
  --accent: #ff7a1a;
  --accent-2: #ff9a34;
  --glass: rgba(22, 24, 28, 0.66);
  --card: rgba(255,255,255,0.08);
  --card-border: rgba(255,255,255,0.25);
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --focus: 0 0 0 3px rgba(255, 170, 60, 0.65);
  --radius: 12px;
}

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

html, body { height: 100%; }

html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(10,12,16,.95) 0%, rgba(22,26,34,.95) 60%, rgba(10,12,16,.95) 100%), 
              radial-gradient(circle at 20% -10%, rgba(255,122,40,.25), transparent 40%),
              var(--bg);
  min-height: 100vh;
  isolation: isolate;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* subtle scanlines + micro-noise overlay */
  background-image:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* Sectionable glass panels (header/nav/main/article/aside/footer) */
header, nav, main, article, aside, footer {
  background: rgba(20, 20, 25, 0.66);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  margin: 0.75rem auto;
  width: min(100%, 1100px);
}

@supports not (backdrop-filter: blur(12px)) {
  header, nav, main, article, aside, footer { background: rgba(20,20,25,0.92); }
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 0.75rem;
}

/* Image handling */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12), 0 6px 20px rgba(0,0,0,0.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content typography */
.content { line-height: 1.5; color: var(--text); }

/* Product ad / CTA blocks */
.product-ad a, .cta {
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease;
}
.product-ad a {
  background: rgba(255, 122, 28, 0.95);
  color: #111;
  border: 1px solid rgba(255,255,255,.4);
}
.product-ad a:hover { background: #ff8a1c; transform: translateY(-1px); }
.sponsored-page a {
  background: rgba(0,0,0,.5);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}
.sponsored-page a:hover { background: rgba(0,0,0,.65); }

/* Links & focus states (WCAG AA-ish) */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
a:focus-visible { outline: none; box-shadow: var(--focus); }

/* Buttons (solid + outline) */
.btn { background: var(--accent); color: #0a0a0a; border: 1px solid rgba(0,0,0,.15); padding: .6rem 1rem; border-radius: 8px; cursor: pointer; }
.btn:hover { background: #ff8a2e; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--focus); }

/* Outline variant helper */
.btn--outline { background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.6); }

/* Typography scale */
h1 {
  font-family: ui-sans-serif, system-ui;
  font-size: clamp(2rem, 4vw + 1rem, 3.75rem);
  line-height: 1.05;
  margin: 0 0 .25rem;
  color: var(--text);
}
h2 { font-size: clamp(1.25rem, 2vw + 1rem, 1.75rem); margin: .75rem 0; color: var(--text); }

/* Header content specifics */
header { padding: 1rem 1rem; }

/* Text content density in article */
article p { font-size: clamp(1rem, 0.9vw + 0.9rem, 1.15rem); margin: .75rem 0; }

/* Lists & blockquotes */
ul { padding-left: 1.25rem; margin: .75rem 0; }
li { margin: .25rem 0; }
blockquote {
  margin: .75rem 0; padding: .5rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(255,122,28,.15);
  border-radius: 6px;
}

/* Print-friendly */
@media print {
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: underline; }
}

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