/* Web roles from design/core/theme.css. Warm monochrome and antique brass.
   Night follows the system setting; the values are the kit's dark theme. */
:root {
  color-scheme: light;
  --bm-iron: #1a1611;
  --bm-ink-2: #322a20;
  --bm-muted: #6e6252;
  --bm-ivory: #f3eee4;
  --bm-ivory-2: #e7e0d0;
  --bm-brass: #c79a4e;
  --bm-brass-deep: #8a6428;
  --bm-brass-hi: #dfb877;
  --bm-good: #5b7a4e;
  --bm-good-ink: #46603c;
  --bm-warn: #a24b3b;
  --bm-warn-ink: #7a3428;
  --bm-caution: #b07a2e;
  --bm-caution-ink: #7a5214;
  --bm-pending-ink: #3e4954;
  --bm-info: #2e6e70;
  --bm-info-ink: #1e4e50;
  --bm-bg: var(--bm-ivory);
  --bm-surface: #fbf8f1;
  --bm-raised: #ede6d8;
  --bm-field: #fff;
  --bm-track: rgba(26, 22, 17, 0.1);
  --bm-scrim: rgba(26, 22, 17, 0.48);
  --bm-border: rgba(26, 22, 17, 0.14);
  --bm-border-strong: rgba(26, 22, 17, 0.28);
  --bm-control-border: rgba(26, 22, 17, 0.54);
  --bm-text: var(--bm-iron);
  --bm-text-soft: rgba(26, 22, 17, 0.66);
  --bm-text-faint: rgba(26, 22, 17, 0.42);
  --bm-inverse: var(--bm-iron);
  --bm-on-inverse: var(--bm-ivory);
  --bm-accent: var(--bm-brass);
  --bm-accent-ink: var(--bm-brass-deep);
  --bm-on-accent: #211708;
  --bm-wash-accent: color-mix(in srgb, var(--bm-accent) 12%, var(--bm-surface));
  --bm-focus: var(--bm-brass-deep);
  --bm-focus-ring: color-mix(in srgb, var(--bm-focus) 34%, transparent);
  /* Type roles of the brand pack (brand/05-typography). The faces are
     self-hosted (fonts/fonts.css). The pack names Archivo for headings and
     Hanken Grotesk for text, both Latin only, and leaves one Cyrillic for
     every platform as a separate choice of face: the owner chose Onest
     (2026-11-13), which draws Latin and Cyrillic alike, so headings and text
     are set in it. JetBrains Mono covers Cyrillic itself. The name ThreadBell
     is never set in type here: the logo is the pack's outlined SVG. The
     system tail stays for the moment before a face loads. */
  --tb-font-system:
    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  --bm-font-display: 'Onest', var(--tb-font-system);
  --bm-font-body: 'Onest', var(--tb-font-system);
  --bm-font-mono:
    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  /* The pack's scale (typography.css): size and line height per role. */
  --tb-type-display-size: 48px;
  --tb-type-display-line: 1.05;
  --tb-type-h1-size: 32px;
  --tb-type-h1-line: 1.1;
  --tb-type-h2-size: 24px;
  --tb-type-h2-line: 1.2;
  --tb-type-h3-size: 20px;
  --tb-type-h3-line: 1.3;
  --tb-type-body-size: 16px;
  --tb-type-body-line: 1.5;
  --tb-type-small-size: 14px;
  --tb-type-small-line: 1.5;
  --tb-type-caption-size: 12px;
  --tb-type-caption-line: 1.4;
  --tb-type-mono-size: 13px;
  --tb-type-mono-line: 1.5;
  --bm-radius-xs: 3px;
  --bm-radius-sm: 5px;
  --bm-radius-md: 8px;
  --bm-radius-lg: 12px;
  --bm-radius-xl: 18px;
  --bm-radius-pill: 999px;
  --bm-shadow-xs: 0 1px 2px rgba(26, 22, 17, 0.06);
  --bm-shadow-sm: 0 2px 8px -2px rgba(26, 22, 17, 0.12);
  --bm-shadow-md: 0 8px 20px -6px rgba(26, 22, 17, 0.16);
  --bm-shadow-lg: 0 18px 44px -14px rgba(26, 22, 17, 0.2);
  --bm-z-dropdown: 1000;
  --bm-z-toast: 1400;
  --bm-z-tooltip: 1500;
  --bm-dur-fast: 120ms;
  --bm-dur-base: 160ms;
  --bm-dur-moderate: 220ms;
  --bm-ease-standard: cubic-bezier(0.2, 0.6, 0.2, 1);
  --bm-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* The cabinet's chrome (top bar, navigation) stays iron in both themes. */
  --tb-chrome: var(--bm-iron);
  --tb-chrome-2: var(--bm-ink-2);
  --tb-on-chrome: var(--bm-ivory);
  --tb-on-chrome-soft: rgba(243, 238, 228, 0.72);
  --tb-chrome-accent: var(--bm-brass-hi);
  /* Conversation surfaces. */
  --tb-chat-bg: #efe9dc;
  --tb-bubble-in: var(--bm-field);
  --tb-bubble-out: color-mix(in srgb, var(--bm-brass) 20%, var(--bm-surface));
  --tb-tick: rgba(26, 22, 17, 0.6);
  --tb-tick-read: var(--bm-info);
  --tb-bubble-shadow: 0 1px 0.5px rgba(26, 22, 17, 0.12);
  /* Over a photo, and the photo opened large: light ink on iron in both
     themes. The strengths are local; the colours are these two. */
  --tb-photo-ink: var(--bm-ivory);
  --tb-photo-ground: #0e0b08;
  /* A number's identity: the dot beside its name. A palette of its own,
     apart from every status hue (good, warn, caution, info, brass), so a
     number never reads as «online» or «error». */
  --tb-id-1: #3a62ad;
  --tb-id-2: #94489c;
  --tb-id-3: #6f7520;
  --tb-id-4: #5a52b5;
  --tb-id-5: #b0436f;
  /* A contact's tags (docs/BOOK.md): a palette of their own, six main colours
     and six additional ones, each 5.4 ΔE or more from every status ink and
     from brass. 1 Кобальт, 2 Корица, 3 Бирюза, 4 Малина, 5 Олива, 6 Фиалка, 7 Лазурь, 
     8 Хаки, 9 Слива, 10 Нефрит, 11 Коралл, 12 Индиго. */
  --tb-tag-1: #3f6ba3;
  --tb-tag-2: #6d3f02;
  --tb-tag-3: #008070;
  --tb-tag-4: #802e53;
  --tb-tag-5: #786f01;
  --tb-tag-6: #53408b;
  --tb-tag-7: #187a91;
  --tb-tag-8: #605b02;
  --tb-tag-9: #703573;
  --tb-tag-10: #287245;
  --tb-tag-11: #b25165;
  --tb-tag-12: #4a56a2;
  --tb-tag-wash: 16%;
  --tb-tag-edge: 40%;
  --tb-tag-ink: 70%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bm-bg: var(--bm-iron);
    --bm-surface: #221d16;
    --bm-raised: #2d2822;
    --bm-field: #171310;
    --bm-track: rgba(243, 238, 228, 0.12);
    --bm-scrim: rgba(8, 6, 4, 0.62);
    --bm-border: rgba(243, 238, 228, 0.14);
    --bm-border-strong: rgba(243, 238, 228, 0.3);
    --bm-control-border: rgba(243, 238, 228, 0.44);
    --bm-text: var(--bm-ivory);
    --bm-text-soft: rgba(243, 238, 228, 0.68);
    --bm-text-faint: rgba(243, 238, 228, 0.4);
    --bm-inverse: var(--bm-ivory);
    --bm-on-inverse: var(--bm-iron);
    --bm-accent: var(--bm-brass-hi);
    --bm-accent-ink: var(--bm-brass-hi);
    --bm-focus: var(--bm-brass-hi);
    --bm-good-ink: #8fcb9b;
    --bm-pending-ink: #93a0ad;
    --bm-warn-ink: #d98a7e;
    --bm-caution-ink: #e0a94e;
    --bm-info-ink: #6fb0b2;
    --bm-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --bm-shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.4);
    --bm-shadow-md: 0 8px 20px -6px rgba(0, 0, 0, 0.5);
    --bm-shadow-lg: 0 18px 44px -14px rgba(0, 0, 0, 0.55);
    --tb-chrome: #120f0b;
    --tb-chrome-2: #2a241c;
    --tb-chat-bg: #15120e;
    --tb-bubble-in: #2a241d;
    --tb-bubble-out: color-mix(in srgb, var(--bm-brass) 22%, #221d16);
    --tb-tick: rgba(243, 238, 228, 0.62);
    --tb-tick-read: #6fb0b2;
    --tb-bubble-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.3);
    --tb-id-1: #8eaaea;
    --tb-id-2: #d395d6;
    --tb-id-3: #c3c66b;
    --tb-id-4: #a6a1f0;
    --tb-id-5: #ec8fb4;
    --tb-tag-1: #99caff;
    --tb-tag-2: #e88f5a;
    --tb-tag-3: #6ddac1;
    --tb-tag-4: #d981ac;
    --tb-tag-5: #c5cc76;
    --tb-tag-6: #a293e7;
    --tb-tag-7: #3bbed1;
    --tb-tag-8: #adb67f;
    --tb-tag-9: #da9ce3;
    --tb-tag-10: #76a982;
    --tb-tag-11: #f793a8;
    --tb-tag-12: #8ab2ff;
    --tb-tag-ink: 80%;
  }
}
