:root {
  --bg: #0d1626;
  --bg-elev: #16233a;
  --bg-card: #1a2b45;
  --border: #26405f;
  --text: #eef3fa;
  --text-dim: #9db0ca;
  --accent: #4a90f0;
  --accent-soft: rgba(74, 144, 240, 0.14);
  --radius: 14px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fb;
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --border: #dbe3ef;
    --text: #16233a;
    --text-dim: #5b6b84;
    --accent: #1b64c8;
    --accent-soft: rgba(27, 100, 200, 0.09);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Header ---------- */
header.site {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
  position: sticky;
  top: 0;
  z-index: 10;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
nav.site a {
  margin-left: 20px;
  font-size: 0.94rem;
  color: var(--text-dim);
}
nav.site a:hover { color: var(--accent); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 76px 0 56px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--accent-soft), transparent);
}
.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.hero p.lead {
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  color: var(--text-dim);
  max-width: 62ch;
  margin: 0 0 26px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}
.btn:hover { text-decoration: none; opacity: 0.9; }
.btn.ghost { background: transparent; color: var(--accent); }

/* ---------- Sections ---------- */
section { padding: 52px 0; }
section + section { border-top: 1px solid var(--border); }
h2 {
  font-size: 1.45rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
h3 { font-size: 1.08rem; margin: 26px 0 6px; }
.section-sub { color: var(--text-dim); margin: 0 0 26px; max-width: 62ch; }

/* ---------- App grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card p { margin: 0 0 14px; color: var(--text-dim); font-size: 0.93rem; flex: 1; }
.card .links { display: flex; gap: 14px; font-size: 0.9rem; flex-wrap: wrap; }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 10px;
  align-self: flex-start;
}

/* ---------- Content pages ---------- */
.page { padding: 48px 0 20px; }
.page h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.page .kicker {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
}
.prose { max-width: 74ch; }
.prose p, .prose li { color: var(--text-dim); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 22px 0;
}
.panel h3:first-child { margin-top: 0; }

details {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "+ "; color: var(--accent); font-weight: 700; }
details[open] summary::before { content: "– "; }
details p { margin: 10px 0 0; }

table.meta { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
table.meta td { padding: 7px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
table.meta td:first-child { color: var(--text-dim); width: 42%; padding-right: 16px; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  padding: 32px 0 44px;
  color: var(--text-dim);
  font-size: 0.9rem;
  background: var(--bg-elev);
}
footer.site .foot-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
footer.site a { color: var(--text-dim); }
footer.site a:hover { color: var(--accent); }

@media (max-width: 560px) {
  .hero { padding: 52px 0 40px; }
  nav.site a { margin-left: 0; margin-right: 18px; }
  header.site .wrap { padding-top: 10px; padding-bottom: 10px; }
}
