:root {
  --bg: #1e1e28;
  --panel: #262633;
  --line: #34344a;
  --text: #ececf2;
  --muted: #a4a4b8;
  --accent: #ff3c5a;
  --accent-soft: rgba(255, 60, 90, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text); line-height: 1.65;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

header.site { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(30, 30, 40, 0.94); backdrop-filter: blur(6px); z-index: 10; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; letter-spacing: 0.2px; }
.brand img { width: 36px; height: 36px; border-radius: 8px; display: block; }
.brand:hover { text-decoration: none; }
nav.main { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.95rem; }
nav.main a { color: var(--muted); }
nav.main a:hover, nav.main a.on { color: var(--text); text-decoration: none; }

.hero { padding: 72px 0 56px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.15; margin: 0 0 16px; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 24px; }
.hero .logo-big { justify-self: center; width: min(280px, 70vw); border-radius: 28px; box-shadow: 0 20px 60px rgba(255, 60, 90, 0.18); }
.btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 10px; font-weight: 600; border: 1px solid var(--line); color: var(--text); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }

section { padding: 56px 0; border-top: 1px solid var(--line); }
section h2 { font-size: 1.7rem; margin: 0 0 8px; }
section p.sub { color: var(--muted); margin: 0 0 28px; max-width: 720px; }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.steps .card { position: relative; padding-top: 52px; }
.steps .card::before {
  counter-increment: step; content: counter(step); position: absolute; top: 18px; left: 22px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 0.85rem; display: grid; place-items: center;
}
.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

.flow { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 8px 0 28px; }
.flow .node { flex: 1 1 140px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 10px; font-size: 0.92rem; }
.flow .node b { display: block; color: var(--text); }
.flow .node span { color: var(--muted); font-size: 0.82rem; }
.flow .arrow { color: var(--accent); font-size: 1.3rem; flex: 0 0 auto; }
.flow .node.tt { border-color: var(--accent); background: var(--accent-soft); }

table.scopes { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 0.95rem; }
table.scopes th, table.scopes td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.scopes th { color: var(--muted); font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.5px; }
code { background: #15151d; border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: 0.88em; }

details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 10px 0 0; }

.doc { max-width: 760px; padding: 48px 20px 64px; margin: 0 auto; }
.doc h1 { font-size: 2rem; margin: 0 0 6px; }
.doc h2 { font-size: 1.2rem; margin: 30px 0 8px; }
.doc p, .doc li { color: #d4d4e0; }
.doc .updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 26px; }

footer.site { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
footer.site .brand img { width: 26px; height: 26px; border-radius: 6px; }
footer.site nav { display: flex; gap: 16px; flex-wrap: wrap; }
footer.site nav a { color: var(--muted); }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; text-align: left; }
  .hero .logo-big { order: -1; width: 140px; justify-self: start; }
  .flow .arrow { transform: rotate(90deg); flex-basis: 100%; text-align: center; }
}
