/* Design system shared by the landing and the live dashboard (dark, Telegram-blue accent). */
:root {
  color-scheme: dark;
  --background: #060607;
  --foreground: #fcfcfc;
  --surface: #18181b;
  --surface-2: #232325;
  --surface-3: #2a2a2d;
  --default: #27272a;
  --default-hover: #323236;
  --border: #28282c;
  --muted: #9f9fa9;
  --accent: #0485f7;
  --accent-hover: #1c91f8;
  --success: #17c964;
  --danger: #f31260;
  --warning: #f5a524;
  --radius: 8px;
  --bar-h: 56px;
  --font: "Google Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; background: var(--background); color: var(--foreground); }
body { font: 400 14px/20px var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg.i { width: 1em; height: 1em; flex-shrink: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; font-weight: 500;
  white-space: nowrap; transition: background-color .15s ease, transform .15s ease; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.96); }
.btn--lg { height: 48px; padding: 0 24px; font-size: 16px; }
.btn--md { height: 40px; padding: 0 16px; font-size: 14px; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 14px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--tertiary { background: var(--default); }
.btn--tertiary:hover { background: var(--default-hover); }
.btn--ghost:hover { background: var(--default); }
.btn--outline { border: 1px solid var(--border); }
.btn--outline:hover { background: rgba(39, 39, 42, .6); }
.btn--icon.btn--md { width: 40px; padding: 0; font-size: 16px; }
.btn--icon.btn--sm { width: 32px; padding: 0; font-size: 16px; }
.link { font-weight: 500; text-decoration: underline; text-decoration-color: #5a5a60; text-underline-offset: 4px; cursor: pointer; }
.link:hover { text-decoration-color: var(--foreground); }
.badge-anchor { position: relative; display: inline-flex; flex-shrink: 0; }
.badge { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--background); }
.badge.live { animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* ---------- app bar ---------- */
[hidden] { display: none !important; }
.bar { position: fixed; inset-inline: 0; top: 0; z-index: 20; padding: 0 8px; }
.bar::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, transparent, rgba(6, 6, 7, .92) 35%); pointer-events: none; }
.bar__inner { position: relative; max-width: 1280px; margin: 0 auto; height: var(--bar-h); display: flex; align-items: center; gap: 8px; }
.bar__spacer { flex: 1; }
.brand { display: inline-flex; align-items: center; gap: 12px; height: 40px; padding: 0 4px; font-size: 16px; line-height: 28px; }
.brand:hover { background: transparent; }
.brand svg { width: 32px; height: 32px; color: var(--accent); margin-bottom: 4px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: flex-end; justify-content: center; padding: 16px;
  background: rgba(0, 0, 0, .5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.modal.open { display: flex; animation: fade .2s ease-out; }
@media (min-width: 640px) { .modal { align-items: center; } }
.modal__dialog { position: relative; width: 100%; max-width: 460px; max-height: 88vh; overflow-y: auto; background: var(--surface);
  border-radius: 24px; padding: 24px; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); animation: rise .25s cubic-bezier(.25, 1, .5, 1);
  scrollbar-width: thin; scrollbar-color: #3a3a3f transparent; }
.modal__close { position: absolute; top: 16px; right: 16px; width: 24px; height: 24px; border-radius: 50%; background: var(--default);
  display: grid; place-items: center; color: var(--foreground); font-size: 12px; }
.modal__close:hover { background: var(--default-hover); }
.modal__heading { font-size: 16px; line-height: 24px; font-weight: 500; }
.modal__body { margin-top: 12px; color: var(--muted); font-size: 14px; }
.modal__list { margin-top: 16px; background: var(--surface-2); border-radius: 20px; padding: 4px 0; }
.modal__item { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 16px; border-radius: 16px; }
.modal__item svg { width: 16px; height: 16px; color: var(--muted); }
.modal__item .t { color: var(--foreground); font-size: 16px; font-weight: 500; line-height: 22px; }
.modal__item .s { color: var(--muted); font-size: 13.5px; line-height: 19px; }
.modal__item { align-items: flex-start; }
.modal__item svg { margin-top: 3px; }
.modal__note { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 19px; }
.modal__item .chev { margin-left: auto; }
.modal__footer { margin-top: 24px; }
.modal__footer .btn { width: 100%; height: 40px; font-size: 16px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.98); } }
