/* mar-ui 1.0.0 7af02f8 — vendored by mar-ui/tools/vendor.mjs; do not edit here, update the kit and re-vendor. */
/* mar-ui tokens (Marmos UI 1.0).
   Independent switches on <html>:
     data-theme   dark | light            (set by init() from Telegram / OS / the user)
     data-palette violet | orange | sage | blue | lime | amber | system   (accent hue, per product)
     data-tone    cool | graphite | warm  (neutral surfaces; defaults follow palette)
     data-shape   soft | compact          (radii, control height, body size)
   Components read only the semantic --ds-* tokens below, never raw hex. */

/* ---------- Scales (theme-independent) ---------- */
:root {
  --ds-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ds-font-mono: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, monospace;

  --ds-text-display: 2rem;      /* 32 */
  --ds-text-title: 1.5rem;      /* 24 */
  --ds-text-section: 1.0625rem; /* 17 */
  --ds-text-label: 0.8125rem;   /* 13 */
  --ds-text-meta: 0.75rem;      /* 12 */
  --ds-text-micro: 0.6875rem;   /* 11 */
  --ds-weight-regular: 400;
  --ds-weight-medium: 520;
  --ds-weight-semibold: 620;
  --ds-weight-bold: 720;

  --ds-space-1: 0.25rem;
  --ds-space-2: 0.5rem;
  --ds-space-3: 0.75rem;
  --ds-space-4: 1rem;
  --ds-space-5: 1.25rem;
  --ds-space-6: 1.5rem;
  --ds-space-8: 2rem;

  --ds-radius-xs: 0.375rem;
  --ds-radius-sm: 0.5rem;
  --ds-radius-md: 0.75rem;
  --ds-radius-lg: 1rem;
  --ds-radius-xl: 1.25rem;
  --ds-radius-2xl: 1.5rem;
  --ds-radius-full: 999rem;

  --ds-motion-micro: 120ms;
  --ds-motion-fast: 160ms;
  --ds-motion-surface: 220ms;
  --ds-ease: cubic-bezier(0.2, 0, 0, 1);
  --ds-ease-enter: cubic-bezier(0, 0, 0.2, 1);
  --ds-ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --ds-ease-spring: cubic-bezier(0.3, 1.25, 0.55, 1); /* slight overshoot for moving selections */
  --ds-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ds-motion-slide: 340ms;
  --ds-motion-crossfade: 200ms; /* state / step content swap inside a fixed frame */
  --ds-motion-shimmer: 1400ms;  /* one skeleton sheen pass */
  --ds-motion-icon: 560ms;      /* one icon hover / press play */
  --ds-motion-morph: 280ms;     /* icon state morph (sun <-> moon, mic <-> mic-off) */
  /* Real springs (sampled damped oscillators) for things that travel: the tab and
     segmented highlight, sheets, menus. JS twins: src/springs.js. The cubic values
     here are the fallback; @supports below swaps in the linear() curves. */
  --ds-motion-spring: 560ms;
  --ds-motion-spring-bouncy: 680ms;
  --ds-ease-spring-soft: cubic-bezier(0.3, 1.25, 0.55, 1);
  --ds-ease-spring-bouncy: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Blur scale: glass surfaces pick from it. */
  --ds-blur-1: 4px;
  --ds-blur-2: 8px;
  --ds-blur-3: 14px;
  --ds-blur-4: 20px;

  --ds-z-sticky: 20;
  --ds-z-sheet: 200;
  --ds-z-confirm: 280;
  --ds-z-toast: 300;

  /* Safe areas: filled by telegram.js, fall back to the browser's. */
  --ds-safe-top: env(safe-area-inset-top, 0px);
  --ds-safe-right: env(safe-area-inset-right, 0px);
  --ds-safe-bottom: env(safe-area-inset-bottom, 0px);
  --ds-safe-left: env(safe-area-inset-left, 0px);
  --ds-app-height: 100dvh;

  /* Shape: soft (Telegram mini apps) is the default. */
  --ds-radius-card: var(--ds-radius-xl);
  --ds-radius-control: 0.875rem;
  --ds-control-h: 2.75rem;
  --ds-control-h-sm: 2.25rem;
  --ds-text-body: 0.9375rem;    /* 15 */
  --ds-gutter: var(--ds-space-4);
}

/* springs:begin — generated by tools/build-springs.mjs from src/springs.js, do not edit */
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --ds-ease-spring-soft: linear(0, 0.052, 0.174, 0.325, 0.48, 0.625, 0.746, 0.844, 0.918, 0.97, 1.005, 1.025, 1.035, 1.037, 1.036, 1.031, 1.025, 1.019, 1.014, 1.01, 1.006, 1.003, 1.001, 1, 1);
    --ds-ease-spring-bouncy: linear(0, 0.062, 0.21, 0.399, 0.594, 0.769, 0.911, 1.015, 1.082, 1.117, 1.127, 1.119, 1.1, 1.076, 1.051, 1.029, 1.011, 0.998, 0.989, 0.985, 0.984, 0.985, 0.987, 0.99, 0.994, 0.996, 0.999, 1, 1);
  }
}
/* springs:end */

:root[data-shape="compact"] {
  /* Desktop density (MarMic). */
  --ds-radius-card: var(--ds-radius-md);
  --ds-radius-control: 0.625rem;
  --ds-control-h: 2.25rem;
  --ds-control-h-sm: 1.875rem;
  --ds-text-body: 0.875rem;
  --ds-gutter: var(--ds-space-3);
}

/* ---------- Neutrals: tone × theme ---------- */
/* color-scheme only once the app opts in with data-theme, so vendoring tokens.css
   alone never changes a working app's form controls or scrollbars. */
:root[data-theme="dark"] { color-scheme: dark; }
/* cool = MarMic packages/ui exact values (default). */
:root {
  --ds-bg: #090b12;
  --ds-surface-1: #10131d;
  --ds-surface-2: #161a27;
  --ds-surface-3: #1d2232;
  --ds-surface-hover: #252b3e;
  --ds-elevated: #2d3348;
  --ds-overlay: #07080dcc;
  --ds-border: #292f40;
  --ds-border-strong: #394158;
  --ds-text: #f5f3ff;
  --ds-text-2: #c4c2d3;
  --ds-text-muted: #8e90a4;
  --ds-text-disabled: #606477;
  --ds-shadow-float: 0 16px 44px #0000008f;
  --ds-shadow-sheet: 0 -12px 48px #00000070;

  --ds-success: #4ed6a0;
  --ds-warning: #f5b85a;
  --ds-danger: #f06d86;
  --ds-info: #6ebcf5;
  --ds-danger-text: #ffb2c0;
  --ds-on-danger: #ffffff;
}
:root[data-theme="light"] {
  color-scheme: light;
  --ds-bg: #f5f4fa;
  --ds-surface-1: #ffffff;
  --ds-surface-2: #efedf5;
  --ds-surface-3: #e6e2ef;
  --ds-surface-hover: #dbd5e8;
  --ds-elevated: #ffffff;
  --ds-overlay: #241a3d4a;
  --ds-border: #ded9e8;
  --ds-border-strong: #c9c2d8;
  --ds-text: #211b2c;
  --ds-text-2: #50485e;
  --ds-text-muted: #71697f;
  --ds-text-disabled: #9992a4;
  --ds-shadow-float: 0 16px 44px #30253d33;
  --ds-shadow-sheet: 0 -12px 48px #30253d26;

  --ds-success: #168362;
  --ds-warning: #9a6113;
  --ds-danger: #c13c57;
  --ds-info: #256ea8;
  --ds-danger-text: #a52d46;
  --ds-on-danger: #ffffff;
}

/* graphite = Paralleli / Хомяк mini app kit. */
:root[data-tone="graphite"] {
  --ds-bg: #101114;
  --ds-surface-1: #191a1f;
  --ds-surface-2: #202127;
  --ds-surface-3: #26272e;
  --ds-surface-hover: #2e2f37;
  --ds-elevated: #26272e;
  --ds-border: #2a2b33;
  --ds-border-strong: #3a3b45;
  --ds-text: #efeff4;
  --ds-text-2: #c3c4cd;
  --ds-text-muted: #9c9ea9;
  --ds-text-disabled: #727582;
}
:root[data-tone="graphite"][data-theme="light"] {
  --ds-bg: #f5f5f7;
  --ds-surface-1: #ffffff;
  --ds-surface-2: #f4f4f7;
  --ds-surface-3: #ededf2;
  --ds-surface-hover: #e6e6ed;
  --ds-elevated: #ffffff;
  --ds-border: #e6e6ed;
  --ds-border-strong: #d0d0da;
  --ds-text: #262532;
  --ds-text-2: #4d4c5a;
  --ds-text-muted: #6f707d;
  --ds-text-disabled: #9798a3;
}

/* warm = Искра exact values. */
:root[data-tone="warm"] {
  --ds-bg: #201e1c;
  --ds-surface-1: #2a2724;
  --ds-surface-2: #302c28;
  --ds-surface-3: #3a332d;
  --ds-surface-hover: #433a32;
  --ds-elevated: #3a332d;
  --ds-overlay: #120e0bcc;
  --ds-border: #433a32;
  --ds-border-strong: #5a4e43;
  --ds-text: #f4ece3;
  --ds-text-2: #c6b9ac;
  --ds-text-muted: #ac9e90;
  --ds-text-disabled: #7a6e63;
}
:root[data-tone="warm"][data-theme="light"] {
  --ds-bg: #f7f5f1;
  --ds-surface-1: #ffffff;
  --ds-surface-2: #f5f3ef;
  --ds-surface-3: #eeeae3;
  --ds-surface-hover: #e7e1d7;
  --ds-elevated: #ffffff;
  --ds-overlay: #3a2a1f4a;
  --ds-border: #e9e3da;
  --ds-border-strong: #d6cdc0;
  --ds-text: #342d29;
  --ds-text-2: #6d645d;
  --ds-text-muted: #756b62;
  --ds-text-disabled: #a89e94;
}

/* ---------- Accent: palette × theme ---------- */
/* violet = MarMic (default). */
:root {
  --ds-accent: #7a5cfa;
  --ds-accent-hover: #9b83ff;
  --ds-accent-pressed: #6846e8;
  --ds-accent-text: #b9a7ff;
  --ds-accent-soft: #2e2c56;
  --ds-on-accent: #ffffff;
  --ds-focus: #c9bcff;
}
:root[data-theme="light"] {
  --ds-accent: #6848da;
  --ds-accent-hover: #7558e7;
  --ds-accent-pressed: #5837c7;
  --ds-accent-text: #5837c7;
  --ds-accent-soft: #e6e0fb;
  --ds-on-accent: #ffffff;
  --ds-focus: #6848da;
}

/* orange = Искра / На Крючке. */
:root[data-palette="orange"] {
  --ds-accent: #f0a271;
  --ds-accent-hover: #ffb98e;
  --ds-accent-pressed: #e08d5a;
  --ds-accent-text: #f0a271;
  --ds-accent-soft: #453225;
  --ds-on-accent: #2b1b12;
  --ds-focus: #ffb98e;
}
:root[data-palette="orange"][data-theme="light"] {
  --ds-accent: #c45128;
  --ds-accent-hover: #bf5229;
  --ds-accent-pressed: #a8441f;
  --ds-accent-text: #b44722;
  --ds-accent-soft: #fbede4;
  --ds-on-accent: #ffffff;
  --ds-focus: #c45128;
}

/* sage / blue = Paralleli accent options. */
:root[data-palette="sage"] {
  --ds-accent: #a9c6ae;
  --ds-accent-hover: #bdd6c1;
  --ds-accent-pressed: #93b399;
  --ds-accent-text: #a9c6ae;
  --ds-accent-soft: #27322a;
  --ds-on-accent: #17221a;
  --ds-focus: #bdd6c1;
}
:root[data-palette="sage"][data-theme="light"] {
  --ds-accent: #477b50;
  --ds-accent-hover: #3f6f47;
  --ds-accent-pressed: #365f3d;
  --ds-accent-text: #3f6f47;
  --ds-accent-soft: #eaf2eb;
  --ds-on-accent: #ffffff;
  --ds-focus: #477b50;
}
:root[data-palette="blue"] {
  --ds-accent: #91b8df;
  --ds-accent-hover: #a8c8e8;
  --ds-accent-pressed: #7aa5d1;
  --ds-accent-text: #91b8df;
  --ds-accent-soft: #22303e;
  --ds-on-accent: #111f2f;
  --ds-focus: #a8c8e8;
}
:root[data-palette="blue"][data-theme="light"] {
  --ds-accent: #416fa4;
  --ds-accent-hover: #3a6495;
  --ds-accent-pressed: #325683;
  --ds-accent-text: #3a6495;
  --ds-accent-soft: #eaf0f8;
  --ds-on-accent: #ffffff;
  --ds-focus: #416fa4;
}

/* lime = Хомяк (observed in the 2026-10-06 screenshot; not in pushed source). */
:root[data-palette="lime"] {
  --ds-accent: #e4f5a1;
  --ds-accent-hover: #eefabf;
  --ds-accent-pressed: #d3e78a;
  --ds-accent-text: #e4f5a1;
  --ds-accent-soft: #2c321c;
  --ds-on-accent: #1b2008;
  --ds-focus: #eefabf;
}
:root[data-palette="lime"][data-theme="light"] {
  --ds-accent: #5c7a12;
  --ds-accent-hover: #516c10;
  --ds-accent-pressed: #455c0d;
  --ds-accent-text: #516c10;
  --ds-accent-soft: #eef5d6;
  --ds-on-accent: #ffffff;
  --ds-focus: #5c7a12;
}

/* amber = MarOptimize exact values (apps/desktop/src/styles/tokens.css); keeps its
   contrast gate: on-accent on accent >= 4.5:1, accent-text on every surface >= 4.5:1.
   MarOptimize has no pressed shade; ours is the accent 6 % darker. */
:root[data-palette="amber"] {
  --ds-accent: #f5b65b;
  --ds-accent-hover: #f8c67c;
  --ds-accent-pressed: #e6a84f;
  --ds-accent-text: #f5b65b;
  --ds-accent-soft: rgba(245, 182, 91, 0.12);
  --ds-on-accent: #0b0e13;
  --ds-focus: rgba(245, 182, 91, 0.75);
}
:root[data-palette="amber"][data-theme="light"] {
  --ds-accent: #f5b65b;
  --ds-accent-hover: #f2a93f;
  --ds-accent-pressed: #e39c35;
  --ds-accent-text: #8a4f00;
  --ds-accent-soft: rgba(245, 182, 91, 0.2);
  --ds-on-accent: #1a1203;
  --ds-focus: rgba(196, 128, 30, 0.8);
  /* The light amber fill is 1.8:1 on white: controls use a deeper amber (3.8:1). */
  --ds-accent-ui: #b8740f;
  --ds-on-accent-ui: #ffffff;
}

/* system = macOS system blue (MarKey): looks like System Settings. White labels on
   systemBlue are 4.0 / 3.65:1, as in macOS itself (listed in the contrast test). */
:root[data-palette="system"] {
  --ds-accent: #0a84ff;
  --ds-accent-hover: #409cff;
  --ds-accent-pressed: #0071e3;
  --ds-accent-text: #4da3ff;
  --ds-accent-soft: #10263f;
  --ds-on-accent: #ffffff;
  --ds-focus: #4da3ff;
}
:root[data-palette="system"][data-theme="light"] {
  --ds-accent: #007aff;
  --ds-accent-hover: #0071eb;
  --ds-accent-pressed: #0062cc;
  --ds-accent-text: #0062cc;
  --ds-accent-soft: #e5f1ff;
  --ds-on-accent: #ffffff;
  --ds-focus: #007aff;
}

/* ---------- Derived (never redefine per palette) ---------- */
:root {
  --ds-success-soft: color-mix(in srgb, var(--ds-success) 14%, var(--ds-surface-1));
  --ds-warning-soft: color-mix(in srgb, var(--ds-warning) 14%, var(--ds-surface-1));
  --ds-danger-soft: color-mix(in srgb, var(--ds-danger) 14%, var(--ds-surface-1));
  --ds-info-soft: color-mix(in srgb, var(--ds-info) 14%, var(--ds-surface-1));
  --ds-ring: 0 0 0 2px var(--ds-bg), 0 0 0 4px var(--ds-focus);
  /* Accent for non-text controls (switch track, checkbox, progress): >= 3:1 on surfaces.
     Equals the accent except where the accent is too light (amber light). */
  --ds-accent-ui: var(--ds-accent);
  --ds-on-accent-ui: var(--ds-on-accent);
  /* Raised neutral thumb (segmented control). */
  --ds-shadow-thumb: 0 1px 2px #00000066, 0 4px 12px -4px #00000080;

  /* Skeleton: base block and the light that sweeps over it. */
  --ds-skeleton: var(--ds-surface-3);
  --ds-skeleton-sheen: color-mix(in srgb, var(--ds-text) 7%, transparent);

  /* Glass (lite profile: backdrop blur + saturation, no SVG displacement, so it
     renders the same in the Telegram iOS WebView). The tint follows the tone. */
  --ds-glass-blur: var(--ds-blur-4);
  --ds-glass-saturate: 1.5;
  --ds-glass-tint: color-mix(in srgb, var(--ds-surface-1) 72%, transparent);
  --ds-glass-backing: color-mix(in srgb, var(--ds-surface-1) 86%, transparent);
  --ds-glass-solid: var(--ds-surface-1);
  --ds-glass-edge: linear-gradient(180deg, #ffffff2e, #ffffff08 60%, #ffffff12);
  --ds-glass-shadow: 0 16px 40px -12px #000000aa;
  --ds-glass-highlight: inset 0 1px 0 #ffffff14;
}
:root[data-theme="light"] {
  --ds-shadow-thumb: 0 1px 2px #1d14301f, 0 4px 10px -4px #1d143033;
  --ds-skeleton: var(--ds-surface-3);
  --ds-skeleton-sheen: color-mix(in srgb, #ffffff 70%, transparent);
  --ds-glass-tint: color-mix(in srgb, var(--ds-surface-1) 80%, transparent);
  --ds-glass-backing: color-mix(in srgb, var(--ds-surface-1) 92%, transparent);
  --ds-glass-edge: linear-gradient(180deg, #ffffffe6, #ffffff59 60%, #ffffff8c);
  --ds-glass-shadow: 0 10px 30px -12px #1d143040;
  --ds-glass-highlight: inset 0 1px 0 #ffffffb3;
}

/* ---------- Category colours (calendars, tags, projects) ----------
   Six hues spaced around the wheel; dark values are light inks, light values
   are the deep inks from Keys. Used as a 3px rail / dot / tinted chip only. */
:root {
  --ds-cat-1: #9b83ff; /* violet */
  --ds-cat-2: #6ebcf5; /* blue */
  --ds-cat-3: #4ed6a0; /* green */
  --ds-cat-4: #f5b85a; /* amber */
  --ds-cat-5: #f0a271; /* orange */
  --ds-cat-6: #f39fae; /* rose */
}
:root[data-theme="light"] {
  --ds-cat-1: #704f96;
  --ds-cat-2: #306f9f;
  --ds-cat-3: #30764e;
  --ds-cat-4: #896818;
  --ds-cat-5: #b44722;
  --ds-cat-6: #a52d46;
}
