/* Critical CSS — loaded immediately, blocks render */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1117; --surface: #1a1d27; --border: #2a2d3e;
  --accent: #6366f1; --accent-light: #818cf8;
  --text: #e2e8f0; --text-2: #94a3b8; --muted: #64748b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
  padding-bottom: 80px;
}

/* Critical nav */
.demo-nav {
  display: flex; align-items: center; gap: 12px; padding: 12px 24px;
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.demo-nav .back {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  font-weight: 500; color: var(--muted); text-decoration: none;
  padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border);
  transition: color .15s, border-color .15s;
}
.demo-nav .back:hover { color: var(--text); border-color: #475569; }
.demo-nav .nav-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.demo-nav .nav-badge {
  margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent-light);
  background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.25);
  border-radius: 100px; padding: 3px 10px;
}

/* Critical above-the-fold layout */
.demo-container { max-width: 900px; margin: 0 auto; padding: 36px 24px; }
.demo-hero { margin-bottom: 24px; }
.demo-hero h1 { font-size: clamp(22px,4vw,34px); font-weight: 800; letter-spacing: -.02em; color: #f1f5f9; margin-bottom: 8px; }
.demo-hero p { font-size: 15px; color: var(--muted); }

.main-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 32px 24px 24px; margin-bottom: 24px; }
.main-header h1 { font-size: clamp(20px,3vw,30px); font-weight: 800; letter-spacing: -.02em; color: #f1f5f9; margin-bottom: 16px; }

nav { display: flex; gap: 8px; }
nav a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 500; transition: background .15s, color .15s; }
nav a.active { background: rgba(99,102,241,.15); color: var(--accent-light); }
nav a:hover { background: rgba(255,255,255,.05); color: var(--text); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 14px; }
.card h2 { font-size: 16px; font-weight: 700; color: #f1f5f9; margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--text-2); line-height: 1.65; }

footer { background: var(--surface); border-top: 1px solid var(--border); padding: 20px 24px; text-align: center; color: var(--muted); font-size: 13px; margin-top: 24px; }

.print-only { display: none; }
