/* Bartix CRM — UI v4 tokens. The only place raw values live (ported from drafts/ui-v4).
   data-fs on <html> = the user's text size, per device: 14 (Mały — the floor, D20) · 15 (Zwykły) ·
   17 (Większy) · 20 (Największy) — D7. Everything is rem, so the whole interface grows with it.
   data-density="compact" = „Odstępy: Zwarte" (D21): one lower control height, smaller tags, a
   narrower gutter; app.css tightens the rows and gaps that are not tokens.

   Rules the stylesheet follows (drafts/ui-v4/NOTES.md, „The system"):
   - one control height (--ctl) for buttons, inputs, tabs, nav rows, menu rows, attachment chips
   - three buttons: .primary (filled), default (outlined), .plain (no border); a frame only
     where you type — the toolbar's buttons and attachment chips are plain (round 4)
   - a tag is not a button: one shape, --tag high, filled, never outlined
   - colour roles: --action = press / type here · selected = one step off the surface + a
     black edge (sidebar, the open row), --ink fill for the kinds bar · --mark = waiting on us ·
     --danger = urgent or overdue · --ink-3 = the second layer of text (meta, signatures, quotes)
   - weights: 400 text · 500 what you press or what is selected · 700 titles, unread and a
     message's sender */

:root {
  --font: "Roboto", "Segoe UI", system-ui, sans-serif;

  --t-sm: max(14px, .9375rem); /* meta, summaries, tags. Nothing smaller. */
  --t-base: 1rem;              /* 15px at Zwykły */
  --t-read: 1.0625rem;         /* message bodies, names */
  --t-title: 1.25rem;          /* a section's title: a window's, an empty state's, a form's */
  --t-page: 1.5rem;            /* page title, a conversation's subject (round 4, R2) */

  --sheet: #FFFFFF;
  --side-bg: #EFEFEF;
  --fill: #F0F1F2;         /* quiet fill: our own messages, tags, notices */
  --hover: #ECEDEE;
  --selected: #E3E5E8;

  --ink: #15181C;
  --ink-2: #3B4148;
  --ink-3: #5C636C;

  --line: #D8DADD;
  --line-strong: #8F959D;   /* control borders: an input looks like an input */

  --action: #1750A8;
  --action-hover: #0F3F8A;
  --mark: #FFD43B;
  --danger: #B4261B;
  --ok: #1B7742;

  --ctl: max(40px, 2.5rem);    /* every control: 40px at Zwykły, grows with the text */
  --tag: max(24px, 1.5rem);    /* every tag and count */
  --r: 8px;
  --r-tag: 6px;
  --pad: 1.5rem;               /* page gutter */
  --side-w: 13.25rem;
  --banner: 0px;               /* the dry-run strip, when the server is in MAIL_DRYRUN */
}

html[data-density="compact"] {
  --ctl: max(34px, 2.125rem);  /* every control: 34px at Zwykły and Mały */
  --tag: max(22px, 1.375rem);
  --pad: 1rem;
}

html { font-size: 15px; }
html[data-fs="14"] { font-size: 14px; }
html[data-fs="17"] { font-size: 17px; }
html[data-fs="20"] { font-size: 20px; }
