/* ==========================================================================
   IRD360 interface: tokens, shell and shared components.

   Light and airy: a white side menu, a soft cool-grey work area and white
   cards with gentle shadows. The brand colour (navy) marks what matters most:
   the primary button, the current menu item and the key numbers. One orange
   means only "waiting on you". Each menu area has its own hue (documents
   blue, workflow teal, external requests plum, certified copies green,
   administration violet): the page's title tile, menu icons, key numbers,
   section tiles and table heads take the hue of the area they belong to.

   Loaded after tailwind.css by the staff shell (templates/base.html) and the
   sign-in pages, so a component class here wins a tie with a Tailwind utility.
   Everything is prefixed ird- except the shell hooks other templates and tests
   already rely on (app-sidebar, app-main, sidebar-*, mobile-overlay).

   Brand colours are set per request in base.html from Branding settings:
     --brand-primary, --brand-primary-rgb, --brand-on-primary,
     --brand-on-primary-muted, --brand-wait-on-primary, --brand-ink,
     --brand-ink-dark (branding/contrast.py works them out).
   ========================================================================== */

/* -------------------------------------------------------------- tokens -- */
:root {
  /* Brand: the Branding colour, its readable ink, and three soft tints of it
     for icon tiles, hovers and selection. The tints are recomputed below with
     relative colour where the browser has it, keeping the brand's hue. */
  --navy: var(--brand-primary, #161e54);
  --navy-ink: var(--brand-ink, #161e54);
  --on-navy: var(--brand-on-primary, #ffffff);
  --navy-50: color-mix(in srgb, var(--brand-primary, #161e54) 7%, #f7f8ff);
  --navy-100: color-mix(in srgb, var(--brand-primary, #161e54) 13%, #f4f6ff);
  --navy-200: color-mix(in srgb, var(--brand-primary, #161e54) 25%, #f2f4ff);

  /* Ground and surfaces. */
  --ground: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --surface-sunk: #f3f4f9;
  --surface-hover: #f3f4fb;
  --rail: #ffffff;

  /* Ink. ink 16.5:1 on white, ink-2 10.6:1, ink-3 (muted) 6.1:1 on white and
     5.7:1 on the ground. */
  --ink: #161a33;
  --ink-2: #3a3f5c;
  --ink-3: #5a6080;

  /* Lines separate; a control's own edge reaches 3:1 against white. */
  --rule: #e6e8f1;
  --rule-strong: #d5d9e8;
  --control-border: #8a90ad;

  /* The one action accent: what waits on this person. The dot is the logo's
     orange; words in it use the deep ink (6.6:1 on its tint). */
  --act: #e8760a;
  --act-ink: #8a4300;
  --act-50: #fff1e0;
  --wait: var(--act-ink);
  --wait-soft: var(--act-50);

  /* Area colours: each menu area has a hue, as a soft tint (-50), a softer
     wash for wide fills such as table heads (-25) and a deep ink. Documents
     and signing blue, workflow and cases teal, external requests plum,
     certified copies green, administration violet. Deep ink is 6.7:1 or
     better on its tint and 7.2:1 or better on white. */
  --k-sign: #23389e;  --k-sign-50: #e9edfc;  --k-sign-25: #f4f6fe;
  --k-case: #0a5a53;  --k-case-50: #e2f3f1;  --k-case-25: #f0f9f8;
  --k-ext: #74215f;   --k-ext-50: #f6e6f1;   --k-ext-25: #faf2f8;
  --k-copy: #1d5e2d;  --k-copy-50: #e5f2e8;  --k-copy-25: #f2f8f4;
  --k-admin: #5e2892; --k-admin-50: #f1eafd; --k-admin-25: #f8f4fe;
  /* Home (dashboard, profile, notifications): the page banner's navy tint,
     taken from the Branding colour below where the browser can. */
  --k-home-50: #dee2f3;

  /* State inks (text) and their quiet fills. */
  --ok: #1f6b45;
  --ok-soft: #e7f5ee;
  --warn: #7a4a00;
  --warn-soft: #fcf3e1;
  --info: #2f4a8a;
  --info-soft: #edf1fb;
  --danger: #a3261b;
  --danger-soft: #fdecea;
  --on-danger: #ffffff;

  /* Kept for area sheets that colour by level: the levels now read by the
     chip's icon, word and meter, so every level uses the brand ink. */
  --class-public: var(--navy-ink);
  --class-general: var(--navy-ink);
  --class-confidential: var(--navy-ink);
  --class-restricted: var(--navy-ink);
  --on-class: var(--on-navy);

  --focus: var(--brand-ink, #161e54);
  --focus-on-rail: var(--focus);
  --scrim: rgb(13 16 41 / 0.42);

  /* Type: Public Sans, one family, a fixed scale. */
  --font-sans: "Public Sans", "Segoe UI", "Noto Sans", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", "Noto Sans Devanagari", "Noto Sans Thai", "Noto Sans CJK SC", "Microsoft YaHei", "Yu Gothic UI", "Malgun Gothic", sans-serif;
  /* References are read in the same face with tabular figures. */
  --font-mono: var(--font-sans);
  /* Raw machine strings only (hashes, secrets, pasted code). */
  --font-code: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;
  --text-xs: 0.8125rem;   /* 13px meta, column heads */
  --text-sm: 0.875rem;    /* 14px secondary, table rows */
  --text-base: 0.9375rem; /* 15px body */
  --text-md: 1rem;        /* 16px card titles */
  --text-lg: 1.1875rem;   /* 19px section heads */
  --text-xl: 1.375rem;    /* 22px */
  --text-2xl: 1.625rem;   /* 26px page title */

  /* Space: 4px steps. */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-7: 28px; --s-8: 32px; --s-10: 40px;

  /* Radius: 16 for cards, 12 for inputs, menus and tiles, 10 for buttons and
     chips. Only counters are full pills. */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-ctl: 12px;

  /* Elevation, three levels, every one offset downward: resting cards, the
     work queue one step higher, and what floats over the page. */
  --shadow-1: 0 1px 2px rgb(22 30 84 / 0.05), 0 2px 8px -2px rgb(22 30 84 / 0.06);
  --shadow-2: 0 1px 2px rgb(22 30 84 / 0.05), 0 8px 24px -6px rgb(22 30 84 / 0.12);
  --shadow-pop: 0 2px 6px rgb(22 30 84 / 0.08), 0 18px 40px -10px rgb(22 30 84 / 0.24);
  --shadow-overlay: var(--shadow-pop);

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 150ms;
  --t-move: 200ms;

  /* 264px until the menu text grew to 16px: "External Requests" with a "99+" count needs this. */
  --sidebar-width: 276px;
  --sidebar-collapsed-width: 76px;
  --target: 40px;
  --bottom-nav-h: 0px;
  /* The footer's line, and how much of the window it keeps when pinned
     (wider than 640px; on a phone it ends the page, so 0). */
  --footer-h: 28px;
  --footer-pin: 0px;
}
@media (min-width: 640.02px) { :root { --footer-pin: var(--footer-h); } }
/* Brand tints that keep the brand's own hue. */
@supports (color: oklch(from red l c h)) {
  :root {
    --navy-50: oklch(from var(--brand-primary, #161e54) 0.955 min(c, 0.018) h);
    --navy-100: oklch(from var(--brand-primary, #161e54) 0.915 min(c, 0.032) h);
    --navy-200: oklch(from var(--brand-primary, #161e54) 0.845 min(c, 0.05) h);
    --k-home-50: oklch(from var(--brand-primary, #161e54) 0.915 min(c, 0.042) h);
  }
}

/* Phones and tablets: a finger is less exact than a pointer. */
@media (pointer: coarse), (max-width: 1023.98px) {
  :root { --target: 44px; }
}

html.dark {
  --navy: var(--brand-ink-dark, #b8c1ff);
  --navy-ink: var(--brand-ink-dark, #b8c1ff);
  --on-navy: #0d1029;
  --navy-50: color-mix(in srgb, var(--brand-primary, #161e54) 30%, #151938);
  --navy-100: color-mix(in srgb, var(--brand-primary, #161e54) 40%, #1f2550);
  --navy-200: color-mix(in srgb, var(--brand-primary, #161e54) 45%, #313a70);
  --ground: #0d1029;
  --surface: #151938;
  --surface-2: #181d40;
  --surface-sunk: #11152f;
  --surface-hover: #1c2147;
  --rail: #11152f;
  --ink: #eceefa;
  --ink-2: #c9cde6;
  --ink-3: #a3a8c9;
  --rule: #262b52;
  --rule-strong: #343a68;
  --control-border: #6b7299;
  --act: #ff9f43;
  --act-ink: #ffc48a;
  --act-50: #3a2a1c;
  --k-sign: #c3cfff;  --k-sign-50: #1f2a66;
  --k-case: #a6e6de;  --k-case-50: #12393f;
  --k-ext: #f2bde4;   --k-ext-50: #3a1c45;
  --k-copy: #b4e5c0;  --k-copy-50: #183a2a;
  --k-admin: #d8bfff; --k-admin-50: #382258;
  --k-sign-25: #1a224f; --k-case-25: #14293c; --k-ext-25: #281a3e; --k-copy-25: #162a31; --k-admin-25: #261e48;
  --k-home-50: #1e2452;
  --ok: #8fd9b2;
  --ok-soft: #173326;
  --warn: #f2c27a;
  --warn-soft: #362a12;
  --info: #b8c6f5;
  --info-soft: #1d2652;
  --danger: #ffaaa2;
  --danger-soft: #3a1e1e;
  --on-danger: #ffffff;
  --scrim: rgb(0 0 0 / 0.6);
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.3), 0 2px 8px -2px rgb(0 0 0 / 0.35);
  --shadow-2: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -6px rgb(0 0 0 / 0.45);
  --shadow-pop: 0 2px 6px rgb(0 0 0 / 0.4), 0 18px 40px -10px rgb(0 0 0 / 0.6);
  --focus: #b8c1ff;
  color-scheme: dark;
}
@supports (color: oklch(from red l c h)) {
  html.dark {
    /* A light tint of the brand: the dark mode's navy. 10:1 under dark ink. */
    --navy: oklch(from var(--brand-primary, #161e54) 0.83 min(c, 0.1) h);
    --navy-ink: oklch(from var(--brand-primary, #161e54) 0.85 min(c, 0.09) h);
    --navy-50: oklch(from var(--brand-primary, #161e54) 0.27 min(c, 0.06) h);
    --navy-100: oklch(from var(--brand-primary, #161e54) 0.31 min(c, 0.07) h);
    --navy-200: oklch(from var(--brand-primary, #161e54) 0.39 min(c, 0.08) h);
    --k-home-50: oklch(from var(--brand-primary, #161e54) 0.285 min(c, 0.065) h);
    --focus: var(--navy);
  }
}
html.dark .ird-btn--destructive { --danger: #b3263a; }

/* High contrast: black on white, solid rules, heavier focus; colour carries
   nothing here, so every tint is white and every ink is black. */
body[data-color-mode="contrast"] {
  --ground: #ffffff;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --surface-sunk: #f0f0f0;
  --surface-hover: #ebebeb;
  --rail: #ffffff;
  --ink: #000000;
  --ink-2: #111111;
  --ink-3: #1f1f1f;
  --rule: #000000;
  --rule-strong: #000000;
  --control-border: #000000;
  --navy: #000000;
  --navy-ink: #000000;
  --on-navy: #ffffff;
  --navy-50: #ffffff;
  --navy-100: #ffffff;
  --navy-200: #000000;
  --act: #000000;
  --act-ink: #000000;
  --act-50: #ffffff;
  --wait: #000000;
  --wait-soft: #ffffff;
  --k-sign: #000000; --k-case: #000000; --k-ext: #000000; --k-copy: #000000; --k-admin: #000000;
  --k-sign-50: #ffffff; --k-case-50: #ffffff; --k-ext-50: #ffffff; --k-copy-50: #ffffff; --k-admin-50: #ffffff;
  --k-sign-25: #ffffff; --k-case-25: #ffffff; --k-ext-25: #ffffff; --k-copy-25: #ffffff; --k-admin-25: #ffffff;
  --k-home-50: #ffffff;
  --ok: #0b4a33;
  --warn: #5c3700;
  --info: #1a3366;
  --danger: #7d0f1c;
  --ok-soft: #ffffff; --warn-soft: #ffffff; --info-soft: #ffffff; --danger-soft: #ffffff;
  --focus: #000000;
  --brand-primary: #000000;
  --brand-on-primary: #ffffff;
  --brand-on-primary-muted: #ffffff;
  --brand-wait-on-primary: #ffffff;
  --brand-ink: #000000;
  --shadow-1: none;
  --shadow-2: none;
  --shadow-pop: 0 0 0 2px #000000;
  /* A dialog has to stand off a white page: a heavy scrim. */
  --scrim: rgb(0 0 0 / 0.72);
}

/* ---------------------------------------------------------- area hues ---
   One hue per menu area (see the -50/-25 tokens above). A page says its area
   on <body data-area> (config.context_processors.ui_area), and --area-tint,
   --area-ink and --area-soft follow it: the page title's icon tile, active
   tab underlines, the page's key numbers and table heads. The dashboard and
   personal pages ("home") keep the brand navy.
   Any element can name a hue with data-hue: its tiles, numbers, avatars and
   pills take --hue-tint and --hue-ink from it, and a tile with no hue of its
   own takes the page's area. Declared on body and below, not on :root, so the
   high-contrast values (set on body) are the ones that resolve. */
body.ird-body, body[data-area="home"] { --area-tint: var(--navy-50); --area-ink: var(--navy-ink); --area-soft: var(--surface-2); }
body[data-area="docs"]  { --area-tint: var(--k-sign-50);  --area-ink: var(--k-sign);  --area-soft: var(--k-sign-25); }
body[data-area="work"]  { --area-tint: var(--k-case-50);  --area-ink: var(--k-case);  --area-soft: var(--k-case-25); }
body[data-area="ext"]   { --area-tint: var(--k-ext-50);   --area-ink: var(--k-ext);   --area-soft: var(--k-ext-25); }
body[data-area="copy"]  { --area-tint: var(--k-copy-50);  --area-ink: var(--k-copy);  --area-soft: var(--k-copy-25); }
body[data-area="admin"] { --area-tint: var(--k-admin-50); --area-ink: var(--k-admin); --area-soft: var(--k-admin-25); }
/* The page banner (see "page banner" below) is one flat area tint behind the
   top bar and the page head; home pages take the brand's navy tint. Its words
   take a deep shade of the area's ink: the title nearer ink, the rest nearer
   the hue, both 7:1 or better on the tint in every mode. */
body.ird-body {
  --banner: var(--area-tint);
  --banner-title: color-mix(in srgb, var(--area-ink) 42%, var(--ink));
  --banner-text: color-mix(in srgb, var(--area-ink) 72%, var(--ink-2));
}
body.ird-body[data-area="home"], body.ird-body:not([data-area]) { --banner: var(--k-home-50); }
[data-hue="home"]   { --hue-tint: var(--navy-50);     --hue-ink: var(--navy-ink); }
[data-hue="docs"]    { --hue-tint: var(--k-sign-50);   --hue-ink: var(--k-sign); }
[data-hue="work"]    { --hue-tint: var(--k-case-50);   --hue-ink: var(--k-case); }
[data-hue="ext"]     { --hue-tint: var(--k-ext-50);    --hue-ink: var(--k-ext); }
[data-hue="copy"]    { --hue-tint: var(--k-copy-50);   --hue-ink: var(--k-copy); }
[data-hue="admin"]   { --hue-tint: var(--k-admin-50);  --hue-ink: var(--k-admin); }
[data-hue="ok"]      { --hue-tint: var(--ok-soft);     --hue-ink: var(--ok); }
[data-hue="neutral"] { --hue-tint: var(--surface-sunk); --hue-ink: var(--ink-2); }
[data-hue="danger"]  { --hue-tint: var(--danger-soft); --hue-ink: var(--danger); }

/* -------------------------------------------------------------- base --- */
body.ird-body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.ird-body ::selection { background: var(--navy-200); color: var(--ink); }
.ird-body { caret-color: var(--navy-ink); accent-color: var(--navy); }

/* Every enabled control shows it can be used; disabled ones say they cannot. */
:where(a[href], button:not(:disabled), summary, select:not(:disabled), label[for], [role="button"], [role="tab"], [role="switch"], [role="menuitem"], input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled)) { cursor: pointer; }
:where(button:disabled, select:disabled, input:disabled, [aria-disabled="true"]) { cursor: not-allowed; }

/* One focus ring for the whole app, at zero specificity so a page can refine it. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
body[data-color-mode="contrast"] :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline-width: 3px;
}

/* Scripts hide components with Tailwind's .hidden. This sheet loads after
   Tailwind, so a component's own display would otherwise win the tie. */
[class*="ird-"].hidden, [class*="ird-"][hidden] { display: none; }

/* Tabular figures wherever numbers line up: counts, dates, references. */
.ird-num, .ird-table td, .ird-rail__count, .ird-pager, .ird-mono, time { font-variant-numeric: tabular-nums; }
/* Visually hidden text is absolutely placed: inside a table it needs a
   positioned cell, or it is placed against a far ancestor and can widen a
   scrolling area. */
:is(.ird-table, .ird-dtable) :is(th, td) { position: relative; }

.ird-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.ird-skip {
  position: absolute; left: var(--s-3); top: -60px; z-index: 200;
  padding: var(--s-2) var(--s-4); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); font-weight: 700;
}
/* The overlay shadow only once the link is on screen. */
.ird-skip:focus { top: var(--s-3); box-shadow: var(--shadow-pop); }

/* Scrollbars in the palette, not the browser's grey. */
.ird-body * { scrollbar-color: var(--rule-strong) transparent; scrollbar-width: thin; }

/* --------------------------------------------------------------- rail --- */
.app-sidebar.ird-rail {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 30;
  width: var(--sidebar-width);
  display: flex; flex-direction: column;
  background: var(--rail);
  color: var(--ink-2);
  border-right: 1px solid var(--rule);
  transition: width var(--t-move) var(--ease-out);
}
body[data-color-mode="contrast"] .app-sidebar.ird-rail { border-right: 2px solid #000; }

.ird-rail__head {
  display: flex; align-items: center; gap: var(--s-2); flex: none;
  min-height: 72px; padding: 16px 14px 10px 20px;
}
.ird-rail__brand {
  display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; flex: 1 1 auto;
  color: var(--ink); text-decoration: none; border-radius: var(--r-md);
}
.ird-rail__brand .sidebar-brand-text { display: flex; flex-direction: column; min-width: 0; }
.ird-rail__name {
  font-size: 1.0625rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink);
  overflow-wrap: anywhere;
}
.ird-rail__tagline {
  font-size: 13px; font-weight: 400; line-height: 1.3; color: var(--ink-3);
}
/* The logo from Branding settings, as drawn: no plate, no crop. */
.ird-rail__logo { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ird-rail__logo img { display: block; width: auto; height: 42px; max-width: 120px; object-fit: contain; }
.ird-rail__logo--dark { display: inline-flex; }
html.dark .ird-rail__logo--dark.hidden { display: inline-flex; }
/* A logo drawn for paper keeps a white disc in dark mode. */
html.dark .ird-rail__logo:not(.ird-rail__logo--dark) img { background: #ffffff; border-radius: 50%; }
/* The full logo from Branding, with the name in it, fills the expanded menu's
   brand area in place of the name (owner, 20 Nov): as drawn, no crop. The
   square logo waits for the collapsed menu. Dark mode takes the dark full
   logo; without one, the light logo keeps a white plate, as the square one
   keeps its disc. */
.ird-rail__brand--wide { padding: 2px 0; }
.ird-rail__wide { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; }
.ird-rail__wide img { width: 150px; max-width: 100%; height: auto; object-fit: contain; object-position: left center; }
/* Small and quiet (owner, 23 Nov 2026: "modern minimalist"): the full logo at
   150px (about 60% of before), its left edge in line with the menu's icons
   (nav 14px + link 12px), in a head about half as tall, even above and below. */
.ird-rail__head:has(.ird-rail__brand--wide) { min-height: 0; padding: 6px 14px 6px 26px; }
html.dark .ird-rail__wide--plate img { background: #ffffff; border-radius: var(--r-md); padding: 6px 8px; }
.ird-rail__brand--wide .ird-rail__mark { display: none; }

.ird-rail__close {
  display: none; flex: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-ctl);
  color: var(--ink-2); background: transparent; border: 1px solid transparent;
}
.ird-rail__close:hover { background: var(--navy-50); color: var(--ink); }

/* The list scrolls between the brand and Collapse menu. A soft shade at
   either end says there is more: the rail-coloured covers scroll with the
   list and hide the shade once its end is reached. */
.ird-rail__nav {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 2px 14px 12px;
  background:
    linear-gradient(var(--rail) 40%, transparent) top / 100% 28px no-repeat local,
    linear-gradient(transparent, var(--rail) 60%) bottom / 100% 28px no-repeat local,
    linear-gradient(rgb(22 30 84 / 0.10), transparent) top / 100% 12px no-repeat scroll,
    linear-gradient(transparent, rgb(22 30 84 / 0.12)) bottom / 100% 12px no-repeat scroll;
  background-color: var(--rail);
}
html.dark .ird-rail__nav {
  background:
    linear-gradient(var(--rail) 40%, transparent) top / 100% 28px no-repeat local,
    linear-gradient(transparent, var(--rail) 60%) bottom / 100% 28px no-repeat local,
    linear-gradient(rgb(0 0 0 / 0.45), transparent) top / 100% 12px no-repeat scroll,
    linear-gradient(transparent, rgb(0 0 0 / 0.5)) bottom / 100% 12px no-repeat scroll;
  background-color: var(--rail);
}
body[data-color-mode="contrast"] .ird-rail__nav { background: var(--rail); }
.ird-rail__nav > * { flex-shrink: 0; }
.ird-rail__group {
  margin: 12px 0 0; padding: 0 12px 4px; font-size: 13.5px; font-weight: 600;
  color: var(--ink-3);
}
/* Each group heading carries a small square of its area's ink. */
.ird-rail__group[data-hue] { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.ird-rail__group[data-hue]::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--hue-ink); }
.ird-rail__link {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 40px; margin: 0; padding: 0 10px 0 12px;
  border-radius: var(--r-md);
  color: var(--ink-2); text-decoration: none;
  /* A step up so the menu reads easily (owner, 20 Nov): it was 14.5px, 36px rows. */
  font-size: 16px; font-weight: 500; line-height: 1.25;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease;
}
.ird-rail__link .material-symbols-outlined { font-size: 22px; flex: none; color: var(--hue-ink, var(--ink-3)); transition: color var(--t-fast) ease; font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24; }
/* An idle item's icon takes its area's ink and its hover takes the area's
   tint; the label stays ink. The current item stays solid brand below. */
.ird-rail__link:hover { color: var(--ink); background: var(--hue-tint, var(--navy-50)); }
.ird-rail__link:hover .material-symbols-outlined { color: var(--hue-ink, var(--navy-ink)); }
.ird-rail__link:active { background: var(--hue-tint, var(--navy-100)); }
.ird-rail__link:focus-visible { outline-offset: -2px; }
/* The current page: solid brand, its own readable foreground. */
.ird-rail__link.is-active {
  background: var(--navy); color: var(--on-navy); font-weight: 600;
  box-shadow: 0 6px 14px -6px rgb(var(--brand-primary-rgb, 22 30 84) / 0.55);
}
.ird-rail__link.is-active .material-symbols-outlined { color: var(--on-navy); font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.ird-rail__link.is-active:hover { background: var(--navy); color: var(--on-navy); filter: brightness(1.12); }
html.dark .ird-rail__link.is-active { box-shadow: none; }
html.dark .ird-rail__link.is-active:hover { filter: brightness(1.06); }
.ird-rail__link.is-active:focus-visible { outline-offset: 2px; }
body[data-color-mode="contrast"] .ird-rail__link.is-active { background: #000; color: #fff; }
.ird-rail__label { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Counts: orange tint for work waiting on this person. */
.ird-rail__count {
  flex: none; margin-left: auto; display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 22px; padding: 0 7px; border-radius: 7px;
  font-size: 13px; font-weight: 600; line-height: 1;
  background: var(--act-50); color: var(--act-ink);
}
/* Unread notifications ask nothing of anyone: a neutral count. */
#sidebar-pending-badge.ird-rail__count { background: var(--navy-50); color: var(--navy-ink); }
.ird-rail__link.is-active .ird-rail__count { background: rgb(255 255 255 / 0.18); color: var(--on-navy); }
html.dark .ird-rail__link.is-active .ird-rail__count { background: rgb(13 16 41 / 0.18); }
body[data-color-mode="contrast"] .ird-rail__count { border: 1px solid currentColor; text-decoration: underline; }
.ird-rail__icon { position: relative; display: inline-flex; flex: none; }
.ird-rail__dot {
  display: none; position: absolute; right: -3px; top: -2px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--act); box-shadow: 0 0 0 2px var(--rail);
}
#app-rail .sidebar-collapsed-dot { background: var(--navy); }
.ird-rail__foot { padding: 8px 14px 14px; border-top: 1px solid var(--rule); }
.ird-rail__toggle {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-md);
  background: transparent; color: var(--ink-3); font: inherit; font-size: var(--text-sm); font-weight: 500;
}
.ird-rail__toggle:hover { color: var(--ink); background: var(--navy-50); }
.ird-rail__toggle .material-symbols-outlined { font-size: 20px; }

/* Collapsed rail (desktop only): icons, with a dot where a count was. */
@media (min-width: 1024px) {
  [data-sidebar-state="collapsed"] .app-sidebar.ird-rail { width: var(--sidebar-collapsed-width); }
  [data-sidebar-state="collapsed"] .sidebar-label,
  [data-sidebar-state="collapsed"] .sidebar-section-label,
  [data-sidebar-state="collapsed"] .sidebar-brand-text,
  [data-sidebar-state="collapsed"] .ird-rail__group { display: none; }
  [data-sidebar-state="collapsed"] .ird-rail__group-gap { display: block; height: 14px; }
  [data-sidebar-state="collapsed"] .ird-rail__head { min-height: 72px; padding: 16px 8px 10px; justify-content: center; }
  [data-sidebar-state="collapsed"] .ird-rail__nav { padding: 2px 12px 16px; }
  [data-sidebar-state="collapsed"] .ird-rail__logo img { height: 36px; max-width: 48px; }
  /* While the menu widens from 76px (Expand menu, 200ms), the brand keeps
     its settled size and is uncovered, as the labels are: the name wrapped
     letter by letter in the narrow menu before. The head clips it meanwhile. */
  .ird-rail__head { overflow: hidden; }
  .ird-rail__brand .sidebar-brand-text { flex: none; width: calc(var(--sidebar-width) - 88px); }
  .ird-rail__wide { flex: none; width: 150px; }
  /* 76px: the square logo, never the full one squeezed. */
  [data-sidebar-state="collapsed"] .ird-rail__brand--wide .ird-rail__wide { display: none; }
  [data-sidebar-state="collapsed"] .ird-rail__brand--wide .ird-rail__mark { display: inline-flex; }
  [data-sidebar-state="collapsed"] .ird-rail__initials { display: inline-flex; }
  [data-sidebar-state="collapsed"] .ird-rail__link { justify-content: center; padding: 0; min-height: 44px; }
  [data-sidebar-state="collapsed"] .ird-rail__dot,
  [data-sidebar-state="collapsed"] .sidebar-collapsed-dot { display: block !important; }
  [data-sidebar-state="collapsed"] .ird-rail__foot { padding: 8px 12px 14px; }
  [data-sidebar-state="collapsed"] .ird-rail__toggle { justify-content: center; padding: 0; }
  [data-sidebar-state="collapsed"] .app-main {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
    max-width: calc(100% - var(--sidebar-collapsed-width));
  }
  [data-sidebar-state="collapsed"] .app-fixed-bar { left: var(--sidebar-collapsed-width); }
}
.ird-rail__group-gap { display: none; }
.ird-rail__initials {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 42px; height: 42px;
  border-radius: 12px; font-weight: 700; font-size: 0.9375rem;
  color: var(--on-navy); background: var(--navy);
}
[data-sidebar-state="collapsed"] .ird-rail__brand:has(.ird-rail__initials) .sidebar-brand-text { display: none; }
[data-sidebar-state="expanded"] .sidebar-toggle-label-collapsed,
[data-sidebar-state="collapsed"] .sidebar-toggle-label-expanded { display: none; }

/* ---------------------------------------------------------- main frame -- */
.app-main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  min-width: 0;
  transition: margin-left var(--t-move) var(--ease-out), width var(--t-move) var(--ease-out), max-width var(--t-move) var(--ease-out);
}
.app-main.app-main--embedded { margin-left: 0; width: 100%; max-width: 100%; }
.app-fixed-bar { left: var(--sidebar-width); transition: left var(--t-move) var(--ease-out); }

/* Below 1024px the menu is a drawer, opened from the bottom bar. */
@media (max-width: 1023.98px) {
  :root { --bottom-nav-h: 64px; }
  .app-fixed-bar { left: 0 !important; }
  .app-sidebar.ird-rail,
  [data-sidebar-state="collapsed"] .app-sidebar.ird-rail {
    z-index: 70; width: min(320px, 86vw);
    transform: translateX(-100%); visibility: hidden;
    transition: transform var(--t-move) var(--ease-out), visibility 0s linear var(--t-move);
    box-shadow: var(--shadow-pop); border-right: 0;
  }
  .app-sidebar.ird-rail.mobile-open {
    transform: translateX(0); visibility: visible;
    transition: transform var(--t-move) var(--ease-out), visibility 0s;
  }
  .ird-rail__close { display: inline-flex; }
  .ird-rail__foot { display: none; }
  .ird-rail__link { min-height: 44px; }
  .app-main,
  [data-sidebar-state="collapsed"] .app-main { margin-left: 0; width: 100%; max-width: 100%; }
  .mobile-overlay {
    display: block; position: fixed; inset: 0; z-index: 65; background: var(--scrim);
    opacity: 0; pointer-events: none; transition: opacity var(--t-move) ease;
  }
  .mobile-overlay.active { opacity: 1; pointer-events: auto; }
  body.ird-drawer-open { overflow: hidden; }
}
@media (min-width: 1024px) { .mobile-overlay { display: none; } }

/* ------------------------------------------------------------- header ---
   The top bar is the banner's first row: the same flat area tint, so the
   breadcrumb, search, theme, bell and account sit on the page's colour.
   Pages with no page head (the workspaces) keep just this tinted bar. */
.ird-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  height: 56px; padding: 0 var(--s-3);
  background: var(--banner, var(--ground));
  border-bottom: 1px solid transparent;
}
@media (min-width: 640px) { .ird-header { height: 64px; padding: 0 var(--s-5); gap: var(--s-4); } }
@media (min-width: 1024px) { .ird-header { padding: 0 var(--s-8); } }
/* With no page head under it, a hairline closes the bar off from the work area. */
body:not(:has(#main-content .ird-page-head)) .ird-header { border-bottom-color: color-mix(in srgb, var(--area-ink) 14%, var(--banner)); }
body[data-color-mode="contrast"] .ird-header { background: #fff; border-bottom: 2px solid #000; }
body[data-color-mode="contrast"]:has(#main-content .ird-page-head) .ird-header { border-bottom-color: transparent; }
.ird-header__start { display: flex; align-items: center; gap: var(--s-2); min-width: 0; flex: 0 1 auto; color: var(--banner-text, var(--ink-2)); font-size: var(--text-sm); }
.ird-header__start > * { white-space: nowrap; flex-shrink: 0; }
.ird-header__start > :last-child { min-width: 0; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 639.98px) {
  /* Breadcrumbs that pages write straight into the header: keep the last crumb. */
  .ird-header__start > :not(.ird-menu-btn):not(.ird-header__brand):not(:last-child) { display: none; }
}
.ird-header__title { color: var(--banner-title, var(--ink)); font-weight: 700; font-size: var(--text-base); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The default breadcrumb: the menu group in the banner's text colour, then
   the page. On phones the page's own heading is right below, so the bar
   keeps only the brand mark there. */
.ird-header__crumbs .ird-header__title { font-size: var(--text-sm); font-weight: 600; }
.ird-crumbs__group { color: var(--banner-text, var(--ink-2)); }
.ird-header__crumbs .ird-header__pagetitle:empty { display: none; }
@media (max-width: 639.98px) { body:has(#main-content .ird-page-head h1) .ird-header__pagetitle { display: none; } }
.ird-header__end { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-1); flex: 1 1 auto; min-width: 0; }
@media (min-width: 640px) { .ird-header__end { gap: var(--s-2); } }
/* Phones: the brand mark leads the header (the menu itself is in the bottom bar). */
.ird-header__brand { display: none; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: var(--r-ctl); margin-left: -4px; }
.ird-header__brand img { width: 34px; height: 34px; object-fit: contain; }
html.dark .ird-header__brand img { background: #fff; border-radius: 50%; }
/* The dark-mode logo is drawn for the dark bar: no disc behind it. It is an
   ird- element, so [class*="ird-"].hidden above would keep it hidden: shown
   here in dark mode, as the menu's own dark logo is. */
html.dark .ird-header__brand img.ird-header__brand-dark { background: none; border-radius: 0; }
html.dark .ird-header__brand img.ird-header__brand-dark.hidden { display: block; }
.ird-header__brand .ird-rail__initials { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
@media (max-width: 1023.98px) { .ird-header__brand { display: inline-flex; } }

/* Breadcrumbs: <nav aria-label="Breadcrumb"><ol class="ird-crumbs">, links,
   then the current page as li[aria-current="page"].ird-header__title. */
.ird-crumbs { display: flex; align-items: center; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.ird-crumbs li { display: flex; align-items: center; gap: var(--s-2); }
.ird-crumbs li + li::before { content: "/" / ""; color: var(--banner-text, var(--ink-3)); font-weight: 400; opacity: 0.7; }
.ird-crumbs li[aria-current="page"] { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ird-crumbs li[aria-current="page"]::before { margin-right: var(--s-2); }
@media (max-width: 639.98px) { .ird-crumbs li + li::before { display: none; } }
.ird-crumbs a { color: var(--banner-text, var(--ink-2)); text-decoration: none; border-radius: var(--r-sm); }
.ird-crumbs a:hover { color: var(--banner-title, var(--ink)); text-decoration: underline; text-underline-offset: 3px; }
@media (pointer: coarse), (max-width: 1023.98px) { .ird-crumbs a { display: inline-flex; align-items: center; min-height: 44px; } }

/* Legacy breadcrumbs inside the header read in the shell's ink. */
.ird-header__start :where(a) { color: var(--banner-text, var(--ink-2)); }
.ird-header__start :where(a:hover) { color: var(--banner-title, var(--ink)); }
.ird-header__start nav, .ird-header__start ol { min-width: 0; }
.ird-header__start ol { flex-wrap: nowrap; overflow: hidden; }
.ird-header__start li { white-space: nowrap; min-width: 0; }
.ird-header__start li:last-child { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 639.98px) {
  .ird-header__start ol > li:not(:last-child) { display: none; }
  .ird-header__start ol > li:last-child .material-symbols-outlined { display: none; }
}

/* The drawer opener, in the bottom bar on phones and tablets. */
.ird-menu-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 44px; padding: 0 12px 0 8px;
  border: 1px solid var(--rule-strong); border-radius: var(--r-ctl);
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-sm); font-weight: 600;
}
.ird-menu-btn:hover { background: var(--surface-hover); }
@media (min-width: 1024px) { .ird-menu-btn { display: none; } }
@media (max-width: 1023.98px) { body:has(.ird-bottomnav) .ird-menu-btn { display: none; } }

.ird-iconbtn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: var(--target); height: var(--target); flex: none;
  border: 1px solid transparent; border-radius: var(--r-ctl); background: transparent; color: var(--ink-2);
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.ird-header .ird-iconbtn { width: 44px; height: 44px; color: var(--banner-text, var(--ink-2)); }
.ird-header .ird-user-btn__role, .ird-header .ird-user-btn__chevron { color: var(--banner-text, var(--ink-3)); }
.ird-header .ird-badge { border-color: var(--banner, var(--ground)); }
.ird-iconbtn:hover { background: var(--surface); border-color: var(--rule); box-shadow: var(--shadow-1); color: var(--ink); }
.ird-iconbtn:active { background: var(--navy-50); }
.ird-iconbtn[aria-expanded="true"] { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); box-shadow: var(--shadow-1); }
.ird-iconbtn .material-symbols-outlined { font-size: 22px; }
/* Unread notifications: a neutral brand count, not the action orange. */
.ird-badge {
  position: absolute; top: 3px; right: 1px; min-width: 20px; height: 18px; padding: 0 5px;
  border-radius: 9px; font-size: 11px; font-weight: 700; line-height: 14px; text-align: center;
  color: var(--on-navy); background: var(--navy); border: 2px solid var(--ground);
  font-variant-numeric: tabular-nums;
}
.ird-badge.hidden { display: none; }
body[data-color-mode="contrast"] .ird-badge { border-color: #fff; }

/* The theme switch in the top bar: one press posts the other colour mode. */
.ird-theme-form { display: contents; }
.ird-theme-btn .ird-theme-btn__to-light { display: none; }
html.dark .ird-theme-btn .ird-theme-btn__to-light { display: inline-block; }
html.dark .ird-theme-btn .ird-theme-btn__to-dark { display: none; }
@media (max-width: 639.98px) { .ird-theme-form .ird-theme-btn { display: none; } }

/* Global search: the one wide field of the top bar. */
.ird-search { position: relative; display: none; align-items: center; flex: 1 1 auto; max-width: 400px; margin-left: auto; margin-right: var(--s-1); }
@media (min-width: 768px) { .ird-search { display: flex; } }
.ird-search__label {
  position: absolute; left: 14px; top: 0; bottom: 0; display: flex; align-items: center;
  color: var(--ink-3); pointer-events: none;
}
.ird-search__label .material-symbols-outlined { font-size: 20px; }
.ird-search__word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* A white field on the banner tint: no edge until hovered, a hint of lift. */
.ird-search .ird-input {
  width: 100%; height: 42px; min-height: 42px; padding: 0 70px 0 42px; border-radius: var(--r-ctl);
  background: var(--surface); border-color: transparent; box-shadow: 0 1px 2px rgb(22 30 84 / 0.08); font-size: 14px;
}
@media (pointer: coarse) { .ird-search .ird-input { height: 44px; min-height: 44px; } }
html.dark .ird-search .ird-input { box-shadow: 0 1px 2px rgb(0 0 0 / 0.3); }
.ird-search .ird-input:hover { border-color: var(--rule-strong); }
.ird-search .ird-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-100); }
body[data-color-mode="contrast"] .ird-search .ird-input { border: 2px solid #000; }
body[data-color-mode="contrast"] .ird-search .ird-input:focus { outline: 3px solid #000; outline-offset: 1px; }
.ird-kbd {
  position: absolute; right: 10px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); line-height: 1.5; white-space: nowrap;
  border: 1px solid var(--rule-strong); border-radius: 6px; padding: 0 6px; background: var(--surface); pointer-events: none;
}
.ird-search-toggle { display: inline-flex; }
@media (min-width: 768px) { .ird-search-toggle { display: none; } }
/* Phone search: a full-width row under the header. */
.ird-search-panel {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 45;
  padding: var(--s-3) var(--s-4); background: var(--ground); border-bottom: 1px solid var(--rule);
  box-shadow: 0 10px 18px -14px rgb(13 16 41 / 0.4);
}
.ird-search-panel[hidden] { display: none; }
.ird-search-panel form { display: flex; gap: var(--s-2); }
.ird-search-panel .ird-input { flex: 1 1 auto; min-width: 0; }
/* The workspaces (viewer, review, signing) put the document's name in the top
   bar, which crushed the search field to a stub. There the search is the icon
   button at every width; it opens the field under the bar. */
body:has(.ird-ws) .ird-header .ird-search { display: none; }
body:has(.ird-ws) .ird-search-toggle { display: inline-flex; }
@media (min-width: 768px) {
  body:has(.ird-ws) .ird-search-panel {
    left: auto; right: var(--s-4); width: min(560px, calc(100% - 2 * var(--s-4))); margin-top: 4px;
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-ctl); box-shadow: var(--shadow-pop);
  }
}
body[data-color-mode="contrast"]:has(.ird-ws) .ird-search-panel { border: 2px solid #000; }

/* Popovers from the header: notifications and the user menu. */
.ird-popover {
  position: fixed; z-index: 9999; top: 60px; right: 12px;
  width: min(360px, calc(100vw - 24px)); max-height: calc(100dvh - 76px - var(--bottom-nav-h));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--r-ctl);
  box-shadow: var(--shadow-pop);
  transform-origin: top right;
  animation: ird-pop-in var(--t-move) var(--ease-out);
}
@media (min-width: 640px) { .ird-popover { top: 68px; right: 20px; } }
@media (min-width: 1024px) { .ird-popover { right: 32px; } }
.ird-popover.hidden { display: none; }
@keyframes ird-pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ird-popover__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--rule);
}
.ird-popover__title { font-weight: 700; font-size: var(--text-base); }
.ird-popover__body { overflow-y: auto; padding: 6px; }
.ird-popover__foot { border-top: 1px solid var(--rule); padding: 6px; }
.ird-notif {
  display: flex; gap: var(--s-3); width: 100%; padding: 10px 10px; text-align: left; border-radius: 8px;
  border: 0; background: transparent; color: inherit; font: inherit;
}
.ird-notif + .ird-notif { margin-top: 2px; }
.ird-notif:hover { background: var(--navy-50); }
.ird-notif .material-symbols-outlined { font-size: 20px; color: var(--ink-3); flex: none; margin-top: 1px; }
.ird-notif__title { font-weight: 600; font-size: var(--text-sm); overflow-wrap: anywhere; }
.ird-notif__meta { margin-top: 2px; font-size: var(--text-xs); color: var(--ink-3); overflow-wrap: anywhere; }
/* Unread asks nothing of anyone: a neutral brand tag. */
.ird-notif__unread { flex: none; margin-left: auto; align-self: center; font-size: 12px; font-weight: 700; color: var(--navy-ink); background: var(--navy-50); padding: 2px 7px; border-radius: 6px; }
.ird-popover__empty { padding: var(--s-6) var(--s-4); font-size: var(--text-sm); color: var(--ink-2); }

.ird-user-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  padding: 0 6px; border: 1px solid transparent; border-radius: var(--r-ctl); background: transparent; color: var(--ink); font: inherit;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
@media (min-width: 1280px) {
  .ird-user-btn { padding: 0 10px 0 6px; margin-left: 4px; border-color: var(--rule); background: var(--surface); box-shadow: var(--shadow-1); }
}
.ird-user-btn:hover, .ird-user-btn[aria-expanded="true"] { border-color: var(--rule-strong); background: var(--surface); }
.ird-user-btn__who { display: none; flex-direction: column; align-items: flex-start; min-width: 0; text-align: left; }
.ird-user-btn__name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); font-weight: 600; line-height: 1.15; }
.ird-user-btn__role { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-3); line-height: 1.25; }
@media (min-width: 1280px) { .ird-user-btn__who { display: flex; } }
.ird-user-btn__chevron { color: var(--ink-3); }
@media (max-width: 399.98px) { .ird-user-btn__chevron { display: none; } }
/* A person's initials: a stable hue from their username (the avatar_hue
   filter writes data-hue), brand navy where none is given. */
.ird-initials {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--hue-tint, var(--navy-50)); color: var(--hue-ink, var(--navy-ink));
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
}
body[data-color-mode="contrast"] .ird-initials { border: 1px solid #000; }
.ird-initials--xs { display: inline-flex; width: 20px; height: 20px; border-radius: 6px; font-size: 10px; line-height: 1; letter-spacing: 0; vertical-align: middle; position: relative; top: -1px; margin-right: 5px; }
.ird-initials--lg { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.ird-menu { padding: 6px; }
.ird-menu__who { padding: 8px 10px 12px; border-bottom: 1px solid var(--rule); margin: 0 -6px 6px; padding-left: 16px; padding-right: 16px; }
.ird-menu__name { font-weight: 700; overflow-wrap: anywhere; }
.ird-menu__role { font-size: var(--text-xs); color: var(--ink-3); }
.ird-menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--target);
  padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: inherit; font-size: var(--text-sm); font-weight: 500;
  text-decoration: none; text-align: left;
}
.ird-menu__item:hover, .ird-menu__item:focus-visible { background: var(--navy-50); color: var(--ink); }
.ird-menu__item:focus-visible { outline-offset: -2px; }
.ird-menu__item .material-symbols-outlined { font-size: 20px; color: var(--ink-3); }
.ird-menu__section { padding: 10px 10px 6px; border-top: 1px solid var(--rule); margin: 6px -6px 0; padding-left: 16px; padding-right: 16px; }
.ird-menu__section-title { font-size: var(--text-xs); font-weight: 600; color: var(--ink-3); margin-bottom: var(--s-2); }
.ird-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: var(--r-ctl); background: var(--surface-sunk); }
.ird-modes button {
  min-height: calc(var(--target) - 4px); padding: 0 var(--s-2); border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2); font: inherit; font-size: var(--text-xs); font-weight: 600;
}
.ird-modes button:hover { background: var(--surface); color: var(--ink); }
.ird-modes button[aria-pressed="true"] { background: var(--surface); color: var(--navy-ink); box-shadow: var(--shadow-1); }
body[data-color-mode="contrast"] .ird-modes { border: 2px solid #000; }
body[data-color-mode="contrast"] .ird-modes button[aria-pressed="true"] { background: #000; color: #fff; }
.ird-check { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-3); font-size: var(--text-sm); min-height: 32px; }
.ird-menu__sep { height: 1px; margin: 6px 4px; background: var(--rule); }
/* A menu item that removes, rejects or ends something. */
.ird-menu__item--danger, .ird-menu__item--danger .material-symbols-outlined { color: var(--danger); }
.ird-menu__item--danger:hover { background: var(--danger-soft); color: var(--danger); }
.ird-menu__signout, .ird-menu__signout .material-symbols-outlined { color: var(--danger); }
.ird-menu__signout:hover { background: var(--danger-soft); color: var(--danger); }

/* ----------------------------------------------------- phone bottom bar --
   Five places one thumb away: Home, Library, Upload, Board (or the
   notifications), and Menu, which opens the full menu as a drawer. */
.ird-bottomnav { display: none; }
@media (max-width: 1023.98px) {
  .ird-bottomnav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--surface); border-top: 1px solid var(--rule); box-shadow: 0 -6px 20px -10px rgb(22 30 84 / 0.18);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  body:has(.ird-bottomnav) .ird-content { padding-bottom: calc(var(--bottom-nav-h) + 24px + env(safe-area-inset-bottom)) !important; }
}
@media (max-width: 640px) {
  body:has(.ird-bottomnav) .ird-footer { padding-bottom: calc(var(--bottom-nav-h) + var(--s-2) + env(safe-area-inset-bottom)); }
}
.ird-bottomnav a, .ird-bottomnav button {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 52px; min-width: 0; padding: 0 2px; margin: 0;
  border: 0; border-radius: var(--r-ctl); background: none; color: var(--ink-3);
  font: inherit; font-size: 11.5px; font-weight: 600; line-height: 1.2; text-decoration: none;
}
.ird-bottomnav a > span:last-child, .ird-bottomnav button > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ird-bottomnav .material-symbols-outlined { font-size: 22px; padding: 2px 14px; border-radius: 10px; }
.ird-bottomnav a:hover, .ird-bottomnav button:hover { color: var(--ink); }
.ird-bottomnav a:active .material-symbols-outlined, .ird-bottomnav button:active .material-symbols-outlined { background: var(--navy-50); }
/* Idle icons take their area's ink, as in the side menu; the current one is brand. */
.ird-bottomnav a[data-hue]:not([aria-current="page"]) .material-symbols-outlined { color: var(--hue-ink); }
.ird-bottomnav [aria-current="page"] { color: var(--navy-ink); }
.ird-bottomnav [aria-current="page"] .material-symbols-outlined { background: var(--navy-50); font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
.ird-bottomnav__count {
  position: absolute; top: 3px; left: calc(50% + 8px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--act-50); color: var(--act-ink);
}
.ird-bottomnav__count--quiet { background: var(--navy-50); color: var(--navy-ink); }
body[data-color-mode="contrast"] .ird-bottomnav { border-top: 2px solid #000; }
body[data-color-mode="contrast"] .ird-bottomnav__count { border: 1px solid #000; }

/* ------------------------------------------------------------ content --- */
.ird-content { flex: 1 1 auto; min-width: 0; }
@media (min-width: 1024px) {
  .ird-content:not(.p-0) { padding-top: var(--s-3) !important; }
  /* Full-bleed workspaces (viewer, review, signing) pull up by exactly this padding. */
  .ird-content > .lg\:-m-8 { margin-top: calc(-1 * var(--s-3)); }
}
.ird-page { max-width: 1480px; }
/* ---------------------------------------------------------- page banner ---
   Every staff page opens on its area's colour: the top bar above, then the
   page head (a large title, one line of context, the page's key figures as
   chips, the actions on the right) on the same flat tint, a large faint area
   icon at the far right, and the first card rising over the banner's lower
   edge by --banner-under. The page head paints the tint itself, so every page
   with .ird-page-head has it with no markup of its own:
     ::before  the tint. Behind everything (z-index -2, in the page's root
               stacking layer), from the top bar down to --banner-under past
               the head; a spread shadow carries it sideways to the edges of
               the work area without widening the page, and the fixed menu
               covers its left end.
     ::after   the faint area icon (--page-icon, z-index -1): over the tint,
               behind the first card.
   Cards are opaque and come later in the page, so they paint over both. The
   head itself is positioned only to place those two; it stays in z-index
   auto, so its menus still open over the card below. */
.ird-page-head {
  --head-gap: 20px;
  --banner-overlap: 36px;
  --banner-under: var(--banner-overlap);
  position: relative;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-4) var(--s-6);
  margin-bottom: var(--head-gap); padding-top: var(--s-2); padding-bottom: 2px;
}
.ird-page-head::before {
  content: ""; position: absolute; z-index: -2; left: 0; right: 0;
  top: -100vmax; bottom: calc(-1 * (var(--head-gap) + var(--banner-under)));
  background: var(--banner); box-shadow: 0 0 0 100vmax var(--banner); clip-path: inset(0 -100vmax);
  pointer-events: none;
}
body[data-page-icon] .ird-page-head::after {
  content: var(--page-icon) / ""; position: absolute; z-index: -1; right: -12px; top: -36px;
  font-family: "Material Symbols Outlined"; font-size: 216px; line-height: 1; font-weight: normal; font-style: normal;
  letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr;
  font-feature-settings: "liga"; -webkit-font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 48;
  color: var(--area-ink); opacity: 0.07; pointer-events: none;
}
html.dark body[data-page-icon] .ird-page-head::after { opacity: 0.1; }
/* With a banner line under the head (the dashboard), the icon stays inside
   the head's own height so it never runs behind that line's words. */
body[data-page-icon] .ird-page-head:has(~ .ird-banner-tail, ~ * .ird-banner-tail)::after { font-size: 128px; top: -24px; }
/* A line that belongs to the banner below the head (the dashboard's "Waiting
   on you" heading): it carries the tint on, and the cards under it rise over
   the banner's edge instead. --tail-gap is its own bottom margin. */
.ird-banner-tail { --tail-gap: 14px; --banner-under: 36px; position: relative; }
.ird-banner-tail::before {
  content: ""; position: absolute; z-index: -2; left: 0; right: 0;
  top: -100vmax; bottom: calc(-1 * (var(--tail-gap) + var(--banner-under)));
  background: var(--banner); box-shadow: 0 0 0 100vmax var(--banner); clip-path: inset(0 -100vmax);
  pointer-events: none;
}
@media (max-width: 639.98px) { .ird-banner-tail { --banner-under: 28px; } }
body[data-color-mode="contrast"] .ird-banner-tail::before { background: none; box-shadow: none; clip-path: none; border-image: linear-gradient(to top, #000 2px, #fff 2px) fill 0 / 0 / 0 100vmax; }
body[data-color-mode="contrast"] .ird-page-head:has(~ .ird-banner-tail, ~ * .ird-banner-tail)::before { border-image: none; }
/* A row of view tabs right under the head stays on the banner: the tint runs
   on under it and the card after it rises over the edge. */
.ird-page-head:has(+ .ia-tabs) { --banner-under: calc(var(--target) + 1px + var(--s-4) + var(--banner-overlap)); }
.ird-page-head:has(+ .ird-nc-tabs) { --banner-under: calc(45px + var(--s-5) + var(--banner-overlap)); }
/* A bare filter row right under the head (or under its tabs, or under a
   closed panel) becomes the card that rises over the banner's edge. */
:is(.ird-page-head, .ird-page-head + section[data-panel], .ird-page-head + :is(.ia-tabs, .ird-nc-tabs)) + .ird-filters:not(.ird-filters--card) {
  padding: var(--s-4); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
body[data-color-mode="contrast"] :is(.ird-page-head, .ird-page-head + section[data-panel], .ird-page-head + :is(.ia-tabs, .ird-nc-tabs)) + .ird-filters:not(.ird-filters--card) { border: 2px solid #000; box-shadow: none; }
@media (max-width: 639.98px) { :is(.ird-page-head, .ird-page-head + section[data-panel], .ird-page-head + :is(.ia-tabs, .ird-nc-tabs)) + .ird-filters:not(.ird-filters--card) { padding: var(--s-3); } }
/* Settings pages: the section menu beside the first card starts below the
   banner's edge, so its first item never sits half on the tint. */
@media (min-width: 1024px) { .ird-page-head + .ia-pf > .ia-pf__nav { padding-top: 40px; } }
/* High contrast: a white banner closed by a black rule; no faint icon. */
body[data-color-mode="contrast"] .ird-page-head::before {
  background: none; box-shadow: none; clip-path: none;
  border-image: linear-gradient(to top, #000 2px, #fff 2px) fill 0 / 0 / 0 100vmax;
}
body[data-color-mode="contrast"][data-page-icon] .ird-page-head::after { display: none; }
@media print { .ird-page-head::before, .ird-page-head::after { display: none !important; } }

.ird-page-head > :first-child:not(.ird-page-head__actions) { min-width: 0; }
.ird-page-head h1, .ird-h1 { margin: 0 auto 0 0; font-weight: 700; text-wrap: balance; overflow-wrap: anywhere; }
.ird-h1 { font-size: var(--text-2xl); line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
.ird-page-head h1, .ird-page-head .ird-h1 { font-size: 2.25rem; line-height: 1.1; letter-spacing: -0.025em; color: var(--banner-title); }
@media (min-width: 1280px) { .ird-page-head h1, .ird-page-head .ird-h1 { font-size: 2.375rem; } }
.ird-page-head .ird-lede { margin-top: var(--s-2); color: var(--banner-text); font-size: var(--text-base); }
.ird-page-head :is(.ird-pc-sub, .ird-lede) strong:not(.ird-num) { color: var(--banner-title); }
.ird-page-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
/* Actions on the tint: lesser ones a soft white, the primary stays brand. */
.ird-page-head :is(.ird-btn--secondary, .ird-btn--quiet) {
  background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--area-ink);
  border-color: transparent; box-shadow: 0 1px 2px rgb(22 30 84 / 0.06); padding: 0 var(--s-4);
}
.ird-page-head :is(.ird-btn--secondary, .ird-btn--quiet):hover:not(:disabled) { background: var(--surface); box-shadow: var(--shadow-1); }
html.dark .ird-page-head :is(.ird-btn--secondary, .ird-btn--quiet) { box-shadow: none; }
body[data-color-mode="contrast"] .ird-page-head :is(.ird-btn--secondary, .ird-btn--quiet) { background: #fff; color: #000; border: 2px solid #000; box-shadow: none; }
.ird-page-head .ird-seg { background: color-mix(in srgb, var(--surface) 55%, transparent); border-color: transparent; }
body[data-color-mode="contrast"] .ird-page-head .ird-seg { background: #fff; border: 2px solid #000; }

@media (max-width: 1023.98px) {
  .ird-page-head h1, .ird-page-head .ird-h1 { font-size: 1.875rem; }
}
@media (max-width: 639.98px) {
  .ird-h1 { font-size: 1.4375rem; }
  .ird-page-head { --head-gap: var(--s-4); --banner-overlap: 28px; align-items: flex-start; column-gap: var(--s-3); padding-top: var(--s-1); }
  .ird-page-head h1, .ird-page-head .ird-h1 { font-size: 1.625rem; line-height: 1.15; }
  .ird-page-head .ird-lede { font-size: 14.5px; }
  .ird-page-head__actions { width: 100%; flex-wrap: nowrap; }
  .ird-page-head__actions .ird-btn--primary { flex: 1 1 auto; }
  body[data-page-icon] .ird-page-head::after { display: none; }
}

/* Figure chips: the page's few key numbers on the banner. A white pill, the
   number in a tinted circle (the area's, or the hue the chip names), a short
   label. Orange only for what waits on the viewer. A chip that filters the
   page is a link and lifts on hover.
     <ul class="ird-figs" aria-label="..."><li><a class="ird-fig ird-fig--wait" href="...">
       <span class="ird-fig__num">3</span>waiting for your signature</a></li></ul> */
.ird-figs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.ird-figs > li { display: flex; min-width: 0; }
.ird-fig {
  display: inline-flex; align-items: center; gap: var(--s-2); min-width: 0; min-height: 38px; padding: 5px 14px 5px 6px;
  border-radius: 999px; background: var(--surface); color: var(--ink-2);
  font-size: 13.5px; font-weight: 500; line-height: 1.25; text-decoration: none;
  box-shadow: 0 1px 2px rgb(22 30 84 / 0.07);
  transition: box-shadow var(--t-fast) ease, transform var(--t-fast) ease, color var(--t-fast) ease;
}
.ird-fig__num {
  display: inline-grid; place-items: center; flex: none; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px;
  background: var(--hue-tint, var(--area-tint)); color: var(--hue-ink, var(--area-ink));
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.ird-fig--wait .ird-fig__num { background: var(--act-50); color: var(--act-ink); }
.ird-fig--neutral .ird-fig__num { background: var(--surface-sunk); color: var(--ink-2); }
a.ird-fig:hover { color: var(--ink); box-shadow: var(--shadow-2); transform: translateY(-1px); }
a.ird-fig[aria-current="true"] { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--area-ink), 0 1px 2px rgb(22 30 84 / 0.07); }
html.dark .ird-fig { box-shadow: none; }
html.dark a.ird-fig[aria-current="true"] { box-shadow: inset 0 0 0 1.5px var(--area-ink); }
body[data-color-mode="contrast"] .ird-fig { border: 2px solid #000; box-shadow: none; color: #000; }
body[data-color-mode="contrast"] .ird-fig__num { border: 1px solid #000; }
body[data-color-mode="contrast"] .ird-fig--wait .ird-fig__num, body[data-color-mode="contrast"] a.ird-fig { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { a.ird-fig:hover { transform: none; } }
@media (pointer: coarse), (max-width: 1023.98px) { .ird-fig { min-height: 44px; } }
@media (max-width: 639.98px) { .ird-figs { margin-top: var(--s-3); gap: 6px; } .ird-fig { font-size: 13px; padding-right: 12px; } }

/* The page's key numbers (in its title line and section notes) take its ink. */
:is(.ird-page-head, .ird-section-note) .ird-num { color: var(--area-ink); font-weight: 700; }
.ird-lede { margin-top: var(--s-1); color: var(--ink-3); font-size: 14.5px; max-width: 70ch; }
.ird-h2 { font-size: var(--text-lg); font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
.ird-panel__head .ird-h2, .ird-card-title { font-size: var(--text-md); font-weight: 600; letter-spacing: -0.005em; }
.ird-h3 { font-size: var(--text-base); font-weight: 600; color: var(--ink); margin: 0; }
/* A heading led by its icon tile (.ird-tile--h). */
.ird-h-tile { display: flex; align-items: center; gap: 10px; min-width: 0; }
/* A settings section head led by its tile: the tile spans the title and
   its line of explanation. */
.ia-formsec__head:has(> .ird-tile) { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; }
.ia-formsec__head > .ird-tile { grid-row: span 3; align-self: start; }
.ia-formsec__head > .ird-tile ~ * { grid-column: 2; }
.ird-meta { font-size: var(--text-xs); color: var(--ink-3); }
.ird-muted { color: var(--ink-3); }
/* A reference code: the same face, tabular figures, a hair of tracking. */
.ird-mono { font-family: var(--font-sans); font-size: 0.875rem; letter-spacing: 0.01em; font-variant-numeric: tabular-nums slashed-zero; }
/* A raw machine string (a hash, a secret): the system monospace. */
.ird-code, .ird-rq-a-hash { font-family: var(--font-code) !important; font-size: 12.5px; letter-spacing: 0; overflow-wrap: anywhere; }
.ird-link { color: var(--navy-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ird-link:hover { text-decoration-thickness: 2px; }

/* A white card on the ground: soft edge, resting shadow. */
.ird-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
body[data-color-mode="contrast"] .ird-panel { border: 2px solid #000; }
.ird-panel__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 18px 22px 14px; }
.ird-panel__body { padding: 0 22px 22px; }
@media (max-width: 639.98px) { .ird-panel__head { padding: 16px 16px 12px; } .ird-panel__body { padding: 0 16px 16px; } }

/* A tinted icon square: the hue it names (data-hue on it or an ancestor),
   else the page's area; a work colour where the icon is that kind of work,
   orange only for what waits. */
.ird-tile {
  display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--hue-tint, var(--area-tint)); color: var(--hue-ink, var(--area-ink));
}
.ird-tile .material-symbols-outlined { font-size: 20px; font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 20; }
.ird-tile--sm { width: 36px; height: 36px; border-radius: 10px; }
.ird-tile--lg { width: 48px; height: 48px; border-radius: 14px; }
/* Solid: the hue's ink as the tile, the icon in the page colour. For the
   dashboard's "Waiting on you" cards, the one place a tile is the focus. */
.ird-tile--solid { background: var(--hue-ink, var(--area-ink)); color: var(--surface); }
.ird-tile--lg .material-symbols-outlined { font-size: 24px; font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24; }
/* Before a section or card title. */
.ird-tile--h { width: 32px; height: 32px; border-radius: 10px; }
.ird-tile--h .material-symbols-outlined { font-size: 18px; font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 20; }
.ird-tile--act { background: var(--act-50); color: var(--act-ink); }
.ird-tile--sign { background: var(--k-sign-50); color: var(--k-sign); }
.ird-tile--case { background: var(--k-case-50); color: var(--k-case); }
.ird-tile--ext { background: var(--k-ext-50); color: var(--k-ext); }
.ird-tile--copy { background: var(--k-copy-50); color: var(--k-copy); }
.ird-tile--danger { background: var(--danger-soft); color: var(--danger); }
.ird-tile--neutral { background: var(--surface-sunk); color: var(--ink-2); }
body[data-color-mode="contrast"] .ird-tile { border: 1px solid #000; }

/* Figures at the top of a page: one card per figure, the number on top in its
   hue's ink (data-hue on the card, else the area's), the icon tile at the top
   right, the label under it and an optional hint. The dashboard's and the
   Departments page's pattern, shared by every area so the pages agree.
     <ul class="ird-kpis"><li class="ird-kpi" data-hue="work">
       <span class="ird-kpi__top"><span class="ird-kpi__num">12</span><span class="ird-tile ird-tile--sm">icon</span></span>
       <span class="ird-kpi__label">Label</span><span class="ird-kpi__hint">Hint</span></li></ul>
   A <dl> works too: the label a <dt>, the number a <dd class="ird-kpi__num">. */
.ird-kpis {
  display: grid; gap: 16px; margin: 0 0 var(--s-6); padding: 0; list-style: none;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.ird-kpi {
  display: flex; flex-direction: column; gap: 10px; min-width: 0; margin: 0; padding: 16px 18px 14px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  color: inherit; text-decoration: none;
}
.ird-kpi__top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-2); min-width: 0; }
.ird-kpi__num {
  display: block; margin: 0; font-size: 2rem; font-weight: 700; letter-spacing: -0.025em; line-height: 1.05;
  color: var(--hue-ink, var(--area-ink)); font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.ird-kpi__num small { font-size: 0.5em; font-weight: 600; letter-spacing: 0; color: var(--ink-3); margin-left: 4px; }
.ird-kpi[data-hue="neutral"] .ird-kpi__num { color: var(--ink); }
.ird-kpi--wait .ird-kpi__num { color: var(--act-ink); }
.ird-kpi__label { display: block; margin: 0; font-size: var(--text-sm); font-weight: 600; color: var(--ink); line-height: 1.35; }
.ird-kpi__hint { display: block; margin: 2px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.35; }
a.ird-kpi { transition: transform var(--t-fast) ease, box-shadow var(--t-fast) ease, border-color var(--t-fast) ease; }
a.ird-kpi:hover { transform: translateY(-2px); border-color: var(--hue-ink, var(--area-ink)); box-shadow: var(--shadow-2); }
a.ird-kpi[aria-current="true"] { border-color: var(--hue-ink, var(--area-ink)); box-shadow: inset 0 0 0 1px var(--hue-ink, var(--area-ink)); }
body[data-color-mode="contrast"] .ird-kpi { border: 2px solid #000; box-shadow: none; }
body[data-color-mode="contrast"] .ird-kpi__num { color: #000; }
body[data-color-mode="contrast"] a.ird-kpi .ird-kpi__label,
body[data-color-mode="contrast"] .ird-kpi--wait .ird-kpi__num,
body[data-color-mode="contrast"] .ird-kpi[data-hue="danger"] .ird-kpi__num { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { a.ird-kpi:hover { transform: none; } }
@media (max-width: 639.98px) {
  .ird-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: var(--s-5); }
  .ird-kpis > .ird-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .ird-kpi { padding: 12px 14px; gap: 8px; }
  .ird-kpi__num { font-size: 1.5rem; }
  .ird-kpi .ird-tile { width: 32px; height: 32px; border-radius: 10px; }
  .ird-kpi__label { font-size: 13px; }
}

/* Section heads: more room above than below. */
.ird-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 14px; }
.ird-section-note { margin: 0 0 0 auto; font-size: var(--text-sm); color: var(--ink-3); }
.ird-section-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--text-lg); font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.ird-act-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--act); box-shadow: 0 0 0 4px var(--act-50); }
body[data-color-mode="contrast"] .ird-act-dot { box-shadow: none; }

/* "Waiting on you" on list pages: a slim line of what waits, orange counts. */
.ird-waiting {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5);
  padding: 10px var(--s-5); margin-bottom: var(--s-6);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-ctl); box-shadow: var(--shadow-1);
}
.ird-waiting__title { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); margin: 0 var(--s-2) 0 0; }
.ird-waiting__title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--act); box-shadow: 0 0 0 3px var(--act-50); }
/* Nothing waiting: the dot goes grey, orange is only for work that waits. */
.ird-waiting:not(:has(a, .ird-waiting__item)) .ird-waiting__title::before { background: var(--ink-3); box-shadow: 0 0 0 3px var(--surface-sunk); }
.ird-waiting__item { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--ink-2); }
.ird-waiting a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: var(--ink-2); text-decoration: none; border-radius: var(--r-sm); padding: 2px 0; }
.ird-waiting a:hover span:last-child { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.ird-waiting b {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 7px;
  background: var(--act-50); color: var(--act-ink); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
body[data-color-mode="contrast"] .ird-waiting b { border: 1px solid #000; }
.ird-waiting__none { color: var(--ink-3); }
/* Phones: the items sit two to a row under the title. Each item is a 44px
   target and its words wrap inside its half of the row. */
@media (max-width: 639.98px) {
  .ird-waiting { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 0 var(--s-3); padding: var(--s-3) var(--s-4) var(--s-1); margin-bottom: var(--s-4); }
  .ird-waiting__title, .ird-waiting__none { grid-column: 1 / -1; }
  .ird-waiting a { min-width: 0; min-height: 44px; padding: 8px 0; line-height: 1.3; align-items: flex-start; }
  .ird-waiting__none { padding: 6px 0 10px; }
}
/* A queue page's own count: one line at every width. */
@media (max-width: 639.98px) {
  .ird-waiting.ird-waiting--one { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; padding: var(--s-2) var(--s-4); }
  .ird-waiting--one a { min-height: 44px; padding: 0; align-items: center; }
  .ird-waiting--one .ird-waiting__none { padding: 0; }
}

/* ------------------------------------------------------------ buttons --- */
.ird-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--target); padding: 0 var(--s-4);
  border: 1px solid transparent; border-radius: 11px;
  font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background-color var(--t-fast) ease, border-color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform 100ms ease;
}
@media (min-width: 1024px) and (pointer: fine) { .ird-btn { min-height: 42px; } }
.ird-btn .material-symbols-outlined { font-size: 19px; }
.ird-btn:active:not(:disabled):not([aria-disabled="true"]) { transform: translateY(1px); }
.ird-btn:disabled, .ird-btn[aria-disabled="true"] { opacity: 0.5; box-shadow: none; }
.ird-btn--primary {
  background: var(--navy); color: var(--on-navy);
  box-shadow: 0 1px 2px rgb(var(--brand-primary-rgb, 22 30 84) / 0.2), 0 6px 14px -6px rgb(var(--brand-primary-rgb, 22 30 84) / 0.5);
}
.ird-btn--primary:hover:not(:disabled) { filter: brightness(1.18); }
html.dark .ird-btn--primary { box-shadow: none; }
html.dark .ird-btn--primary:hover:not(:disabled) { filter: brightness(1.07); }
.ird-btn--secondary { background: var(--surface); color: var(--ink); border-color: var(--rule-strong); box-shadow: var(--shadow-1); }
.ird-btn--secondary:hover:not(:disabled) { background: var(--surface-2); border-color: var(--navy-200); }
.ird-btn--quiet { background: transparent; color: var(--navy-ink); padding: 0 var(--s-3); }
.ird-btn--quiet:hover:not(:disabled) { background: var(--navy-50); }
/* A routine-sized control that leads to something destructive: the danger
   ink says where it goes; the destructive fill is kept for the final button. */
.ird-btn.ird-btn--danger-quiet { color: var(--danger); }
.ird-btn.ird-btn--danger-quiet:hover:not(:disabled) { background: var(--danger-soft); }
.ird-btn.ird-btn--danger-line { background: var(--surface); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, var(--rule-strong)); box-shadow: var(--shadow-1); }
.ird-btn.ird-btn--danger-line:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }
.ird-btn--destructive { background: var(--danger); color: var(--on-danger); box-shadow: 0 1px 2px rgb(120 20 20 / 0.2), 0 6px 14px -6px rgb(120 20 20 / 0.45); }
html.dark .ird-btn--destructive { background: #b3263a; color: #ffffff; box-shadow: none; }
.ird-btn--destructive:hover:not(:disabled) { filter: brightness(1.1); }
.ird-btn--block { width: 100%; }
.ird-btn--sm { min-height: 34px; padding: 0 var(--s-3); font-size: var(--text-xs); border-radius: 9px; }
@media (min-width: 1024px) and (pointer: fine) { .ird-btn.ird-btn--sm { min-height: 34px; } }
/* Under 1024px and on touch a small button is still a 44px target. */
@media (pointer: coarse), (max-width: 1023.98px) { .ird-btn.ird-btn--sm { min-height: 44px; } }
body[data-color-mode="contrast"] .ird-btn--primary,
body[data-color-mode="contrast"] .ird-btn--destructive { border: 2px solid #000; box-shadow: none; }
body[data-color-mode="contrast"] .ird-btn--secondary { border: 2px solid #000; box-shadow: none; }
body[data-color-mode="contrast"] .ird-btn--quiet { text-decoration: underline; }

/* ------------------------------------------------------- form controls --- */
.ird-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ird-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ird-hint { font-size: var(--text-xs); color: var(--ink-3); }
.ird-input, .ird-select {
  display: block; width: 100%; min-height: var(--target); padding: 0 var(--s-3);
  border: 1px solid var(--control-border); border-radius: var(--r-md);
  background-color: var(--surface); color: var(--ink);
  font: inherit; font-size: 14.5px; line-height: 1.3;
  box-shadow: none;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
@media (min-width: 1024px) and (pointer: fine) { .ird-input, .ird-select { min-height: 42px; } }
/* A textarea keeps its vertical padding; its rows set the height. */
textarea.ird-input, .ird-input.ird-textarea { min-height: 0; padding-top: 10px; padding-bottom: 10px; line-height: 1.5; resize: vertical; }
.ird-input::placeholder { color: var(--ink-3); opacity: 1; }
.ird-input:hover, .ird-select:hover { border-color: var(--ink-3); }
.ird-input:focus, .ird-select:focus {
  border-color: var(--navy); outline: none; box-shadow: 0 0 0 3px var(--navy-100);
}
body[data-color-mode="contrast"] :is(.ird-input, .ird-select) { border-width: 2px; }
body[data-color-mode="contrast"] :is(.ird-input, .ird-select):focus { outline: 3px solid #000; outline-offset: 1px; box-shadow: none; }
/* Date and time fields keep their ring while focus sits in one of their segments. */
:is([type="date"], [type="datetime-local"], [type="time"]).ird-input:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-100); }
.ird-select { padding-right: 2.25rem; }
html.dark .ird-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23c9cde6' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}
.ird-input--code { text-align: center; font-family: var(--font-sans); font-variant-numeric: tabular-nums; font-size: 1.75rem; letter-spacing: 0.4em; min-height: 56px; }
.ird-input-wrap { position: relative; }
.ird-input-wrap .ird-input { padding-right: 52px; }
.ird-input-wrap__btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
/* A field with its icon inside, on the left. */
.ird-with-icon { position: relative; }
.ird-with-icon > .material-symbols-outlined { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--ink-3); pointer-events: none; }
.ird-with-icon > .ird-input { padding-left: 40px; }
.ird-checkbox { width: 18px; height: 18px; border-radius: var(--r-sm); border: 1px solid var(--control-border); color: var(--navy); }
/* Checkboxes and radios everywhere: the box is the surface, the edge the 3:1
   control border, and a checked box is brand-filled in every mode. */
:where(.ird-content, .ird-auth) :is([type="checkbox"], [type="radio"]) {
  width: 18px; height: 18px; background-color: var(--surface); border-color: var(--control-border);
  color: var(--navy);
}
:where(.ird-content, .ird-auth) [type="checkbox"] { border-radius: 5px; }
:where(.ird-content, .ird-auth) :is([type="checkbox"], [type="radio"]):focus { box-shadow: none; }
:where(.ird-content, .ird-auth) :is([type="checkbox"], [type="radio"]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
body[data-color-mode="contrast"] :where(.ird-content, .ird-auth) :is([type="checkbox"], [type="radio"]):focus-visible { outline-width: 3px; }
html.dark :where(.ird-content, .ird-auth) [type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%230d1029' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}
html.dark :where(.ird-content, .ird-auth) [type="radio"]:checked {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%230d1029' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
}
:where(.ird-content, .ird-auth) :is([type="checkbox"], [type="radio"]):disabled { opacity: 0.5; }

/* A field that needs fixing: the danger edge and fill, and its own line
   under it that says how to fix it. */
.ird-input.is-invalid, .ird-select.is-invalid { border-color: var(--danger); background-color: var(--danger-soft); }
.ird-input.is-invalid:focus, .ird-select.is-invalid:focus { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
body[data-color-mode="contrast"] :is(.ird-input, .ird-select).is-invalid { border-width: 2px; }
.ird-field-error {
  display: flex; align-items: flex-start; gap: 6px; margin: 6px 0 0;
  font-size: var(--text-xs); font-weight: 600; line-height: 1.35; color: var(--danger); overflow-wrap: anywhere;
}
.ird-field > .ird-field-error { margin-top: 0; }
.ird-field-error .material-symbols-outlined { font-size: 16px; flex: none; margin-top: 1px; }

/* A drop zone: a dashed edge, because it is not a settled object. The file
   input inside it is visually hidden; the whole zone is its label. */
.ird-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-1);
  min-height: 120px; padding: var(--s-5) var(--s-4); text-align: center; cursor: pointer;
  background: var(--surface-2); color: var(--ink);
  border: 1.5px dashed var(--control-border); border-radius: var(--r-ctl);
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.ird-panel .ird-drop { background: var(--surface-2); }
.ird-drop:hover, .ird-drop.is-over { border-color: var(--navy); background: var(--navy-50); }
.ird-drop:active { background: var(--navy-100); }
.ird-drop:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--navy); }
.ird-drop .material-symbols-outlined { font-size: 28px; color: var(--navy-ink); }
.ird-drop__title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ird-drop__text { font-size: var(--text-xs); color: var(--ink-3); }
.ird-drop[data-has-file="true"] { border-style: solid; }
.ird-drop.is-invalid, .ird-drop[aria-invalid="true"] { border: 2px solid var(--danger); background: var(--danger-soft); }
body[data-color-mode="contrast"] .ird-drop { border-width: 2px; }
body[data-color-mode="contrast"] .ird-drop:has(input:focus-visible) { outline-width: 3px; }
/* The file it holds: a thumbnail, the name on one line, its size. */
.ird-file { display: flex; align-items: center; gap: var(--s-3); min-width: 0; padding: var(--s-3); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-ctl); }
.ird-file__thumb { display: flex; align-items: center; justify-content: center; flex: none; width: 96px; height: 72px; overflow: hidden; background: #fff; border: 1px solid var(--rule); border-radius: 8px; color: var(--ink-2); }
.ird-file__thumb img { width: 100%; height: 100%; object-fit: contain; }
.ird-file__thumb .material-symbols-outlined { font-size: 32px; }
.ird-file__main { min-width: 0; flex: 1 1 auto; }
.ird-file__name { margin: 0; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ird-file__meta { margin: 0; font-size: var(--text-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- alerts --- */
.ird-alert {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border: 1px solid; border-radius: var(--r-ctl);
  font-size: var(--text-sm); line-height: 1.5; overflow-wrap: anywhere;
}
.ird-alert .material-symbols-outlined { font-size: 20px; flex: none; margin-top: 1px; }
.ird-alert__title { font-weight: 700; }
.ird-alert--success { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 28%, transparent); }
.ird-alert--warning { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.ird-alert--info { color: var(--info); background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 24%, transparent); }
.ird-alert--error { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 28%, transparent); }
.ird-alert :where(p) { margin: 0; }
body[data-color-mode="contrast"] .ird-alert { border-width: 2px; border-color: #000; }

/* ------------------------------------------------- consequential row ---
   The action that files, confirms or acknowledges something, set apart from
   routine controls: under a rule, after a gap, with one line that says what
   it does. A way back stays quiet at the start of the row. */
.ird-commit { display: grid; gap: var(--s-4); margin-top: var(--s-2); padding-top: var(--s-5); border-top: 1px solid var(--rule-strong); }
.ird-commit__note { display: flex; gap: var(--s-2); margin: 0; font-size: var(--text-sm); color: var(--ink-2); max-width: 62ch; }
.ird-commit__note .material-symbols-outlined { font-size: 18px; flex: none; color: var(--ink-3); margin-top: 1px; }
.ird-commit__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); }
.ird-commit__row .ird-btn--primary { min-width: 12rem; }
@media (max-width: 639.98px) {
  .ird-commit__row { flex-direction: column-reverse; align-items: stretch; }
  .ird-commit__row .ird-btn { width: 100%; white-space: normal; }
}

/* --------------------------------------------------------------- dialogs -- */
.ird-dialog-scrim {
  position: fixed; inset: 0; z-index: 140; display: flex; align-items: center; justify-content: center;
  padding: var(--s-4); background: var(--scrim);
}
.ird-dialog-scrim.hidden { display: none; }
.ird-dialog {
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: 32rem; max-height: 85vh;
  overflow: hidden; background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-pop);
}
.ird-dialog__head { display: flex; align-items: flex-start; gap: var(--s-3); padding: 22px 22px 8px; }
.ird-dialog__head > .material-symbols-outlined {
  display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; margin: -4px 0 0; border-radius: 12px;
  font-size: 22px; background: var(--navy-50); color: var(--navy-ink);
}
.ird-dialog__title { font-size: 1.125rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; margin: 0; }
.ird-dialog__body { padding: var(--s-2) 22px 22px; overflow-y: auto; color: var(--ink); font-size: var(--text-base); line-height: 1.55; overflow-wrap: anywhere; }
.ird-dialog__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s-2) var(--s-3); padding: var(--s-3) 22px 22px; background: var(--surface); }
.ird-dialog__body > * + * { margin-top: var(--s-4); }
.ird-dialog__titles { min-width: 0; flex: 1 1 auto; }
.ird-dialog__title { overflow-wrap: anywhere; }
.ird-dialog__lede { margin: 2px 0 0; font-size: var(--text-sm); color: var(--ink-3); }
.ird-dialog__form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
/* A note in the footer, on its own row above the actions: what the action will do. */
.ird-dialog__warn { flex: 1 1 100%; display: flex; gap: var(--s-2); margin: 0; font-size: var(--text-xs); color: var(--ink-2); }
.ird-dialog__warn .material-symbols-outlined { font-size: 16px; color: var(--warn); flex: none; }
.ird-dialog__foot--sticky { position: sticky; bottom: 0; }
/* Larger dialogs hold forms that scroll: rules mark where the head and the
   actions end. */
.ird-dialog--md { max-width: 44rem; max-height: 92vh; }
.ird-dialog--lg { max-width: 60rem; max-height: 92vh; }
.ird-dialog--full { max-width: none; max-height: none; height: 100%; border-radius: 0; border: 0; }
.ird-dialog:is(.ird-dialog--md, .ird-dialog--lg, .ird-dialog--full) .ird-dialog__head { padding: 20px 22px 14px; border-bottom: 1px solid var(--rule); }
.ird-dialog:is(.ird-dialog--md, .ird-dialog--lg, .ird-dialog--full) .ird-dialog__body { flex: 1 1 auto; min-height: 0; padding: var(--s-4) 22px; }
.ird-dialog:is(.ird-dialog--md, .ird-dialog--lg, .ird-dialog--full) .ird-dialog__foot { border-top: 1px solid var(--rule); padding-top: var(--s-4); }
/* A tall dialog scrolls with the page behind it; a full one covers it. */
.ird-dialog-scrim--scroll { display: block; overflow-y: auto; padding: var(--s-3); }
.ird-dialog-scrim--scroll .ird-dialog { max-height: none; margin: 0 auto; }
.ird-dialog-scrim--full { padding: 0; z-index: 150; }
@media (max-width: 639.98px) {
  .ird-dialog__head { padding: 18px 16px 8px; }
  .ird-dialog__body { padding-left: 16px; padding-right: 16px; }
  .ird-dialog__foot { flex-direction: column-reverse; align-items: stretch; padding-left: 16px; padding-right: 16px; }
  .ird-dialog__foot .ird-btn { width: 100%; }
  .ird-dialog__foot .ird-dialog__warn { order: 1; }
}
.ird-dialog__close { position: absolute; right: 10px; top: 10px; }
body[data-color-mode="contrast"] .ird-dialog { border: 2px solid #000; }
.ird-dialog--error .ird-dialog__head > .material-symbols-outlined { color: var(--danger); background: var(--danger-soft); }
.ird-dialog--success .ird-dialog__head > .material-symbols-outlined { color: var(--ok); background: var(--ok-soft); }
.ird-dialog--warning .ird-dialog__head > .material-symbols-outlined { color: var(--warn); background: var(--warn-soft); }
.ird-dialog--info .ird-dialog__head > .material-symbols-outlined { color: var(--info); background: var(--info-soft); }

/* The page-message dialog (includes/message_modal.html, owner 23 Nov 2026):
   every success, warning, notice and error, one dialog per page. Several
   messages are one list; the most serious sets the colour and the title. */
.ird-msg { z-index: 145; }
.ird-msg__panel { max-width: 30rem; }
.ird-msg .ird-dialog__head { padding-right: 60px; }
.ird-msg__text { margin: 0; }
.ird-msg__list { display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.ird-msg__list li { display: flex; align-items: flex-start; gap: var(--s-2); }
.ird-msg__list li > .material-symbols-outlined { flex: none; margin-top: 2px; font-size: 18px; }
.ird-msg__list li[data-level="error"] > .material-symbols-outlined { color: var(--danger); }
.ird-msg__list li[data-level="warning"] > .material-symbols-outlined { color: var(--warn); }
.ird-msg__list li[data-level="success"] > .material-symbols-outlined { color: var(--ok); }
.ird-msg__list li[data-level="info"] > .material-symbols-outlined { color: var(--info); }

/* Toasts from live notifications. */
.ird-toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: var(--s-3);
  width: min(360px, calc(100vw - 32px)); padding: var(--s-3) var(--s-4);
  background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r-ctl);
  box-shadow: var(--shadow-pop); font-size: var(--text-sm);
  transition: opacity 300ms ease;
}
.ird-toast .material-symbols-outlined { font-size: 20px; flex: none; color: var(--info); }
.ird-toast--success .material-symbols-outlined { color: var(--ok); }
.ird-toast--warning .material-symbols-outlined { color: var(--warn); }
.ird-toast--error .material-symbols-outlined { color: var(--danger); }
.ird-toast__title { font-weight: 700; }
.ird-toast__text { color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ------------------------------------------------------- tables & lists -- */
.ird-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--text-sm); }
.ird-table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 11px 14px; background: var(--area-soft); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.ird-table td { padding: 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; color: var(--ink); }
.ird-table tr:last-child td { border-bottom: 0; }
.ird-table tbody tr:hover td { background: color-mix(in srgb, var(--area-tint) 55%, var(--surface)); }

.ird-list { list-style: none; margin: 0; padding: 0; }
.ird-list > li { border-top: 1px solid var(--rule); }
.ird-list > li:first-child { border-top: 0; }
.ird-list__row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 22px; color: inherit; text-decoration: none; }
a.ird-list__row:hover { background: var(--navy-50); }
.ird-list__main { min-width: 0; }
.ird-list__title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.ird-list__side { flex: none; font-size: var(--text-xs); color: var(--ink-3); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ data tables that stack --
   <div class="ird-dtable-wrap"><table class="ird-dtable">, cells with
   data-label. A real table: a tinted header row and 14px rows. Under 760px of
   the width the list actually has, each row becomes a record card. */
.ird-dtable-wrap { container: dtable / inline-size; }
.ird-dtable {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: var(--text-sm); background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.ird-dtable th {
  text-align: left; vertical-align: bottom; padding: 11px 14px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--area-soft);
  border-bottom: 1px solid var(--rule); white-space: nowrap;
}
.ird-dtable thead tr:first-child th:first-child { border-top-left-radius: var(--r-lg); }
.ird-dtable thead tr:first-child th:last-child { border-top-right-radius: var(--r-lg); }
.ird-dtable td {
  padding: 14px; border-top: 1px solid var(--rule); vertical-align: middle;
  color: var(--ink); overflow-wrap: break-word; font-variant-numeric: tabular-nums;
}
/* break-word, not anywhere: a short word (a status, a role) never splits, and
   long free text breaks through its own overflow-wrap:anywhere. */
.ird-dtable tbody tr:first-child td { border-top: 0; }
.ird-dtable tbody tr { transition: background-color 120ms ease; }
.ird-dtable tbody tr:hover td { background: color-mix(in srgb, var(--area-tint) 55%, var(--surface)); }
.ird-dtable tbody tr:last-child td:first-child { border-bottom-left-radius: var(--r-lg); }
.ird-dtable tbody tr:last-child td:last-child { border-bottom-right-radius: var(--r-lg); }
.ird-dtable .ird-dtable__right { text-align: right; }
.ird-dtable td.ird-dtable__nowrap, .ird-dtable th.ird-dtable__nowrap { white-space: nowrap; overflow-wrap: normal; }
.ird-dtable__actions { text-align: right; white-space: nowrap; }
.ird-dtable__actions > * { vertical-align: middle; }
/* A selectable row (the audit log): the row is a button for keyboard users. */
.ird-dtable tr[aria-selected="true"] td { background: var(--navy-50); }
body[data-color-mode="contrast"] .ird-dtable tr[aria-selected="true"] td { background: var(--surface-sunk); box-shadow: inset 0 2px 0 #000, inset 0 -2px 0 #000; }
body[data-color-mode="contrast"] .ird-dtable { border: 2px solid #000; }
.ird-dtable__foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3);
  margin-top: var(--s-3); font-size: var(--text-xs); color: var(--ink-3);
}

@container dtable (max-width: 759.98px) {
  .ird-dtable, .ird-dtable tbody, .ird-dtable tr, .ird-dtable td { display: block; }
  .ird-dtable { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); }
  .ird-dtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* Two short fields side by side; the lead cell and the actions span both. */
  .ird-dtable tbody tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-4);
    position: relative; padding: 14px 16px;
    background: transparent; border-top: 1px solid var(--rule);
  }
  .ird-dtable tbody tr:first-child { border-top: 0; }
  .ird-dtable tbody tr:hover td { background: transparent; }
  .ird-dtable tbody tr:hover { background: color-mix(in srgb, var(--navy-50) 55%, var(--surface)); }
  .ird-dtable td, .ird-dtable tbody tr:first-child td { border: 0; padding: 2px 0; border-radius: 0 !important; }
  .ird-dtable td[data-label]::before {
    content: attr(data-label); display: block; margin-top: var(--s-2);
    font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  }
  .ird-dtable td.ird-dtable__lead::before { display: none; }
  .ird-dtable td.ird-dtable__lead, .ird-dtable td.ird-dtable__wide, .ird-dtable td.ird-dtable__empty, .ird-dtable td[colspan], .ird-dtable .ird-dtable__actions { grid-column: 1 / -1; }
  .ird-dtable td.ird-dtable__empty { padding: 0; }
  .ird-dtable .ird-dtable__right { text-align: left; }
  .ird-dtable__actions { text-align: left; white-space: normal; padding-top: var(--s-3) !important; }
  .ird-dtable__actions .ird-btn { min-height: 44px; }
  .ird-dtable tr[aria-selected="true"] { box-shadow: inset 0 0 0 2px var(--navy-ink); }
  .ird-dtable td.ird-dtable__nowrap { white-space: normal; }
}
/* Inside a panel: edge to edge, no frame of its own. */
.ird-dtable--flush { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.ird-dtable--flush thead tr:first-child th { border-radius: 0 !important; }
.ird-dtable--flush :is(th, td):first-child { padding-left: 22px; }
.ird-dtable--flush :is(th, td):last-child { padding-right: 22px; }
@container dtable (max-width: 759.98px) {
  .ird-dtable--flush { border: 0; padding: 0; }
  .ird-dtable--flush td:first-child, .ird-dtable--flush td:last-child { padding-left: 0; padding-right: 0; }
}
@media (pointer: coarse), (max-width: 1023.98px) {
  .ird-dtable__foot a, .ird-dtable td > a.ird-link { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Status: always a word, with its icon. Orange only for what waits on the
   viewer. As a pill (.ird-pill) it takes a soft tint of its kind. */
.ird-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); font-size: var(--text-sm); }
.ird-status--wait { color: var(--act-ink); }
.ird-status--done { color: var(--ok); }
.ird-status--closed { color: var(--ink-3); }
.ird-status--danger { color: var(--danger); }
.ird-status--warn { color: var(--warn); }
.ird-status--info { color: var(--info); }
/* A priority or attention mark on a record (Urgent, High priority, urgent
   cases). Ink, weight and an icon carry it: orange is kept for work waiting
   on this person and red for refusals and errors. */
.ird-flag { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink); }
.ird-flag .material-symbols-outlined { font-size: 17px; color: var(--ink-2); font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 20; }
.ird-status .material-symbols-outlined { font-size: 17px; font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 20; }
/* A pill never runs past its cell: in a narrow column a long state ("Waiting
   for your signature") wraps onto a second line inside the pill. */
.ird-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; max-width: 100%; padding: 5px 10px 5px 8px; border-radius: 8px;
  font-size: 13px; font-weight: 600; line-height: 1.15; white-space: normal; overflow-wrap: break-word; text-align: left; border: 1px solid transparent;
  background: var(--surface-sunk); color: var(--ink-2);
}
.ird-pill .material-symbols-outlined { flex: none; font-size: 16px; font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 20; }
/* A pill that names its hue (a role on the Users list, a registration's state). */
.ird-pill[data-hue] { background: var(--hue-tint); color: var(--hue-ink); }
.ird-pill--review, .ird-pill--signed { background: var(--k-sign-50); color: var(--k-sign); }
.ird-pill--approved { background: var(--ok-soft); color: var(--ok); }
.ird-pill--released { background: var(--k-case-50); color: var(--k-case); }
.ird-pill--wait { background: var(--act-50); color: var(--act-ink); }
.ird-pill--danger { background: var(--danger-soft); color: var(--danger); }
.ird-pill--closed { background: transparent; color: var(--ink-3); border-color: var(--rule-strong); }
body[data-color-mode="contrast"] .ird-pill { background: #fff; color: #000; border: 1px solid #000; }

/* ------------------------------------------------- stages and steps -------
   One family for everything that moves through stages in a fixed order.
   Stages behind are filled green, the current one is ink and stands taller,
   the one waiting on the viewer is orange, a blocked or refused one is
   danger, stages ahead are outlined. A word always names the state too.

   <ol class="ird-track"> <li data-state="done|current|upcoming|skipped|blocked">
     <span class="ird-track__bar"></span> [<span class="ird-track__label">] */
.ird-track { display: flex; align-items: flex-start; gap: 3px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.ird-track > * { position: relative; flex: 1 1 0; min-width: 0; }
.ird-track__bar {
  display: block; height: 6px; margin-top: 3px; border-radius: 3px;
  background: transparent; box-shadow: inset 0 0 0 1px var(--control-border);
}
.ird-track > [data-state="done"] .ird-track__bar { background: var(--ok); box-shadow: none; }
.ird-track > [data-state="skipped"] .ird-track__bar { background: repeating-linear-gradient(90deg, var(--ok) 0 6px, transparent 6px 9px); box-shadow: inset 0 0 0 1px var(--ok); }
.ird-track > [data-state="current"] .ird-track__bar { height: 10px; margin-top: 1px; background: var(--navy); box-shadow: none; }
.ird-track > [data-state="current"].is-mine .ird-track__bar { background: var(--act); }
.ird-track > [data-state="blocked"] .ird-track__bar { height: 10px; margin-top: 1px; background: var(--danger); box-shadow: none; }
.ird-track[data-end="ok"] > [data-state="current"] .ird-track__bar { background: var(--ok); }
.ird-track[data-end="danger"] > [data-state="current"] .ird-track__bar { background: var(--danger); }
.ird-track > .is-off { margin-left: 6px; }
.ird-track > .is-gate .ird-track__bar { box-shadow: inset 0 0 0 1px var(--control-border), inset 0 0 0 2px var(--surface), inset 0 0 0 3px var(--control-border); }
.ird-track__label {
  display: flex; align-items: center; gap: 2px; margin-top: 4px;
  font-size: var(--text-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; line-height: 1.3;
}
.ird-track__label .material-symbols-outlined { font-size: 14px; flex: none; }
.ird-track > [data-state="current"] .ird-track__label { color: var(--ink); font-weight: 700; }
.ird-track > [data-state="current"].is-mine .ird-track__label { color: var(--act-ink); }
.ird-track > [data-state="blocked"] .ird-track__label { color: var(--danger); font-weight: 700; }
.ird-track--numbers .ird-track__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ird-track__name { overflow: hidden; text-overflow: ellipsis; }
.ird-track--fixed { flex: none; gap: 3px; }
.ird-track--fixed > * { flex: 0 0 22px; }
body[data-color-mode="contrast"] .ird-track__bar { box-shadow: inset 0 0 0 1px var(--ink); }
body[data-color-mode="contrast"] .ird-track > :is([data-state="done"], [data-state="current"], [data-state="blocked"]) .ird-track__bar { box-shadow: none; }
body[data-color-mode="contrast"] .ird-track > [data-state="current"].is-mine .ird-track__label { text-decoration: underline; }

.ird-stage { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.ird-stage__word { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: var(--text-sm); line-height: 1.3; }
.ird-stage__note { font-size: var(--text-xs); font-weight: 400; color: var(--ink-3); }

/* Step list: the same states, one row per step with a 30px marker on a
   connector line. */
.ird-steps { --step-pad-x: 22px; list-style: none; margin: 0; padding: 0; }
.ird-step {
  position: relative; display: grid; gap: 4px var(--s-3);
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-areas: "mark main" "mark side";
  padding: var(--s-3) var(--step-pad-x); border-top: 1px solid var(--rule);
}
.ird-steps > li:first-child { border-top: 0; }
.ird-step::before {
  content: ""; position: absolute; left: calc(var(--step-pad-x) + 14px); top: 0; bottom: 0; width: 2px; background: var(--rule);
}
.ird-steps > li:first-child::before { top: 26px; }
.ird-steps > li:last-child::before { bottom: calc(100% - 26px); }
.ird-steps > li:only-child::before { display: none; }
.ird-step__mark {
  grid-area: mark; position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 10px;
  border: 1px solid var(--control-border); background: var(--surface); color: var(--ink-2);
  font-size: var(--text-sm); font-weight: 700; font-variant-numeric: tabular-nums;
}
.ird-step__mark .material-symbols-outlined { font-size: 18px; }
.ird-step[data-state="done"] .ird-step__mark { background: var(--ok); border-color: var(--ok); color: var(--surface); }
.ird-step[data-state="skipped"] .ird-step__mark { border-style: dashed; color: var(--ink-2); }
.ird-step[data-state="current"] .ird-step__mark { border: 2px solid var(--navy); color: var(--navy-ink); }
.ird-step[data-state="current"].is-mine .ird-step__mark { border-color: var(--act); color: var(--act-ink); background: var(--act-50); }
.ird-step[data-state="blocked"] .ird-step__mark { border: 2px solid var(--danger); color: var(--danger); }
.ird-step[data-state="waiting"] .ird-step__mark { color: var(--ink-3); }
.ird-step--gate { background: var(--surface-2); }
.ird-step--gate .ird-step__mark { border-style: double; border-width: 3px; color: var(--ink); }
.ird-step__main { grid-area: main; min-width: 0; }
.ird-step__title { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; line-height: 1.35; }
.ird-step__meta { margin: 2px 0 0; font-size: var(--text-xs); color: var(--ink-3); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ird-step__side { grid-area: side; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); font-size: var(--text-sm); }
.ird-steps--compact { --step-pad-x: 0px; }
.ird-steps--compact > .ird-step { border-top: 0; padding-top: var(--s-2); padding-bottom: var(--s-2); }
.ird-steps--compact > li:first-child::before { top: 22px; }
.ird-steps--compact > li:last-child::before { bottom: calc(100% - 22px); }
body[data-color-mode="contrast"] .ird-step::before { background: var(--ink); }

/* A vertical stack that never lets a long word push it wider. */
.ird-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.ird-stack--loose { gap: var(--s-6); }
.ird-dialog__body.ird-stack > * + * { margin-top: 0; }

/* ------------------------------------------------------ checkbox rows ---
   A checkbox or radio with its words; the whole row is the target. */
.ird-checkrow { display: flex; align-items: flex-start; gap: var(--s-3); min-height: var(--target); padding: var(--s-2) 0; font-size: var(--text-sm); color: var(--ink); cursor: pointer; }
.ird-checkrow > [type="checkbox"], .ird-checkrow > [type="radio"] { flex: none; margin-top: 2px; }
.ird-checkrow__label { display: block; font-weight: 600; color: var(--ink); line-height: 1.35; }
.ird-checkrow__hint { display: block; margin-top: 2px; font-size: var(--text-xs); font-weight: 400; color: var(--ink-3); }
@media (pointer: coarse), (max-width: 1023.98px) { .ird-checkrow { min-height: 44px; } }
.ird-checklist { list-style: none; margin: 0; padding: 0; }
.ird-checklist > li + li { border-top: 1px solid var(--rule); }
@container (min-width: 640px) {
  .ird-checklist--2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-6); }
  .ird-checklist--2 > li + li { border-top: 0; }
  .ird-checklist--2 > li { border-bottom: 1px solid var(--rule); }
}

/* A signature pad is paper: white in every mode, a dashed edge, a pen cursor. */
.ird-sigpad {
  display: block; width: 100%; max-width: 100%; background: #ffffff; cursor: crosshair; touch-action: none;
  border: 1.5px dashed var(--control-border); border-radius: var(--r-ctl);
}

/* ---------------------------------------------------- inline disclosure ---
   A form that opens in place under the button that asks for it. */
.ird-disclose { min-width: 0; }
.ird-disclose > summary { list-style: none; }
.ird-disclose > summary::-webkit-details-marker { display: none; }
.ird-disclose__chev { font-size: 18px; transition: transform var(--t-fast) ease; }
.ird-disclose[open] > summary .ird-disclose__chev { transform: rotate(180deg); }
.ird-disclose__panel {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); margin-top: var(--s-2); padding: var(--s-4);
  max-width: 34rem; background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--r-ctl);
}
.ird-disclose__panel p { margin: 0; }
@media (max-width: 639.98px) { .ird-disclose, .ird-disclose > summary { width: 100%; } }

/* --------------------------------------------------------------- facts ---
   Facts about one thing, label over value, as many columns as fit. */
.ird-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: var(--s-4) var(--s-6); margin: 0; }
.ird-facts > div { min-width: 0; }
.ird-facts dt { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.ird-facts dd { margin: 2px 0 0; color: var(--ink); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ird-facts dd small { display: block; margin-top: 2px; font-size: var(--text-xs); color: var(--ink-3); }
.ird-facts .is-wide { grid-column: 1 / -1; }
.ird-facts--stack { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 639.98px) {
  .ird-facts:not(.ird-facts--stack):not(.ird-facts--2) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3) var(--s-4); }
}
.ird-facts--2 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .ird-facts--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Key and value on one ruled row, value to the right: a side panel's summary. */
.ird-kv { display: grid; grid-template-columns: minmax(6rem, max-content) minmax(0, 1fr); column-gap: 0; margin: 0; font-size: var(--text-sm); }
.ird-kv dt, .ird-kv dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--rule); }
.ird-kv dt:first-of-type, .ird-kv dd:first-of-type { border-top: 0; }
.ird-kv dt { color: var(--ink-3); padding-right: var(--s-4); }
.ird-kv dd { color: var(--ink); font-weight: 600; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.ird-kv dd .ird-mono { font-weight: 500; }
/* A reference is read character by character: never broken across lines. */
.ird-kv dd.ird-mono, .ird-kv dd .ird-mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ird-kv dd .ird-mono { display: inline-block; max-width: 100%; vertical-align: bottom; }
.ird-kv--stack { grid-template-columns: minmax(0, 1fr); }
.ird-kv--stack dt { padding-bottom: 0; }
.ird-kv--stack dd { padding-top: 2px; border-top: 0; text-align: left; }

/* ------------------------------------------------- segmented control ---
   One choice of a few, side by side, on a sunken track; the chosen one
   lifts to white with the brand ink. */
.ird-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-ctl); background: var(--surface-sunk); border: 1px solid var(--rule); }
.ird-seg > :is(a, label, button) {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: calc(var(--target) - 8px); margin: 0; padding: 0 var(--s-3);
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-2);
  font: inherit; font-size: var(--text-sm); font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease;
}
.ird-seg > :is(a, label, button):hover { background: var(--surface); color: var(--ink); }
.ird-seg > :is(a[aria-current="true"], a[aria-current="page"], label:has(input:checked), button[aria-pressed="true"], button[aria-selected="true"]) { background: var(--surface); color: var(--area-ink); box-shadow: var(--shadow-1); }
.ird-seg > :is(a, label, button) .material-symbols-outlined { font-size: 18px; margin-right: 6px; }
.ird-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.ird-seg > :is(button:disabled, label:has(input:disabled)) { color: var(--ink-3); cursor: not-allowed; opacity: 0.7; }
.ird-seg > :is(button[aria-pressed="true"]:disabled, label:has(input:checked:disabled)) { background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 -2px 0 var(--rule-strong); }
.ird-seg > :is(a, button):focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ird-seg > label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.ird-seg--fill { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.ird-seg--sm > :is(a, label, button) { min-height: 28px; padding: 0 var(--s-2); font-size: var(--text-xs); }
@media (pointer: coarse), (max-width: 1023.98px) { .ird-seg > :is(a, label, button) { min-height: 44px; } }
body[data-color-mode="contrast"] .ird-seg { border: 2px solid #000; background: #fff; }
body[data-color-mode="contrast"] .ird-seg > :is(a[aria-current="true"], a[aria-current="page"], label:has(input:checked), button[aria-pressed="true"], button[aria-selected="true"]) { background: #000; color: #fff; }

/* Tabs: an underline row; the chosen tab is brand ink with a 2px rule. */
.ird-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.ird-tabs::-webkit-scrollbar { display: none; }
.ird-tab {
  display: inline-flex; align-items: center; gap: 8px; flex: none; height: 44px; padding: 0 12px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; border-radius: 8px 8px 0 0; background: none;
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink-3); text-decoration: none; white-space: nowrap;
}
.ird-tab:hover { color: var(--ink); background: var(--area-soft); }
.ird-tab:focus-visible { outline-offset: -2px; }
.ird-tab[aria-current="page"], .ird-tab[aria-selected="true"] { color: var(--area-ink); border-bottom-color: var(--area-ink); }
body[data-color-mode="contrast"] .ird-tab[aria-current="page"], body[data-color-mode="contrast"] .ird-tab[aria-selected="true"] { border-bottom-width: 3px; color: #000; }
@media (max-width: 639.98px) { .ird-tabs { gap: 0; } .ird-tab { padding: 0 9px; font-size: 14px; gap: 6px; } }

/* A count beside a label: brand tint, or orange for what waits on you. */
.ird-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 7px;
  font-size: 12.5px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
  background: var(--navy-50); color: var(--navy-ink);
}
.ird-count--act { background: var(--act-50); color: var(--act-ink); }
body[data-color-mode="contrast"] .ird-count { border: 1px solid #000; }

/* ----------------------------------------------------------- pagination -- */
.ird-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-5); font-size: var(--text-sm); color: var(--ink-3); }
.ird-pager__pages { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.ird-pager a, .ird-pager [aria-current="page"] {
  display: inline-flex; align-items: center; justify-content: center; min-width: var(--target); min-height: var(--target);
  padding: 0 var(--s-3); border-radius: var(--r-md); text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums;
}
.ird-pager a { color: var(--ink-2); background: transparent; border: 1px solid transparent; }
.ird-pager a:hover { background: var(--navy-50); color: var(--ink); }
.ird-pager [aria-current="page"] { background: var(--navy); color: var(--on-navy); }
.ird-pager__gap { padding: 0 var(--s-1); color: var(--ink-3); }
body[data-color-mode="contrast"] .ird-pager a { border-color: #000; text-decoration: underline; }

/* ---------------------------------------------------------- empty state --
   Centred in its card: a tinted icon square, a title that says what is
   empty and why, and the one action that fills it. */
.ird-empty { padding: 48px 24px; max-width: 60ch; }
.ird-empty__title { font-size: var(--text-md); font-weight: 600; color: var(--ink); margin: 0 0 6px; }
.ird-empty__text { color: var(--ink-3); font-size: var(--text-sm); margin: 0 0 var(--s-5); }
.ird-panel.ird-empty { max-width: none; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ird-panel.ird-empty .ird-empty__text { max-width: 52ch; }
/* Every empty state leads with a tile in the page's area colour: the page's
   own icon (or the one data-icon names), never an illustration. A filtered
   list that came back empty in a centred card says search_off. */
.ird-empty::before {
  content: var(--page-icon, "inbox") / ""; display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 14px;
  background: var(--area-tint); color: var(--area-ink);
  font-family: "Material Symbols Outlined"; font-size: 22px; line-height: 1; font-weight: normal; font-style: normal; letter-spacing: normal; text-transform: none; white-space: nowrap; overflow: hidden;
  font-feature-settings: "liga"; -webkit-font-feature-settings: "liga"; font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}
.ird-empty:has(> .ird-empty__icon)::before { content: none; }
.ird-panel.ird-empty::before { content: "search_off" / ""; width: 52px; height: 52px; margin-bottom: 14px; border-radius: 16px; font-size: 24px; }
.ird-empty[data-icon]::before { content: attr(data-icon) / ""; }
.ird-empty[data-icon="folder"]::before { content: "folder_open" / ""; }
body[data-color-mode="contrast"] .ird-empty::before { border: 2px solid #000; }

/* Loading rows: a soft shimmer that stops under reduced motion. */
.ird-skeleton { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--rule) 0%, var(--surface-2) 50%, var(--rule) 100%); background-size: 200% 100%; animation: ird-shimmer 1.4s ease-in-out infinite; }
@keyframes ird-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ------------------------------------------------ classification chip ---
   Each level: its own icon, its word, and a four-bar meter that fills one
   bar per level, so Public < General < Confidential < Restricted reads by
   shape and word, and colour only reinforces it. Markup stays
   <span class="ird-ctab" data-level="..." title="...">Word</span>; the
   icon and the meter are drawn here, hidden from screen readers. */
.ird-ctab-col { position: static; display: inline-flex; align-items: center; width: auto !important; height: auto !important; max-width: 100%; vertical-align: middle; }
.ird-ctab {
  position: static; display: inline-flex; align-items: center; gap: 6px; flex: none;
  width: auto; height: 26px; padding: 0 9px 0 7px; border-radius: 8px;
  border: 1px solid transparent;
  font-size: 12.5px; font-weight: 600; line-height: 1; white-space: nowrap;
  --i: "apartment"; --b1: currentColor; --b2: currentColor; --b3: var(--bar-off); --b4: var(--bar-off);
  --bar-off: color-mix(in srgb, currentColor 24%, transparent);
  background: var(--navy-50); color: var(--navy-ink);
}
.ird-ctab::before {
  content: var(--i) / ""; font-family: "Material Symbols Outlined"; font-size: 15px; line-height: 1; font-weight: normal;
  font-feature-settings: "liga"; -webkit-font-feature-settings: "liga"; letter-spacing: normal; text-transform: none;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 20;
}
.ird-ctab::after {
  content: ""; flex: none; width: 18px; height: 11px; margin-left: 2px;
  background:
    linear-gradient(var(--b1), var(--b1)) 0 100% / 3px 5px no-repeat,
    linear-gradient(var(--b2), var(--b2)) 5px 100% / 3px 7px no-repeat,
    linear-gradient(var(--b3), var(--b3)) 10px 100% / 3px 9px no-repeat,
    linear-gradient(var(--b4), var(--b4)) 15px 100% / 3px 11px no-repeat;
}
.ird-ctab[data-level="PUBLIC"] {
  --i: "public"; --b2: var(--bar-off);
  background: var(--surface-2); color: var(--ink-2); border-color: var(--rule-strong);
}
.ird-ctab[data-level="GENERAL"] { --i: "apartment"; }
.ird-ctab[data-level="CONFIDENTIAL"] {
  --i: "lock"; --b3: currentColor;
  background: var(--navy-100); color: var(--navy-ink); border-color: var(--navy-200);
}
.ird-ctab[data-level="RESTRICTED"] {
  --i: "shield_lock"; --b3: currentColor; --b4: currentColor;
  background: var(--navy); color: var(--on-navy);
}
body[data-color-mode="contrast"] .ird-ctab { background: #fff; color: #000; border: 1px solid #000; }
body[data-color-mode="contrast"] .ird-ctab[data-level="RESTRICTED"] { background: #000; color: #fff; }
/* The old positional key over a column of tabs: the chips carry their own
   words now, so the key becomes the column's name. */
.ird-ctab-legend { position: static; width: auto !important; height: auto; }
.ird-ctab-legend span { display: none !important; }
.ird-ctab-legend::before { content: "Classification"; }
.ird-ctab-legend:has(~ .ird-ctab-legend__compact) { display: none; }
.ird-ctab-legend__compact { display: block !important; }
.ird-tabline-legend { display: none; }

/* Area sheets size their classification column from the old tab line
   (three steps plus a tab). Pinned here, so every such column is the chip's
   width instead. */
* { --tab-step: 0px !important; --tab-w: 150px !important; }

/* Wrappers that hung the tab from a row's top rule now hold the chip in
   the row's flow, above the title. */
:is(.ird-activity__tab, .ird-pick__tab, .ird-bm-doc__tab, .ird-rq-a-doc__tab, .ird-rq-b-row__tab, .ird-rq-b-details__tab, .ird-pub-record__tab, .ird-reg__ctab, .ia-ctabcell, .ird-ctab-cell, .ird-ctab-inline, .ird-record__ctab, .ird-pc-tabline) {
  position: static !important; width: auto !important; height: auto !important; min-height: 0 !important; margin: 0 !important; inset: auto !important;
}
:is(.ird-pick__tab, .ird-bm-doc__tab, .ird-rq-a-doc__tab, .ird-rq-b-row__tab, .ird-rq-b-details__tab, .ird-pub-record__tab) { display: block; margin-bottom: 8px !important; }
:is(.ird-pick, .ird-bm-doc, .ird-rq-a-doc, .ird-rq-b-row, .ird-pub-record):has(> :is(.ird-pick__tab, .ird-bm-doc__tab, .ird-rq-a-doc__tab, .ird-rq-b-row__tab, .ird-pub-record__tab)) { padding-top: var(--s-4) !important; }

/* ---------------------------------------------------------- record lists --
   A list of records drawn as a table card: a tinted header row, 14px rows,
   the classification chip in its own column. Three arrangements, chosen by
   the width the list actually has:
     stacked   under 900px: each record is a card row with its chips under
               the title;
     compact   900 to 1099px: the department moves into the line under the title;
     full      1100px and up: every field in its own column.
   The reference stays on one line; the full value is in its title and dialog. */
.ird-records-wrap { container: records / inline-size; }
.ird-records {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.ird-records > li + li .ird-record { border-top: 1px solid var(--rule); }
.ird-records > li:first-child .ird-record { border-top-left-radius: var(--r-lg); border-top-right-radius: var(--r-lg); }
.ird-records > li:last-child .ird-record { border-bottom-left-radius: var(--r-lg); border-bottom-right-radius: var(--r-lg); }
body[data-color-mode="contrast"] .ird-records { border: 2px solid #000; }
.ird-record__head-cell { min-width: 0; }
.ird-record {
  position: relative; display: grid; column-gap: var(--s-3); row-gap: 6px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "main main menu"
    "ref ref ref"
    "tab status status"
    "dept dept when";
  align-items: center;
  padding: 14px 8px 14px 16px;
  background: transparent;
  transition: background-color 120ms ease;
}
.ird-record:hover { background: color-mix(in srgb, var(--navy-50) 55%, var(--surface)); }
.ird-record:active { background: var(--navy-50); }
.ird-records__head { display: none; }
.ird-record__cell { min-width: 0; }
.ird-record__ctab { grid-area: tab; }
.ird-record__main { grid-area: main; }
.ird-record__refcell { grid-area: ref; }
.ird-record__deptcell { grid-area: dept; }
.ird-record__statuscell { grid-area: status; }
.ird-record__whencell { grid-area: when; }
.ird-record__rowmenu { grid-area: menu; align-self: start; }
.ird-record__label { display: inline; color: var(--ink-3); font-size: 12.5px; font-weight: 600; margin-right: 4px; }
.ird-records--no-dept .ird-record__deptcell { display: none; }

@container records (min-width: 900px) {
  .ird-records__head,
  .ird-record {
    display: grid; column-gap: var(--s-4); row-gap: 0; align-items: center;
    grid-template-columns: minmax(0, 1fr) 136px 150px 150px 112px 44px;
    grid-template-areas: "main ref tab status when menu";
    padding: 12px 12px 12px 20px;
  }
  .ird-record { min-height: 64px; }
  .ird-records__head {
    margin: 0; padding-top: 11px; padding-bottom: 11px; align-items: center;
    font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--surface-2);
    border: 1px solid var(--rule); border-bottom: 0; border-radius: var(--r-lg) var(--r-lg) 0 0;
  }
  .ird-records__head + .ird-records { border-top-left-radius: 0; border-top-right-radius: 0; }
  .ird-records__head + .ird-records > li:first-child .ird-record { border-top: 1px solid var(--rule); border-radius: 0; }
  .ird-record__ctab, .ird-record__statuscell { align-self: center; }
  .ird-record__label { display: none; }
  .ird-record__deptcell { display: none; }
  .ird-record__rowmenu { align-self: center; }
}
@container records (min-width: 1100px) {
  .ird-records__head,
  .ird-record {
    grid-template-columns: minmax(0, 1fr) 140px 150px minmax(110px, 170px) 150px 112px 44px;
    grid-template-areas: "main ref tab dept status when menu";
  }
  .ird-records--no-dept .ird-records__head,
  .ird-records--no-dept .ird-record {
    grid-template-columns: minmax(0, 1fr) 140px 150px 150px 112px 44px;
    grid-template-areas: "main ref tab status when menu";
  }
  .ird-record__deptcell { display: block; font-size: var(--text-sm); }
  .ird-records__head .ird-record__deptcell { font-size: inherit; }
  .ird-records--no-dept .ird-record__deptcell { display: none; }
  .ird-record__subdept { display: none; }
}
/* The library (comp A): Document, Classification, Status, Department,
   Owner, Updated. The reference sits under the title. On phones a card is
   the title, the reference, the chips, and one muted line for department,
   owner and date. */
.ird-records--lib .ird-record {
  grid-template-columns: max-content minmax(0, 1fr) 44px;
  grid-template-areas: "main main menu" "tab status status" "meta meta meta";
}
.ird-records--lib :is(.ird-record__deptcell, .ird-record__ownercell, .ird-record__whencell) { display: none; }
.ird-record__ownercell { grid-area: owner; }
.ird-record__metacell { grid-area: meta; margin: 0; font-size: 13px; color: var(--ink-3); overflow-wrap: anywhere; }
.ird-records--lib .ird-record__subdept { display: none; }
.ird-owner { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; color: var(--ink-2); font-size: var(--text-sm); }
.ird-owner__av { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--hue-tint, var(--navy-50)); color: var(--hue-ink, var(--navy-ink)); font-size: 12px; font-weight: 700; }
.ird-owner__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body[data-color-mode="contrast"] .ird-owner__av { background: #fff; color: #000; box-shadow: inset 0 0 0 1px #000; }
@container records (min-width: 900px) {
  .ird-records--lib .ird-records__head, .ird-records--lib .ird-record {
    column-gap: 14px;
    grid-template-columns: minmax(0, 1fr) 140px 164px 128px 104px 44px;
    grid-template-areas: "main tab status owner when menu";
  }
  .ird-records--lib .ird-record__metacell { display: none; }
  .ird-records--lib :is(.ird-record__ownercell, .ird-record__whencell) { display: block; }
  .ird-records--lib .ird-record__subdept { display: block; }
}
@container records (min-width: 1100px) {
  .ird-records--lib .ird-records__head, .ird-records--lib .ird-record {
    grid-template-columns: minmax(0, 1fr) 140px 172px 120px 128px 104px 44px;
    grid-template-areas: "main tab status dept owner when menu";
  }
  .ird-records--lib .ird-record__deptcell { display: block; }
  .ird-records--lib .ird-record__subdept { display: none; }
  .ird-records--lib.ird-records--no-dept .ird-records__head, .ird-records--lib.ird-records--no-dept .ird-record {
    grid-template-columns: minmax(0, 1fr) 140px 172px 128px 104px 44px;
    grid-template-areas: "main tab status owner when menu";
  }
  .ird-records--lib.ird-records--no-dept .ird-record__deptcell { display: none; }
}
.ird-record__ref {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 12.5px; line-height: 1.35; color: var(--ink-3); font-variant-numeric: tabular-nums slashed-zero; letter-spacing: 0.01em;
}
.ird-record__ref button {
  display: block; max-width: 100%; padding: 0; margin: 0; border: 0; background: none; color: var(--ink-2); font: inherit; text-align: left;
  text-decoration: underline dotted; text-decoration-color: var(--ink-3); text-underline-offset: 3px; border-radius: var(--r-sm);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ird-record__ref button:hover { color: var(--navy-ink); text-decoration-color: currentColor; }
.ird-record__subdept { color: var(--ink-3); }
.ird-record__refcell { display: flex; align-items: baseline; gap: 4px; }
.ird-record__refcell > .ird-record__ref { flex: 1 1 auto; min-width: 0; }
.ird-records__head .ird-record__refcell { display: block; }
.ird-libbody { display: flex; flex-direction: column; }
/* The view tabs open the filter card: one card, tabs on top, which is the
   card that rises over the page banner's edge. */
.ird-libbody > .ird-tabs:has(+ .ird-filters--card) {
  margin-bottom: 0 !important; padding: 4px 12px 0; background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.ird-libbody > .ird-tabs + .ird-filters--card { border-top: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); }
body[data-color-mode="contrast"] .ird-libbody > .ird-tabs:has(+ .ird-filters--card) { border: 2px solid #000; border-bottom-width: 1px; }
@media (max-width: 639.98px) { .ird-libbody > .ird-tabs:has(+ .ird-filters--card) { padding: 2px 4px 0; } }
.ird-record__doc { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ird-record__doc > .ird-tile { align-self: flex-start; margin-top: 1px; }
.ird-record__docmain { min-width: 0; flex: 1 1 auto; }
.ird-record__refline { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 2px; min-width: 0; }
.ird-record__refline .ird-record__ref { max-width: 100%; }
/* "Waiting on you" on a row: an orange dot and its words. */
.ird-wait-mark { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--act-ink); white-space: nowrap; }
.ird-wait-mark::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--act); }
body[data-color-mode="contrast"] .ird-wait-mark { text-decoration: underline; }
.ird-record__title { font-weight: 600; font-size: 14.5px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ird-record__title:hover { color: var(--navy-ink); text-decoration: underline; text-underline-offset: 3px; }
/* The whole row opens the record; the other controls sit above that layer. */
.ird-record__title::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.ird-record__title:focus-visible { outline: none; }
.ird-record__title:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -3px; border-radius: 12px; }
.ird-record :where(button, a:not(.ird-record__title), summary, details) { position: relative; z-index: 1; }
.ird-record__sub { margin-top: 2px; font-size: 12.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.ird-record__dept { font-size: var(--text-sm); color: var(--ink-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ird-record__when { font-size: var(--text-sm); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ird-record__urgent { display: inline-flex; align-items: center; gap: 2px; margin-left: var(--s-2); font-size: var(--text-xs); font-weight: 600; color: var(--ink); }
.ird-record__urgent .material-symbols-outlined { font-size: 16px; color: var(--ink-2); }
.ird-record__hits { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: var(--s-2); font-size: var(--text-xs); color: var(--ink-3); }
.ird-record__hits a {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 8px;
  border: 1px solid var(--rule-strong); border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--navy-ink); text-decoration: none; background: var(--surface); font-variant-numeric: tabular-nums;
}
.ird-record__hits a:hover { border-color: var(--navy); background: var(--navy-50); }
.ird-record__snippet { margin-top: 4px; font-size: var(--text-xs); color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Row actions: a native disclosure, so it works without script and by keyboard. */
.ird-rowmenu { position: relative; justify-self: end; }
.ird-rowmenu > summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: var(--target); height: var(--target); border-radius: var(--r-ctl); color: var(--ink-2);
  border: 1px solid transparent;
}
@media (pointer: coarse), (max-width: 1023.98px) { .ird-rowmenu > summary { width: 44px; height: 44px; } }
.ird-rowmenu > summary::-webkit-details-marker { display: none; }
.ird-rowmenu > summary:hover, .ird-rowmenu[open] > summary { background: var(--surface); color: var(--ink); border-color: var(--rule); box-shadow: var(--shadow-1); }
.ird-rowmenu__panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 232px; padding: 6px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-ctl); box-shadow: var(--shadow-pop);
}
.ird-rowmenu__panel .ird-menu__item { white-space: nowrap; min-height: 40px; }
@media (pointer: coarse), (max-width: 1023.98px) { .ird-rowmenu__panel .ird-menu__item { min-height: 44px; } }
.ird-rowmenu__panel hr, .ird-rowmenu__panel .ird-menu__sep { border: 0; height: 1px; background: var(--rule); margin: 6px 4px; }
body[data-color-mode="contrast"] .ird-rowmenu__panel { border: 2px solid #000; }

/* Filter bar: a card of labelled fields. */
.ird-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-3); margin-bottom: var(--s-4); }
.ird-filters--card { padding: var(--s-4); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
body[data-color-mode="contrast"] .ird-filters--card { border: 2px solid #000; }
.ird-filters .ird-field { min-width: 0; }
.ird-filters__search { flex: 1 1 320px; }
.ird-filters__searchrow { display: flex; gap: var(--s-2); }
.ird-filters__searchrow > .ird-input, .ird-filters__searchrow > .ird-with-icon { flex: 1 1 auto; min-width: 0; }
.ird-filters__toggle { display: none; }
.ird-filters__count { font-variant-numeric: tabular-nums; }
/* On wide screens the selects sit in the same row as the search field. */
.ird-filters__more { display: contents; }
.ird-filters__select { flex: 0 1 172px; }
.ird-filters__dates { flex: 0 1 300px; }
.ird-daterange { display: flex; align-items: center; gap: 6px; }
.ird-daterange .ird-input { padding: 0 8px; font-variant-numeric: tabular-nums; min-width: 0; }
.ird-daterange span { color: var(--ink-3); font-size: 13px; }
.ird-filters__clear { align-self: flex-end; }
.ird-filters__note { flex: 1 1 100%; order: 10; margin: calc(-1 * var(--s-1)) 0 0; font-size: var(--text-xs); color: var(--ink-3); }
/* On phones they fold behind the Filters button, open when any is in use. */
@media (max-width: 639.98px) {
  .ird-filters { gap: var(--s-2); }
  .ird-filters--card { padding: var(--s-3); }
  .ird-filters__search { flex-basis: 100%; }
  .ird-filters__toggle { display: inline-flex; }
  /* The field gets the whole width; Search and Filters share the line under it. */
  .ird-filters__searchrow { flex-wrap: wrap; }
  .ird-filters__searchrow > .ird-input, .ird-filters__searchrow > .ird-with-icon { flex: 1 1 100%; }
  .ird-filters__searchrow > .ird-btn { flex: 1 1 0; justify-content: center; }
  .ird-filters__more { display: none; flex: 1 1 100%; }
  .ird-filters__more[data-open="true"] { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); padding-top: var(--s-2); }
  .ird-filters__more .ird-filters__note, .ird-filters__more .ird-filters__clear { grid-column: 1 / -1; margin: 0; }
}

/* Page actions on phones: the main action, and the rest behind More. */
.ird-only-narrow { display: none; }
.ird-more { position: relative; }
.ird-more > summary { list-style: none; }
.ird-more > summary::-webkit-details-marker { display: none; }
.ird-more .ird-rowmenu__panel { right: 0; }
@media (max-width: 639.98px) {
  .ird-only-wide { display: none !important; }
  .ird-only-narrow { display: block; }
}

/* A stats line instead of tiles: real counts, one line, wraps when it must. */
.ird-stats { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s-5); margin: 0 0 var(--s-6); font-size: var(--text-sm); color: var(--ink-3); }
/* A page's figures take its area ink (orange and red marks set their own). */
.ird-stats strong { color: var(--area-ink); font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 4px; }
.ird-stats > div { display: inline-flex; align-items: baseline; gap: 6px; }
.ird-stats dt { color: var(--ink-3); }
.ird-stats dd { margin: 0; }
.ird-stats dd strong { margin-left: 0; }
.ird-stats dd span { color: var(--ink-3); }
.ird-stats a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.ird-stats a:hover { color: var(--ink); }

/* Activity lists. The plain row: the record and its meta, the time at the
   end, a chip line above when the row carries one. */
.ird-activity { list-style: none; margin: 0; padding: 0; }
.ird-activity > li + li { border-top: 1px solid var(--rule); }
.ird-activity__row { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px var(--s-4); padding: 12px 22px; }
.ird-activity__row--tab .ird-activity__tab { flex: 1 0 100%; }
.ird-activity__main { min-width: 0; flex: 1 1 0; }
.ird-activity__titlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.ird-activity__title { font-weight: 600; font-size: 14.5px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; line-height: 1.35; margin: 0; }
a.ird-activity__title:hover { text-decoration: underline; text-underline-offset: 3px; }
.ird-activity__meta { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.ird-activity__meta b { color: var(--ink-2); font-weight: 600; }
.ird-activity__when { flex: none; text-align: right; font-size: 13px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.35; }
.ird-activity__when strong { display: block; color: var(--ink-2); font-weight: 600; }
@media (max-width: 479.98px) { .ird-activity__row { flex-direction: column; gap: 4px; padding: 12px 16px; } .ird-activity__when { text-align: left; } }

/* The dashboard's recent activity: a tile for the kind of action, the record
   and its chip on one line, who did it under, the date at the end; the
   whole row opens the record. */
.ird-activity--tiles { padding: 0 10px 10px; }
.ird-activity__row--tile { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; transition: background-color var(--t-fast) ease; }
.ird-activity__row--tile:has(a.ird-activity__title):hover { background: var(--navy-50); }
.ird-activity__row--tile a.ird-activity__title::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.ird-activity__row--tile a.ird-activity__title:focus-visible { outline: none; }
.ird-activity__row--tile a.ird-activity__title:focus-visible::after { outline: 2px solid var(--focus); outline-offset: -2px; }
@media (max-width: 639.98px) {
  .ird-activity--tiles { padding: 0 4px 6px; }
  .ird-activity__row--tile { grid-template-columns: 36px minmax(0, 1fr); gap: 4px 12px; }
  .ird-activity__row--tile > .ird-tile { width: 36px; height: 36px; border-radius: 10px; grid-row: span 2; align-self: start; }
  .ird-activity__row--tile .ird-activity__when { grid-column: 2; text-align: left; display: flex; gap: 6px; }
  .ird-activity__row--tile .ird-activity__when strong { display: inline; font-weight: 500; color: var(--ink-3); }
}

/* ------------------------------------------------------------ loading ---
   static/js/ird-loading.js (owner, 23 Nov 2026; the animated IRD360 logo
   24 Nov). Nothing here shows before 400 ms, so a quick page never flickers.
   - .ird-loading: the middle of the screen while a page opens or a form
     sends, over a light scrim (above the dialogs and the phone bottom bar,
     centred in the space above that bar): the badge in the logo's turning
     ring, the words, what was asked for, a moving bar, and a slot held for
     the 10 s line so nothing moves when it appears.
   - .ird-busy: a small spinner in place of the label of the button that is
     waiting; [data-ird-hold] takes no second press from the first moment.
   - .ird-loading-veil: a small ring over an area a person is waiting to fill.
   Only transform and opacity move. Reduced motion: nothing turns or slides;
   a slow fade instead. */
:root { --mark-orange: #f97205; --mark-orange-hi: #fe8a40; --mark-navy: #032564; }
.ird-spinner {
  display: inline-block; flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--navy-ink) 16%, transparent); border-top-color: var(--mark-orange);
  animation: ird-spin 0.8s linear infinite;
}
@keyframes ird-spin { to { transform: rotate(360deg); } }
@keyframes ird-pulse { 50% { opacity: 0.35; } }
@keyframes ird-loading-in { from { opacity: 0; } }
@keyframes ird-loading-pop { from { opacity: 0; transform: translateY(6px) scale(0.96); } }
@keyframes ird-loading-bar { from { transform: translateX(-100%); } to { transform: translateX(265%); } }
@keyframes ird-loading-rise { from { opacity: 0; transform: translateY(4px); } }
.ird-loading {
  position: fixed; inset: 0; z-index: 190; display: flex; align-items: center; justify-content: center;
  padding: var(--s-4) var(--s-4) calc(var(--s-4) + var(--bottom-nav-h, 0px) + env(safe-area-inset-bottom, 0px));
  background: rgb(245 246 250 / 0.62); cursor: progress; animation: ird-loading-in var(--t-fast) ease-out;
}
.ird-loading[hidden] { display: none; }
html.dark .ird-loading { background: rgb(13 16 41 / 0.62); }
body[data-color-mode="contrast"] .ird-loading { background: rgb(255 255 255 / 0.72); }
.ird-loading__box {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  width: min(320px, 100%); padding: var(--s-7) var(--s-6) 0; text-align: center;
  background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop); animation: ird-loading-pop 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
body[data-color-mode="contrast"] .ird-loading__box { border: 2px solid #000; }
/* The mark: the badge still, the ring turning round it. */
.ird-mark { position: relative; display: block; flex: none; width: 84px; height: 84px; margin-bottom: var(--s-4); }
.ird-mark__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: ird-spin 1.6s linear infinite; will-change: transform; }
.ird-mark__arc { fill: none; stroke: var(--mark-orange); stroke-width: 7; stroke-linecap: round; }
.ird-mark__arc--hi { stroke: var(--mark-orange-hi); stroke-linecap: butt; }
.ird-mark__head { fill: var(--mark-orange); }
.ird-mark__dots { fill: #fff; }
.ird-mark__core { position: absolute; inset: 15px; display: block; border-radius: 50%; }
.ird-mark__badge, .ird-mark__img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ird-mark__disk { fill: var(--mark-navy); }
.ird-mark__digits { fill: none; stroke: #fff; stroke-width: 7.8; stroke-linecap: round; stroke-linejoin: round; }
.ird-mark__img--dark { display: none; }
html.dark .ird-mark__img--light { display: none; }
html.dark .ird-mark__img--dark, .ird-mark__img--only { display: block; }
html.dark .ird-mark__disk { stroke: rgb(255 255 255 / 0.9); stroke-width: 2; }
body[data-color-mode="contrast"] .ird-mark__arc { stroke: #a34700; }
body[data-color-mode="contrast"] .ird-mark__head { fill: #a34700; }
.ird-loading__text { margin: 0; font-size: var(--text-base); font-weight: 600; line-height: 1.4; color: var(--ink); }
.ird-loading__detail {
  max-width: 100%; min-height: 1.45em; margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: var(--text-sm); line-height: 1.45; color: var(--ink-3);
}
/* Held from the start, so the box never grows when the 10 s line appears. */
.ird-loading__slow { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 68px; padding: var(--s-3) 0 var(--s-4); }
.ird-loading__stop, .ird-loading__note { animation: ird-loading-rise 240ms cubic-bezier(0.16, 1, 0.3, 1) both; }
.ird-loading__stop { gap: var(--s-2); cursor: pointer; }
.ird-loading__stop[hidden], .ird-loading__note[hidden] { display: none; }
.ird-loading__key {
  display: none; padding: 1px 5px; border: 1px solid var(--rule-strong); border-radius: 5px;
  font: inherit; font-size: 11px; font-weight: 600; line-height: 1.3; color: var(--ink-3);
}
@media (hover: hover) and (pointer: fine) { .ird-loading__key { display: inline-block; } }
@media (pointer: coarse) { .ird-loading__stop { min-height: 44px; padding: 0 var(--s-4); } }
.ird-loading__note { margin: 0; max-width: 34ch; font-size: var(--text-xs); line-height: 1.45; color: var(--ink-2); }
/* The bar along the foot of the box: it moves, it never counts. */
.ird-loading__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; overflow: hidden; background: color-mix(in srgb, var(--navy-ink) 10%, transparent); }
.ird-loading__bar > span {
  position: absolute; inset: 0 auto 0 0; width: 38%; border-radius: 3px; background: var(--mark-orange);
  animation: ird-loading-bar 1.5s cubic-bezier(0.65, 0, 0.35, 1) infinite; will-change: transform;
}
body[data-color-mode="contrast"] .ird-loading__bar { background: rgb(0 0 0 / 0.2); }
body[data-color-mode="contrast"] .ird-loading__bar > span { background: #000; }
@media (max-width: 639.98px) {
  .ird-loading__box { padding-top: var(--s-6); }
  .ird-mark { width: 72px; height: 72px; }
  .ird-mark__core { inset: 13px; }
}
.ird-busy, [data-ird-hold] { pointer-events: none; }
.ird-busy { position: relative; color: transparent !important; }
.ird-busy > * { visibility: hidden; }
.ird-busy::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; border: 2px solid var(--ird-busy-ink, var(--on-navy)); border-right-color: transparent;
  animation: ird-spin 0.8s linear infinite;
}
.ird-btn--secondary.ird-busy::after, .ird-btn--quiet.ird-busy::after { border-color: var(--ird-busy-ink, var(--ink)); border-right-color: transparent; }
.ird-loading-area { position: relative; }
.ird-loading-area--short { min-height: 48px; }
.ird-loading-veil {
  position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-start; justify-content: center;
  padding-top: min(40%, 48px); background: color-mix(in srgb, var(--surface) 65%, transparent); border-radius: inherit;
}
.ird-loading-area--short .ird-loading-veil { align-items: center; padding-top: 0; }
/* A search field: a small spinner at its right end, nothing over the words being typed. */
.ird-loading-veil, .ird-loading-veil--corner { pointer-events: none; }
.ird-loading-veil--corner { inset: 0 12px 0 auto; align-items: center; padding-top: 0; background: none; }
.ird-loading-veil--corner .ird-spinner { width: 18px; height: 18px; border-width: 2px; }
body[data-color-mode="contrast"] .ird-spinner { border-color: rgb(0 0 0 / 0.25); border-top-color: #000; }
@media (prefers-reduced-motion: reduce) {
  .ird-spinner, .ird-busy::after { animation: ird-pulse 1.6s ease-in-out infinite; }
  .ird-loading { animation: none; }
  .ird-loading__box { animation: ird-loading-in 200ms ease-out both; }
  .ird-mark__ring { animation: none; }
  .ird-mark { animation: ird-pulse 2.4s ease-in-out infinite; }
  .ird-loading__bar > span { left: 31%; animation: ird-pulse 2.4s ease-in-out infinite; }
  .ird-loading__stop, .ird-loading__note { animation: none; }
}

/* ------------------------------------------------------------- footer --- */
/* ------------------------------------------------------------- footer ---
   One slim line (owner: "its height consumes too much space"), the same on
   every page of the shell. Wider than 640px it is pinned to the bottom of the
   window: sticky as the last thing in the main column, so it follows the side
   menu's width and its own line is reserved at the end of the page, and the
   last table row, form button or pager always scrolls clear of it. Above the
   tablet bottom bar where there is one. On a phone it simply ends the page,
   above the bottom bar, which already holds the bottom of the screen.
   Things pinned to the bottom themselves (the Branding save bar, the
   finalization override, the full-height workspaces) step up by --footer-pin. */
.ird-footer {
  display: flex; flex-wrap: nowrap; align-items: center; justify-content: center; gap: 0 var(--s-2);
  min-height: var(--footer-h); padding: 0 var(--s-4); border-top: 1px solid var(--rule);
  background: var(--surface);
  font-size: 12px; line-height: 16px; color: var(--ink-3); text-align: center;
  white-space: nowrap; overflow: hidden;
}
.ird-footer > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ird-footer > [aria-hidden="true"] { flex: none; }
.ird-footer a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.ird-footer a:hover { color: var(--ink); }
body[data-color-mode="contrast"] .ird-footer { border-top: 2px solid #000; color: #000; }
@media (min-width: 640.02px) {
  .ird-footer { position: sticky; bottom: 0; z-index: 30; height: var(--footer-h); }
  /* A 24px target in the pinned line, so it stays slim on a tablet (WCAG 2.5.8);
     more specific than the 44px rule for stand-alone links below. */
  .ird-body .ird-footer a { display: inline-flex; align-items: center; min-height: 24px; }
}
@media (min-width: 640.02px) and (max-width: 1023.98px) {
  body:has(.ird-bottomnav) .ird-footer { bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  /* The end of the page: a line that wraps rather than clips. */
  .ird-footer { flex-wrap: wrap; gap: 0 var(--s-3); white-space: normal; overflow: visible; padding-top: var(--s-2); padding-bottom: var(--s-2); }
  .ird-footer > * { overflow: visible; }
  /* Wrapped, a dot would end a line: the gap separates the parts instead. */
  .ird-footer > [aria-hidden="true"] { display: none; }
  /* The bottom bar's room is kept under the footer instead of under the content. */
  body:has(.ird-bottomnav) .ird-content { padding-bottom: var(--s-4) !important; }
}
.ia-savebar { bottom: var(--footer-pin); }

/* ------------------------------------------------------------- sign-in ---
   The same world signed out: the soft ground, one white card with the
   brand mark at its head, nothing to sell. */
.ird-auth {
  min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr);
  background: var(--ground);
}
@media (min-width: 1024px) { .ird-auth { grid-template-columns: minmax(360px, 5fr) minmax(0, 7fr); } }
/* Identity only: the logo, the name and the tagline on the white menu ground. */
.ird-auth__brand {
  display: none; flex-direction: column; justify-content: center; gap: var(--s-8);
  padding: var(--s-10) var(--s-10) var(--s-8);
  background: var(--rail); color: var(--ink); border-right: 1px solid var(--rule);
}
@media (min-width: 1024px) { .ird-auth__brand { display: flex; } }
.ird-auth__brandtop { display: flex; flex-direction: column; gap: var(--s-6); }
.ird-auth__name { font-size: 2rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; margin: 0; color: var(--ink); }
.ird-auth__tagline { margin-top: var(--s-1); font-size: var(--text-md); color: var(--ink-3); }
.ird-auth__logo { display: inline-flex; margin-bottom: var(--s-6); }
.ird-auth__logo img { display: block; height: 96px; width: auto; max-width: 280px; object-fit: contain; }
html.dark .ird-auth__logo img { background: #fff; border-radius: 50%; }
.ird-auth__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ird-auth__facts li { display: flex; align-items: center; gap: var(--s-3); font-size: var(--text-sm); color: var(--ink-2); }
.ird-auth__facts .material-symbols-outlined { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-size: 20px; background: var(--navy-50); color: var(--navy-ink); }
.ird-auth__main { display: flex; flex-direction: column; min-width: 0; }
.ird-auth__mobilebar {
  display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4);
  background: color-mix(in srgb, var(--ground) 94%, transparent); color: var(--ink); border-bottom: 1px solid var(--rule);
}
@media (min-width: 1024px) { .ird-auth__mobilebar { display: none; } }
.ird-auth__mobilebar .ird-rail__logo img { height: 36px; }
.ird-auth__mobilebar strong { font-size: var(--text-md); line-height: 1.2; overflow-wrap: anywhere; }
.ird-auth__mobilebar small { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); }
.ird-auth__center { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: var(--s-8) var(--s-4); }
.ird-auth__card {
  width: 100%; max-width: 440px; padding: var(--s-8) var(--s-8) var(--s-7);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
}
body[data-color-mode="contrast"] .ird-auth__card { border: 2px solid #000; }
@media (max-width: 479.98px) { .ird-auth__card { padding: var(--s-6) var(--s-5); } }
.ird-auth__title { font-size: var(--text-2xl); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
.ird-auth__lede { margin: var(--s-1) 0 var(--s-6); color: var(--ink-3); font-size: 14.5px; }
.ird-auth__stack > * + * { margin-top: var(--s-5); }
.ird-auth__foot { padding: var(--s-4) var(--s-5) var(--s-6); text-align: center; font-size: var(--text-xs); color: var(--ink-3); overflow-wrap: anywhere; }
.ird-auth__foot a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.ird-auth__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; }
.ird-auth__back { display: inline-flex; align-items: center; gap: 4px; min-height: var(--target); font-size: var(--text-sm); font-weight: 600; color: var(--navy-ink); text-decoration: none; }
.ird-auth__back:hover { text-decoration: underline; text-underline-offset: 3px; }
.ird-auth__back .material-symbols-outlined { font-size: 18px; }
.ird-auth__note { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--rule); font-size: var(--text-xs); color: var(--ink-3); }

/* ------------------------------------------------------------ dashboard -- */
.ird-dash-page { display: flex; flex-direction: column; gap: var(--s-7); }
.ird-dash-page > .ird-page-head { margin-bottom: 0; --head-gap: var(--s-7); }
/* What waits on you: equal cards, each a link to its queue. White cards with
   a step more shadow, the work colour only on the icon tile. */
.ird-wait-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 18px; }
/* From 1024px: three across, so five or six cards make two even rows; four
   across for exactly four, and for seven or eight. */
@media (min-width: 1024px) {
  .ird-wait-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ird-wait-grid:has(> :nth-child(4):last-child),
  .ird-wait-grid:has(> :nth-child(7)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.ird-wait-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px 20px 18px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  color: var(--ink); text-decoration: none;
  transition: transform 180ms var(--ease-out), box-shadow 180ms ease, border-color 180ms ease;
}
.ird-wait-card:hover { transform: translateY(-2px); border-color: var(--hue-ink, var(--navy-200)); box-shadow: var(--shadow-pop); }
.ird-wait-card:active { transform: translateY(0); }
.ird-wait-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
/* The count takes its card's work ink; orange stays the section's waiting marker. */
.ird-wait-card__num { font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--hue-ink, var(--navy-ink)); font-variant-numeric: tabular-nums; }
.ird-wait-card__label { margin: 0; font-size: var(--text-base); font-weight: 600; color: var(--ink); line-height: 1.35; }
.ird-wait-card__desc { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-3); }
.ird-wait-card__cta { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--navy-ink); font-weight: 600; font-size: var(--text-sm); }
.ird-wait-card__cta .material-symbols-outlined { font-size: 20px; transition: transform 180ms ease; }
.ird-wait-card:hover .ird-wait-card__cta .material-symbols-outlined { transform: translateX(3px); }
body[data-color-mode="contrast"] .ird-wait-card { border: 2px solid #000; }
body[data-color-mode="contrast"] .ird-wait-card__cta { text-decoration: underline; }
.ird-wait-none { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-1); color: var(--ink-2); }
@media (max-width: 639.98px) {
  .ird-wait-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ird-wait-card { padding: 16px 14px 14px; gap: 10px; }
  .ird-wait-card__num { font-size: 2.125rem; }
  .ird-wait-card__label { font-size: 14.5px; line-height: 1.3; }
  .ird-wait-card__desc { font-size: 13px; }
  .ird-wait-card__cta { font-size: 13px; min-height: 32px; }
}

.ird-dash { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1240px) { .ird-dash { grid-template-columns: minmax(0, 1fr) 340px; } }
.ird-dash__side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
/* Office totals: a tile, the label, the number in brand ink. */
.ird-totals { list-style: none; margin: 0; padding: 0 22px 10px; }
.ird-totals li { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.ird-totals li + li { border-top: 1px solid var(--rule); }
.ird-totals__label { flex: 1 1 auto; min-width: 0; font-size: 14.5px; color: var(--ink-2); }
.ird-totals__label a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); }
.ird-totals__label a:hover { color: var(--ink); text-decoration-color: currentColor; }
.ird-totals__hint { display: block; font-size: 13px; color: var(--ink-3); }
.ird-totals__hint a { color: var(--navy-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ird-totals__value { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; color: var(--hue-ink, var(--navy-ink)); font-variant-numeric: tabular-nums; }
@media (max-width: 639.98px) { .ird-totals { padding: 0 16px 6px; } }
/* Go to. The plain list: rows with a rule between, for a panel or the
   phone app. The dashboard's form (--cards): one card per page. */
.ird-goto { list-style: none; margin: 0; padding: 0; }
.ird-goto li { min-width: 0; }
.ird-goto:not(.ird-goto--cards) li + li { border-top: 1px solid var(--rule); }
.ird-goto a { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 12px 20px; color: var(--ink); text-decoration: none; }
.ird-goto:not(.ird-goto--cards) a:hover { background: var(--surface-hover); }
.ird-goto:not(.ird-goto--cards) a > .material-symbols-outlined { font-size: 20px; color: var(--ink-2); margin-top: 1px; flex: none; }
.ird-goto a:hover .ird-goto__title { text-decoration: underline; text-underline-offset: 3px; }
.ird-goto a > .ird-goto__title, .ird-goto__body { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.ird-goto__title { display: block; font-weight: 600; font-size: 14.5px; }
.ird-goto__text { display: block; font-size: 13px; color: var(--ink-3); margin-top: 1px; }
.ird-goto__metric { display: block; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ird-goto--cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1239.98px) { .ird-goto--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639.98px) { .ird-goto--cards { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.ird-goto--cards a {
  align-items: center; gap: 14px; height: 100%; min-height: 64px; padding: 16px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-ctl); box-shadow: var(--shadow-1);
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease, transform var(--t-fast) ease;
}
.ird-goto--cards a:hover { border-color: var(--hue-ink, var(--navy-200)); box-shadow: var(--shadow-2); transform: translateY(-1px); }
body[data-color-mode="contrast"] .ird-goto--cards a { border: 2px solid #000; }
.ird-goto--cards .ird-goto__metric + .ird-goto__text { display: none; }
.ird-dash-phone-search { display: none; }
@media (max-width: 767.98px) {
  .ird-dash-phone-search { display: flex; gap: var(--s-2); margin-top: calc(-1 * var(--s-3)); }
  .ird-dash-phone-search .ird-with-icon { flex: 1 1 auto; min-width: 0; }
}
.ird-goto__chev { flex: none; margin-left: auto; color: var(--ink-3); font-size: 20px; }
.ird-search-results h3 { display: flex; align-items: baseline; gap: var(--s-3); padding: var(--s-4) 22px var(--s-2); margin: 0; font-size: var(--text-base); font-weight: 600; }
.ird-search-results h3 a { margin-left: auto; font-size: var(--text-sm); }
.ird-search-results section + section { border-top: 1px solid var(--rule); }

/* Phones and tablets: every stand-alone link and button is at least 44px tall. */
@media (pointer: coarse), (max-width: 1023.98px) {
  .ird-footer a, .ird-auth__foot a, .ird-panel__head .ird-link, .ird-figures dt a,
  .ird-lede > .ird-link, .ird-stats a, .ird-totals__hint a, .ird-totals__label a {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  .ird-waiting a { min-height: 44px; }
  .ird-record__ref button { min-height: 44px; line-height: 44px; }
  .ird-record__hits a { min-height: 44px; min-width: 44px; justify-content: center; }
}
/* Kept for pages that still use them. */
.ird-figures { display: grid; grid-template-columns: minmax(0, 1fr) auto; margin: 0; }
.ird-figures dt, .ird-figures dd { padding: var(--s-3) 0; border-top: 1px solid var(--rule); margin: 0; }
.ird-figures dt:first-of-type, .ird-figures dd:first-of-type { border-top: 0; }
.ird-figures dt { font-weight: 500; color: var(--ink-2); }
.ird-figures dt small { display: block; font-weight: 400; font-size: var(--text-xs); color: var(--ink-3); }
.ird-figures dd { text-align: right; font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; color: var(--hue-ink, var(--navy-ink)); }
.ird-figures dt:has(> .ird-tile) { display: flex; align-items: center; gap: 12px; }
.ird-figures dd[data-hue] { display: flex; align-items: center; justify-content: flex-end; }

/* -------------------------------------------------------------- motion --- */
@media (prefers-reduced-motion: reduce) {
  .app-sidebar.ird-rail, .ird-rail__link, .app-main, .app-fixed-bar, .mobile-overlay, .ird-btn, .ird-input, .ird-select, .ird-record, .ird-toast, .ird-disclose__chev, .ird-drop, .ird-wait-card, .ird-goto a, .ird-iconbtn, .ird-wait-card__cta .material-symbols-outlined { transition: none !important; }
  .ird-popover { animation: none; }
  .ird-skeleton { animation: none; }
  .ird-btn:active:not(:disabled), .ird-wait-card:hover, .ird-goto a:hover { transform: none; }
}
@media (prefers-reduced-transparency: reduce) { .mobile-overlay { background: rgb(13 16 41 / 0.85); } }

/* --------------------------------------------- pages not yet redesigned --
   They keep their own Tailwind markup; these lines make their cards and
   text sit on the shell's ground in each mode, in the same card language. */
.ird-content :where(.bg-white) { background-color: var(--surface); }
.ird-content :where(.bg-slate-50, .bg-gray-50) { background-color: var(--surface-2); }
.ird-content :where(.border-slate-200, .border-gray-200, .border-slate-100) { border-color: var(--rule); }
.ird-content :where(.rounded-xl.border, .rounded-2xl.border) { border-radius: var(--r-lg); }
.ird-content :where(.shadow-sm) { box-shadow: var(--shadow-1); }
.ird-content :where(.text-slate-900, .text-gray-900) { color: var(--ink); }
.ird-content :where(.text-slate-600, .text-slate-700, .text-gray-600) { color: var(--ink-2); }
.ird-content :where(.text-slate-500, .text-gray-500) { color: var(--ink-3); }
html.dark .ird-content :where(.dark\:bg-slate-900, .dark\:bg-slate-800) { background-color: var(--surface); }
html.dark .ird-content :where(.dark\:bg-slate-950, .dark\:bg-\[\#131a1f\]) { background-color: var(--ground); }
html.dark .ird-content :where(.dark\:border-slate-800, .dark\:border-slate-700) { border-color: var(--rule); }
html.dark .ird-content :where(.dark\:text-white, .dark\:text-slate-100) { color: var(--ink); }
html.dark .ird-content :where(.dark\:text-slate-400) { color: var(--ink-3); }

/* Printing a page drops the shell. */
@media print {
  .app-sidebar, .ird-header, .ird-footer, .mobile-overlay, .ird-skip, .ird-bottomnav { display: none !important; }
  .app-main { margin-left: 0 !important; width: 100% !important; max-width: 100% !important; }
}

/* ------------------------------------------------- library table card ---
   The toolbar (what is shown, and the day's figures), the header row and
   the rows, and the pages, all in one card. */
.ird-records-card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
body[data-color-mode="contrast"] .ird-records-card { border: 2px solid #000; }
body[data-color-mode="contrast"] .ird-records-card .ird-records { border: 0; }
.ird-records-card .ird-records { border: 0; box-shadow: none; border-radius: 0 0 var(--r-lg) var(--r-lg); background: transparent; }
.ird-records-card .ird-records > li:first-child .ird-record { border-radius: 0; }
.ird-records-card .ird-records__head { border-radius: 0; border-left: 0; border-right: 0; }
.ird-records-card:has(.ird-pager) .ird-records, .ird-records-card:has(.ird-pager) .ird-records > li:last-child .ird-record { border-radius: 0; }
.ird-records-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 14px 20px; }
.ird-records-count { margin: 0; font-size: var(--text-sm); color: var(--ink-3); }
.ird-records-count b { color: var(--ink); font-weight: 700; }
.ird-records-toolbar .ird-libstats { margin: 0; }
.ird-records-card > .ird-pager { margin: 0; padding: 12px 20px; border-top: 1px solid var(--rule); }
@container records (max-width: 899.98px) {
  .ird-records-toolbar { padding: 12px 16px; border-bottom: 1px solid var(--rule); }
  .ird-records-card .ird-only-wide-tile { display: none; }
  .ird-records-card > .ird-pager { padding: 10px 12px; }
}
@media (max-width: 639.98px) {
  .ird-records-toolbar .ird-libstats { display: none; }
  .ird-pager__pages a:not([rel]) , .ird-pager__gap { display: none; }
}
/* A title link in a plain activity row is the row's one way in: on touch it
   gets the full 44px. */
@media (pointer: coarse), (max-width: 1023.98px) {
  .ird-activity__row:not(.ird-activity__row--tile) a.ird-activity__title { display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; }
}
