:root {
  --bg: #070b16;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(255, 255, 255, 0.16);
  --text: #eef3ff;
  --muted: #b0bddf;
  --accent: #89b6ff;
  --accent-2: #7bf2ff;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system; color: var(--text); background: #05070f; }
#bg { position: fixed; inset: 0; z-index: 0; }
.topbar, .controls, .deck, .progress { position: relative; z-index: 2; }

.topbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(12,16,28,.82), rgba(12,16,28,.55));
  backdrop-filter: blur(16px) saturate(140%);
}
.brand { font-weight: 700; letter-spacing: .2px; }
.meta { color: var(--muted); font-size: .85rem; }

.progress {
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(123, 242, 255, .6);
  transition: width .35s ease;
}

.dots { display: flex; gap: 8px; }
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(117, 142, 224, .38);
  border: 1px solid rgba(151, 176, 255, .45);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.dot:hover { transform: scale(1.2); }
.dot.active { background: var(--accent); }

.deck { min-height: calc(100vh - 121px); display: flex; overflow: hidden; }
/* Progressive enhancement: visible by default if JS fails */
.slide {
  min-width: 100%;
  padding: 36px clamp(18px, 4vw, 56px);
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
/* Only switch to slide-mode when JS marks the page ready */
.js-enabled .slide {
  opacity: 0;
  transform: translateX(30px) scale(.99);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.js-enabled .slide.active { opacity: 1; transform: translateX(0) scale(1); pointer-events: auto; }

h1, h2, h3 { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 8px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 8px; }
.lead { color: var(--muted); font-size: 1.1rem; margin-bottom: 16px; }

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--card), rgba(255,255,255,.04));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 10px 30px rgba(2, 10, 36, .35);
  backdrop-filter: blur(20px) saturate(140%);
  transform: translateY(8px);
  opacity: .98;
  animation: floatIn .6s ease both;
}
.card.full { margin-top: 14px; }
@keyframes floatIn {
  from { transform: translateY(16px); opacity: .4; }
  to { transform: translateY(0); opacity: 1; }
}

.shimmer::after {
  content: "";
  position: absolute;
  inset: -120% auto auto -40%;
  width: 30%;
  height: 300%;
  transform: rotate(18deg);
  background: linear-gradient(to right, transparent, rgba(255,255,255,.18), transparent);
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer {
  0% { left: -40%; }
  100% { left: 140%; }
}

.hero-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(137,182,255,.14);
  border: 1px solid rgba(137,182,255,.35);
  color: #dfeaff;
  font-size: .8rem;
}

.hint { color: var(--muted); margin-top: 14px; }
.controls {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 14px; border-top: 1px solid var(--line);
  background: linear-gradient(to top, rgba(10,14,24,.85), rgba(10,14,24,.45));
  backdrop-filter: blur(14px);
}
button, .cta {
  background: linear-gradient(180deg, rgba(33,50,107, .95), rgba(20,34,77,.95));
  color: var(--text);
  border: 1px solid #5d77d8;
  border-radius: 12px;
  padding: 9px 14px;
  cursor: pointer;
  transition: transform .15s ease, filter .2s ease;
}
button:hover { filter: brightness(1.1); transform: translateY(-1px); }
button:active { transform: translateY(0); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tab.active { background: linear-gradient(180deg, #4a73df, #375bb9); }
.flow { display: grid; gap: 10px; }
.step {
  padding: 12px; border-radius: 12px;
  background: rgba(20,31,68,.85);
  border: 1px solid rgba(106,130,214,.75);
  animation: slideUp .35s ease both;
}
@keyframes slideUp {
  from { transform: translateY(10px); opacity: .5; }
  to { transform: translateY(0); opacity: 1; }
}

label { display: block; margin-bottom: 10px; color: var(--muted); }
input[type=range] { width: 100%; margin-top: 4px; accent-color: #82aeff; }
pre { background: #0a1330; border-radius: 10px; padding: 10px; overflow: auto; border:1px solid rgba(136,166,255,.3); }
code { color: #def0ff; }

.slide ul li, .slide ol li { margin: 6px 0; }
