@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('./fonts/unbounded/normal-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('./fonts/unbounded/normal-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('./fonts/unbounded/normal-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('./fonts/unbounded/normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url('./fonts/nunito-sans/normal-cyrillic-ext.woff2') format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url('./fonts/nunito-sans/normal-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url('./fonts/nunito-sans/normal-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito Sans'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url('./fonts/nunito-sans/normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito Sans'; font-style: italic; font-weight: 200 1000; font-display: swap; src: url('./fonts/nunito-sans/italic-cyrillic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito Sans'; font-style: italic; font-weight: 200 1000; font-display: swap; src: url('./fonts/nunito-sans/italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

@font-face { font-family: 'DejaVu Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('./fonts/DejaVuSans.woff2') format('woff2'); }

@font-face { font-family: 'Noto Sans Symbols 2'; font-style: normal; font-weight: 400; font-display: swap; src: url('./fonts/NotoSansSymbols2.woff2') format('woff2'); unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8BB, U+1F8C0-1F8C1, U+1F900-1F90B, U+1F93B, U+1F946, U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA89, U+1FA8F-1FAC6, U+1FACE-1FADC, U+1FADF-1FAE9, U+1FAF0-1FAF8, U+1FB00-1FBFF; }

:root {
  --bg-0: #0f0f12;
  --bg-1: #17171c;
  --bg-2: #1f1f26;
  --bg-3: #2a2a33;
  --bg-4: #35353f;

  --fg-0: rgba(255,255,255,0.96);
  --fg-1: rgba(255,255,255,0.78);
  --fg-2: rgba(255,255,255,0.55);
  --fg-3: rgba(255,255,255,0.35);
  --fg-4: rgba(255,255,255,0.18);

  --line-1: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.10);
  --line-3: rgba(255,255,255,0.16);

  --accent:        #a8a398;
  --accent-hover:  #b6b0a5;
  --accent-soft:   rgba(168,163,152,0.16);
  --accent-softer: rgba(168,163,152,0.08);
  --accent-ink:    #0f0f12;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-2xl: 28px;
  --r-full: 999px;

  --font-display: 'Unbounded', 'Nunito Sans', system-ui, sans-serif;
  --font-body:    'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Inter', system-ui, sans-serif;
  --font-symbol:  'DejaVu Sans', 'Noto Sans Symbols 2', system-ui, sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, Menlo, Consolas, 'DejaVu Sans Mono', 'Liberation Mono', monospace;

  --spinner-opacity-base:  0.30;
  --spinner-opacity-hover: 0.55;
  --spinner-y-offset:      -3px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;

  -webkit-tap-highlight-color: transparent;
}

html, body {
  color: var(--fg-0);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  scroll-padding-top: 96px;
}

html { background: var(--bg-0); }

html { overflow-x: clip; }

::selection { background: var(--accent-soft); color: var(--fg-0); }
a { color: inherit; }

h1, h2, h3, h4, p { overflow-wrap: break-word; hyphens: auto; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--bg-4); }

.wm {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: 'Unbounded', sans-serif;
  color: var(--fg-0);
  line-height: 1;
  user-select: none;

  cursor: pointer;
  transition: color .2s;
}
.wm-spinner {
  display: inline-block;
  width: 1em;
  text-align: center;
  flex-shrink: 0;
  font-family: var(--font-symbol);
  color: var(--fg-0);
  opacity: var(--spinner-opacity-base);
  transform: translateY(var(--spinner-y-offset));
  transition: opacity .25s;
  margin-right: 0.18em;
  line-height: 1;
}
.wm:hover .wm-spinner { opacity: var(--spinner-opacity-hover); }
.wm-text {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-variation-settings: 'wght' 900;
  letter-spacing: 0.03em;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  display: inline-block;
}

.btn-ghost, .btn-primary {
  padding: 12px 24px;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost { background: transparent; border: 1px solid var(--line-2); color: var(--fg-0); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--line-3); }
.btn-primary { background: var(--accent); border: 1px solid var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(15, 15, 18, 0.7);
  border-bottom: 1px solid var(--line-1);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
}
.nav .wm { font-size: 22px; text-decoration: none; }
.nav-links {
  display: flex;
  gap: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav-link {
  color: var(--fg-1);
  text-decoration: none;

  font-family: 'Nunito Sans', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-full);
  transition: all .15s;
}
.nav-link:hover { color: var(--fg-0); background: var(--bg-2); }
.nav-link.is-active { color: var(--accent); }
.nav-cta { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.nav-cta .btn-ghost, .nav-cta .btn-primary { padding: 8px 16px; font-size: 11px; }

.nav-collapse { display: contents; }
.nav-burger { display: none; }

@media (max-width: 820px) {

  .nav-inner { padding: 16px 20px; }
  .nav .wm { font-size: 24px; }
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    margin-left: auto;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
  }
  .nav-burger span {
    display: block;
    width: 16px;
    height: 1.5px;
    margin: 0 auto;
    background: var(--fg-0);
    border-radius: 2px;
    transition: transform .2s, opacity .2s;
  }
  .nav.is-open .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav.is-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  .nav-collapse {
    display: none;
  }
  /* JS-portaled version: .nav-collapse перемещается в <body> на open,
     чтобы свой backdrop-filter не блокировался parent'ом .nav (который
     сам имеет backdrop-filter). В body у .nav-collapse нет ancestor с
     backdrop-filter - его собственный blur наконец работает. JS также
     выставляет top inline по реальной высоте header. */
  .nav-collapse.is-portal {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 49;
    padding: 14px 20px 22px;
    background: rgba(15, 15, 18, 0.7);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-bottom: 1px solid var(--line-1);
    animation: nav-drop .2s ease-out;
  }
  @keyframes nav-drop {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .nav-links {
    position: static;
    transform: none;
    flex-direction: column;
    gap: 2px;
  }
  .nav-link { font-size: 15px; padding: 11px 14px; }
  .nav-cta { flex-direction: column; align-items: stretch; gap: 8px; margin-left: 0; }
  .nav-cta .btn-ghost, .nav-cta .btn-primary {
    justify-content: center;
    padding: 13px 16px;
    font-size: 12px;
  }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: radial-gradient(
    ellipse 110% 95% at 50% 45%,
    transparent 38%,
    rgba(0,0,0,0.28) 80%,
    rgba(0,0,0,0.55) 100%
  );
  opacity: 1;
  transition: opacity 1600ms cubic-bezier(.22,.61,.36,1);
}
body.is-revealed::before { opacity: 0.62; }

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0.04;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

.page-head::before {
  content: '';
  --tail: 240px;
  position: absolute;
  inset: 0 0 calc(-1 * var(--tail)) 0;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    ellipse 92% 88% at 50% 45%,
    transparent 30%,
    rgba(15,15,18,0.55) 80%,
    rgba(15,15,18,0.85) 100%
  );
  opacity: 1;
  transition: opacity 1800ms cubic-bezier(.22,.61,.36,1);
  -webkit-mask-image: linear-gradient(to bottom,
    #000 0%, #000 calc(100% - var(--tail)), transparent 100%);
          mask-image: linear-gradient(to bottom,
    #000 0%, #000 calc(100% - var(--tail)), transparent 100%);
}
body.is-revealed .page-head::before { opacity: 0.85; }

@keyframes glyph-emerge {
  0%   { opacity: 0;         transform: translate(-50%,-50%) rotate(var(--rot,0deg)) scale(0.55); filter: blur(3px); }
  100% { opacity: var(--op); transform: translate(-50%,-50%) rotate(var(--rot,0deg)) scale(1);    filter: blur(0); }
}

.page-head h1 .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.22em);
  filter: blur(10px);
  transition: opacity 1000ms cubic-bezier(.22,.61,.36,1),
              transform 1000ms cubic-bezier(.22,.61,.36,1),
              filter 1000ms cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(700ms + var(--wi, 0) * 95ms);
  will-change: transform, opacity, filter;
}
body.is-revealed .page-head h1 .word {
  opacity: 1; transform: translateY(0); filter: blur(0);
}

.page-head .eyebrow, .page-head .lead {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(8px);
  transition: opacity 1000ms cubic-bezier(.22,.61,.36,1),
              transform 1000ms cubic-bezier(.22,.61,.36,1),
              filter 1000ms cubic-bezier(.22,.61,.36,1);
}
.page-head .eyebrow { transition-delay: 450ms; }
.page-head .lead    { transition-delay: 1150ms; }
body.is-revealed .page-head .eyebrow,
body.is-revealed .page-head .lead {
  opacity: 1; transform: none; filter: blur(0);
}

.doc-cards .doc-card {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  /* Reveal-only transition while pre-emerged: staircase delay по индексу
     карточки (var --ci). НИ В КОЕМ СЛУЧАЕ не вписывай сюда hover-related
     properties (border-color / background): тот же transition-delay
     применится к ним и при наведении мышью каждая карточка будет
     «висеть» в hover state по 120-360 ms (delay'a stagger по карточкам),
     множественные cards одновременно подсвечивались бы при быстрых
     движениях курсора. Hover-transition объявлен отдельно в `.doc-card`
     ниже и срабатывает только после is-emerged. */
  transition: opacity 950ms cubic-bezier(.22,.61,.36,1),
              transform 950ms cubic-bezier(.22,.61,.36,1),
              filter 950ms cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--ci, 0) * 120ms);
}
.doc-cards.is-emerged .doc-card {
  opacity: 1; transform: translateY(0); filter: blur(0);
  /* После emergence — короткий hover transition без staircase delay,
     overrides shorthand выше. */
  transition: border-color .2s, transform .2s, background .2s;
  transition-delay: 0s;
}

.footer > .footer-inner {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition: opacity 950ms cubic-bezier(.22,.61,.36,1),
              transform 950ms cubic-bezier(.22,.61,.36,1),
              filter 950ms cubic-bezier(.22,.61,.36,1);
  will-change: transform, opacity, filter;
}
.footer.is-emerged > .footer-inner {
  opacity: 1; transform: none; filter: blur(0);
}

.doc-page-head .doc-back,
.doc-page-head .doc-switch,
.doc-wrap .doc-layout {
  opacity: 0;
  transform: translateY(20px);
  filter: blur(6px);
  transition: opacity 1000ms cubic-bezier(.22,.61,.36,1),
              transform 1000ms cubic-bezier(.22,.61,.36,1),
              filter 1000ms cubic-bezier(.22,.61,.36,1);
}
.doc-page-head .doc-back   { transition-delay: 450ms; }
.doc-page-head .doc-switch { transition-delay: 700ms; }
.doc-wrap .doc-layout      { transition-delay: 900ms; }
body.is-revealed .doc-page-head .doc-back,
body.is-revealed .doc-page-head .doc-switch,
body.is-revealed .doc-wrap .doc-layout {
  opacity: 1; transform: none; filter: blur(0);
}

body.reveal-done .doc-page-head .doc-back,
body.reveal-done .doc-page-head .doc-switch,
body.reveal-done .doc-wrap .doc-layout,
body.reveal-done .page-head h1 .word,
body.reveal-done .page-head .eyebrow,
body.reveal-done .page-head .lead {
  transition: none;
}

body.no-reveal::before { opacity: 0.62; transition: none; }
body.no-reveal .page-head::before { opacity: 0.85; transition: none; }

body.no-reveal .page-head-glyphs > span,
body.no-reveal .page-head-glyphs > span.reveal {
  opacity: var(--op, 1);
  transform: translate(-50%,-50%) rotate(var(--rot, 0deg));
  filter: none;
  animation: none;
}
body.no-reveal .page-head h1 .word,
body.no-reveal .page-head .eyebrow,
body.no-reveal .page-head .lead,
body.no-reveal .doc-cards .doc-card,
body.no-reveal .footer > .footer-inner,
body.no-reveal .doc-page-head .doc-back,
body.no-reveal .doc-page-head .doc-switch,
body.no-reveal .doc-wrap .doc-layout {
  opacity: 1; transform: none; filter: none; transition: none;
}

@media (prefers-reduced-motion: reduce) {
  body::before { opacity: 0.62; transition: none; }
  .page-head::before { opacity: 0.85; transition: none; }
  .page-head-glyphs > span,
  .page-head-glyphs > span.reveal {
    opacity: var(--op, 1);
    transform: translate(-50%,-50%) rotate(var(--rot, 0deg));
    filter: none; animation: none;
  }
  .page-head h1 .word, .page-head .eyebrow, .page-head .lead,
  .doc-cards .doc-card, .footer > .footer-inner,
  .doc-page-head .doc-back, .doc-page-head .doc-switch,
  .doc-wrap .doc-layout {
    opacity: 1; transform: none; filter: none; transition: none;
  }
}

.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.fab button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: var(--r-full);
  cursor: pointer;
  color: var(--fg-0);
  border: 1px solid var(--line-2);
  background: rgba(31, 31, 38, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background .15s, border-color .15s;
}
.fab button:hover { background: var(--bg-3); border-color: var(--line-3); }
.fab-ic { width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; }
@media (max-width: 560px) {
  .fab { right: 14px; bottom: 14px; }
  .fab button { font-size: 10px; padding: 9px 14px; }
}

.page-head {
  padding: 110px 32px 64px;
  text-align: center;
  position: relative;

  background: transparent;

  overflow: visible;
}
.page-head > * { position: relative; z-index: 1; }
.page-head-glyphs {

  --tail: 240px;
  position: absolute;
  inset: 0 0 calc(-1 * var(--tail)) 0;
  pointer-events: none;
  opacity: 0.06;
  overflow: hidden;
  font-family: var(--font-symbol);
  color: var(--fg-0);
  user-select: none;
  line-height: 1;
  z-index: -1;
  -webkit-mask-image: linear-gradient(to bottom,
    #000 0%, #000 calc(100% - var(--tail)), transparent 100%);
          mask-image: linear-gradient(to bottom,
    #000 0%, #000 calc(100% - var(--tail)), transparent 100%);
}
.page-head-glyphs > span {
  position: absolute;
  display: inline-block;
  margin: 0;
  padding: 0;
  opacity: var(--op, 1);
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
}
.page-head-glyphs > span.reveal {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(0.55);
  filter: blur(3px);
  animation: glyph-emerge 1100ms cubic-bezier(.22,.61,.36,1) var(--d, 0ms) forwards;
}

.page-head h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(36px, 5.5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 18px auto 0;
  max-width: 14ch;
  position: relative;
}
.page-head h1 em { font-style: normal; color: var(--accent); }
.page-head .lead {
  color: var(--fg-1);
  font-size: 18px;
  line-height: 1.65;
  max-width: 600px;
  margin: 22px auto 0;
  position: relative;
}

.doc-cards {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 32px 110px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 860px) { .doc-cards { grid-template-columns: 1fr; max-width: 560px; } }

.doc-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-2xl);
  padding: 30px 28px 26px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s, background .2s;
  position: relative;
  overflow: hidden;
}
.doc-card:hover {
  border-color: var(--line-3);
  background: var(--bg-2);
  transform: translateY(-3px);
}
.doc-card .doc-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
}
.doc-card .glyph {
  font-family: var(--font-symbol);
  font-size: 34px;
  color: var(--accent);
  line-height: 1;
}
.doc-card .num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--fg-3);
}
.doc-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 10px;
}
.doc-card p {
  color: var(--fg-2);
  font-size: 13.5px;
  line-height: 1.6;
  flex: 1;
}
.doc-card .open {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .15s;
}
.doc-card:hover .open { gap: 12px; }

.doc-page-head {
  padding: 80px 32px 32px;
  text-align: left;
}
.doc-page-head-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.doc-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 32px 120px; }

.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--fg-2);
  text-decoration: none;
  transition: color .15s;
  margin-bottom: 22px;
}
.doc-back:hover { color: var(--fg-0); }

.doc-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}
.doc-switch a {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: var(--r-full);
  border: 1px solid var(--line-2);
  color: var(--fg-1);
  text-decoration: none;
  transition: all .15s;
}
.doc-switch a:hover { background: var(--bg-2); color: var(--fg-0); }
.doc-switch a.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.doc-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; gap: 0; } }

.doc-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  border-left: 1px solid var(--line-2);
  padding-left: 18px;
}
.doc-toc-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 14px;
}
.doc-toc a {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--fg-2);
  text-decoration: none;
  padding: 5px 0;
  transition: color .15s;
  overflow-wrap: break-word;
  hyphens: auto;
}
.doc-toc a:hover { color: var(--fg-0); }
.doc-toc a.is-current { color: var(--accent); }
@media (max-width: 900px) {
  .doc-toc {
    position: static;
    max-height: none;
    border-left: none;
    border-bottom: 1px solid var(--line-2);
    padding-left: 0;
    padding-bottom: 18px;
    margin-bottom: 36px;
  }
}

.doc-body { min-width: 0; font-size: 15.5px; color: var(--fg-1); }
.doc-body > h1:first-child { margin-top: 0; }
.doc-body h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg-0);
  margin: 8px 0 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-2);
}
.doc-body h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--fg-0);
  margin: 52px 0 16px;
  scroll-margin-top: 96px;
}
.doc-body h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg-0);
  margin: 32px 0 12px;
  scroll-margin-top: 96px;
}
.doc-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-0);
  margin: 24px 0 10px;
}
.doc-body p { margin: 14px 0; line-height: 1.7; }
.doc-body ul, .doc-body ol { margin: 14px 0 14px 4px; padding-left: 22px; }
.doc-body li { margin: 7px 0; line-height: 1.65; }
.doc-body li::marker { color: var(--accent); }
.doc-body a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.doc-body a:hover { border-bottom-color: var(--accent); }
.doc-body strong { color: var(--fg-0); font-weight: 700; }
.doc-body em { font-style: italic; }
/* Inline code - GitHub-like: monospace, subtle fill, NO border (the
   bordered version read as a "pill"). Block code is the pre rule below */
.doc-body code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-2);
  border-radius: 6px;
  padding: 0.12em 0.4em;
}
.doc-body pre {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.55;
}
.doc-body pre code {
  font-family: var(--font-mono);
  font-size: inherit;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  white-space: pre;
  color: var(--fg-1);
}
/* api.html wraps each <pre> in .doc-code-wrap so the copy button stays
   pinned top-right while a wide <pre> scrolls horizontally. The pre's
   vertical margin moves to the wrap so spacing is unchanged */
.doc-code-wrap { position: relative; margin: 16px 0; }
.doc-code-wrap > pre { margin: 0; }
/* Copy-to-clipboard button injected into each code block by api.html's
   addCopyButtons. Always faintly visible (touch has no hover), brighter
   on hover / focus */
.doc-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 7px;
  color: var(--fg-2);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity .15s, color .15s, border-color .15s;
}
.doc-body pre:hover .doc-copy,
.doc-copy:focus-visible { opacity: 1; }
.doc-copy:hover { color: var(--fg-0); border-color: var(--accent-soft); }
.doc-copy svg { width: 16px; height: 16px; fill: currentColor; }
.doc-copy.is-copied { color: var(--accent); border-color: var(--accent); opacity: 1; }
.doc-body hr { border: none; border-top: 1px solid var(--line-2); margin: 44px 0; }
.doc-body blockquote {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 18px;
  margin: 18px 0;
  color: var(--fg-2);
}
.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 13.5px;
  display: block;
  overflow-x: auto;
}
.doc-body th, .doc-body td {
  border: 1px solid var(--line-2);
  padding: 9px 13px;
  text-align: left;
  vertical-align: top;
}
.doc-body th {
  background: var(--bg-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  color: var(--fg-0);
}

.doc-status {
  color: var(--fg-3);
  font-size: 14px;
  padding: 40px 0;
  text-align: center;
}

.footer {
  padding: 72px 32px 36px;
  border-top: 1px solid var(--line-1);
  background: var(--bg-0);
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer-brand { max-width: 360px; }
.footer-brand .wm { font-size: 22px; margin-bottom: 14px; }
.footer-brand p { color: var(--fg-2); font-size: 14px; line-height: 1.6; }
.footer-kofi { margin-top: 18px; }
.footer-kofi a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: background .15s, transform .15s;
}
.footer-kofi a::before {
  content: '\2665';
  font-family: var(--font-symbol);
  font-size: 12px;
  line-height: 1;
}
.footer-kofi a:hover { background: var(--accent-hover); transform: translateY(-1px); }
.footer-col h5 {
  font-family: var(--font-display);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--fg-1); text-decoration: none; font-size: 14px; transition: color .15s; }
.footer-col a:hover { color: var(--fg-0); }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--line-1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--fg-3);
  font-size: 12px;
  flex-wrap: wrap;
  gap: 12px;
  font-variant-numeric: tabular-nums;
}
.footer-bottom .gly { font-family: var(--font-symbol); opacity: 0.5; }

@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .page-head { padding: 84px 20px 52px; }
  .doc-page-head { padding: 64px 20px 24px; }
  .doc-cards { padding: 0 20px 84px; }
  .doc-wrap { padding: 24px 20px 96px; }
  .footer { padding: 56px 20px 34px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; margin-bottom: 36px; }
}
