/* Tokens and base. Ported from docs/prototype/yapy-miniapp.html (v6); the demo stage, phone frame,
   fake status bar and fake Telegram header are gone: the app fills the Telegram viewport.
   Spacing scale: 4 / 8 / 12 / 16 / 24. Control heights: 54 primary, 44 secondary / chips / tabs,
   32 small label buttons (44px hit area). Cards and blocks: radius 24; everything pressable: 999. */

@font-face{font-family:'Onest';font-style:normal;font-weight:300 700;font-display:swap;
  src:url(../fonts/onest-cyrillic.woff2?v=2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Onest';font-style:normal;font-weight:300 700;font-display:swap;
  src:url(../fonts/onest-latin.woff2?v=2) 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:'Onest';font-style:normal;font-weight:300 700;font-display:swap;
  src:url(../fonts/onest-latin-ext.woff2?v=2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Onest';font-style:normal;font-weight:300 700;font-display:swap;
  src:url(../fonts/onest-symbols.woff2?v=2) format('woff2');unicode-range:U+2190,U+2192,U+2194-2199,U+2300-243F,U+25A0-27BF}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;
  src:url(../fonts/jbmono-500-cyrillic.woff2?v=2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;
  src:url(../fonts/jbmono-500-latin.woff2?v=2) 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}

:root{
  --ink:#0F0D15;
  --paper:#F7F4FB;
  --paper-2:#EEE8F6;
  --line:#DDD3EA;
  --lilac:#C6A4F7;
  --lilac-2:#EADFFC;
  --lilac-ink:#6F4FB0;
  --lilac-deep:#7A4FE0;
  --blue:#3148FF;
  --card:#1B1922;
  --card-2:#26232F;
  --line-d:#2E2B37;
  --mute:#6B6578;
  --mute-d:#9E97AD;
  /* status colours: one red in two variants (text contrast >= 4.5:1 on its surface), one cool green; orange only on dots */
  --ok:#3FD6A0;
  --warn:#F2B14C;
  --red-d:#FF7A8A;
  --red-l:#C23B5A;
  --red-d-a:255,122,138;
  --ok-l:#177A5C;
  --white:#FFFFFF;
  --dark-bg:#0B0A0F;
  --grad:linear-gradient(118deg,#5A1FEF 0%,#8550F6 48%,#9A6BF5 100%);
  /* surfaces with small white text on them: light end kept dark enough for 4.5:1 */
  --grad-deep:linear-gradient(118deg,#5A1FEF 0%,#7A45F4 52%,#8656F2 100%);
  --f:'Onest','Manrope',system-ui,-apple-system,'Segoe UI',sans-serif;
  --mono:'JetBrains Mono',ui-monospace,'Cascadia Mono',monospace;
  --out:cubic-bezier(.22,1,.36,1);
  --spring:cubic-bezier(.34,1.36,.64,1);
  /* insets: Telegram safeAreaInset + contentSafeAreaInset, set by js/telegram.js; env() before that */
  --in-t:env(safe-area-inset-top,0px);
  --in-r:env(safe-area-inset-right,0px);
  --in-b:env(safe-area-inset-bottom,0px);
  --in-l:env(safe-area-inset-left,0px);
  /* nav capsule: 60 tall, 18 above the bottom edge */
  --nav-b:18px;
  --nav-h:60px;
  color-scheme:light;
}
html,body{height:100%;margin:0}
html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{background:var(--paper);color:var(--ink);font-family:var(--f);overflow:hidden;overscroll-behavior:none;touch-action:manipulation;
  transition:background-color .45s var(--out);-webkit-tap-highlight-color:transparent}
body[data-tone="dark"]{background:var(--dark-bg)}
*{box-sizing:border-box}
[hidden]{display:none!important}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
/* lilac ring on dark surfaces, ink on light ones (sheets are light) */
.screen.dark :focus-visible,.nav :focus-visible,.step :focus-visible,.fatal.dark :focus-visible{outline-color:var(--lilac)}
.sheet :focus-visible{outline-color:var(--ink)}
.num{font-variant-numeric:tabular-nums}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* the app viewport: the whole Telegram webview. Height follows viewportStableHeight so the nav never jumps
   while Telegram expands; sheets use the live height so a field stays above the keyboard. */
.vp{position:relative;width:100%;height:var(--app-h,100%);overflow:hidden;display:flex;flex-direction:column;
  background:var(--paper);transition:background-color .45s var(--out);isolation:isolate}
.vp[data-tone="dark"]{background:var(--dark-bg)}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}
