/* CRM library, file 4 of 7: controls. Loaded after lib/chip.css, before lib/surface.css and app.css.

   Belongs here: what a person clicks that is not a ds button. The crm-icon-btn family with its sizes and touch area, crm-reveal
   (shown on hover of its row, always on touch), crm-searchbox, the interactive filter chip crm-chip in one selected style, the
   segmented control (crm-seg), the toolbar that holds them (crm-toolbar), the round actions with a label (crm-action in a
   crm-action-bar) and the dock of a phone (crm-dock).

   Contract: a base rule is ONE class, a modifier two, descendant parts go inside :where(); no id, no @layer, and an element selector
   only in a bridge rule (`.ds .crm-searchbox > input`), marked with a comment that starts with the word bridge. State is styled on
   .on as well as on aria-pressed and aria-checked; sizes come from the control tokens, a per-component value is a --k-* knob.
   Every control here is a button, a link or a field, so it gets the focus ring of lib/base.css (2px --blue, 2px outside) or the
   ring of a ds field; where a control clips that ring (crm-seg) it draws it inside.

   The builders are in public/app/components/controls.js: iconButton(), searchField(), chipButton(), segmented(), toolbar(), labelled(),
   stepper(), actionButton(), actionBar(), dockBar(). */

/* ── Icon buttons ────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   A button that is one icon: crm-icon-btn in four sizes on one scale (--crm-ib-xs 1.5rem, sm 1.75rem, md 2rem, lg 2.5rem), the
   icon always 0.6 of the button. It has a name (aria-label) and, on a coarse pointer, a touch area of --crm-hit around it that
   does not move the layout. Words next to crm-icon-btn: xs | sm | lg, danger, on (or aria-pressed) for a toggle that is on.
   The aliases are the older names of the same button: crm-copy, crm-wa and crm-field-edit are xs and square, crm-card-toggle and
   crm-view-more are sm, crm-view-add is md. */
.crm-icon-btn, .crm-copy, .crm-wa, .crm-field-edit, .crm-card-toggle, .crm-view-more, .crm-view-add {
  --k-ib: var(--crm-ib-md);
  position: relative; display: inline-grid; place-items: center; flex: none; width: var(--k-ib); height: var(--k-ib);
  border-radius: var(--crm-radius-pill); color: var(--muted);
}
.crm-icon-btn.xs, .crm-copy, .crm-wa, .crm-field-edit { --k-ib: var(--crm-ib-xs); border-radius: var(--crm-radius-ctl); }
.crm-icon-btn.sm, .crm-card-toggle, .crm-view-more { --k-ib: var(--crm-ib-sm); }
.crm-icon-btn.lg { --k-ib: var(--crm-ib-lg); }
.crm-icon-btn:hover, .crm-copy:hover, .crm-wa:hover, .crm-field-edit:hover, .crm-card-toggle:hover, .crm-view-more:hover, .crm-view-add:hover { background: var(--surface-2); color: var(--ink); }
.crm-icon-btn.on, .crm-icon-btn[aria-pressed="true"] { background: var(--crm-surface-selected); color: var(--crm-info-ink); }
.crm-icon-btn.danger:where(:hover) { background: var(--coral-soft); color: var(--crm-bad-ink); }
.crm-icon-btn:disabled { background: none; color: var(--muted); opacity: .45; cursor: not-allowed; }
:where(.crm-icon-btn, .crm-copy, .crm-field-edit, .crm-card-toggle, .crm-view-more, .crm-view-add) > .ms { font-size: calc(var(--k-ib) * .6); }
/* bridge: an icon button that is a link (iconButton({ href })): `.ds a` colours every link blue and weighs a class and an element,
   so the link takes the muted ink back */
.ds a.crm-icon-btn { color: var(--muted); }
/* bridge: and under the pointer the ink of .crm-icon-btn:hover, which the rule above outweighs */
.ds a.crm-icon-btn:where(:hover) { color: var(--ink); }
/* the touch area: as large as the button with a mouse (--crm-hit is 0), 2.75rem around its centre on a coarse pointer */
:where(.crm-icon-btn, .crm-copy, .crm-wa, .crm-field-edit, .crm-card-toggle, .crm-view-more, .crm-view-add)::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: max(100%, var(--crm-hit)); height: max(100%, var(--crm-hit)); transform: translate(-50%, -50%);
}
/* two icon buttons side by side on a coarse pointer: the second moves over by what the touch areas are larger than the buttons, so
   the areas never overlap and a thumb on the cross of a dialog does not open the page next to it (review 12-11) */
@media (pointer: coarse) {
  :where(.crm-icon-btn, .crm-copy, .crm-wa) + :where(.crm-icon-btn, .crm-copy, .crm-wa) { margin-inline-start: max(0rem, calc(var(--crm-hit) - var(--k-ib, var(--crm-ib-md)))); }
}

/* ── Admin-only actions (18-11-2026) ────────────────────────────────────────────────────────────────────────────────────────────
   An action only admins (or admins and marketing) have: Marley, "kunnen we een kleur uitkiezen voor admin acties zodat je als admin
   direct ziet dat enkel admins op bepaalde knoppen kunnen drukken?". The builders mark it (admin: true or 'marketing' on iconButton,
   toolButton, the actions of createCard and the items of openMenu; markAdmin() of components/admin.js on a ds button of a page) with the
   class crm-admin, and it says so three ways, never the colour alone: the ink of --crm-admin on its soft field (lib/tokens.css, both
   themes), a shield (crm-admin-mark, shield_person, after the label or on the corner of an icon button) and the tooltip "Alleen
   beheerders", which a screen reader hears with the name (in the aria-label, or as the hidden text crm-admin-say).
   Hidden text is pinned to the top left of what holds it (inset: 0 auto auto 0, lint hidden-text): out of the flow without a place of
   its own it lay where its row lay, outside every scroll box, and the Toewijzen of fifty leads gave the whole page a scrollbar both
   ways (Marley 18-11-2026: "opeens een grote horizontale overflow scrollbar"). */
.crm-admin-mark { flex: none; color: var(--crm-admin); font-size: var(--crm-icon-xs); }
.crm-admin-mark::before { content: 'shield_person'; }
.crm-admin-say { position: absolute; inset: 0 auto auto 0; width: .0625rem; height: .0625rem; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.crm-icon-btn.crm-admin { background: var(--crm-admin-soft); color: var(--crm-admin); }
.crm-icon-btn.crm-admin:where(:hover) { box-shadow: inset 0 0 0 .0625rem var(--crm-admin); }
/* on an icon button the shield sits on its corner, so the button keeps its size and its icon */
:where(.crm-icon-btn) > .crm-admin-mark { position: absolute; inset-block-start: calc(var(--k-ib) * -.22); inset-inline-end: calc(var(--k-ib) * -.22); font-size: calc(var(--k-ib) * .5); }
/* a ds button (toolButton, a page's button through markAdmin): .ds .btn colours it with two classes, so this weighs two as well */
.ds .crm-admin:where(.btn) { border-color: var(--crm-admin); color: var(--crm-admin); }

/* ── Reveal ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   A control that only shows when its row is pointed at (crm-reveal inside a crm-reveal-host). It also shows when it has the
   focus, while its menu is open (aria-expanded) or it is on, and always where there is no hover (touch): a control nobody can
   find is no control. The aliases are the controls and the rows that did this each with rules of their own. */
.crm-reveal, .crm-field-edit, .crm-assoc-more, .crm-cal-add { opacity: 0; transition: opacity var(--crm-dur-fast); }
:where(.crm-reveal-host, .crm-field, .crm-props-row, .crm-assoc-entry, .crm-cal-day):hover :where(.crm-reveal, .crm-field-edit, .crm-assoc-more, .crm-cal-add),
.crm-reveal:focus-visible, .crm-field-edit:focus-visible, .crm-assoc-more:focus-visible, .crm-cal-add:focus-visible,
.crm-reveal[aria-expanded="true"], .crm-assoc-more[aria-expanded="true"], .crm-reveal.on { opacity: 1; }
@media (hover: none) { .crm-reveal, .crm-field-edit, .crm-assoc-more, .crm-cal-add { opacity: 1; } }

/* ── Search box ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   The search field of a toolbar: a pill of one control height with the glass in it, 17rem wide (wide: 24rem, where the search is
   what the page is for) and the full row on a phone.
   The glass is decoration; the field has its name as aria-label. The class a page knew
   its input by stays on the input as a hook. */
.crm-searchbox { position: relative; display: flex; flex: 0 1 17rem; min-width: min(100%, 11rem); }
.crm-searchbox.wide { flex-basis: 24rem; }
:where(.crm-searchbox) > .ms { position: absolute; left: var(--sp-4); top: 50%; transform: translateY(-50%); color: var(--faint); font-size: var(--crm-icon-sm); pointer-events: none; }
/* bridge: (0,2,1), heavier than `.ds input`, which makes every input a field with its own padding and corners */
.ds .crm-searchbox > input { width: 100%; height: var(--crm-ctl-h); padding: 0 var(--sp-4) 0 2.4rem; border-radius: var(--crm-radius-pill); font-size: var(--crm-fs-input); appearance: none; }
/* bridge: the cross of the browser is not drawn */
.ds .crm-searchbox > input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
@media (width < 48rem) { .crm-searchbox { flex: 1 1 100%; } }

/* ── Filter chip ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   crm-chip is a button that filters or toggles: it opens a popover (aria-expanded), or it is on or off (aria-pressed, or the word
   on). One control height; sm for a row of filters inside a card; multi for a chip that holds a sentence. There is ONE selected
   look: the soft blue with a readable ink (5.9:1 light, 7.1:1 dark). A static label is a crm-badge (lib/chip.css), not this.
   A toggle that is on also shows a check mark (crm-chip-check) where its icon stood: the two fills differ 1.1:1, so the colour
   alone says nothing to who does not see it. A chip with a choice made (on) shows its value in bold.
   Parts: an icon, crm-chip-label, crm-chip-value (bold, shortens), a count (.n). A chip that is on can sit in a crm-chip-group
   with a crm-chip-x that clears it. crm-journey-filter is the older name of the small chip. */
.crm-chip, .crm-journey-filter {
  --k-h: var(--crm-ctl-h);
  position: relative; display: inline-flex; align-items: center; gap: var(--sp-1); box-sizing: border-box; max-width: 100%; height: var(--k-h); padding: 0 var(--sp-3) 0 var(--sp-4);
  border: 1px solid var(--line-strong); border-radius: var(--crm-radius-pill); background: var(--surface); color: var(--ink);
  font-size: var(--fs-sm); font-weight: var(--crm-fw-medium); white-space: nowrap; cursor: pointer;
}
.crm-chip:hover, .crm-journey-filter:hover { background: var(--surface-2); }
.crm-chip[aria-expanded="true"] { border-color: var(--blue); }
.crm-chip.on, .crm-chip[aria-pressed="true"], .crm-journey-filter[aria-pressed="true"] { border-color: transparent; background: var(--crm-surface-selected); color: var(--crm-info-ink); }
.crm-chip.sm, .crm-journey-filter { --k-h: var(--crm-ctl-h-sm); padding: 0 var(--sp-3); }
.crm-chip.multi { height: auto; min-height: var(--k-h); padding-block: var(--sp-1); white-space: normal; text-align: left; }
.crm-chip:disabled { opacity: .45; cursor: not-allowed; }
:where(.crm-chip, .crm-journey-filter) > .ms { flex: none; font-size: var(--crm-icon-sm); }
/* the check mark of a toggle: in the chip from the start (an empty Material Symbol, the glyph is written here so the text of the
   chip stays its label), shown while it is on, and the icon of the chip makes room for it */
.crm-chip-check { display: none; }
.crm-chip-check::before { content: 'check'; }
.crm-chip[aria-pressed="true"] > :where(.crm-chip-check), .crm-journey-filter[aria-pressed="true"] > :where(.crm-chip-check) { display: inline-block; }
.crm-chip[aria-pressed="true"] > :where(.crm-chip-check ~ .ms:not(.crm-chip-caret)) { display: none; }
:where(.crm-chip, .crm-journey-filter) > :where(.n) { color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
:where(.crm-chip.on, .crm-chip[aria-pressed="true"], .crm-journey-filter[aria-pressed="true"]) > :where(.n) { color: inherit; }
/* the small chip keeps a touch area of --crm-hit in height on a coarse pointer */
:where(.crm-chip.sm, .crm-journey-filter)::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: max(100%, var(--crm-hit)); transform: translateY(-50%); }
.crm-chip-label { flex: none; }
.crm-chip-value { min-width: 0; max-width: 14rem; overflow: hidden; font-weight: var(--crm-fw-bold); text-overflow: ellipsis; }
.crm-chip-group { display: inline-flex; align-items: center; max-width: 100%; }
:where(.crm-chip-group) > .crm-chip.on { padding-right: var(--sp-2); border-top-right-radius: 0; border-bottom-right-radius: 0; }
.crm-chip-x { display: inline-grid; place-items: center; align-self: stretch; padding: 0 var(--sp-3); border-radius: 0 var(--crm-radius-pill) var(--crm-radius-pill) 0; background: var(--crm-surface-selected); color: var(--crm-info-ink); }
.crm-chip-x:hover { background: var(--line); }
:where(.crm-chip-x) > .ms { font-size: var(--crm-icon-xs); }

/* ── Segmented control ───────────────────────────────────────────────────────────────────────────────────────────────────────────
   crm-seg is a switch between a few fixed choices of which one is on (Lijst | Bord, Alle | Opt-in | Opt-out): a radiogroup of
   radios (aria-checked) or a group of toggles (aria-pressed), the word on next to either. One control height, border included.
   An item of one icon carries the word icon and a name (aria-label). In a toolbar it is the last thing at the right edge, where
   it stays whatever else appears (toolbar({ fixed })). The chosen item is white on the blue solid (5.2:1 light, 4.7:1 dark; on
   --blue it was 3.7:1 in dark). The focus ring is drawn inside the item, white on the chosen one: the pill clips what is outside. */
.crm-seg { display: inline-flex; flex: none; flex-wrap: wrap; box-sizing: border-box; max-width: 100%; min-height: var(--crm-ctl-h); overflow: hidden; border: 1px solid var(--line-strong); border-radius: var(--crm-radius-pill); background: var(--surface); }
.crm-seg-item {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-1); padding: 0 var(--sp-4);
  border-right: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); font-weight: var(--crm-fw-medium); white-space: nowrap; cursor: pointer;
}
.crm-seg-item.icon { padding: 0 var(--sp-3); }
.crm-seg-item:first-child { border-radius: var(--crm-radius-pill) 0 0 var(--crm-radius-pill); }
.crm-seg-item:last-child { border-right: 0; border-radius: 0 var(--crm-radius-pill) var(--crm-radius-pill) 0; }
.crm-seg-item:hover { background: var(--surface-2); color: var(--ink); }
.crm-seg-item.on, .crm-seg-item[aria-pressed="true"], .crm-seg-item[aria-checked="true"] { background: var(--crm-chosen); color: var(--crm-on-solid); }
.crm-seg-item:disabled { background: none; color: var(--muted); opacity: .4; cursor: not-allowed; }
.crm-seg-item:focus-visible { outline-offset: calc(2px * -1); }
.crm-seg-item.on:where(:focus-visible), .crm-seg-item[aria-pressed="true"]:where(:focus-visible), .crm-seg-item[aria-checked="true"]:where(:focus-visible) { outline-color: var(--crm-on-solid); }
:where(.crm-seg-item) > .ms { font-size: var(--crm-icon-sm); }
/* tiles: the same choice as tiles of one width that fill the row (the days of the dashboard, 13-11-2026, after the day picker of the
   BA app): each its label over a small mono line (crm-seg-sub, the day number), on the sunken surface; the chosen one is white on
   the blue solid like the chosen item of the pill, its small line too. Later than the pill and as heavy, so it wins on every state. */
.crm-seg.tiles { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: var(--sp-2); min-height: 0; overflow: visible; border: 0; border-radius: 0; background: none; }
.crm-seg.tiles > :where(.crm-seg-item) { flex-direction: column; gap: var(--sp-0); min-width: 0; padding: var(--sp-2) var(--sp-1); border: 0; border-radius: var(--crm-radius-box);
  background: var(--crm-surface-sunken); color: var(--ink); font-size: var(--fs-md); font-weight: var(--crm-fw-semibold); line-height: 1.2; }
.crm-seg.tiles > :where(.crm-seg-item:hover) { background: var(--line); }
.crm-seg.tiles > :where(.crm-seg-item.on, .crm-seg-item[aria-pressed="true"], .crm-seg-item[aria-checked="true"]) { background: var(--crm-chosen); color: var(--crm-on-solid); }
.crm-seg-sub { color: var(--muted); font-family: var(--crm-font-mono); font-size: var(--fs-2xs); font-weight: var(--crm-fw-medium); letter-spacing: var(--crm-track-caps); text-transform: uppercase; }
.crm-seg-item:where(.on, [aria-pressed="true"], [aria-checked="true"]) > .crm-seg-sub { color: inherit; }

/* ── Toolbar ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   The row above a table or a list: crm-toolbar-main at the left (search, filters; it wraps), crm-toolbar-end at the right
   (buttons, and last of all a fixed switch). Every control in it is one height (--crm-ctl-h): the search box, a filter chip, a
   segmented control, a select of the hub and a button, btn-sm included. Without side padding it lines up with the page; inset
   is the toolbar inside a card that has no padding of its own (a list). What stands in it is centred on one line (a text next to a
   select); in the list toolbar, whose main runs over several rows of chips, the end stays at the top. When the end no longer fits
   next to the main it drops under it, at the right. crm-page-toolbar and crm-ac-toolbar are older names. */
.crm-toolbar, .crm-page-toolbar, .crm-ac-toolbar { --k-gap: var(--sp-3); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--k-gap) var(--sp-4); padding: var(--sp-4) 0; container-type: inline-size; }
.crm-toolbar.inset { flex: none; align-items: flex-start; padding: var(--sp-4) var(--crm-pad-x); }
.crm-toolbar-main { display: flex; flex: 1 1 0%; flex-wrap: wrap; align-items: center; gap: var(--k-gap, var(--sp-3)); min-width: min(100%, 11rem); }
.crm-toolbar-main:empty { display: none; }
.crm-toolbar-end { display: flex; flex: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--k-gap, var(--sp-3)); max-width: 100%; margin-left: auto; }
:where(.crm-toolbar-main, .crm-toolbar-end) > .btn { min-height: var(--crm-ctl-h); }
/* One row where it fits (18-11-2026, Marley: search and Exporteren on one row, Kolommen alone on the next, the weeks on a third): the
   search of a toolbar narrower than 48rem gives way before anything wraps (from 17rem, or 24rem when wide, down to 11rem; in a wider
   one it keeps its width and a row of filters wraps, so its placeholder is not cut), and in a toolbar narrower than 40rem (a card in
   the middle column of a record) the buttons of the end keep their icon and drop their label (toolButton(): the label is still their
   name and their tooltip). The toolbar is a container for that (inline-size: no stacking context, no containing block, tested in
   Chrome 157); only what is in it asks for its width. */
@container (width < 48rem) { :where(.crm-toolbar-main) > .crm-searchbox { flex: 1 1 11rem; max-width: 17rem; } :where(.crm-toolbar-main) > .crm-searchbox.wide { max-width: 24rem; } }
@container (width < 40rem) { :where(.crm-toolbar-end) .crm-tool-text { display: none; } }
/* on a phone the main takes the whole row and the end stands under it, at the right: next to the end the main was squeezed to its
   least width, with every filter on a line of its own and the search too narrow for its placeholder */
@media (width < 48rem) { .crm-toolbar.inset { padding: var(--sp-4); } .crm-toolbar-main { flex-basis: 100%; } :where(.crm-toolbar-main) > .crm-searchbox, :where(.crm-toolbar-main) > .crm-searchbox.wide { flex-basis: 100%; max-width: none; } }
/* a control with its name in front of it (labelled()): "Van wie [Mijn taken]" */
.crm-labelled { display: inline-flex; align-items: center; gap: var(--sp-2); min-width: 0; color: var(--muted); font-size: var(--fs-sm); }
.crm-labelled-text { flex: none; white-space: nowrap; }

/* ── Saved views ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   The button Weergaven of a screen with a table (viewsButton(), components/saved-views.js, 13-11-2026): a btn-sm in the fixed part of
   the toolbar, so it never moves, with the name of the view that is open cut off at --k-max (the full name is its title and its name);
   on, a view is open: the selected look of a chip, the info ink on --crm-surface-selected (5,9 / 7,1). The menu it opens is crm-menu. */
.crm-saved-views { --k-max: 12rem; display: inline-flex; align-items: center; gap: var(--sp-1); max-width: 100%; }
.crm-saved-views.on { border-color: var(--crm-hue-blue); background: var(--crm-surface-selected); color: var(--crm-info-ink); }
:where(.crm-saved-views) :where(.crm-saved-views-name) { overflow: hidden; max-width: var(--k-max); text-overflow: ellipsis; white-space: nowrap; }

/* ── Steps ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   The way through a flow of a few steps (stepper(), 18-11-2026, the campaign: E-mail, Ontvangers, Test, Versturen): crm-steps is a
   nav with an ordered list, one column per step, and every step (crm-step, a button when the page lets a person go there) is a bar
   on top, its mark (the number, a check or an icon of its own), its title and a line under it that says how it stands. The state is a
   tone word on the step from the tone table of lib/chip.css (ok: done, the mark a check; warn: needs a look, the mark its icon; bad)
   and never the colour alone: the mark changes its glyph and the line says it in words. The step that is open is aria-current="step":
   its bar and its mark the chosen solid with white in it (5.2:1 light, 4.7:1 dark), its title bold. It is a container: in a box under
   40rem (a phone) a step is its mark over its title and the line under it drops; the title is cut off before anything scrolls. */
:where(.crm-step) { --k-ink: var(--muted); --k-bg: var(--surface-2); --k-accent: var(--line-strong); --k-solid: var(--crm-hue-slate-solid); --k-line: var(--line); }
.crm-steps { container-type: inline-size; min-width: 0; }
.crm-steps-list { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.crm-step { display: flex; align-items: flex-start; gap: var(--sp-3); box-sizing: border-box; width: 100%; height: 100%; min-width: 0; padding: var(--sp-3) var(--sp-2) var(--sp-2) 0;
  border-top: .1875rem solid var(--k-accent); color: var(--ink); text-align: left; }
.crm-step:where(button):hover { background: linear-gradient(var(--surface-2), transparent); }
.crm-step[aria-current="step"] { --k-accent: var(--crm-chosen); --k-bg: var(--crm-chosen); --k-ink: var(--crm-on-solid); }
.crm-step-mark { display: inline-grid; place-items: center; flex: none; width: var(--crm-ib-sm); height: var(--crm-ib-sm); border-radius: var(--pill); background: var(--k-bg); color: var(--k-ink); font-size: var(--fs-sm); font-weight: var(--crm-fw-semibold); }
:where(.crm-step-mark) > .ms { font-size: var(--crm-icon-sm); }
.crm-step-text { display: flex; flex-direction: column; min-width: 0; padding-top: .125rem; }
.crm-step-title { overflow: hidden; font-weight: var(--crm-fw-medium); text-overflow: ellipsis; white-space: nowrap; }
:where(.crm-step[aria-current="step"]) :where(.crm-step-title) { font-weight: var(--crm-fw-bold); }
.crm-step-sub { overflow: hidden; color: var(--muted); font-size: var(--fs-xs); text-overflow: ellipsis; white-space: nowrap; }
/* what needs a look says so in the ink of its tone too (not on the open step: there the tone is the chosen solid) */
:where(.crm-step:not([aria-current="step"])):where(.warn, .bad) .crm-step-sub { color: var(--k-ink); }
@container (width < 40rem) {
  .crm-step { flex-direction: column; align-items: center; gap: var(--sp-1); padding: var(--sp-2) 0 0; text-align: center; }
  :where(.crm-step-text) { max-width: 100%; padding: 0; font-size: var(--fs-xs); }
  :where(.crm-step-text) > :where(.crm-step-sub) { display: none; }
}

/* ── Actions ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   The round actions of a contact card (Bellen, WhatsApp, Mail, Notitie, Taak; the quick view, 12-11-2026): crm-action is a link or a
   button that is a disc (crm-action-disc, 2.75rem: a touch target by itself) with the icon, and its label in words under it
   (crm-action-label, which is also its name). The disc takes the tone table of lib/chip.css: neutral by default (the ink on
   --surface-2), info, ok, warn, bad or violet as a word next to crm-action (the ink of the tone on its soft fill, 4.6:1 or more).
   The label says what it does, so the colour only helps the eye. crm-action-bar is the row: one line, that wraps on a narrow screen. */
:where(.crm-action) { --k-ink: var(--ink); --k-bg: var(--surface-2); --k-accent: var(--line-strong); --k-solid: var(--crm-hue-slate-solid); --k-line: var(--line); }
.crm-action-bar { --k-gap: var(--sp-2); display: flex; flex-wrap: wrap; gap: var(--k-gap); min-width: 0; }
.crm-action { display: inline-flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: var(--sp-1); min-width: 4.25rem; padding: var(--sp-1); border-radius: var(--crm-radius-box); text-decoration: none; cursor: pointer; }
.crm-action-disc { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--k-line); border-radius: var(--pill); background: var(--k-bg); color: var(--k-ink); transition: box-shadow var(--crm-dur-fast); }
:where(.crm-action-disc) > .ms { font-size: var(--crm-icon-md); }
.crm-action:hover > :where(.crm-action-disc) { box-shadow: inset 0 0 0 .125rem var(--k-accent); }
.crm-action-label { color: var(--ink); font-size: var(--fs-xs); font-weight: var(--crm-fw-medium); line-height: 1.2; text-align: center; white-space: nowrap; }
/* on a phone the actions share one row in equal parts (five did not fit 4.25rem each on a screen of 390: Taak went to a row of its own) */
@media (width < 40rem) { .crm-action-bar > :where(.crm-action) { flex: 1 1 0; min-width: 0; } }

/* ── Dock ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   The bar of a phone at the bottom of the screen (Marley 12-11-2026: Bedrijven, Deals, Taken, Zoeken, Menu): crm-dock is a row of
   crm-dock-item, each a link or a button the width of its column and --crm-dock-h high (a touch target of more than 2.75rem), with
   its icon on a pill (crm-dock-icon) above its label (crm-dock-label, which is also its name). The page that is open is
   aria-current="page", a button whose panel is open aria-expanded="true": the icon fills, its pill takes the selected surface and
   the label goes bold, so it is not said with colour alone (the ink of the selected surface is 5.9:1 light, 7.1:1 dark). One item is
   lit at a time: while the search or the drawer is open, the page under it is not. .bottom
   docks it to the bottom edge of a phone, over the safe area of the screen, and hides it from 48rem up; the frame gives the content,
   and the toasts --crm-foot-clear of room above it (lib/tokens.css). It lies under the drawer, its scrim, a popover and
   a dialog. Built with dockBar() of components/controls.js. */
.crm-dock { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; min-width: 0; background: var(--crm-surface-float); border-top: 1px solid var(--line); }
.crm-dock.bottom { position: fixed; inset: auto 0 0; z-index: var(--crm-z-top); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
@media (width >= 48rem) { .crm-dock.bottom { display: none; } }
.crm-dock-item { --k-ink: var(--muted); --k-bg: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .125rem;
  min-width: 0; min-height: var(--crm-dock-h); padding: var(--sp-1); text-decoration: none; }
.crm-dock-item:where(:hover) { --k-ink: var(--ink); }
.crm-dock-item:where([aria-expanded="true"], .crm-dock:not(:has(> [aria-expanded="true"])) > [aria-current="page"]) { --k-ink: var(--crm-info-ink); --k-bg: var(--crm-surface-selected); }
:where(.crm-dock-item) > :where(.crm-dock-icon) { display: grid; place-items: center; width: 3.5rem; height: 2rem; border-radius: var(--pill); background: var(--k-bg); color: var(--k-ink); transition: background var(--crm-dur-fast); }
:where(.crm-dock-icon) > .ms { font-size: var(--crm-icon-lg); }
:where(.crm-dock-item[aria-expanded="true"], .crm-dock:not(:has(> [aria-expanded="true"])) > .crm-dock-item[aria-current="page"]) > :where(.crm-dock-icon) > .ms { font-variation-settings: 'FILL' 1; }
:where(.crm-dock-item) > :where(.crm-dock-label) { max-width: 100%; overflow: hidden; color: var(--k-ink); font-size: var(--fs-xs); font-weight: var(--crm-fw-medium); line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
:where(.crm-dock-item[aria-expanded="true"], .crm-dock:not(:has(> [aria-expanded="true"])) > .crm-dock-item[aria-current="page"]) > :where(.crm-dock-label) { font-weight: var(--crm-fw-bold); }
/* The middle of the dock (Dashboard, 13-11-2026): a bigger circle that rises above the bar, set off from the page by a ring of the
   bar's surface. It follows the states of the other items in its own way (Marley 14-11-2026: the lit look had a second blue ring
   around the circle): resting it is grey with a muted icon like the other items (only one item is lit at a time, a soft blue circle
   next to a lit Deals read as two), lit it is the solid blue with the white filled icon and a little lift; the label goes blue and
   bold like any lit item, so the state is not said by colour alone. */
.crm-dock-item.center { --k-bg: var(--surface-2); --k-on: var(--muted); --k-lift: 0 0 transparent; }
.crm-dock-item.center:where([aria-expanded="true"], .crm-dock:not(:has(> [aria-expanded="true"])) > [aria-current="page"]) { --k-bg: var(--crm-hue-blue-solid); --k-on: var(--crm-on-solid); --k-lift: var(--crm-elev-raised); }
.crm-dock-item.center > :where(.crm-dock-icon) { width: 3.5rem; height: 3.5rem; margin-top: -1.5rem; border-radius: 50%; color: var(--k-on); box-shadow: 0 0 0 .25rem var(--crm-surface-float), var(--k-lift); }
