:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #5b6477;
  --line: #e4e7ef;
  --folio: #2563eb;
  --ledger: #16a34a;
  --deck: #dc2626;
  --accent: #4f46e5;
  --shadow: 0 30px 60px -20px rgba(15, 23, 42, .25), 0 12px 24px -12px rgba(15, 23, 42, .15);
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f19;
    --bg-soft: #111726;
    --surface: #151c2c;
    --text: #e8ecf5;
    --muted: #9aa3b7;
    --line: #232c40;
    --accent: #818cf8;
    --shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 12px 24px -12px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f19;
  --bg-soft: #111726;
  --surface: #151c2c;
  --text: #e8ecf5;
  --muted: #9aa3b7;
  --line: #232c40;
  --accent: #818cf8;
  --shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 12px 24px -12px rgba(0, 0, 0, .5);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

nav.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
nav.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
nav.top .links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
nav.top .links a { text-decoration: none; color: var(--muted); }
nav.top .links a:hover { color: var(--text); }

.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--text); color: var(--bg); box-shadow: 0 8px 20px -8px rgba(15,23,42,.5); }
.button.ghost { border: 1px solid var(--line); background: var(--surface); }
.button svg { width: 18px; height: 18px; }

header.hero { position: relative; overflow: hidden; padding: 88px 0 40px; text-align: center; }
header.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto -10%; height: 640px; z-index: -1;
  background:
    radial-gradient(40% 50% at 20% 40%, color-mix(in srgb, var(--folio) 22%, transparent), transparent 70%),
    radial-gradient(40% 50% at 50% 20%, color-mix(in srgb, var(--ledger) 20%, transparent), transparent 70%),
    radial-gradient(40% 50% at 80% 40%, color-mix(in srgb, var(--deck) 18%, transparent), transparent 70%);
  filter: blur(10px);
}
.hero img.logo { width: 112px; height: 112px; filter: drop-shadow(0 18px 30px rgba(15,23,42,.25)); }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.05; letter-spacing: -.035em; margin: 22px 0 18px; font-weight: 800; }
.hero h1 .grad {
  background: linear-gradient(90deg, var(--folio), var(--ledger) 50%, var(--deck));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 680px; margin: 0 auto 32px; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.platforms { margin-top: 18px; font-size: 14px; color: var(--muted); }
.wip {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, #f59e0b 16%, transparent); color: #b45309;
  border: 1px solid color-mix(in srgb, #f59e0b 40%, transparent);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wip { color: #fbbf24; } }
:root[data-theme="dark"] .wip { color: #fbbf24; }
.wip i { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }

.showcase { padding: 36px 0 90px; }
.tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
}
.tab .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.tab[aria-selected="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.tab[aria-selected="true"] .dot { background: #fff; }
.frame {
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid var(--line); background: var(--surface);
  max-width: 1100px; margin: 0 auto;
}
.frame img { display: block; width: 100%; height: auto; }
.caption { text-align: center; color: var(--muted); margin-top: 20px; font-size: 15px; min-height: 1.6em; }

section { padding: 90px 0; }
section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; color: var(--accent); }
h2 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.025em; line-height: 1.15; margin: 10px 0 16px; }
.intro { color: var(--muted); font-size: 18px; max-width: 720px; }

.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.module {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; position: relative; overflow: hidden;
}
.module::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.module .badge {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); margin-bottom: 16px;
}
.module .badge svg { width: 24px; height: 24px; }
.module h3 { margin: 0 0 2px; font-size: 22px; }
.module .kind { color: var(--c); font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.module p { color: var(--muted); margin: 0 0 16px; }
.module ul { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.module li { padding: 6px 0 6px 24px; position: relative; border-top: 1px dashed var(--line); }
.module li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.formats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.formats span { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); margin-bottom: 14px; }
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.terminal {
  background: #0d1117; color: #d6deeb; border-radius: 14px; padding: 22px 24px;
  font: 14px/1.7 ui-monospace, "SF Mono", Menlo, Consolas, monospace; box-shadow: var(--shadow);
  overflow-x: auto; border: 1px solid #1f2633;
}
.terminal .dots { display: flex; gap: 7px; margin-bottom: 16px; }
.terminal .dots i { width: 11px; height: 11px; border-radius: 50%; background: #3a4150; }
.terminal .dots i:nth-child(1) { background: #ff5f57; }
.terminal .dots i:nth-child(2) { background: #febc2e; }
.terminal .dots i:nth-child(3) { background: #28c840; }
.terminal .you { color: #7fdbca; }
.terminal .tool { color: #c792ea; }
.terminal .ok { color: #addb67; }
.terminal .dim { color: #637777; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; }
.checks li { padding: 8px 0 8px 32px; position: relative; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 11px; width: 20px; height: 20px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.checks li::after {
  content: ""; position: absolute; left: 7px; top: 15px; width: 6px; height: 10px;
  border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.download { text-align: center; }
.download .cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 40px auto 0; max-width: 900px; }
.download .card {
  padding: 28px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; transition: transform .15s ease, border-color .15s ease;
}
.download .card:hover { transform: translateY(-3px); border-color: var(--accent); }
.download .card svg { width: 34px; height: 34px; margin-bottom: 10px; }
.download .card strong { display: block; font-size: 18px; }
.download .card span { color: var(--muted); font-size: 14px; }
.build { margin-top: 36px; color: var(--muted); font-size: 15px; }
.build code { background: var(--bg-soft); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; font-size: 14px; }

footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; align-items: center; }
footer a { color: var(--muted); }

@media (max-width: 900px) {
  .modules, .features, .download .cards { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  nav.top .links a.hide-sm { display: none; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  nav.top .links { gap: 14px; }
  header.hero { padding-top: 56px; }
  section { padding: 64px 0; }
}

.faq { max-width: 820px; margin: 40px auto 0; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 14px 20px; margin-bottom: 12px; background: var(--surface); }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--muted); margin: 10px 0 0; }
.article { max-width: 780px; margin: 0 auto; padding: 64px 24px 90px; }
.article h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; letter-spacing: -.03em; margin: 12px 0 18px; }
.article h2 { font-size: clamp(24px, 3vw, 30px); margin-top: 44px; }
.article p, .article li { font-size: 17px; }
.article table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.article th, .article td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.article th { background: var(--bg-soft); }
.lang { display: flex; gap: 10px; font-size: 14px; }
.lang a { text-decoration: none; color: var(--muted); }
.lang a[aria-current="page"] { color: var(--text); font-weight: 700; }

nav.top .brand { flex-shrink: 0; }
nav.top .links { align-items: center; min-width: 0; }
footer .lang { width: 100%; justify-content: center; display: none; }
@media (max-width: 720px) {
  nav.top .lang { display: none; }
  footer .lang { display: flex; }
}
@media (max-width: 560px) {
  nav.top .links a.hide-xs { display: none; }
}
