/* CUBRA design tokens: one file for the site and the cabinet (s-design D0).
   Direction B «Простори» + C «Щільний» (05-SITE/design/messenger.html).
   Light by default; dark by the system or by the user's choice
   (<html data-theme="light|dark">, kept per device). The showcase of every
   part is 05-SITE/design/system.html. No inline styles anywhere: the
   cabinet's CSP allows style-src 'self' only. */

:root{
  /* brand, the same in both themes */
  --teal:#5EEAD4; --teal-d:#0D9488; --teal-dd:#0B6B63;
  --violet:#A78BFA; --violet-d:#6D28D9;
  --grad-accent:linear-gradient(145deg,#14B8A6,#0B6B63);
  --grad-sec:linear-gradient(145deg,#8B5CF6,#5B21B6);
  --grad-line:linear-gradient(90deg,#0D9488,#6D28D9);
  --tile-teal:linear-gradient(145deg,#14B8A6,#0B6B63);
  --tile-violet:linear-gradient(145deg,#8B5CF6,#5B21B6);
  --tile-blue:linear-gradient(145deg,#3B82F6,#1E40AF);
  --tile-slate:linear-gradient(145deg,#64748B,#334155);
  --tile-amber:linear-gradient(145deg,#F59E0B,#B45309);
  --on-grad:#FFFFFF;

  /* type */
  --font:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;
  --font-mono:ui-monospace,"Cascadia Mono",Consolas,monospace;
  --fs-xs:12px; --fs-s:13px; --fs-m:15px; --fs-l:17px; --fs-xl:21px; --fs-2xl:28px;

  /* shape and space */
  --radius-s:10px; --radius-m:12px; --radius-l:18px; --radius-pill:999px;
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:24px; --sp-6:32px;
  --tap:44px;

  /* settings rows and groups, as in Telegram and WhatsApp (s-menu) */
  --set-title:20px; --set-name:18px; --set-row:16px; --set-row-in:15px; --set-sub:14px; --set-cap:13px;
  --set-row-h:50px; --set-row-h2:60px; --set-tile:30px; --set-ico:18px; --set-radius:14px;
  --tile-green:linear-gradient(145deg,#22C55E,#15803D);
  --tile-red:linear-gradient(145deg,#F87171,#DC2626);
  --tile-rose:linear-gradient(145deg,#FB7185,#BE123C);
  --tile-gray:linear-gradient(145deg,#94A3B8,#64748B);
  --tile-sec:linear-gradient(145deg,#0D9488,#0B4F4A);
  --ease:cubic-bezier(.2,.7,.2,1); --dur:180ms;

  /* light theme */
  --bg:#EEF1F6; --pane:#FFFFFF; --pane-2:#F5F7FA; --raise:#FFFFFF; --line:rgba(15,27,48,.10);
  --text:#0F1B30; --text-2:#4B5670; --text-3:#636C7F;
  --accent:#0D9488; --accent-hover:#0B6B63; --accent-ink:#FFFFFF; --accent-soft:#D5F3EE;
  --sec:#6D28D9; --sec-soft:rgba(109,40,217,.10);
  --sel:rgba(13,148,136,.08); --focus:rgba(13,148,136,.5);
  --ok:#15803D; --ok-soft:#DCFCE7; --warn:#B45309; --warn-soft:#FEF3C7; --danger:#B91C1C; --danger-soft:#FEE2E2;
  --in:#FFFFFF; --out:#D5F3EE; --out-text:#0B2B28;
  --glow-a:rgba(139,92,246,.10); --glow-b:rgba(20,184,166,.10);
  --shadow:0 18px 50px rgba(15,27,48,.12); --shadow-s:0 4px 14px rgba(15,27,48,.08);
  --scrim:rgba(5,7,13,.45);
  color-scheme:light;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#070A12; --pane:#0B1120; --pane-2:#0F1729; --raise:#141E33; --line:rgba(230,240,242,.08);
    --text:#E8EDF4; --text-2:#9AA5B5; --text-3:#8B97AB;
    --accent:#5EEAD4; --accent-hover:#99F6E4; --accent-ink:#00201C; --accent-soft:#0B3B38;
    --sec:#A78BFA; --sec-soft:rgba(167,139,250,.14);
    --sel:rgba(94,234,212,.08); --focus:rgba(94,234,212,.55);
    --ok:#4ADE80; --ok-soft:rgba(74,222,128,.12); --warn:#FBBF24; --warn-soft:rgba(251,191,36,.12); --danger:#F87171; --danger-soft:rgba(248,113,113,.12);
    --in:#141E33; --out:#0F3D39; --out-text:#E6FBF7;
    --glow-a:rgba(109,40,217,.16); --glow-b:rgba(13,148,136,.12);
    --shadow:0 18px 50px rgba(0,0,0,.45); --shadow-s:0 4px 14px rgba(0,0,0,.35);
    --scrim:rgba(0,0,0,.6);
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#070A12; --pane:#0B1120; --pane-2:#0F1729; --raise:#141E33; --line:rgba(230,240,242,.08);
  --text:#E8EDF4; --text-2:#9AA5B5; --text-3:#8B97AB;
  --accent:#5EEAD4; --accent-hover:#99F6E4; --accent-ink:#00201C; --accent-soft:#0B3B38;
  --sec:#A78BFA; --sec-soft:rgba(167,139,250,.14);
  --sel:rgba(94,234,212,.08); --focus:rgba(94,234,212,.55);
  --ok:#4ADE80; --ok-soft:rgba(74,222,128,.12); --warn:#FBBF24; --warn-soft:rgba(251,191,36,.12); --danger:#F87171; --danger-soft:rgba(248,113,113,.12);
  --in:#141E33; --out:#0F3D39; --out-text:#E6FBF7;
  --glow-a:rgba(109,40,217,.16); --glow-b:rgba(13,148,136,.12);
  --shadow:0 18px 50px rgba(0,0,0,.45); --shadow-s:0 4px 14px rgba(0,0,0,.35);
  --scrim:rgba(0,0,0,.6);
  color-scheme:dark;
}

/* ---------- base ---------- */
*{box-sizing:border-box}
*{scrollbar-width:thin;scrollbar-color:var(--text-3) transparent}
body{font-family:var(--font);font-size:var(--fs-m);line-height:1.45;background:var(--bg);color:var(--text);
  font-feature-settings:"cv11","ss01";-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:6px}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
