/* Base & Theme Tokens */
:root {
  --bg: #0b0f14;
  --bg-2: #121923;
  --text: #e8f0f5;
  --muted: #a6b4c2;
  --accent: #f6a66e;
  --accent-2: #ffd5ba;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.22);
  --tile: #cbd5e1;
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --radius: 12px;
}

/* Layered, responsive surfaces and typography (mobile-first) */
html, body {
  height: 100%;
}
* { box-sizing: border-box; }
html {
  font-smoothing: antialiased;
}
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: clamp(14px, 1.2vw + 12px, 18px);
  line-height: 1.5;
  min-height: 100dvh;
  background: var(--bg);
  background-image:
    linear-gradient(135deg, rgba(180, 190, 200, 0.12) 0%, rgba(180,190,200,0.04) 60%, rgba(180,190,200,0.12) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0) 60%);
  background-blend-mode: overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
img { display: block; max-width: 100%; height: auto; }

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

/* Glass panels (with fallback) */
header, main, article, footer, aside {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, footer, aside { background: rgba(255,255,255,0.14); }
}
header { text-align: center; margin-bottom: 1rem; }

/* Header hero typography */
header h1 {
  font-size: clamp(1.4rem, 2.4vw + 1rem, 2.6rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
  color: var(--text);
}
header .meta { color: var(--muted); font-size: clamp(0.85rem, 0.8vw + 0.8rem, 1rem); margin-top: .25rem; }
header nav { margin-top: .5rem; }
header nav a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  padding: .25rem .5rem;
  border: 1px solid rgba(246,166,110,.5);
}
header nav a:hover, header nav a:focus-visible { text-decoration: underline; text-underline-offset: 3px; outline: none; }

/* Featured image frame (compat layer for .image-frame) */
.image-frame, .featured-image {
  width: 100%;
  display: block;
  margin: 0 0 1rem;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255,255,255,.25);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame { aspect-ratio: 16 / 9; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Main content structure */
main { display: block; padding: 0; }

/* Content helpers (may appear as sections/cards) */
.content { color: var(--text); }
.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;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.tag {
  display: inline-block;
  padding: .15em .6em;
  border-radius: 999px;
  font-size: .75rem;
  line-height: 1;
  color: #1b0a05;
  background: rgba(246,161,99,0.22);
  border: 1px solid rgba(246,161,99,0.4);
}

/* Article content styling and hierarchy */
article h2 { font-size: clamp(1.25rem, 2vw + 1rem, 1.75rem); margin: .25rem 0 0.5rem; color: var(--text); }
article h3 { font-size: clamp(1.05rem, 1.6vw + .8rem, 1.25rem); margin: .75rem 0 .4rem; color: #e9f0f5; }
article p, article ul { color: var(--text); margin: .4rem 0 1rem; }
article ul { padding-left: 1.25rem; }
article li { margin: .25rem 0; }

/* Lists & emphasis */
ul, li { color: var(--text); }
blockquote {
  margin: .5rem 0 1rem;
  padding: .75rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(246,166,110,0.14);
  border-radius: 6px;
}
strong { font-weight: 700; }

/* Product ad / sponsored blocks */
.product-ad, .sponsored-page {
  display: block;
  margin: .5rem 0;
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: .75rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
}
.product-ad a:hover, .sponsored-page a:hover,
.product-ad a:focus-visible, .sponsored-page a:focus-visible {
  text-decoration: underline;
  outline: none;
}
.product-ad p, .sponsored-page p { margin: 0; }

/* Links & interactive controls (AA considerations) */
a, button, .btn, .cta { color: var(--text); text-decoration: none; outline: none; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Buttons (solid and outline variants) */
.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(246,166,110,0.95);
  color: #1b120f;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.btn.secondary {
  background: rgba(255,255,255,0.12);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Form controls (baseline, if present) */
input, textarea, select {
  width: 100%;
  padding: .6rem .75rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font: inherit;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Utility helpers for layout parity */
ul.list { padding-left: 1.25rem; margin: .25rem 0 1rem; }

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

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