:root {
  --bg: #050609;
  --surface: #0e1118;
  --text: #f3f5f9;
  --muted: #98a0ae;
  --line: #1c212c;
  --accent: #5fd8e6;
  --glow: #35d6c8;
  --glow-scale: 1;
  --glow-opacity: 0.9;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }

.top, main, .foot { width: min(1040px, 100% - 32px); margin-inline: auto; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 14px var(--glow); }
.topnav { display: none; gap: 22px; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.topnav a:hover { color: var(--text); }
@media (min-width: 760px) { .topnav { display: flex; } }
.pill { background: var(--text); color: var(--bg); text-decoration: none; font-weight: 600; font-size: 0.9rem; padding: 8px 18px; border-radius: 999px; }

.hero { text-align: center; padding: 64px 0 40px; }
h1 { font-size: clamp(2.6rem, 8.5vw, 5.4rem); line-height: 1.02; letter-spacing: -0.04em; margin: 0 0 22px; font-weight: 750; }
.grad { background: linear-gradient(90deg, #4aa8ff, #35d6c8 40%, #55e07a 70%, #e8dc3c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: clamp(1.05rem, 2.4vw, 1.3rem); max-width: 40ch; margin: 0 auto 30px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 0 0 16px; }
.button { display: inline-block; padding: 13px 24px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; }
.button.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.fine { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* Interactive demo */
.demo { margin: 56px auto 0; max-width: 820px; }
.demo[data-mode="auto"] { --glow: #35d6c8; }
.demo[data-mode="mid"]  { --glow: #55e07a; --glow-scale: 1.05; }
.demo[data-mode="high"] { --glow: #c8e640; --glow-scale: 1.25; }
.demo[data-mode="hot"]  { --glow: #ff8a2a; --glow-scale: 1.25; }
.demo[data-mode="off"]  { --glow-opacity: 0; }
.screen {
  position: relative; height: clamp(200px, 40vw, 320px); overflow: hidden;
  border-radius: 28px 28px 0 0; border: 1px solid var(--line); border-bottom: 0;
  background: radial-gradient(120% 90% at 50% 0%, #141824, #07080c 70%);
}
.notch {
  position: absolute; left: 50%; top: 0; transform: translateX(-50%); z-index: 2;
  width: clamp(130px, 25vw, 200px); height: clamp(26px, 4.8vw, 38px);
  background: #000; border-radius: 0 0 20px 20px;
}
.glow {
  position: absolute; left: 50%; top: -34px; z-index: 1;
  width: clamp(210px, 38vw, 310px); height: clamp(80px, 13vw, 110px);
  border-radius: 0 0 50% 50%; filter: blur(28px);
  background: var(--glow); opacity: var(--glow-opacity);
  transform: translateX(-50%) scale(var(--glow-scale));
  transition: background 0.6s ease, opacity 0.6s ease, transform 0.6s ease;
}
.demo[data-mode="auto"] .glow { animation: ramp 10s ease-in-out infinite alternate; }
.demo[data-mode="high"] .glow { animation: breathe 3.2s ease-in-out infinite; }
@keyframes ramp {
  0% { background: #4aa8ff; transform: translateX(-50%) scale(0.85); }
  35% { background: #35d6c8; transform: translateX(-50%) scale(1); }
  70% { background: #55e07a; transform: translateX(-50%) scale(1.12); }
  100% { background: #e8dc3c; transform: translateX(-50%) scale(1.25); }
}
@keyframes breathe { 50% { opacity: 0.65; } }

.modes { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 28px 28px; }
.modes button { font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--muted); background: transparent; border: 0; padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.modes button:hover { color: var(--text); }
.modes button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.caption { color: var(--muted); font-size: 0.9rem; margin: 14px 0 0; min-height: 1.5em; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding: 56px 0 24px; }
.features article { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.features h2 { font-size: 1.1rem; letter-spacing: -0.01em; margin: 0 0 8px; }
.features p { color: var(--muted); margin: 0; font-size: 0.97rem; }

/* Specs strip */
.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; margin: 24px 0 0; }
.specs div { background: var(--bg); padding: 20px 22px; }
.specs span { display: block; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.specs strong { font-weight: 600; font-size: 1rem; }

/* Sections */
section[id] { scroll-margin-top: 16px; }
.steps, .modes-info, .settings, .compat, .release, .faq { padding: 64px 0 8px; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); letter-spacing: -0.03em; margin: 0 0 20px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.steps li { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.steps .n { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--text); color: var(--bg); }
.steps p, .settings p, .release p, .modes-info dd, .note { color: var(--muted); margin: 0; font-size: 0.97rem; max-width: 72ch; }
.note { margin-top: 14px; }
.modes-info dl { margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.modes-info dl > div { background: var(--bg); display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 16px 22px; }
.modes-info dt { font-weight: 700; }
.modes-info dd { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.cards article { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 22px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.93rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child > * { border-bottom: 0; }
thead th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; }
tbody th { font-weight: 600; }
td { color: var(--muted); }
.release .cta.left { justify-content: flex-start; margin: 20px 0 12px; }
.fine.left { text-align: left; word-break: break-all; max-width: none; }
.rel-title { margin-top: 32px; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.timeline li { color: var(--muted); font-size: 0.95rem; padding-left: 16px; border-left: 2px solid var(--line); }
.timeline strong { color: var(--text); margin-right: 8px; }
.timeline time { margin-right: 8px; font-size: 0.85rem; }
.faq { padding-bottom: 24px; }

/* Details */
.more { margin: 48px 0 0; }
details { border-top: 1px solid var(--line); padding: 4px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 1.4rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p, details ul { color: var(--muted); font-size: 0.97rem; margin: 0 0 16px; max-width: 72ch; }
details ul { padding-left: 20px; }
details li { margin-bottom: 8px; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 40px 0 48px; color: var(--muted); font-size: 0.9rem; }
.foot a { color: var(--muted); }

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