:root {
  color-scheme: dark;
  --bg: #090d19;
  --panel: #111a2b;
  --panel-2: #17233a;
  --line: rgba(173, 190, 225, .15);
  --text: #f4f6fc;
  --muted: #aeb9cf;
  --accent: #a991ff;
  --accent-2: #7c65e8;
  --danger: #ff758b;
  --shadow: 0 20px 70px rgba(0,0,0,.27);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 80% -10%, rgba(117,92,224,.22), transparent 38%), var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.75;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #c9bcff; text-decoration: underline; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.container { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(9,13,25,.86); backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); font-weight: 800; letter-spacing: .01em; }
.brand:hover { text-decoration: none; color: white; }
.brand img { width: 42px; height: 42px; }
.brand small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.nav { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
.nav a { color: #dce2f1; font-size: 14px; font-weight: 650; white-space: nowrap; }
.nav a.active { color: var(--accent); }
.lang-toggle, .menu-toggle {
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-weight: 750; font-size: 13px;
}
.menu-toggle { display: none; }
.hero { padding: 76px 0 54px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 34px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #cbbfff; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow:before { content: ""; width: 22px; height: 1px; background: var(--accent); }
h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.12; letter-spacing: -.045em; margin: 18px 0; }
h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.25; letter-spacing: -.025em; margin: 0 0 14px; }
h3 { font-size: 18px; margin: 0 0 9px; }
p { margin: 0 0 14px; }
.lead { color: #c4cde0; font-size: clamp(16px, 2vw, 19px); max-width: 700px; }
.hero-card { border: 1px solid rgba(185,167,255,.24); background: linear-gradient(145deg, rgba(124,101,232,.2), rgba(17,26,43,.88)); border-radius: 30px; padding: 28px; box-shadow: var(--shadow); }
.hero-mark { height: 150px; display: grid; place-items: center; position: relative; overflow: hidden; }
.hero-mark:before, .hero-mark:after { content: ""; position: absolute; border: 1px solid rgba(201,188,255,.25); border-radius: 50%; width: 190px; height: 190px; }
.hero-mark:after { width: 250px; height: 250px; }
.hero-mark img { width: 88px; height: 88px; z-index: 1; filter: drop-shadow(0 10px 30px rgba(0,0,0,.35)); }
.hero-card p { color: var(--muted); font-size: 14px; text-align: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; color: #cbd4e8; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.035); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 70px; }
.card { display: block; min-height: 174px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(145deg, rgba(25,37,60,.92), rgba(15,23,39,.92)); color: var(--text); transition: transform .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-3px); border-color: rgba(169,145,255,.5); text-decoration: none; color: var(--text); }
.card-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: rgba(169,145,255,.14); color: var(--accent); margin-bottom: 13px; }
.card-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card p { font-size: 13px; color: var(--muted); margin-bottom: 0; }
.note { border: 1px solid rgba(169,145,255,.23); background: rgba(124,101,232,.08); border-radius: 18px; padding: 18px 20px; color: #d7dced; margin: 24px 0; }
.page-hero { padding: 56px 0 28px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 48px); margin: 10px 0 12px; }
.page-hero p { color: var(--muted); max-width: 780px; }
.meta { color: #8592ad; font-size: 12px; margin-top: 12px; }
.content-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; padding-bottom: 70px; }
.toc { position: sticky; top: 98px; padding: 18px; background: rgba(17,26,43,.8); border: 1px solid var(--line); border-radius: 18px; }
.toc strong { display: block; font-size: 13px; color: #dbe2f3; margin-bottom: 8px; }
.toc a { display: block; padding: 6px 0; font-size: 12px; color: var(--muted); }
.prose { min-width: 0; border: 1px solid var(--line); border-radius: 24px; background: rgba(17,26,43,.74); padding: clamp(20px, 4vw, 42px); box-shadow: var(--shadow); }
.prose section { scroll-margin-top: 110px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.prose section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.prose h2 { font-size: 22px; margin-bottom: 12px; }
.prose h3 { margin-top: 17px; }
.prose p, .prose li { color: #c0cadd; font-size: 14px; }
.prose ul, .prose ol { padding-inline-start: 22px; margin: 8px 0 14px; }
.prose li { margin: 6px 0; }
.prose strong { color: #f3f5fc; }
.prose .small { font-size: 12px; color: #929fba; }
.data-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: 11px 12px; text-align: start; vertical-align: top; }
.data-table th { background: rgba(169,145,255,.1); color: #e7e1ff; }
.data-table td { color: #c0cadd; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid rgba(169,145,255,.42); background: linear-gradient(135deg, var(--accent-2), #6750cf); color: white; border-radius: 13px; padding: 12px 18px; font-weight: 800; font-size: 14px; box-shadow: 0 10px 24px rgba(70,54,160,.18); }
.button:hover { background: #8a75ee; color: white; text-decoration: none; }
.button.secondary { color: #e3e8f7; background: rgba(255,255,255,.04); border-color: var(--line); box-shadow: none; }
.button.danger { background: linear-gradient(135deg, #c54764, #a62f4e); border-color: rgba(255,117,139,.4); }
.form-card { padding: 22px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.025); margin-top: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 750; color: #e6eaf5; }
.field input, .field textarea { width: 100%; border: 1px solid rgba(174,185,207,.25); background: #0b1221; color: var(--text); border-radius: 11px; padding: 12px 13px; outline: none; }
.field input:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(169,145,255,.12); }
.field textarea { min-height: 100px; resize: vertical; }
.helper { color: #8f9bb4; font-size: 12px; }
.footer { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--muted); }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer p { font-size: 12px; margin: 5px 0; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.footer-links a { color: #c8d1e4; }
.callout-danger { border-color: rgba(255,117,139,.3); background: rgba(197,71,100,.08); }
.callout-danger strong { color: #ffb1c0; }
.two-col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.mini-card { padding: 18px; background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 16px; }
.mini-card h3 { color: #f2f4fb; }
.mini-card p { color: var(--muted); font-size: 13px; margin: 0; }
.back-top { position: fixed; bottom: 18px; inset-inline-end: 18px; border: 1px solid var(--line); background: rgba(17,26,43,.9); color: white; border-radius: 50%; width: 42px; height: 42px; display: grid; place-items: center; }
@media (max-width: 900px) {
  .nav { gap: 12px; }
  .nav a { font-size: 12px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .content-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc .toc-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 12px; }
}
@media (max-width: 650px) {
  .header-inner { min-height: 68px; flex-wrap: wrap; padding: 10px 0; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; padding: 10px 0 6px; justify-content: flex-start; }
  .nav.open { display: flex; }
  .nav a { font-size: 13px; }
  .hero { padding: 48px 0 32px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 420px; }
  .cards { gap: 10px; margin-bottom: 48px; }
  .card { min-height: 156px; padding: 17px; }
  .form-grid, .two-col { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .data-table { display: block; overflow-x: auto; white-space: normal; }
}
