:root {
  --bg: #f6f8fb;
  --bg-alt: #edf1f7;
  --card: #ffffff;
  --text: #182031;
  --muted: #5f6b80;
  --border: #dbe1ea;
  --primary: #2f6fde;
  --primary-soft: #e6eefc;
  --primary-text: #ffffff;
  --ok: #1a8f4c;
  --shadow: 0 1px 2px rgba(20, 30, 50, .06), 0 8px 24px rgba(20, 30, 50, .06);
  --mock-bg: #1b2230;
  --mock-cell: #2a3346;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151c;
    --bg-alt: #171b24;
    --card: #1c212c;
    --text: #e6e9f0;
    --muted: #949db0;
    --border: #2c3341;
    --primary: #5089f0;
    --primary-soft: #1f2c47;
    --ok: #3cc178;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --mock-bg: #0d1017;
    --mock-cell: #222a3a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12151c;
  --bg-alt: #171b24;
  --card: #1c212c;
  --text: #e6e9f0;
  --muted: #949db0;
  --border: #2c3341;
  --primary: #5089f0;
  --primary-soft: #1f2c47;
  --ok: #3cc178;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --mock-bg: #0d1017;
  --mock-cell: #222a3a;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 860px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar .bar { height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); text-decoration: none; }
.bar-tools { display: flex; align-items: center; gap: 8px; }
button { font: inherit; color: inherit; cursor: pointer; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card);
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.icon-btn .i-moon { display: none; }
:root[data-dark="1"] .icon-btn .i-sun { display: none; }
:root[data-dark="1"] .icon-btn .i-moon { display: block; }
.lang { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--card); }
.lang button { border: 0; background: none; padding: 6px 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lang button.on { background: var(--primary); color: var(--primary-text); }

.hero { padding: 64px 0 56px; background: linear-gradient(180deg, var(--primary-soft), var(--bg)); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow { margin: 0 0 10px; color: var(--primary); font-weight: 600; font-size: 14px; letter-spacing: .3px; }
h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.15; margin: 0 0 16px; letter-spacing: -.5px; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.meta { margin: 14px 0 0; color: var(--muted); font-size: 13px; min-height: 1.6em; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; padding: 10px 18px; font-weight: 600; border: 1px solid var(--border);
  background: var(--card); color: var(--text);
}
.btn:hover { text-decoration: none; filter: brightness(1.05); }
.btn.big { padding: 13px 24px; font-size: 16px; }
.btn.full { width: 100%; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 30%, transparent); }
.btn.ghost { background: transparent; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.mock { background: var(--mock-bg); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.mock-bar { display: flex; gap: 6px; padding: 2px 4px 10px; }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: #3a4458; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 5px; aspect-ratio: 16 / 10; }
.cell { background: linear-gradient(135deg, var(--mock-cell), #33405a); border-radius: 5px; position: relative; }
.cell.big { grid-column: span 2; grid-row: span 2; background: linear-gradient(135deg, #2c3a55, #44597e); }
.rec { position: absolute; top: 8px; left: 8px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .25); }
.mock-timeline { position: relative; height: 14px; margin-top: 9px; background: #2a3243; border-radius: 4px; }
.mock-timeline b { position: absolute; top: 3px; height: 8px; border-radius: 3px; background: #3cc178; opacity: .85; }
.mock-timeline em { position: absolute; top: -3px; width: 2px; height: 20px; background: #f5b83d; }

.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 8px; letter-spacing: -.3px; }
h3 { font-size: 16px; margin: 0 0 10px; }
.sub { color: var(--muted); margin: 0 0 32px; font-size: 16px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature, .card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 20px; box-shadow: var(--shadow);
}
.feature h3 { margin: 12px 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.ficon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.ficon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.dl-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; margin-top: 24px; align-items: start; }
.side { display: grid; gap: 16px; }
.dl-card { padding: 24px; }
.dl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 600; }
.ver { font-size: 26px; font-weight: 700; font-family: Consolas, "Cascadia Mono", Menlo, monospace; word-break: break-all; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ok); border: 1px solid currentColor; white-space: nowrap; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 18px 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; }
.sha { display: flex; gap: 8px; align-items: baseline; }
.sha code { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: 12px; word-break: break-all; color: var(--muted); }
button.link { background: none; border: 0; padding: 0; color: var(--primary); font-size: 13px; font-weight: 600; flex: none; }
button.link:hover { text-decoration: underline; }
.notes { white-space: pre-wrap; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 6px 0 18px; font-size: 14px; max-height: 240px; overflow: auto; }
.empty { color: var(--muted); padding: 20px 0; text-align: center; }
.older { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 12px; }
.older summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.older .count { font-weight: 400; }
.older ul { list-style: none; padding: 0; margin: 10px 0 0; }
.older li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.older li:last-child { border-bottom: 0; }
.older .v { font-family: Consolas, "Cascadia Mono", Menlo, monospace; }
.older .d { color: var(--muted); }
.older .n { flex-basis: 100%; color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.ticks, .steps { margin: 0; padding-left: 20px; }
.ticks li, .steps li { margin: 6px 0; font-size: 14px; }
.steps code, .ticks code { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: 13px; background: var(--bg); border: 1px solid var(--border); padding: 0 5px; border-radius: 5px; }

.privacy { display: grid; gap: 12px; margin-bottom: 20px; }
.pitem { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.pitem .ficon { flex: none; width: 34px; height: 34px; }
.pitem .ficon svg { width: 18px; height: 18px; }
.pitem h3 { margin: 0 0 2px; font-size: 15px; }
.pitem p { margin: 0; color: var(--muted); font-size: 14px; }

.footer { border-top: 1px solid var(--border); padding: 22px 0; font-size: 14px; background: var(--card); }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 8px 16px; border-radius: 8px; z-index: 20; font-size: 14px;
}

@media (max-width: 900px) {
  .hero-grid, .dl-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .mock { max-width: 520px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav { display: none; }
  .hero { padding: 40px 0 36px; }
  .lead { font-size: 16px; }
  .features { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .cta .btn { flex: 1 1 100%; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .sha { flex-direction: column; gap: 2px; }
}
