:root {
  --bg: #0d1020; --bg2: #151a31; --card: #1a2040; --line: #2a3158;
  --text: #eef0f8; --muted: #a3abc6; --accent: #8aa8ff; --accent2: #b48cff; --ok: #5fd39a;
  --radius: 16px;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f6f7fb; --bg2: #ffffff; --card: #ffffff; --line: #e3e6f0; --text: #161a2b; --muted: #59607a; --accent: #3e63dd; --accent2: #7b4fd6; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

header.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 80%, transparent); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; color: var(--text); text-decoration: none; }
.brand img { width: 30px; height: 30px; }
nav.links { margin-left: auto; display: flex; gap: 20px; font-size: 15px; }
nav.links a { color: var(--muted); text-decoration: none; }
nav.links a:hover { color: var(--text); }
@media (max-width: 720px) { nav.links a:not(.gh) { display: none; } }

.hero { padding: 72px 0 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding-top: 44px; } }
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.08; margin: 0 0 18px; letter-spacing: -0.02em; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; border-radius: 12px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--text); background: var(--card); }
.btn.primary { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff; border: 0; box-shadow: 0 10px 30px -10px var(--accent); }
.btn:hover { filter: brightness(1.08); }
.small { font-size: 14px; color: var(--muted); }
.hero .art { position: relative; min-height: 380px; }
.hero .art img { position: absolute; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
.art .a1 { width: 64%; left: 0; top: 10px; }
.art .a2 { width: 46%; right: 0; top: 0; }
.art .a3 { width: 42%; left: 14%; top: 175px; }
.art .a4 { width: 52%; right: 2%; top: 260px; }
@media (max-width: 900px) { .hero .art { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } .hero .art img { position: static; width: 100%; } }

section { padding: 56px 0; }
section h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; letter-spacing: -0.01em; }
section p.sub { color: var(--muted); margin: 0 0 30px; max-width: 46em; }

.grid { display: grid; gap: 18px; }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.icon { font-size: 26px; display: block; margin-bottom: 10px; }

.dl .card { display: flex; flex-direction: column; gap: 12px; }
.dl .card .btn { justify-content: center; }
.dl .card.me { outline: 2px solid var(--accent); }
.dl details { font-size: 14px; color: var(--muted); }
.dl summary { cursor: pointer; }

.faces { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.face { background: linear-gradient(135deg, #222a4a, #16324a 60%, #2b2048); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 12px; min-height: 230px; }
.face img { max-height: 160px; width: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); }
.face b { color: #fff; font-weight: 600; }
.face span { color: #c9d0ea; font-size: 13.5px; text-align: center; }

.steps { counter-reset: s; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps .card { position: relative; padding-top: 52px; }
.steps .card::before { counter-increment: s; content: counter(s); position: absolute; top: 18px; left: 22px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
pre { background: #0a0d1a; color: #d8def3; border: 1px solid var(--line); border-radius: 12px; padding: 16px; overflow: auto; font: 13.5px/1.55 "Cascadia Mono", Consolas, Menlo, monospace; }
code { font-family: "Cascadia Mono", Consolas, Menlo, monospace; font-size: .92em; }

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

footer { border-top: 1px solid var(--line); padding: 30px 0 50px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }

/* Article pages */
.article { max-width: 780px; padding: 48px 0 24px; }
.article h1 { font-size: clamp(32px, 4.6vw, 48px); line-height: 1.12; margin: 8px 0 16px; letter-spacing: -0.02em; }
.article .lead { font-size: 19px; color: var(--muted); margin: 0 0 24px; }
.article h2 { font-size: clamp(23px, 3vw, 30px); margin: 44px 0 10px; }
.article h3 { font-size: 19px; margin: 26px 0 6px; }
.article p, .article li { color: var(--text); }
.article li { margin: 6px 0; }
.article figure { margin: 26px 0; text-align: center; }
.article figure img { filter: drop-shadow(0 12px 24px rgba(0,0,0,.35)); }
.article figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.article .cta { margin: 26px 0 8px; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.note { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 14px 18px; margin: 20px 0; }
.related { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 18px; }
.related a { text-decoration: none; }
.related .card h3 { color: var(--text); }
kbd { font: 600 .85em "Cascadia Mono", Consolas, Menlo, monospace; background: var(--card); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; padding: 1px 7px; }
.badge { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--muted); border: 1px solid var(--line); }
