/* Хроно — шрифты и дизайн-токены. Шрифты вшиты локально (OFL), CDN не используется. */
@font-face { font-family: 'Unbounded Variable'; font-style: normal; font-display: swap; font-weight: 200 900; src: url(../fonts/unbounded-cyrillic-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Unbounded Variable'; font-style: normal; font-display: swap; font-weight: 200 900; src: url(../fonts/unbounded-latin-wght-normal.woff2) format('woff2-variations'); 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 Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/onest-cyrillic-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Onest Variable'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/onest-latin-wght-normal.woff2) format('woff2-variations'); 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: 'JetBrains Mono Variable'; font-style: normal; font-display: swap; font-weight: 100 800; src: url(../fonts/jetbrains-mono-cyrillic-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'JetBrains Mono Variable'; font-style: normal; font-display: swap; font-weight: 100 800; src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations'); 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 {
  --font-display: 'Unbounded Variable', 'Unbounded', 'Onest Variable', system-ui, sans-serif;
  --font-body: 'Onest Variable', 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  /* пружина: перелёт ~8 % и успокоение */
  --spring: linear(0, .17 3%, .46 7%, .74 12%, .93 17%, 1.03 21%, 1.07 25%, 1.06 30%, 1.03 36%, 1.005 45%, .995 55%, 1);
  --dur-1: 140ms; --dur-2: 240ms; --dur-3: 420ms;

  --r-1: 8px; --r-2: 12px; --r-3: 18px; --r-4: 26px;
  --hit: 44px;
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* календарные цвета (одинаково читаются в обеих темах) */
  --c-mint: #2DD4A8; --c-azure: #3BA7FF; --c-violet: #8B6CFF; --c-rose: #FF5C8A; --c-amber: #FFB020;
  --c-coral: #FF7A59; --c-lime: #A3E635; --c-cyan: #22D3EE; --c-lilac: #D26BFF; --c-slate: #94A3B8;

  color-scheme: dark;
}

/* ---------- тёмная «ночь» (по умолчанию) ---------- */
:root, [data-theme='dark'] {
  --bg: #0B0D17;
  --bg-2: #0F1224;
  --surface: #12162B;
  --surface-2: #181D38;
  --ink: #EDEFF9;
  --ink-2: #A9B0CE;
  --ink-3: #8089AE;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .15);
  --glass: rgba(21, 25, 48, .56);
  --glass-2: rgba(255, 255, 255, .045);
  --glass-strong: rgba(16, 20, 40, .86);
  --hover: rgba(255, 255, 255, .06);
  --press: rgba(255, 255, 255, .1);
  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  --shadow-md: 0 14px 36px -16px rgba(0, 0, 0, .65);
  --accent-a: #4EF0C0; --accent-b: #47B8FF; --accent-c: #A07BFF;
  --accent-text: #6FF2CF;
  --on-accent: #04110D;
  --now: #FF5470;
  --now-label: #D6264A;     /* фон меток «сейчас» и бейджа: белый текст ≥ 4,5:1 */
  --weekend: rgba(255, 255, 255, .022);
  --holiday: #FF8FA3;
  --grain-op: .05;
  --aurora-op: 1;
  --scrim: rgba(4, 6, 14, .62);
}

/* ---------- светлая «бумага» ---------- */
[data-theme='light'] {
  color-scheme: light;
  --bg: #EDEFF2;
  --bg-2: #E5E8ED;
  --surface: #FFFFFF;
  --surface-2: #F6F7F9;
  --ink: #10142B;
  --ink-2: #474E6E;
  --ink-3: #626A8B;
  --line: rgba(16, 20, 43, .1);
  --line-2: rgba(16, 20, 43, .2);
  --glass: rgba(255, 255, 255, .66);
  --glass-2: rgba(16, 20, 43, .035);
  --glass-strong: rgba(255, 255, 255, .92);
  --hover: rgba(16, 20, 43, .05);
  --press: rgba(16, 20, 43, .09);
  --shadow-lg: 0 30px 70px -34px rgba(26, 34, 80, .35), 0 0 0 1px rgba(16, 20, 43, .05);
  --shadow-md: 0 12px 30px -16px rgba(26, 34, 80, .3);
  --accent-text: #09705C;
  --now: #D81E43;
  --now-label: #D81E43;
  --weekend: rgba(16, 20, 43, .03);
  --holiday: #C21D45;
  --grain-op: .035;
  --aurora-op: .5;
  --scrim: rgba(235, 238, 244, .7);
}

/* ---------- палитры (Pro): меняют акцентный градиент и свечение авроры ---------- */
html[data-palette='sunset'] { --accent-a: #FFC46B; --accent-b: #FF7A8A; --accent-c: #C46BFF; --accent-text: #FFC46B; }
html[data-palette='forest'] { --accent-a: #B8F06B; --accent-b: #3FD6A0; --accent-c: #2FA9D8; --accent-text: #B8F06B; }
html[data-palette='graphite'] { --accent-a: #E8ECF8; --accent-b: #9FB0D8; --accent-c: #6E7FB5; --accent-text: #D6DCF0; }
html[data-theme='light'][data-palette='sunset'] { --accent-text: #9E4A0A; }
html[data-theme='light'][data-palette='forest'] { --accent-text: #336A0B; }
html[data-theme='light'][data-palette='graphite'] { --accent-text: #3C4770; }

:root { --grad: linear-gradient(112deg, var(--accent-a) 0%, var(--accent-b) 52%, var(--accent-c) 100%); }
